{
  "id": "a29768a10c3cd23d87c763d525d5b1f9",
  "_format": "hh-sol-build-info-1",
  "solcVersion": "0.7.1",
  "solcLongVersion": "0.7.1+commit.f4a555be",
  "input": {
    "language": "Solidity",
    "sources": {
      "src.sol/amm/lib/helpers/AssetHelpers.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../openzeppelin/IERC20.sol\";\n\nimport \"../../vault/interfaces/IAsset.sol\";\nimport \"../../vault/interfaces/IWETH.sol\";\n\nabstract contract AssetHelpers {\n    // solhint-disable-next-line var-name-mixedcase\n    IWETH private immutable _weth;\n\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\n    // it is an address Pools cannot register as a token.\n    address private constant _ETH = address(0);\n\n    constructor(IWETH weth) {\n        _weth = weth;\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function _WETH() internal view returns (IWETH) {\n        return _weth;\n    }\n\n    /**\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\n     */\n    function _isETH(IAsset asset) internal pure returns (bool) {\n        return address(asset) == _ETH;\n    }\n\n    /**\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\n     * to the WETH contract.\n     */\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\n    }\n\n    /**\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\n     */\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\n        IERC20[] memory tokens = new IERC20[](assets.length);\n        for (uint256 i = 0; i < assets.length; ++i) {\n            tokens[i] = _translateToIERC20(assets[i]);\n        }\n        return tokens;\n    }\n\n    /**\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\n     */\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\n        return IERC20(address(asset));\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
      },
      "src.sol/amm/vault/interfaces/IAsset.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\n/**\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\n * types.\n *\n * This concept is unrelated to a Pool's Asset Managers.\n */\ninterface IAsset {\n    // solhint-disable-previous-line no-empty-blocks\n}\n"
      },
      "src.sol/amm/vault/interfaces/IWETH.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\n/**\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\n */\ninterface IWETH is IERC20 {\n    function deposit() external payable;\n\n    function withdraw(uint256 amount) external;\n}\n"
      },
      "src.sol/amm/vault/AssetTransfersHandler.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/math/Math.sol\";\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/helpers/AssetHelpers.sol\";\nimport \"../lib/openzeppelin/SafeERC20.sol\";\nimport \"../lib/openzeppelin/Address.sol\";\n\nimport \"./interfaces/IWETH.sol\";\nimport \"./interfaces/IAsset.sol\";\nimport \"./interfaces/IVault.sol\";\n\nabstract contract AssetTransfersHandler is AssetHelpers {\n    using SafeERC20 for IERC20;\n    using Address for address payable;\n\n    /**\n     * @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\n     * as possible from Internal Balance, then transfers any remaining amount.\n     *\n     * If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\n     * will be wrapped into WETH.\n     *\n     * WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\n     * caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\n     * typically doesn't hold any).\n     */\n    function _receiveAsset(\n        IAsset asset,\n        uint256 amount,\n        address sender,\n        bool fromInternalBalance\n    ) internal {\n        if (amount == 0) {\n            return;\n        }\n\n        if (_isETH(asset)) {\n            _require(!fromInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\n\n            // The ETH amount to receive is deposited into the WETH contract, which will in turn mint WETH for\n            // the Vault at a 1:1 ratio.\n\n            // A check for this condition is also introduced by the compiler, but this one provides a revert reason.\n            // Note we're checking for the Vault's total balance, *not* ETH sent in this transaction.\n            _require(address(this).balance >= amount, Errors.INSUFFICIENT_ETH);\n            _WETH().deposit{ value: amount }();\n        } else {\n            IERC20 token = _asIERC20(asset);\n\n            if (fromInternalBalance) {\n                // We take as many tokens from Internal Balance as possible: any remaining amounts will be transferred.\n                uint256 deductedBalance = _decreaseInternalBalance(sender, token, amount, true);\n                // Because `deductedBalance` will be always the lesser of the current internal balance\n                // and the amount to decrease, it is safe to perform unchecked arithmetic.\n                amount -= deductedBalance;\n            }\n\n            if (amount > 0) {\n                token.safeTransferFrom(sender, address(this), amount);\n            }\n        }\n    }\n\n    /**\n     * @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\n     * Balance instead of being transferred.\n     *\n     * If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\n     * are instead sent directly after unwrapping WETH.\n     */\n    function _sendAsset(\n        IAsset asset,\n        uint256 amount,\n        address payable recipient,\n        bool toInternalBalance\n    ) internal {\n        if (amount == 0) {\n            return;\n        }\n\n        if (_isETH(asset)) {\n            // Sending ETH is not as involved as receiving it: the only special behavior is it cannot be\n            // deposited to Internal Balance.\n            _require(!toInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\n\n            // First, the Vault withdraws deposited ETH from the WETH contract, by burning the same amount of WETH\n            // from the Vault. This receipt will be handled by the Vault's `receive`.\n            _WETH().withdraw(amount);\n\n            // Then, the withdrawn ETH is sent to the recipient.\n            recipient.sendValue(amount);\n        } else {\n            IERC20 token = _asIERC20(asset);\n            if (toInternalBalance) {\n                _increaseInternalBalance(recipient, token, amount);\n            } else {\n                token.safeTransfer(recipient, amount);\n            }\n        }\n    }\n\n    /**\n     * @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\n     * if the caller sent less ETH than `amountUsed`.\n     *\n     * Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\n     * Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\n     * not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\n     * returned ETH.\n     */\n    function _handleRemainingEth(uint256 amountUsed) internal {\n        _require(msg.value >= amountUsed, Errors.INSUFFICIENT_ETH);\n\n        uint256 excess = msg.value - amountUsed;\n        if (excess > 0) {\n            msg.sender.sendValue(excess);\n        }\n    }\n\n    /**\n     * @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\n     * caller.\n     *\n     * Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\n     * we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\n     * ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\n     * locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\n     * prevent user error.\n     */\n    receive() external payable {\n        _require(msg.sender == address(_WETH()), Errors.ETH_TRANSFER);\n    }\n\n    // This contract uses virtual internal functions instead of inheriting from the modules that implement them (in\n    // this case UserBalance) in order to decouple it from the rest of the system and enable standalone testing by\n    // implementing these with mocks.\n\n    function _increaseInternalBalance(\n        address account,\n        IERC20 token,\n        uint256 amount\n    ) internal virtual;\n\n    function _decreaseInternalBalance(\n        address account,\n        IERC20 token,\n        uint256 amount,\n        bool capped\n    ) internal virtual returns (uint256);\n}\n"
      },
      "src.sol/amm/lib/math/Math.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\n * Adapted from OpenZeppelin's SafeMath library\n */\nlibrary Math {\n    /**\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        _require(c >= a, Errors.ADD_OVERFLOW);\n        return c;\n    }\n\n    /**\n     * @dev Returns the addition of two signed integers, reverting on overflow.\n     */\n    function add(int256 a, int256 b) internal pure returns (int256) {\n        int256 c = a + b;\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\n        return c;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        _require(b <= a, Errors.SUB_OVERFLOW);\n        uint256 c = a - b;\n        return c;\n    }\n\n    /**\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\n     */\n    function sub(int256 a, int256 b) internal pure returns (int256) {\n        int256 c = a - b;\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\n        return c;\n    }\n\n    /**\n     * @dev Returns the largest of two numbers of 256 bits.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a >= b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers of 256 bits.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a * b;\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\n        return c;\n    }\n\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\n        _require(b != 0, Errors.ZERO_DIVISION);\n        return a / b;\n    }\n\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\n        _require(b != 0, Errors.ZERO_DIVISION);\n\n        if (a == 0) {\n            return 0;\n        } else {\n            return 1 + (a - 1) / b;\n        }\n    }\n}\n"
      },
      "src.sol/amm/lib/helpers/BalancerErrors.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\n// solhint-disable\n\n/**\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\n * supported.\n */\nfunction _require(bool condition, uint256 errorCode) pure {\n    if (!condition) _revert(errorCode);\n}\n\n/**\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\n */\nfunction _revert(uint256 errorCode) pure {\n    // We're going to dynamically create a revert string based on the error code, with the following format:\n    // 'BAL#{errorCode}'\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\n    //\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\n    // number (8 to 16 bits) than the individual string characters.\n    //\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\n    assembly {\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\n        // the '0' character.\n\n        let units := add(mod(errorCode, 10), 0x30)\n\n        errorCode := div(errorCode, 10)\n        let tenths := add(mod(errorCode, 10), 0x30)\n\n        errorCode := div(errorCode, 10)\n        let hundreds := add(mod(errorCode, 10), 0x30)\n\n        // With the individual characters, we can now construct the full string. The \"BAL#\" part is a known constant\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\n        // characters to it, each shifted by a multiple of 8.\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\n        // array).\n\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\n\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\n        // message will have the following layout:\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\n\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\n        // The string length is fixed: 7 characters.\n        mstore(0x24, 7)\n        // Finally, the string itself is stored.\n        mstore(0x44, revertReason)\n\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\n        revert(0, 100)\n    }\n}\n\nlibrary Errors {\n    // Math\n    uint256 internal constant ADD_OVERFLOW = 0;\n    uint256 internal constant SUB_OVERFLOW = 1;\n    uint256 internal constant SUB_UNDERFLOW = 2;\n    uint256 internal constant MUL_OVERFLOW = 3;\n    uint256 internal constant ZERO_DIVISION = 4;\n    uint256 internal constant DIV_INTERNAL = 5;\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\n    uint256 internal constant INVALID_EXPONENT = 9;\n\n    // Input\n    uint256 internal constant OUT_OF_BOUNDS = 100;\n    uint256 internal constant UNSORTED_ARRAY = 101;\n    uint256 internal constant UNSORTED_TOKENS = 102;\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\n    uint256 internal constant ZERO_TOKEN = 104;\n\n    // Shared pools\n    uint256 internal constant MIN_TOKENS = 200;\n    uint256 internal constant MAX_TOKENS = 201;\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\n    uint256 internal constant MINIMUM_BPT = 204;\n    uint256 internal constant CALLER_NOT_VAULT = 205;\n    uint256 internal constant UNINITIALIZED = 206;\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\n    uint256 internal constant EXPIRED_PERMIT = 209;\n\n    // Pools\n    uint256 internal constant MIN_AMP = 300;\n    uint256 internal constant MAX_AMP = 301;\n    uint256 internal constant MIN_WEIGHT = 302;\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\n    uint256 internal constant MAX_IN_RATIO = 304;\n    uint256 internal constant MAX_OUT_RATIO = 305;\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\n    uint256 internal constant INVALID_TOKEN = 309;\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\n    uint256 internal constant ZERO_INVARIANT = 311;\n\n    // Lib\n    uint256 internal constant REENTRANCY = 400;\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\n    uint256 internal constant PAUSED = 402;\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\n\n    // Vault\n    uint256 internal constant INVALID_POOL_ID = 500;\n    uint256 internal constant CALLER_NOT_POOL = 501;\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\n    uint256 internal constant INVALID_SIGNATURE = 504;\n    uint256 internal constant EXIT_BELOW_MIN = 505;\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\n    uint256 internal constant SWAP_LIMIT = 507;\n    uint256 internal constant SWAP_DEADLINE = 508;\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\n    uint256 internal constant INSUFFICIENT_ETH = 516;\n    uint256 internal constant UNALLOCATED_ETH = 517;\n    uint256 internal constant ETH_TRANSFER = 518;\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\n    uint256 internal constant TOKENS_MISMATCH = 520;\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\n    uint256 internal constant POOL_NO_TOKENS = 527;\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\n\n    // Fees\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/SafeERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\nimport \"./IERC20.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    function safeTransfer(\n        IERC20 token,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    function safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value\n    ) internal {\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     *\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\n     */\n    function _callOptionalReturn(address token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves.\n        (bool success, bytes memory returndata) = token.call(data);\n\n        // If the low-level call didn't succeed we return whatever was returned from it.\n        assembly {\n            if eq(success, 0) {\n                returndatacopy(0, 0, returndatasize())\n                revert(0, returndatasize())\n            }\n        }\n\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\n\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n        (bool success, ) = recipient.call{ value: amount }(\"\");\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\n    }\n}\n"
      },
      "src.sol/amm/vault/interfaces/IVault.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma experimental ABIEncoderV2;\n\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\nimport \"./IWETH.sol\";\nimport \"./IAsset.sol\";\nimport \"./IAuthorizer.sol\";\nimport \"./IFlashLoanRecipient.sol\";\nimport \"./ISignaturesValidator.sol\";\nimport \"../ProtocolFeesCollector.sol\";\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\n * don't override one of these declarations.\n */\ninterface IVault is ISignaturesValidator {\n    // Generalities about the Vault:\n    //\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\n    //\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\n    //\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\n\n    // Authorizer\n    //\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\n    // can perform a given action.\n\n    /**\n     * @dev Returns the Vault's Authorizer.\n     */\n    function getAuthorizer() external view returns (IAuthorizer);\n\n    /**\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\n     *\n     * Emits an `AuthorizerChanged` event.\n     */\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\n\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\n\n    // Relayers\n    //\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\n    // this power, two things must occur:\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\n    //    functions.\n    //  - Each user must approve the relayer to act on their behalf.\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\n\n    /**\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\n     */\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\n\n    /**\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\n     *\n     * Emits a `RelayerApprovalChanged` event.\n     */\n    function setRelayerApproval(\n        address sender,\n        address relayer,\n        bool approved\n    ) external;\n\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\n\n    // Internal Balance\n    //\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\n    //\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\n    // operations of different kinds, with different senders and recipients, at once.\n\n    /**\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\n     */\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\n\n    /**\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\n     * it lets integrators reuse a user's Vault allowance.\n     *\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\n     */\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\n\n    /**\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\n     without manual WETH wrapping or unwrapping.\n     */\n    struct UserBalanceOp {\n        UserBalanceOpKind kind;\n        IAsset asset;\n        uint256 amount;\n        address sender;\n        address payable recipient;\n    }\n\n    // There are four possible operations in `manageUserBalance`:\n    //\n    // - DEPOSIT_INTERNAL\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\n    //\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\n    // relevant for relayers).\n    //\n    // Emits an `InternalBalanceChanged` event.\n    //\n    //\n    // - WITHDRAW_INTERNAL\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\n    //\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\n    // it to the recipient as ETH.\n    //\n    // Emits an `InternalBalanceChanged` event.\n    //\n    //\n    // - TRANSFER_INTERNAL\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\n    //\n    // Reverts if the ETH sentinel value is passed.\n    //\n    // Emits an `InternalBalanceChanged` event.\n    //\n    //\n    // - TRANSFER_EXTERNAL\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\n    // relayers, as it lets them reuse a user's Vault allowance.\n    //\n    // Reverts if the ETH sentinel value is passed.\n    //\n    // Emits an `ExternalBalanceTransfer` event.\n\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\n\n    /**\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\n     * interacting with Pools using Internal Balance.\n     *\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\n     * address.\n     */\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\n\n    /**\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\n     */\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\n\n    // Pools\n    //\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\n    // functionality:\n    //\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\n    // which increase with the number of registered tokens.\n    //\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\n    // independent of the number of registered tokens.\n    //\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\n\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\n\n    /**\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\n     * changed.\n     *\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\n     *\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\n     * multiple Pools may share the same contract.\n     *\n     * Emits a `PoolRegistered` event.\n     */\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\n\n    /**\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\n     */\n    event PoolRegistered(bytes32 poolId);\n\n    /**\n     * @dev Returns a Pool's contract address and specialization setting.\n     */\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\n\n    /**\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\n     *\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\n     * exit by receiving registered tokens, and can only swap registered tokens.\n     *\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\n     * ascending order.\n     *\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\n     * Asset Manager should not be made lightly.\n     *\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\n     * different Asset Manager.\n     *\n     * Emits a `TokensRegistered` event.\n     */\n    function registerTokens(\n        bytes32 poolId,\n        IERC20[] memory tokens,\n        address[] memory assetManagers\n    ) external;\n\n    /**\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\n     */\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\n\n    /**\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\n     *\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\n     * must be deregistered in the same `deregisterTokens` call.\n     *\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\n     *\n     * Emits a `TokensDeregistered` event.\n     */\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\n\n    /**\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\n     */\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\n\n    /**\n     * @dev Returns detailed information for a Pool's registered token.\n     *\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\n     * equals the sum of `cash` and `managed`.\n     *\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\n     * `managed` or `total` balance to be greater than 2^112 - 1.\n     *\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\n     * change for this purpose, and will update `lastChangeBlock`.\n     *\n     * `assetManager` is the Pool's token Asset Manager.\n     */\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\n        external\n        view\n        returns (\n            uint256 cash,\n            uint256 managed,\n            uint256 lastChangeBlock,\n            address assetManager\n        );\n\n    /**\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\n     * the tokens' `balances` changed.\n     *\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\n     *\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\n     * order as passed to `registerTokens`.\n     *\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\n     * instead.\n     */\n    function getPoolTokens(bytes32 poolId)\n        external\n        view\n        returns (\n            IERC20[] memory tokens,\n            uint256[] memory balances,\n            uint256 lastChangeBlock\n        );\n\n    /**\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\n     * Pool shares.\n     *\n     * If the caller is not `sender`, it must be an authorized relayer for them.\n     *\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\n     * these maximums.\n     *\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\n     * back to the caller (not the sender, which is important for relayers).\n     *\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\n     *\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\n     *\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\n     * directly to the Pool's contract, as is `recipient`.\n     *\n     * Emits a `PoolBalanceChanged` event.\n     */\n    function joinPool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        JoinPoolRequest memory request\n    ) external payable;\n\n    struct JoinPoolRequest {\n        IAsset[] assets;\n        uint256[] maxAmountsIn;\n        bytes userData;\n        bool fromInternalBalance;\n    }\n\n    /**\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\n     * `getPoolTokenInfo`).\n     *\n     * If the caller is not `sender`, it must be an authorized relayer for them.\n     *\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\n     * it just enforces these minimums.\n     *\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\n     *\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\n     *\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\n     * do so will trigger a revert.\n     *\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\n     * `tokens` array. This array must match the Pool's registered tokens.\n     *\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\n     * passed directly to the Pool's contract.\n     *\n     * Emits a `PoolBalanceChanged` event.\n     */\n    function exitPool(\n        bytes32 poolId,\n        address sender,\n        address payable recipient,\n        ExitPoolRequest memory request\n    ) external;\n\n    struct ExitPoolRequest {\n        IAsset[] assets;\n        uint256[] minAmountsOut;\n        bytes userData;\n        bool toInternalBalance;\n    }\n\n    /**\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\n     */\n    event PoolBalanceChanged(\n        bytes32 indexed poolId,\n        address indexed liquidityProvider,\n        IERC20[] tokens,\n        int256[] deltas,\n        uint256[] protocolFeeAmounts\n    );\n\n    enum PoolBalanceChangeKind { JOIN, EXIT }\n\n    // Swaps\n    //\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\n    //\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\n    // individual swaps.\n    //\n    // There are two swap kinds:\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\n    //\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\n    // the final intended token.\n    //\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\n    // much less gas than they would otherwise.\n    //\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\n    // updating the Pool's internal accounting).\n    //\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\n    //\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\n    //\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\n    //\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\n\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\n\n    /**\n     * @dev Performs a swap with a single Pool.\n     *\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\n     * taken from the Pool, which must be greater than or equal to `limit`.\n     *\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\n     * sent to the Pool, which must be less than or equal to `limit`.\n     *\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\n     *\n     * Emits a `Swap` event.\n     */\n    function swap(\n        SingleSwap memory singleSwap,\n        FundManagement memory funds,\n        uint256 limit,\n        uint256 deadline\n    ) external payable returns (uint256);\n\n    /**\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\n     * the `kind` value.\n     *\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\n     *\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\n     * used to extend swap behavior.\n     */\n    struct SingleSwap {\n        bytes32 poolId;\n        SwapKind kind;\n        IAsset assetIn;\n        IAsset assetOut;\n        uint256 amount;\n        bytes userData;\n    }\n\n    /**\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\n     *\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\n     * the same index in the `assets` array.\n     *\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\n     * `amountOut` depending on the swap kind.\n     *\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\n     *\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\n     * or unwrapped from WETH by the Vault.\n     *\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\n     *\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\n     * equivalent `swap` call.\n     *\n     * Emits `Swap` events.\n     */\n    function batchSwap(\n        SwapKind kind,\n        BatchSwapStep[] memory swaps,\n        IAsset[] memory assets,\n        FundManagement memory funds,\n        int256[] memory limits,\n        uint256 deadline\n    ) external payable returns (int256[] memory);\n\n    /**\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\n     *\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\n     * from the previous swap, depending on the swap kind.\n     *\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\n     * used to extend swap behavior.\n     */\n    struct BatchSwapStep {\n        bytes32 poolId;\n        uint256 assetInIndex;\n        uint256 assetOutIndex;\n        uint256 amount;\n        bytes userData;\n    }\n\n    /**\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\n     */\n    event Swap(\n        bytes32 indexed poolId,\n        IERC20 indexed tokenIn,\n        IERC20 indexed tokenOut,\n        uint256 amountIn,\n        uint256 amountOut\n    );\n\n    /**\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\n     * `recipient` account.\n     *\n     * If the caller is not `sender`, it must be an authorized relayer for them.\n     *\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\n     * `joinPool`.\n     *\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\n     * transferred. This matches the behavior of `exitPool`.\n     *\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\n     * revert.\n     */\n    struct FundManagement {\n        address sender;\n        bool fromInternalBalance;\n        address payable recipient;\n        bool toInternalBalance;\n    }\n\n    /**\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\n     *\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\n     * receives are the same that an equivalent `batchSwap` call would receive.\n     *\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\n     * approve them for the Vault, or even know a user's address.\n     *\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\n     * eth_call instead of eth_sendTransaction.\n     */\n    function queryBatchSwap(\n        SwapKind kind,\n        BatchSwapStep[] memory swaps,\n        IAsset[] memory assets,\n        FundManagement memory funds\n    ) external returns (int256[] memory assetDeltas);\n\n    // Flash Loans\n\n    /**\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\n     *\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\n     * for each token contract. `tokens` must be sorted in ascending order.\n     *\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\n     * `receiveFlashLoan` call.\n     */\n    function flashLoan(\n        IFlashLoanRecipient recipient,\n        IERC20[] memory tokens,\n        uint256[] memory amounts,\n        bytes memory userData\n    ) external;\n\n    // Asset Management\n    //\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\n    //\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\n    //\n    // This concept is unrelated to the IAsset interface.\n\n    /**\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\n     *\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\n     * operations of different kinds, with different Pools and tokens, at once.\n     *\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\n     */\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\n\n    struct PoolBalanceOp {\n        PoolBalanceOpKind kind;\n        bytes32 poolId;\n        IERC20 token;\n        uint256 amount;\n    }\n\n    /**\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\n     *\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\n     *\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\n     */\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\n\n    /**\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\n     */\n    event PoolBalanceManaged(\n        bytes32 indexed poolId,\n        address indexed assetManager,\n        IERC20 indexed token,\n        int256 cashDelta,\n        int256 managedDelta\n    );\n\n    // Protocol Fees\n    //\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\n    // permissioned accounts.\n    //\n    // There are two kinds of protocol fees:\n    //\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\n    //\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\n    // exiting a Pool in debt without first paying their share.\n\n    /**\n     * @dev Returns the current protocol fee module.\n     */\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\n\n    /**\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\n     * error in some part of the system.\n     *\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\n     *\n     * While the contract is paused, the following features are disabled:\n     * - depositing and transferring internal balance\n     * - transferring external balance (using the Vault's allowance)\n     * - swaps\n     * - joining Pools\n     * - Asset Manager interactions\n     *\n     * Internal Balance can still be withdrawn, and Pools exited.\n     */\n    function setPaused(bool paused) external;\n\n    /**\n     * @dev Returns the Vault's WETH instance.\n     */\n    function WETH() external view returns (IWETH);\n    // solhint-disable-previous-line func-name-mixedcase\n}\n"
      },
      "src.sol/amm/vault/interfaces/IAuthorizer.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\ninterface IAuthorizer {\n    /**\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\n     */\n    function canPerform(\n        bytes32 actionId,\n        address account,\n        address where\n    ) external view returns (bool);\n}\n"
      },
      "src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\n// Inspired by Aave Protocol's IFlashLoanReceiver.\n\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\ninterface IFlashLoanRecipient {\n    /**\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\n     *\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\n     * Vault, or else the entire flash loan will revert.\n     *\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\n     */\n    function receiveFlashLoan(\n        IERC20[] memory tokens,\n        uint256[] memory amounts,\n        uint256[] memory feeAmounts,\n        bytes memory userData\n    ) external;\n}\n"
      },
      "src.sol/amm/vault/interfaces/ISignaturesValidator.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\n */\ninterface ISignaturesValidator {\n    /**\n     * @dev Returns the EIP712 domain separator.\n     */\n    function getDomainSeparator() external view returns (bytes32);\n\n    /**\n     * @dev Returns the next nonce used by an address to sign messages.\n     */\n    function getNextNonce(address user) external view returns (uint256);\n}\n"
      },
      "src.sol/amm/vault/ProtocolFeesCollector.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/helpers/InputHelpers.sol\";\nimport \"../lib/helpers/Authentication.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\nimport \"../lib/openzeppelin/SafeERC20.sol\";\n\nimport \"./interfaces/IVault.sol\";\nimport \"./interfaces/IAuthorizer.sol\";\n\n/**\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\n * Vault performs to reduce its overall bytecode size.\n *\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\n * to the Vault's own authorizer.\n */\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\n    using SafeERC20 for IERC20;\n\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\n\n    IVault public immutable vault;\n\n    // All fee percentages are 18-decimal fixed point numbers.\n\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\n    // when users join and exit them.\n    uint256 private _swapFeePercentage;\n\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\n    uint256 private _flashLoanFeePercentage;\n\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\n\n    constructor(IVault _vault)\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\n        // identifiers.\n        Authentication(bytes32(uint256(address(this))))\n    {\n        vault = _vault;\n    }\n\n    function withdrawCollectedFees(\n        IERC20[] calldata tokens,\n        uint256[] calldata amounts,\n        address recipient\n    ) external nonReentrant authenticate {\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            IERC20 token = tokens[i];\n            uint256 amount = amounts[i];\n            token.safeTransfer(recipient, amount);\n        }\n    }\n\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\n        _swapFeePercentage = newSwapFeePercentage;\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\n    }\n\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\n        _require(\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\n        );\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\n    }\n\n    function getSwapFeePercentage() external view returns (uint256) {\n        return _swapFeePercentage;\n    }\n\n    function getFlashLoanFeePercentage() external view returns (uint256) {\n        return _flashLoanFeePercentage;\n    }\n\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\n        feeAmounts = new uint256[](tokens.length);\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\n        }\n    }\n\n    function getAuthorizer() external view returns (IAuthorizer) {\n        return _getAuthorizer();\n    }\n\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\n        return _getAuthorizer().canPerform(actionId, account, address(this));\n    }\n\n    function _getAuthorizer() internal view returns (IAuthorizer) {\n        return vault.getAuthorizer();\n    }\n}\n"
      },
      "src.sol/amm/lib/helpers/InputHelpers.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../openzeppelin/IERC20.sol\";\n\nimport \"./BalancerErrors.sol\";\n\nimport \"../../vault/interfaces/IAsset.sol\";\n\nlibrary InputHelpers {\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\n    }\n\n    function ensureInputLengthMatch(\n        uint256 a,\n        uint256 b,\n        uint256 c\n    ) internal pure {\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\n    }\n\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\n        address[] memory addressArray;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            addressArray := array\n        }\n        ensureArrayIsSorted(addressArray);\n    }\n\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\n        address[] memory addressArray;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            addressArray := array\n        }\n        ensureArrayIsSorted(addressArray);\n    }\n\n    function ensureArrayIsSorted(address[] memory array) internal pure {\n        if (array.length < 2) {\n            return;\n        }\n\n        address previous = array[0];\n        for (uint256 i = 1; i < array.length; ++i) {\n            address current = array[i];\n            _require(previous < current, Errors.UNSORTED_ARRAY);\n            previous = current;\n        }\n    }\n}\n"
      },
      "src.sol/amm/lib/helpers/Authentication.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"./BalancerErrors.sol\";\nimport \"./IAuthentication.sol\";\n\n/**\n * @dev Building block for performing access control on external functions.\n *\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\n * to external functions to only make them callable by authorized accounts.\n *\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\n */\nabstract contract Authentication is IAuthentication {\n    bytes32 private immutable _actionIdDisambiguator;\n\n    /**\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\n     * multi contract systems.\n     *\n     * There are two main uses for it:\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\n     *    unique. The contract's own address is a good option.\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\n     *    shared by the entire family (and no other contract) should be used instead.\n     */\n    constructor(bytes32 actionIdDisambiguator) {\n        _actionIdDisambiguator = actionIdDisambiguator;\n    }\n\n    /**\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\n     */\n    modifier authenticate() {\n        _authenticateCaller();\n        _;\n    }\n\n    /**\n     * @dev Reverts unless the caller is allowed to call the entry point function.\n     */\n    function _authenticateCaller() internal view {\n        bytes32 actionId = getActionId(msg.sig);\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\n    }\n\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\n        // multiple contracts.\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\n    }\n\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    constructor() {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and make it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _enterNonReentrant();\n        _;\n        _exitNonReentrant();\n    }\n\n    function _enterNonReentrant() private {\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\n        _require(_status != _ENTERED, Errors.REENTRANCY);\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n    }\n\n    function _exitNonReentrant() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n}\n"
      },
      "src.sol/amm/lib/helpers/IAuthentication.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\ninterface IAuthentication {\n    /**\n     * @dev Returns the action identifier associated with the external function described by `selector`.\n     */\n    function getActionId(bytes4 selector) external view returns (bytes32);\n}\n"
      },
      "src.sol/amm/vault/Fees.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/math/FixedPoint.sol\";\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\nimport \"../lib/openzeppelin/SafeERC20.sol\";\n\nimport \"./ProtocolFeesCollector.sol\";\nimport \"./VaultAuthorization.sol\";\nimport \"./interfaces/IVault.sol\";\n\n/**\n * @dev To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the\n * ProtocolFeesCollector contract.\n */\nabstract contract Fees is IVault {\n    using SafeERC20 for IERC20;\n\n    ProtocolFeesCollector private immutable _protocolFeesCollector;\n\n    constructor() {\n        _protocolFeesCollector = new ProtocolFeesCollector(IVault(this));\n    }\n\n    function getProtocolFeesCollector() public view override returns (ProtocolFeesCollector) {\n        return _protocolFeesCollector;\n    }\n\n    /**\n     * @dev Returns the protocol swap fee percentage.\n     */\n    function _getProtocolSwapFeePercentage() internal view returns (uint256) {\n        return getProtocolFeesCollector().getSwapFeePercentage();\n    }\n\n    /**\n     * @dev Returns the protocol fee amount to charge for a flash loan of `amount`.\n     */\n    function _calculateFlashLoanFeeAmount(uint256 amount) internal view returns (uint256) {\n        // Fixed point multiplication introduces error: we round up, which means in certain scenarios the charged\n        // percentage can be slightly higher than intended.\n        uint256 percentage = getProtocolFeesCollector().getFlashLoanFeePercentage();\n        return FixedPoint.mulUp(amount, percentage);\n    }\n\n    function _payFee(IERC20 token, uint256 amount) internal {\n        if (amount > 0) {\n            token.safeTransfer(address(getProtocolFeesCollector()), amount);\n        }\n    }\n}\n"
      },
      "src.sol/amm/lib/math/FixedPoint.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"./LogExpMath.sol\";\nimport \"../helpers/BalancerErrors.sol\";\n\n/* solhint-disable private-vars-leading-underscore */\n\nlibrary FixedPoint {\n    uint256 internal constant ONE = 1e18; // 18 decimal places\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\n\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\n\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        // Fixed Point addition is the same as regular checked addition\n\n        uint256 c = a + b;\n        _require(c >= a, Errors.ADD_OVERFLOW);\n        return c;\n    }\n\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        // Fixed Point addition is the same as regular checked addition\n\n        _require(b <= a, Errors.SUB_OVERFLOW);\n        uint256 c = a - b;\n        return c;\n    }\n\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 product = a * b;\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\n\n        return product / ONE;\n    }\n\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 product = a * b;\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\n\n        if (product == 0) {\n            return 0;\n        } else {\n            // The traditional divUp formula is:\n            // divUp(x, y) := (x + y - 1) / y\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\n            // divUp(x, y) := (x - 1) / y + 1\n            // Note that this requires x != 0, which we already tested for.\n\n            return ((product - 1) / ONE) + 1;\n        }\n    }\n\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\n        _require(b != 0, Errors.ZERO_DIVISION);\n\n        if (a == 0) {\n            return 0;\n        } else {\n            uint256 aInflated = a * ONE;\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\n\n            return aInflated / b;\n        }\n    }\n\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\n        _require(b != 0, Errors.ZERO_DIVISION);\n\n        if (a == 0) {\n            return 0;\n        } else {\n            uint256 aInflated = a * ONE;\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\n\n            // The traditional divUp formula is:\n            // divUp(x, y) := (x + y - 1) / y\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\n            // divUp(x, y) := (x - 1) / y + 1\n            // Note that this requires x != 0, which we already tested for.\n\n            return ((aInflated - 1) / b) + 1;\n        }\n    }\n\n    /**\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\n     * the true value (that is, the error function expected - actual is always positive).\n     */\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\n        uint256 raw = LogExpMath.pow(x, y);\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\n\n        if (raw < maxError) {\n            return 0;\n        } else {\n            return sub(raw, maxError);\n        }\n    }\n\n    /**\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\n     * the true value (that is, the error function expected - actual is always negative).\n     */\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\n        uint256 raw = LogExpMath.pow(x, y);\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\n\n        return add(raw, maxError);\n    }\n\n    /**\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\n     *\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\n     * prevents intermediate negative values.\n     */\n    function complement(uint256 x) internal pure returns (uint256) {\n        return (x < ONE) ? (ONE - x) : 0;\n    }\n}\n"
      },
      "src.sol/amm/vault/VaultAuthorization.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/helpers/Authentication.sol\";\nimport \"../lib/helpers/TemporarilyPausable.sol\";\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/helpers/SignaturesValidator.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\n\nimport \"./interfaces/IVault.sol\";\nimport \"./interfaces/IAuthorizer.sol\";\n\n/**\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\n *\n * Additionally handles relayer access and approval.\n */\nabstract contract VaultAuthorization is\n    IVault,\n    ReentrancyGuard,\n    Authentication,\n    SignaturesValidator,\n    TemporarilyPausable\n{\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\n\n    // _JOIN_TYPE_HASH = keccak256(\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\");\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\n\n    // _EXIT_TYPE_HASH = keccak256(\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\");\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\n\n    // _SWAP_TYPE_HASH = keccak256(\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\");\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\n\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\");\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\n\n    // _SET_RELAYER_TYPE_HASH =\n    //     keccak256(\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\");\n    bytes32\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\n\n    IAuthorizer private _authorizer;\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\n\n    /**\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\n     * is, it is a relayer for that function), and either:\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\n     *  b) a valid signature from them was appended to the calldata.\n     *\n     * Should only be applied to external functions.\n     */\n    modifier authenticateFor(address user) {\n        _authenticateFor(user);\n        _;\n    }\n\n    constructor(IAuthorizer authorizer)\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\n        Authentication(bytes32(uint256(address(this))))\n        SignaturesValidator(\"Balancer V2 Vault\")\n    {\n        _authorizer = authorizer;\n    }\n\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\n        _authorizer = newAuthorizer;\n    }\n\n    function getAuthorizer() external view override returns (IAuthorizer) {\n        return _authorizer;\n    }\n\n    function setRelayerApproval(\n        address sender,\n        address relayer,\n        bool approved\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\n        _approvedRelayers[sender][relayer] = approved;\n        emit RelayerApprovalChanged(relayer, sender, approved);\n    }\n\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\n        return _hasApprovedRelayer(user, relayer);\n    }\n\n    /**\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\n     * function (that is, it is a relayer for that function) and either:\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\n     *  b) a valid signature from them was appended to the calldata.\n     */\n    function _authenticateFor(address user) internal {\n        if (msg.sender != user) {\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\n            _authenticateCaller();\n\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\n            if (!_hasApprovedRelayer(user, msg.sender)) {\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\n            }\n        }\n    }\n\n    /**\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\n     */\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\n        return _approvedRelayers[user][relayer];\n    }\n\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\n        // Access control is delegated to the Authorizer.\n        return _authorizer.canPerform(actionId, user, address(this));\n    }\n\n    function _typeHash() internal pure override returns (bytes32 hash) {\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\n        // assembly implementation results in much denser bytecode.\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\n            // 4 bytes.\n            let selector := shr(224, calldataload(0))\n\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\n            // resulting in dense bytecode (PUSH4 opcodes).\n            switch selector\n                case 0xb95cac28 {\n                    hash := _JOIN_TYPE_HASH\n                }\n                case 0x8bdb3913 {\n                    hash := _EXIT_TYPE_HASH\n                }\n                case 0x52bbbe29 {\n                    hash := _SWAP_TYPE_HASH\n                }\n                case 0x945bcec9 {\n                    hash := _BATCH_SWAP_TYPE_HASH\n                }\n                case 0xfa6e671d {\n                    hash := _SET_RELAYER_TYPE_HASH\n                }\n                default {\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\n                }\n        }\n    }\n}\n"
      },
      "src.sol/amm/lib/math/LogExpMath.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General internal License for more details.\n\n// You should have received a copy of the GNU General internal License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\n/* solhint-disable */\n\n/**\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\n *\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\n * exponentiation and logarithm (where the base is Euler's number).\n *\n * @author Fernando Martinelli - @fernandomartinelli\n * @author Sergio Yuhjtman - @sergioyuhjtman\n * @author Daniel Fernandez - @dmf7z\n */\nlibrary LogExpMath {\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\n    // two numbers, and multiply by ONE when dividing them.\n\n    // All arguments and return values are 18 decimal fixed point numbers.\n    int256 constant ONE_18 = 1e18;\n\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\n    // case of ln36, 36 decimals.\n    int256 constant ONE_20 = 1e20;\n    int256 constant ONE_36 = 1e36;\n\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\n    //\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\n    // The smallest possible result is 10^(-18), which makes largest negative argument\n    // ln(10^(-18)) = -41.446531673892822312.\n    // We use 130.0 and -41.0 to have some safety margin.\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\n\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\n    // 256 bit integer.\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\n\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\n\n    // 18 decimal constants\n    int256 constant x0 = 128000000000000000000; // 2ˆ7\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // eˆ(x0) (no decimals)\n    int256 constant x1 = 64000000000000000000; // 2ˆ6\n    int256 constant a1 = 6235149080811616882910000000; // eˆ(x1) (no decimals)\n\n    // 20 decimal constants\n    int256 constant x2 = 3200000000000000000000; // 2ˆ5\n    int256 constant a2 = 7896296018268069516100000000000000; // eˆ(x2)\n    int256 constant x3 = 1600000000000000000000; // 2ˆ4\n    int256 constant a3 = 888611052050787263676000000; // eˆ(x3)\n    int256 constant x4 = 800000000000000000000; // 2ˆ3\n    int256 constant a4 = 298095798704172827474000; // eˆ(x4)\n    int256 constant x5 = 400000000000000000000; // 2ˆ2\n    int256 constant a5 = 5459815003314423907810; // eˆ(x5)\n    int256 constant x6 = 200000000000000000000; // 2ˆ1\n    int256 constant a6 = 738905609893065022723; // eˆ(x6)\n    int256 constant x7 = 100000000000000000000; // 2ˆ0\n    int256 constant a7 = 271828182845904523536; // eˆ(x7)\n    int256 constant x8 = 50000000000000000000; // 2ˆ-1\n    int256 constant a8 = 164872127070012814685; // eˆ(x8)\n    int256 constant x9 = 25000000000000000000; // 2ˆ-2\n    int256 constant a9 = 128402541668774148407; // eˆ(x9)\n    int256 constant x10 = 12500000000000000000; // 2ˆ-3\n    int256 constant a10 = 113314845306682631683; // eˆ(x10)\n    int256 constant x11 = 6250000000000000000; // 2ˆ-4\n    int256 constant a11 = 106449445891785942956; // eˆ(x11)\n\n    /**\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\n     *\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\n     */\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\n        if (y == 0) {\n            // We solve the 0^0 indetermination by making it equal one.\n            return uint256(ONE_18);\n        }\n\n        if (x == 0) {\n            return 0;\n        }\n\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\n        // x^y = exp(y * ln(x)).\n\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\n        int256 x_int256 = int256(x);\n\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\n\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\n        int256 y_int256 = int256(y);\n\n        int256 logx_times_y;\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\n            int256 ln_36_x = ln_36(x_int256);\n\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\n            // (downscaled) last 18 decimals.\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\n        } else {\n            logx_times_y = ln(x_int256) * y_int256;\n        }\n        logx_times_y /= ONE_18;\n\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\n        _require(\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\n            Errors.PRODUCT_OUT_OF_BOUNDS\n        );\n\n        return uint256(exp(logx_times_y));\n    }\n\n    /**\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\n     *\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\n     */\n    function exp(int256 x) internal pure returns (int256) {\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\n\n        if (x < 0) {\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\n            // Fixed point division requires multiplying by ONE_18.\n            return ((ONE_18 * ONE_18) / exp(-x));\n        }\n\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\n        // decomposition.\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\n        // decomposition, which will be lower than the smallest x_n.\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\n\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\n        // decomposition.\n\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\n        // it and compute the accumulated product.\n\n        int256 firstAN;\n        if (x >= x0) {\n            x -= x0;\n            firstAN = a0;\n        } else if (x >= x1) {\n            x -= x1;\n            firstAN = a1;\n        } else {\n            firstAN = 1; // One with no decimal places\n        }\n\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\n        // smaller terms.\n        x *= 100;\n\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\n        int256 product = ONE_20;\n\n        if (x >= x2) {\n            x -= x2;\n            product = (product * a2) / ONE_20;\n        }\n        if (x >= x3) {\n            x -= x3;\n            product = (product * a3) / ONE_20;\n        }\n        if (x >= x4) {\n            x -= x4;\n            product = (product * a4) / ONE_20;\n        }\n        if (x >= x5) {\n            x -= x5;\n            product = (product * a5) / ONE_20;\n        }\n        if (x >= x6) {\n            x -= x6;\n            product = (product * a6) / ONE_20;\n        }\n        if (x >= x7) {\n            x -= x7;\n            product = (product * a7) / ONE_20;\n        }\n        if (x >= x8) {\n            x -= x8;\n            product = (product * a8) / ONE_20;\n        }\n        if (x >= x9) {\n            x -= x9;\n            product = (product * a9) / ONE_20;\n        }\n\n        // x10 and x11 are unnecessary here since we have high enough precision already.\n\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\n\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\n\n        // The first term is simply x.\n        term = x;\n        seriesSum += term;\n\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\n\n        term = ((term * x) / ONE_20) / 2;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 3;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 4;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 5;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 6;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 7;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 8;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 9;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 10;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 11;\n        seriesSum += term;\n\n        term = ((term * x) / ONE_20) / 12;\n        seriesSum += term;\n\n        // 12 Taylor terms are sufficient for 18 decimal precision.\n\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\n        // and then drop two digits to return an 18 decimal value.\n\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\n    }\n\n    /**\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\n     */\n    function ln(int256 a) internal pure returns (int256) {\n        // The real natural logarithm is not defined for negative numbers or zero.\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\n\n        if (a < ONE_18) {\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\n            // Fixed point division requires multiplying by ONE_18.\n            return (-ln((ONE_18 * ONE_18) / a));\n        }\n\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\n        // decomposition, which will be lower than the smallest a_n.\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\n\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\n        // ONE_18 to convert them to fixed point.\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\n        // by it and compute the accumulated sum.\n\n        int256 sum = 0;\n        if (a >= a0 * ONE_18) {\n            a /= a0; // Integer, not fixed point division\n            sum += x0;\n        }\n\n        if (a >= a1 * ONE_18) {\n            a /= a1; // Integer, not fixed point division\n            sum += x1;\n        }\n\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\n        sum *= 100;\n        a *= 100;\n\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\n\n        if (a >= a2) {\n            a = (a * ONE_20) / a2;\n            sum += x2;\n        }\n\n        if (a >= a3) {\n            a = (a * ONE_20) / a3;\n            sum += x3;\n        }\n\n        if (a >= a4) {\n            a = (a * ONE_20) / a4;\n            sum += x4;\n        }\n\n        if (a >= a5) {\n            a = (a * ONE_20) / a5;\n            sum += x5;\n        }\n\n        if (a >= a6) {\n            a = (a * ONE_20) / a6;\n            sum += x6;\n        }\n\n        if (a >= a7) {\n            a = (a * ONE_20) / a7;\n            sum += x7;\n        }\n\n        if (a >= a8) {\n            a = (a * ONE_20) / a8;\n            sum += x8;\n        }\n\n        if (a >= a9) {\n            a = (a * ONE_20) / a9;\n            sum += x9;\n        }\n\n        if (a >= a10) {\n            a = (a * ONE_20) / a10;\n            sum += x10;\n        }\n\n        if (a >= a11) {\n            a = (a * ONE_20) / a11;\n            sum += x11;\n        }\n\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\n        // Let z = (a - 1) / (a + 1).\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\n\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\n        // division by ONE_20.\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\n        int256 z_squared = (z * z) / ONE_20;\n\n        // num is the numerator of the series: the z^(2 * n + 1) term\n        int256 num = z;\n\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\n        int256 seriesSum = num;\n\n        // In each step, the numerator is multiplied by z^2\n        num = (num * z_squared) / ONE_20;\n        seriesSum += num / 3;\n\n        num = (num * z_squared) / ONE_20;\n        seriesSum += num / 5;\n\n        num = (num * z_squared) / ONE_20;\n        seriesSum += num / 7;\n\n        num = (num * z_squared) / ONE_20;\n        seriesSum += num / 9;\n\n        num = (num * z_squared) / ONE_20;\n        seriesSum += num / 11;\n\n        // 6 Taylor terms are sufficient for 36 decimal precision.\n\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\n        seriesSum *= 2;\n\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\n        // value.\n\n        return (sum + seriesSum) / 100;\n    }\n\n    /**\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\n     */\n    function log(int256 arg, int256 base) internal pure returns (int256) {\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\n\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\n        // upscaling.\n\n        int256 logBase;\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\n            logBase = ln_36(base);\n        } else {\n            logBase = ln(base) * ONE_18;\n        }\n\n        int256 logArg;\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\n            logArg = ln_36(arg);\n        } else {\n            logArg = ln(arg) * ONE_18;\n        }\n\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\n        return (logArg * ONE_18) / logBase;\n    }\n\n    /**\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\n     * for x close to one.\n     *\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\n     */\n    function ln_36(int256 x) private pure returns (int256) {\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\n        // worthwhile.\n\n        // First, we transform x to a 36 digit fixed point value.\n        x *= ONE_18;\n\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\n\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\n        // division by ONE_36.\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\n        int256 z_squared = (z * z) / ONE_36;\n\n        // num is the numerator of the series: the z^(2 * n + 1) term\n        int256 num = z;\n\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\n        int256 seriesSum = num;\n\n        // In each step, the numerator is multiplied by z^2\n        num = (num * z_squared) / ONE_36;\n        seriesSum += num / 3;\n\n        num = (num * z_squared) / ONE_36;\n        seriesSum += num / 5;\n\n        num = (num * z_squared) / ONE_36;\n        seriesSum += num / 7;\n\n        num = (num * z_squared) / ONE_36;\n        seriesSum += num / 9;\n\n        num = (num * z_squared) / ONE_36;\n        seriesSum += num / 11;\n\n        num = (num * z_squared) / ONE_36;\n        seriesSum += num / 13;\n\n        num = (num * z_squared) / ONE_36;\n        seriesSum += num / 15;\n\n        // 8 Taylor terms are sufficient for 36 decimal precision.\n\n        // All that remains is multiplying by 2 (non fixed point).\n        return seriesSum * 2;\n    }\n}\n"
      },
      "src.sol/amm/lib/helpers/TemporarilyPausable.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"./BalancerErrors.sol\";\n\n/**\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\n * used as an emergency switch in case a security vulnerability or threat is identified.\n *\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\n * analysis later determines there was a false alarm.\n *\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\n *\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\n * irreversible.\n */\nabstract contract TemporarilyPausable {\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\n    // solhint-disable not-rely-on-time\n\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\n\n    uint256 private immutable _pauseWindowEndTime;\n    uint256 private immutable _bufferPeriodEndTime;\n\n    bool private _paused;\n\n    event PausedStateChanged(bool paused);\n\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\n\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\n\n        _pauseWindowEndTime = pauseWindowEndTime;\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\n    }\n\n    /**\n     * @dev Reverts if the contract is paused.\n     */\n    modifier whenNotPaused() {\n        _ensureNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\n     * Period.\n     */\n    function getPausedState()\n        external\n        view\n        returns (\n            bool paused,\n            uint256 pauseWindowEndTime,\n            uint256 bufferPeriodEndTime\n        )\n    {\n        paused = !_isNotPaused();\n        pauseWindowEndTime = _getPauseWindowEndTime();\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\n    }\n\n    /**\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\n     * unpaused until the end of the Buffer Period.\n     *\n     * Once the Buffer Period expires, this function reverts unconditionally.\n     */\n    function _setPaused(bool paused) internal {\n        if (paused) {\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\n        } else {\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\n        }\n\n        _paused = paused;\n        emit PausedStateChanged(paused);\n    }\n\n    /**\n     * @dev Reverts if the contract is paused.\n     */\n    function _ensureNotPaused() internal view {\n        _require(_isNotPaused(), Errors.PAUSED);\n    }\n\n    /**\n     * @dev Returns true if the contract is unpaused.\n     *\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\n     * longer accessed.\n     */\n    function _isNotPaused() internal view returns (bool) {\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\n    }\n\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\n\n    function _getPauseWindowEndTime() private view returns (uint256) {\n        return _pauseWindowEndTime;\n    }\n\n    function _getBufferPeriodEndTime() private view returns (uint256) {\n        return _bufferPeriodEndTime;\n    }\n}\n"
      },
      "src.sol/amm/lib/helpers/SignaturesValidator.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"./BalancerErrors.sol\";\n\nimport \"../openzeppelin/EIP712.sol\";\nimport \"../../vault/interfaces/ISignaturesValidator.sol\";\n\n/**\n * @dev Utility for signing Solidity function calls.\n *\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\n *\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\n */\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\n    // for each of these values, even if 'v' is typically an 8 bit value.\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\n\n    // Replay attack prevention for each user.\n    mapping(address => uint256) internal _nextNonce;\n\n    constructor(string memory name) EIP712(name, \"1\") {\n        // solhint-disable-previous-line no-empty-blocks\n    }\n\n    function getDomainSeparator() external view override returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n\n    function getNextNonce(address user) external view override returns (uint256) {\n        return _nextNonce[user];\n    }\n\n    /**\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\n     */\n    function _validateSignature(address user, uint256 errorCode) internal {\n        uint256 nextNonce = _nextNonce[user]++;\n        _require(_isSignatureValid(user, nextNonce), errorCode);\n    }\n\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\n        uint256 deadline = _deadline();\n\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\n        // solhint-disable-next-line not-rely-on-time\n        if (deadline < block.timestamp) {\n            return false;\n        }\n\n        bytes32 typeHash = _typeHash();\n        if (typeHash == bytes32(0)) {\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\n            return false;\n        }\n\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\n        bytes32 digest = _hashTypedDataV4(structHash);\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\n\n        address recoveredAddress = ecrecover(digest, v, r, s);\n\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\n        return recoveredAddress != address(0) && recoveredAddress == user;\n    }\n\n    /**\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\n     * selector (available as `msg.sig`).\n     *\n     * The typehash must conform to the following format:\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\n     *\n     * If 0x00, all signatures will be considered invalid.\n     */\n    function _typeHash() internal view virtual returns (bytes32);\n\n    /**\n     * @dev Extracts the signature deadline from extra calldata.\n     *\n     * This function returns bogus data if no signature is included.\n     */\n    function _deadline() internal pure returns (uint256) {\n        // The deadline is the first extra argument at the end of the original calldata.\n        return uint256(_decodeExtraCalldataWord(0));\n    }\n\n    /**\n     * @dev Extracts the signature parameters from extra calldata.\n     *\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\n     * be considered a valid signature in the first place.\n     */\n    function _signature()\n        internal\n        pure\n        returns (\n            uint8 v,\n            bytes32 r,\n            bytes32 s\n        )\n    {\n        // v, r and s are appended after the signature deadline, in that order.\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\n        r = _decodeExtraCalldataWord(0x40);\n        s = _decodeExtraCalldataWord(0x60);\n    }\n\n    /**\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\n     *\n     * This function returns bogus data if no signature is included.\n     */\n    function _calldata() internal pure returns (bytes memory result) {\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\n            // solhint-disable-next-line no-inline-assembly\n            assembly {\n                // We simply overwrite the array length with the reduced one.\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\n            }\n        }\n    }\n\n    /**\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\n     *\n     * This function returns bogus data if no signature is included.\n     */\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\n        }\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/EIP712.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n    /* solhint-disable var-name-mixedcase */\n    bytes32 private immutable _HASHED_NAME;\n    bytes32 private immutable _HASHED_VERSION;\n    bytes32 private immutable _TYPE_HASH;\n\n    /* solhint-enable var-name-mixedcase */\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    constructor(string memory name, string memory version) {\n        _HASHED_NAME = keccak256(bytes(name));\n        _HASHED_VERSION = keccak256(bytes(version));\n        _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19\\x01\", _domainSeparatorV4(), structHash));\n    }\n\n    function _getChainId() private view returns (uint256 chainId) {\n        // Silence state mutability warning without generating bytecode.\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\n        // https://github.com/ethereum/solidity/issues/2691\n        this;\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            chainId := chainid()\n        }\n    }\n}\n"
      },
      "src.sol/amm/vault/PoolBalances.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/math/Math.sol\";\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/helpers/InputHelpers.sol\";\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\nimport \"../lib/openzeppelin/SafeERC20.sol\";\n\nimport \"./Fees.sol\";\nimport \"./PoolTokens.sol\";\nimport \"./UserBalance.sol\";\nimport \"./interfaces/IBasePool.sol\";\n\n/**\n * @dev Stores the Asset Managers (by Pool and token), and implements the top level Asset Manager and Pool interfaces,\n * such as registering and deregistering tokens, joining and exiting Pools, and informational functions like `getPool`\n * and `getPoolTokens`, delegating to specialization-specific functions as needed.\n *\n * `managePoolBalance` handles all Asset Manager interactions.\n */\nabstract contract PoolBalances is Fees, ReentrancyGuard, PoolTokens, UserBalance {\n    using Math for uint256;\n    using SafeERC20 for IERC20;\n    using BalanceAllocation for bytes32;\n    using BalanceAllocation for bytes32[];\n\n    function joinPool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        JoinPoolRequest memory request\n    ) external payable override whenNotPaused {\n        // This function doesn't have the nonReentrant modifier: it is applied to `_joinOrExit` instead.\n\n        // Note that `recipient` is not actually payable in the context of a join - we cast it because we handle both\n        // joins and exits at once.\n        _joinOrExit(PoolBalanceChangeKind.JOIN, poolId, sender, payable(recipient), _toPoolBalanceChange(request));\n    }\n\n    function exitPool(\n        bytes32 poolId,\n        address sender,\n        address payable recipient,\n        ExitPoolRequest memory request\n    ) external override {\n        // This function doesn't have the nonReentrant modifier: it is applied to `_joinOrExit` instead.\n        _joinOrExit(PoolBalanceChangeKind.EXIT, poolId, sender, recipient, _toPoolBalanceChange(request));\n    }\n\n    // This has the exact same layout as JoinPoolRequest and ExitPoolRequest, except the `maxAmountsIn` and\n    // `minAmountsOut` are called `limits`. Internally we use this struct for both since these two functions are quite\n    // similar, but expose the others to callers for clarity.\n    struct PoolBalanceChange {\n        IAsset[] assets;\n        uint256[] limits;\n        bytes userData;\n        bool useInternalBalance;\n    }\n\n    /**\n     * @dev Converts a JoinPoolRequest into a PoolBalanceChange, with no runtime cost.\n     */\n    function _toPoolBalanceChange(JoinPoolRequest memory request)\n        private\n        pure\n        returns (PoolBalanceChange memory change)\n    {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            change := request\n        }\n    }\n\n    /**\n     * @dev Converts an ExitPoolRequest into a PoolBalanceChange, with no runtime cost.\n     */\n    function _toPoolBalanceChange(ExitPoolRequest memory request)\n        private\n        pure\n        returns (PoolBalanceChange memory change)\n    {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            change := request\n        }\n    }\n\n    /**\n     * @dev Implements both `joinPool` and `exitPool`, based on `kind`.\n     */\n    function _joinOrExit(\n        PoolBalanceChangeKind kind,\n        bytes32 poolId,\n        address sender,\n        address payable recipient,\n        PoolBalanceChange memory change\n    ) private nonReentrant withRegisteredPool(poolId) authenticateFor(sender) {\n        // This function uses a large number of stack variables (poolId, sender and recipient, balances, amounts, fees,\n        // etc.), which leads to 'stack too deep' issues. It relies on private functions with seemingly arbitrary\n        // interfaces to work around this limitation.\n\n        InputHelpers.ensureInputLengthMatch(change.assets.length, change.limits.length);\n\n        // We first check that the caller passed the Pool's registered tokens in the correct order, and retrieve the\n        // current balance for each.\n        IERC20[] memory tokens = _translateToIERC20(change.assets);\n        bytes32[] memory balances = _validateTokensAndGetBalances(poolId, tokens);\n\n        // The bulk of the work is done here: the corresponding Pool hook is called, its final balances are computed,\n        // assets are transferred, and fees are paid.\n        (\n            bytes32[] memory finalBalances,\n            uint256[] memory amountsInOrOut,\n            uint256[] memory paidProtocolSwapFeeAmounts\n        ) = _callPoolBalanceChange(kind, poolId, sender, recipient, change, balances);\n\n        // All that remains is storing the new Pool balances.\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            _setTwoTokenPoolCashBalances(poolId, tokens[0], finalBalances[0], tokens[1], finalBalances[1]);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            _setMinimalSwapInfoPoolBalances(poolId, tokens, finalBalances);\n        } else {\n            // PoolSpecialization.GENERAL\n            _setGeneralPoolBalances(poolId, finalBalances);\n        }\n\n        bool positive = kind == PoolBalanceChangeKind.JOIN; // Amounts in are positive, out are negative\n        emit PoolBalanceChanged(\n            poolId,\n            sender,\n            tokens,\n            // We can unsafely cast to int256 because balances are actually stored as uint112\n            _unsafeCastToInt256(amountsInOrOut, positive),\n            paidProtocolSwapFeeAmounts\n        );\n    }\n\n    /**\n     * @dev Calls the corresponding Pool hook to get the amounts in/out plus protocol fee amounts, and performs the\n     * associated token transfers and fee payments, returning the Pool's final balances.\n     */\n    function _callPoolBalanceChange(\n        PoolBalanceChangeKind kind,\n        bytes32 poolId,\n        address sender,\n        address payable recipient,\n        PoolBalanceChange memory change,\n        bytes32[] memory balances\n    )\n        private\n        returns (\n            bytes32[] memory finalBalances,\n            uint256[] memory amountsInOrOut,\n            uint256[] memory dueProtocolFeeAmounts\n        )\n    {\n        (uint256[] memory totalBalances, uint256 lastChangeBlock) = balances.totalsAndLastChangeBlock();\n\n        IBasePool pool = IBasePool(_getPoolAddress(poolId));\n        (amountsInOrOut, dueProtocolFeeAmounts) = kind == PoolBalanceChangeKind.JOIN\n            ? pool.onJoinPool(\n                poolId,\n                sender,\n                recipient,\n                totalBalances,\n                lastChangeBlock,\n                _getProtocolSwapFeePercentage(),\n                change.userData\n            )\n            : pool.onExitPool(\n                poolId,\n                sender,\n                recipient,\n                totalBalances,\n                lastChangeBlock,\n                _getProtocolSwapFeePercentage(),\n                change.userData\n            );\n\n        InputHelpers.ensureInputLengthMatch(balances.length, amountsInOrOut.length, dueProtocolFeeAmounts.length);\n\n        // The Vault ignores the `recipient` in joins and the `sender` in exits: it is up to the Pool to keep track of\n        // their participation.\n        finalBalances = kind == PoolBalanceChangeKind.JOIN\n            ? _processJoinPoolTransfers(sender, change, balances, amountsInOrOut, dueProtocolFeeAmounts)\n            : _processExitPoolTransfers(recipient, change, balances, amountsInOrOut, dueProtocolFeeAmounts);\n    }\n\n    /**\n     * @dev Transfers `amountsIn` from `sender`, checking that they are within their accepted limits, and pays\n     * accumulated protocol swap fees.\n     *\n     * Returns the Pool's final balances, which are the current balances plus `amountsIn` minus accumulated protocol\n     * swap fees.\n     */\n    function _processJoinPoolTransfers(\n        address sender,\n        PoolBalanceChange memory change,\n        bytes32[] memory balances,\n        uint256[] memory amountsIn,\n        uint256[] memory dueProtocolFeeAmounts\n    ) private returns (bytes32[] memory finalBalances) {\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\n        uint256 wrappedEth = 0;\n\n        finalBalances = new bytes32[](balances.length);\n        for (uint256 i = 0; i < change.assets.length; ++i) {\n            uint256 amountIn = amountsIn[i];\n            _require(amountIn <= change.limits[i], Errors.JOIN_ABOVE_MAX);\n\n            // Receive assets from the sender - possibly from Internal Balance.\n            IAsset asset = change.assets[i];\n            _receiveAsset(asset, amountIn, sender, change.useInternalBalance);\n\n            if (_isETH(asset)) {\n                wrappedEth = wrappedEth.add(amountIn);\n            }\n\n            uint256 feeAmount = dueProtocolFeeAmounts[i];\n            _payFee(_translateToIERC20(asset), feeAmount);\n\n            // Compute the new Pool balances. Note that the fee amount might be larger than `amountIn`,\n            // resulting in an overall decrease of the Pool's balance for a token.\n            finalBalances[i] = (amountIn >= feeAmount) // This lets us skip checked arithmetic\n                ? balances[i].increaseCash(amountIn - feeAmount)\n                : balances[i].decreaseCash(feeAmount - amountIn);\n        }\n\n        // Handle any used and remaining ETH.\n        _handleRemainingEth(wrappedEth);\n    }\n\n    /**\n     * @dev Transfers `amountsOut` to `recipient`, checking that they are within their accepted limits, and pays\n     * accumulated protocol swap fees from the Pool.\n     *\n     * Returns the Pool's final balances, which are the current `balances` minus `amountsOut` and fees paid\n     * (`dueProtocolFeeAmounts`).\n     */\n    function _processExitPoolTransfers(\n        address payable recipient,\n        PoolBalanceChange memory change,\n        bytes32[] memory balances,\n        uint256[] memory amountsOut,\n        uint256[] memory dueProtocolFeeAmounts\n    ) private returns (bytes32[] memory finalBalances) {\n        finalBalances = new bytes32[](balances.length);\n        for (uint256 i = 0; i < change.assets.length; ++i) {\n            uint256 amountOut = amountsOut[i];\n            _require(amountOut >= change.limits[i], Errors.EXIT_BELOW_MIN);\n\n            // Send tokens to the recipient - possibly to Internal Balance\n            IAsset asset = change.assets[i];\n            _sendAsset(asset, amountOut, recipient, change.useInternalBalance);\n\n            uint256 feeAmount = dueProtocolFeeAmounts[i];\n            _payFee(_translateToIERC20(asset), feeAmount);\n\n            // Compute the new Pool balances. A Pool's token balance always decreases after an exit (potentially by 0).\n            finalBalances[i] = balances[i].decreaseCash(amountOut.add(feeAmount));\n        }\n    }\n\n    /**\n     * @dev Returns the total balance for `poolId`'s `expectedTokens`.\n     *\n     * `expectedTokens` must exactly equal the token array returned by `getPoolTokens`: both arrays must have the same\n     * length, elements and order. Additionally, the Pool must have at least one registered token.\n     */\n    function _validateTokensAndGetBalances(bytes32 poolId, IERC20[] memory expectedTokens)\n        private\n        view\n        returns (bytes32[] memory)\n    {\n        (IERC20[] memory actualTokens, bytes32[] memory balances) = _getPoolTokens(poolId);\n        InputHelpers.ensureInputLengthMatch(actualTokens.length, expectedTokens.length);\n        _require(actualTokens.length > 0, Errors.POOL_NO_TOKENS);\n\n        for (uint256 i = 0; i < actualTokens.length; ++i) {\n            _require(actualTokens[i] == expectedTokens[i], Errors.TOKENS_MISMATCH);\n        }\n\n        return balances;\n    }\n\n    /**\n     * @dev Casts an array of uint256 to int256, setting the sign of the result according to the `positive` flag,\n     * without checking whether the values fit in the signed 256 bit range.\n     */\n    function _unsafeCastToInt256(uint256[] memory values, bool positive)\n        private\n        pure\n        returns (int256[] memory signedValues)\n    {\n        signedValues = new int256[](values.length);\n        for (uint256 i = 0; i < values.length; i++) {\n            signedValues[i] = positive ? int256(values[i]) : -int256(values[i]);\n        }\n    }\n}\n"
      },
      "src.sol/amm/vault/PoolTokens.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\n\nimport \"./AssetManagers.sol\";\nimport \"./PoolRegistry.sol\";\nimport \"./balances/BalanceAllocation.sol\";\n\nabstract contract PoolTokens is ReentrancyGuard, PoolRegistry, AssetManagers {\n    using BalanceAllocation for bytes32;\n    using BalanceAllocation for bytes32[];\n\n    function registerTokens(\n        bytes32 poolId,\n        IERC20[] memory tokens,\n        address[] memory assetManagers\n    ) external override nonReentrant whenNotPaused onlyPool(poolId) {\n        InputHelpers.ensureInputLengthMatch(tokens.length, assetManagers.length);\n\n        // Validates token addresses and assigns Asset Managers\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            IERC20 token = tokens[i];\n            _require(token != IERC20(0), Errors.INVALID_TOKEN);\n\n            _poolAssetManagers[poolId][token] = assetManagers[i];\n        }\n\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\n            _registerTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            _registerMinimalSwapInfoPoolTokens(poolId, tokens);\n        } else {\n            // PoolSpecialization.GENERAL\n            _registerGeneralPoolTokens(poolId, tokens);\n        }\n\n        emit TokensRegistered(poolId, tokens, assetManagers);\n    }\n\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens)\n        external\n        override\n        nonReentrant\n        whenNotPaused\n        onlyPool(poolId)\n    {\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\n            _deregisterTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            _deregisterMinimalSwapInfoPoolTokens(poolId, tokens);\n        } else {\n            // PoolSpecialization.GENERAL\n            _deregisterGeneralPoolTokens(poolId, tokens);\n        }\n\n        // The deregister calls above ensure the total token balance is zero. Therefore it is now safe to remove any\n        // associated Asset Managers, since they hold no Pool balance.\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            delete _poolAssetManagers[poolId][tokens[i]];\n        }\n\n        emit TokensDeregistered(poolId, tokens);\n    }\n\n    function getPoolTokens(bytes32 poolId)\n        external\n        view\n        override\n        withRegisteredPool(poolId)\n        returns (\n            IERC20[] memory tokens,\n            uint256[] memory balances,\n            uint256 lastChangeBlock\n        )\n    {\n        bytes32[] memory rawBalances;\n        (tokens, rawBalances) = _getPoolTokens(poolId);\n        (balances, lastChangeBlock) = rawBalances.totalsAndLastChangeBlock();\n    }\n\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\n        external\n        view\n        override\n        withRegisteredPool(poolId)\n        returns (\n            uint256 cash,\n            uint256 managed,\n            uint256 lastChangeBlock,\n            address assetManager\n        )\n    {\n        bytes32 balance;\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\n\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            balance = _getTwoTokenPoolBalance(poolId, token);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            balance = _getMinimalSwapInfoPoolBalance(poolId, token);\n        } else {\n            // PoolSpecialization.GENERAL\n            balance = _getGeneralPoolBalance(poolId, token);\n        }\n\n        cash = balance.cash();\n        managed = balance.managed();\n        lastChangeBlock = balance.lastChangeBlock();\n        assetManager = _poolAssetManagers[poolId][token];\n    }\n\n    /**\n     * @dev Returns all of `poolId`'s registered tokens, along with their raw balances.\n     */\n    function _getPoolTokens(bytes32 poolId) internal view returns (IERC20[] memory tokens, bytes32[] memory balances) {\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            return _getTwoTokenPoolTokens(poolId);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            return _getMinimalSwapInfoPoolTokens(poolId);\n        } else {\n            // PoolSpecialization.GENERAL\n            return _getGeneralPoolTokens(poolId);\n        }\n    }\n}\n"
      },
      "src.sol/amm/vault/UserBalance.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/math/Math.sol\";\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\nimport \"../lib/openzeppelin/SafeCast.sol\";\nimport \"../lib/openzeppelin/SafeERC20.sol\";\n\nimport \"./AssetTransfersHandler.sol\";\nimport \"./VaultAuthorization.sol\";\n\n/**\n * Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance.\n *\n * Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\n * transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\n * when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\n * gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\n *\n * Internal Balance management features batching, which means a single contract call can be used to perform multiple\n * operations of different kinds, with different senders and recipients, at once.\n */\nabstract contract UserBalance is ReentrancyGuard, AssetTransfersHandler, VaultAuthorization {\n    using Math for uint256;\n    using SafeCast for uint256;\n    using SafeERC20 for IERC20;\n\n    // Internal Balance for each token, for each account.\n    mapping(address => mapping(IERC20 => uint256)) private _internalTokenBalance;\n\n    function getInternalBalance(address user, IERC20[] memory tokens)\n        external\n        view\n        override\n        returns (uint256[] memory balances)\n    {\n        balances = new uint256[](tokens.length);\n        for (uint256 i = 0; i < tokens.length; i++) {\n            balances[i] = _getInternalBalance(user, tokens[i]);\n        }\n    }\n\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable override nonReentrant {\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\n        uint256 ethWrapped = 0;\n\n        // Cache for these checks so we only perform them once (if at all).\n        bool checkedCallerIsRelayer = false;\n        bool checkedNotPaused = false;\n\n        for (uint256 i = 0; i < ops.length; i++) {\n            UserBalanceOpKind kind;\n            IAsset asset;\n            uint256 amount;\n            address sender;\n            address payable recipient;\n\n            // This destructuring by calling `_validateUserBalanceOp` seems odd, but results in reduced bytecode size.\n            (kind, asset, amount, sender, recipient, checkedCallerIsRelayer) = _validateUserBalanceOp(\n                ops[i],\n                checkedCallerIsRelayer\n            );\n\n            if (kind == UserBalanceOpKind.WITHDRAW_INTERNAL) {\n                // Internal Balance withdrawals can always be performed by an authorized account.\n                _withdrawFromInternalBalance(asset, sender, recipient, amount);\n            } else {\n                // All other operations are blocked if the contract is paused.\n\n                // We cache the result of the pause check and skip it for other operations in this same transaction\n                // (if any).\n                if (!checkedNotPaused) {\n                    _ensureNotPaused();\n                    checkedNotPaused = true;\n                }\n\n                if (kind == UserBalanceOpKind.DEPOSIT_INTERNAL) {\n                    _depositToInternalBalance(asset, sender, recipient, amount);\n\n                    // Keep track of all ETH wrapped into WETH as part of a deposit.\n                    if (_isETH(asset)) {\n                        ethWrapped = ethWrapped.add(amount);\n                    }\n                } else {\n                    // Transfers don't support ETH.\n                    _require(!_isETH(asset), Errors.CANNOT_USE_ETH_SENTINEL);\n                    IERC20 token = _asIERC20(asset);\n\n                    if (kind == UserBalanceOpKind.TRANSFER_INTERNAL) {\n                        _transferInternalBalance(token, sender, recipient, amount);\n                    } else {\n                        // TRANSFER_EXTERNAL\n                        _transferToExternalBalance(token, sender, recipient, amount);\n                    }\n                }\n            }\n        }\n\n        // Handle any remaining ETH.\n        _handleRemainingEth(ethWrapped);\n    }\n\n    function _depositToInternalBalance(\n        IAsset asset,\n        address sender,\n        address recipient,\n        uint256 amount\n    ) private {\n        _increaseInternalBalance(recipient, _translateToIERC20(asset), amount);\n        _receiveAsset(asset, amount, sender, false);\n    }\n\n    function _withdrawFromInternalBalance(\n        IAsset asset,\n        address sender,\n        address payable recipient,\n        uint256 amount\n    ) private {\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\n        _decreaseInternalBalance(sender, _translateToIERC20(asset), amount, false);\n        _sendAsset(asset, amount, recipient, false);\n    }\n\n    function _transferInternalBalance(\n        IERC20 token,\n        address sender,\n        address recipient,\n        uint256 amount\n    ) private {\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\n        _decreaseInternalBalance(sender, token, amount, false);\n        _increaseInternalBalance(recipient, token, amount);\n    }\n\n    function _transferToExternalBalance(\n        IERC20 token,\n        address sender,\n        address recipient,\n        uint256 amount\n    ) private {\n        if (amount > 0) {\n            token.safeTransferFrom(sender, recipient, amount);\n            emit ExternalBalanceTransfer(token, sender, recipient, amount);\n        }\n    }\n\n    /**\n     * @dev Increases `account`'s Internal Balance for `token` by `amount`.\n     */\n    function _increaseInternalBalance(\n        address account,\n        IERC20 token,\n        uint256 amount\n    ) internal override {\n        uint256 currentBalance = _getInternalBalance(account, token);\n        uint256 newBalance = currentBalance.add(amount);\n        _setInternalBalance(account, token, newBalance, amount.toInt256());\n    }\n\n    /**\n     * @dev Decreases `account`'s Internal Balance for `token` by `amount`. If `allowPartial` is true, this function\n     * doesn't revert if `account` doesn't have enough balance, and sets it to zero and returns the deducted amount\n     * instead.\n     */\n    function _decreaseInternalBalance(\n        address account,\n        IERC20 token,\n        uint256 amount,\n        bool allowPartial\n    ) internal override returns (uint256 deducted) {\n        uint256 currentBalance = _getInternalBalance(account, token);\n        _require(allowPartial || (currentBalance >= amount), Errors.INSUFFICIENT_INTERNAL_BALANCE);\n\n        deducted = Math.min(currentBalance, amount);\n        // By construction, `deducted` is lower or equal to `currentBalance`, so we don't need to use checked\n        // arithmetic.\n        uint256 newBalance = currentBalance - deducted;\n        _setInternalBalance(account, token, newBalance, -(deducted.toInt256()));\n    }\n\n    /**\n     * @dev Sets `account`'s Internal Balance for `token` to `newBalance`.\n     *\n     * Emits an `InternalBalanceChanged` event. This event includes `delta`, which is the amount the balance increased\n     * (if positive) or decreased (if negative). To avoid reading the current balance in order to compute the delta,\n     * this function relies on the caller providing it directly.\n     */\n    function _setInternalBalance(\n        address account,\n        IERC20 token,\n        uint256 newBalance,\n        int256 delta\n    ) private {\n        _internalTokenBalance[account][token] = newBalance;\n        emit InternalBalanceChanged(account, token, delta);\n    }\n\n    /**\n     * @dev Returns `account`'s Internal Balance for `token`.\n     */\n    function _getInternalBalance(address account, IERC20 token) internal view returns (uint256) {\n        return _internalTokenBalance[account][token];\n    }\n\n    /**\n     * @dev Destructures a User Balance operation, validating that the contract caller is allowed to perform it.\n     */\n    function _validateUserBalanceOp(UserBalanceOp memory op, bool checkedCallerIsRelayer)\n        private\n        view\n        returns (\n            UserBalanceOpKind,\n            IAsset,\n            uint256,\n            address,\n            address payable,\n            bool\n        )\n    {\n        // The only argument we need to validate is `sender`, which can only be either the contract caller, or a\n        // relayer approved by `sender`.\n        address sender = op.sender;\n\n        if (sender != msg.sender) {\n            // We need to check both that the contract caller is a relayer, and that `sender` approved them.\n\n            // Because the relayer check is global (i.e. independent of `sender`), we cache that result and skip it for\n            // other operations in this same transaction (if any).\n            if (!checkedCallerIsRelayer) {\n                _authenticateCaller();\n                checkedCallerIsRelayer = true;\n            }\n\n            _require(_hasApprovedRelayer(sender, msg.sender), Errors.USER_DOESNT_ALLOW_RELAYER);\n        }\n\n        return (op.kind, op.asset, op.amount, sender, op.recipient, checkedCallerIsRelayer);\n    }\n}\n"
      },
      "src.sol/amm/vault/interfaces/IBasePool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"./IVault.sol\";\nimport \"./IPoolSwapStructs.sol\";\n\n/**\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\n * either IGeneralPool or IMinimalSwapInfoPool\n */\ninterface IBasePool is IPoolSwapStructs {\n    /**\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\n     *\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\n     *\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\n     *\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\n     * balance.\n     *\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\n     *\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\n     * state-changing operations, such as minting pool shares.\n     */\n    function onJoinPool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\n\n    /**\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\n     * `protocolSwapFeePercentage`.\n     *\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\n     *\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\n     *\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\n     * balance.\n     *\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\n     *\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\n     * state-changing operations, such as burning pool shares.\n     */\n    function onExitPool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\n}\n"
      },
      "src.sol/amm/vault/AssetManagers.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/math/Math.sol\";\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/helpers/InputHelpers.sol\";\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/openzeppelin/SafeERC20.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\n\nimport \"./UserBalance.sol\";\nimport \"./balances/BalanceAllocation.sol\";\nimport \"./balances/GeneralPoolsBalance.sol\";\nimport \"./balances/MinimalSwapInfoPoolsBalance.sol\";\nimport \"./balances/TwoTokenPoolsBalance.sol\";\n\nabstract contract AssetManagers is\n    ReentrancyGuard,\n    GeneralPoolsBalance,\n    MinimalSwapInfoPoolsBalance,\n    TwoTokenPoolsBalance\n{\n    using Math for uint256;\n    using SafeERC20 for IERC20;\n\n    // Stores the Asset Manager for each token of each Pool.\n    mapping(bytes32 => mapping(IERC20 => address)) internal _poolAssetManagers;\n\n    function managePoolBalance(PoolBalanceOp[] memory ops) external override nonReentrant whenNotPaused {\n        // This variable could be declared inside the loop, but that causes the compiler to allocate memory on each\n        // loop iteration, increasing gas costs.\n        PoolBalanceOp memory op;\n\n        for (uint256 i = 0; i < ops.length; ++i) {\n            // By indexing the array only once, we don't spend extra gas in the same bounds check.\n            op = ops[i];\n\n            bytes32 poolId = op.poolId;\n            _ensureRegisteredPool(poolId);\n\n            IERC20 token = op.token;\n            _require(_isTokenRegistered(poolId, token), Errors.TOKEN_NOT_REGISTERED);\n            _require(_poolAssetManagers[poolId][token] == msg.sender, Errors.SENDER_NOT_ASSET_MANAGER);\n\n            PoolBalanceOpKind kind = op.kind;\n            uint256 amount = op.amount;\n            (int256 cashDelta, int256 managedDelta) = _performPoolManagementOperation(kind, poolId, token, amount);\n\n            emit PoolBalanceManaged(poolId, msg.sender, token, cashDelta, managedDelta);\n        }\n    }\n\n    /**\n     * @dev Performs the `kind` Asset Manager operation on a Pool.\n     *\n     * Withdrawals will transfer `amount` tokens to the caller, deposits will transfer `amount` tokens from the caller,\n     * and updates will set the managed balance to `amount`.\n     *\n     * Returns a tuple with the 'cash' and 'managed' balance deltas as a result of this call.\n     */\n    function _performPoolManagementOperation(\n        PoolBalanceOpKind kind,\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) private returns (int256, int256) {\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\n\n        if (kind == PoolBalanceOpKind.WITHDRAW) {\n            return _withdrawPoolBalance(poolId, specialization, token, amount);\n        } else if (kind == PoolBalanceOpKind.DEPOSIT) {\n            return _depositPoolBalance(poolId, specialization, token, amount);\n        } else {\n            // PoolBalanceOpKind.UPDATE\n            return _updateManagedBalance(poolId, specialization, token, amount);\n        }\n    }\n\n    /**\n     * @dev Moves `amount` tokens from a Pool's 'cash' to 'managed' balance, and transfers them to the caller.\n     *\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\n     */\n    function _withdrawPoolBalance(\n        bytes32 poolId,\n        PoolSpecialization specialization,\n        IERC20 token,\n        uint256 amount\n    ) private returns (int256 cashDelta, int256 managedDelta) {\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            _twoTokenPoolCashToManaged(poolId, token, amount);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            _minimalSwapInfoPoolCashToManaged(poolId, token, amount);\n        } else {\n            // PoolSpecialization.GENERAL\n            _generalPoolCashToManaged(poolId, token, amount);\n        }\n\n        if (amount > 0) {\n            token.safeTransfer(msg.sender, amount);\n        }\n\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\n        // therefore always fit in a 256 bit integer.\n        cashDelta = int256(-amount);\n        managedDelta = int256(amount);\n    }\n\n    /**\n     * @dev Moves `amount` tokens from a Pool's 'managed' to 'cash' balance, and transfers them from the caller.\n     *\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\n     */\n    function _depositPoolBalance(\n        bytes32 poolId,\n        PoolSpecialization specialization,\n        IERC20 token,\n        uint256 amount\n    ) private returns (int256 cashDelta, int256 managedDelta) {\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            _twoTokenPoolManagedToCash(poolId, token, amount);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            _minimalSwapInfoPoolManagedToCash(poolId, token, amount);\n        } else {\n            // PoolSpecialization.GENERAL\n            _generalPoolManagedToCash(poolId, token, amount);\n        }\n\n        if (amount > 0) {\n            token.safeTransferFrom(msg.sender, address(this), amount);\n        }\n\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\n        // therefore always fit in a 256 bit integer.\n        cashDelta = int256(amount);\n        managedDelta = int256(-amount);\n    }\n\n    /**\n     * @dev Sets a Pool's 'managed' balance to `amount`.\n     *\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call (the 'cash' delta will always be zero).\n     */\n    function _updateManagedBalance(\n        bytes32 poolId,\n        PoolSpecialization specialization,\n        IERC20 token,\n        uint256 amount\n    ) private returns (int256 cashDelta, int256 managedDelta) {\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            managedDelta = _setTwoTokenPoolManagedBalance(poolId, token, amount);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            managedDelta = _setMinimalSwapInfoPoolManagedBalance(poolId, token, amount);\n        } else {\n            // PoolSpecialization.GENERAL\n            managedDelta = _setGeneralPoolManagedBalance(poolId, token, amount);\n        }\n\n        cashDelta = 0;\n    }\n\n    /**\n     * @dev Returns true if `token` is registered for `poolId`.\n     */\n    function _isTokenRegistered(bytes32 poolId, IERC20 token) private view returns (bool) {\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            return _isTwoTokenPoolTokenRegistered(poolId, token);\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            return _isMinimalSwapInfoPoolTokenRegistered(poolId, token);\n        } else {\n            // PoolSpecialization.GENERAL\n            return _isGeneralPoolTokenRegistered(poolId, token);\n        }\n    }\n}\n"
      },
      "src.sol/amm/vault/PoolRegistry.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\n\nimport \"./VaultAuthorization.sol\";\n\n/**\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\n * and helper functions for ensuring correct behavior when working with Pools.\n */\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\n    // types.\n    mapping(bytes32 => bool) private _isPoolRegistered;\n\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\n    uint256 private _nextPoolNonce;\n\n    /**\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\n     */\n    modifier withRegisteredPool(bytes32 poolId) {\n        _ensureRegisteredPool(poolId);\n        _;\n    }\n\n    /**\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\n     */\n    modifier onlyPool(bytes32 poolId) {\n        _ensurePoolIsSender(poolId);\n        _;\n    }\n\n    /**\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\n     */\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\n    }\n\n    /**\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\n     */\n    function _ensurePoolIsSender(bytes32 poolId) private view {\n        _ensureRegisteredPool(poolId);\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\n    }\n\n    function registerPool(PoolSpecialization specialization)\n        external\n        override\n        nonReentrant\n        whenNotPaused\n        returns (bytes32)\n    {\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\n        // 2**80 Pools, and the nonce will not overflow.\n\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\n\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\n        _isPoolRegistered[poolId] = true;\n\n        _nextPoolNonce += 1;\n\n        emit PoolRegistered(poolId);\n        return poolId;\n    }\n\n    function getPool(bytes32 poolId)\n        external\n        view\n        override\n        withRegisteredPool(poolId)\n        returns (address, PoolSpecialization)\n    {\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\n    }\n\n    /**\n     * @dev Creates a Pool ID.\n     *\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\n     *\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\n     * unique.\n     *\n     * Pool IDs have the following layout:\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\n     * MSB                                                                              LSB\n     *\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\n     * suffice. However, there's nothing else of interest to store in this extra space.\n     */\n    function _toPoolId(\n        address pool,\n        PoolSpecialization specialization,\n        uint80 nonce\n    ) internal pure returns (bytes32) {\n        bytes32 serialized;\n\n        serialized |= bytes32(uint256(nonce));\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\n\n        return serialized;\n    }\n\n    /**\n     * @dev Returns the address of a Pool's contract.\n     *\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\n     */\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\n        // since the logical shift already sets the upper bits to zero.\n        return address(uint256(poolId) >> (12 * 8));\n    }\n\n    /**\n     * @dev Returns the specialization setting of a Pool.\n     *\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\n     */\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\n\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\n        // string: we instead perform the check ourselves to help in error diagnosis.\n\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\n        // values 0, 1 and 2.\n        _require(value < 3, Errors.INVALID_POOL_ID);\n\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            specialization := value\n        }\n    }\n}\n"
      },
      "src.sol/amm/vault/balances/BalanceAllocation.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../../lib/math/Math.sol\";\n\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\n// tokens that are *not* inside of the Vault.\n//\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\n// transferring funds to and from the Asset Manager.\n//\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\n// not inside the Vault.\n//\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\n//\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\n//\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\n// packing and unpacking.\n//\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\n// associated arithmetic operations and therefore reduces the chance of misuse.\nlibrary BalanceAllocation {\n    using Math for uint256;\n\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\n\n    /**\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\n     */\n    function total(bytes32 balance) internal pure returns (uint256) {\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\n        // ensures that 'total' always fits in 112 bits.\n        return cash(balance) + managed(balance);\n    }\n\n    /**\n     * @dev Returns the amount of Pool tokens currently in the Vault.\n     */\n    function cash(bytes32 balance) internal pure returns (uint256) {\n        uint256 mask = 2**(112) - 1;\n        return uint256(balance) & mask;\n    }\n\n    /**\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\n     */\n    function managed(bytes32 balance) internal pure returns (uint256) {\n        uint256 mask = 2**(112) - 1;\n        return uint256(balance >> 112) & mask;\n    }\n\n    /**\n     * @dev Returns the last block when the total balance changed.\n     */\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\n        uint256 mask = 2**(32) - 1;\n        return uint256(balance >> 224) & mask;\n    }\n\n    /**\n     * @dev Returns the difference in 'managed' between two balances.\n     */\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\n    }\n\n    /**\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\n     * balance of *any* of them last changed.\n     */\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\n        internal\n        pure\n        returns (\n            uint256[] memory results,\n            uint256 lastChangeBlock_ // Avoid shadowing\n        )\n    {\n        results = new uint256[](balances.length);\n        lastChangeBlock_ = 0;\n\n        for (uint256 i = 0; i < results.length; i++) {\n            bytes32 balance = balances[i];\n            results[i] = total(balance);\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\n        }\n    }\n\n    /**\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\n     * with zero.\n     */\n    function isZero(bytes32 balance) internal pure returns (bool) {\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\n        uint256 mask = 2**(224) - 1;\n        return (uint256(balance) & mask) == 0;\n    }\n\n    /**\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\n     * with zero.\n     */\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\n        return !isZero(balance);\n    }\n\n    /**\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\n     *\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\n     */\n    function toBalance(\n        uint256 _cash,\n        uint256 _managed,\n        uint256 _blockNumber\n    ) internal pure returns (bytes32) {\n        uint256 _total = _cash + _managed;\n\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\n\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\n        return _pack(_cash, _managed, _blockNumber);\n    }\n\n    /**\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\n     * for Asset Manager deposits).\n     *\n     * Updates the last total balance change block, even if `amount` is zero.\n     */\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\n        uint256 newCash = cash(balance).add(amount);\n        uint256 currentManaged = managed(balance);\n        uint256 newLastChangeBlock = block.number;\n\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\n    }\n\n    /**\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\n     * (except for Asset Manager withdrawals).\n     *\n     * Updates the last total balance change block, even if `amount` is zero.\n     */\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\n        uint256 newCash = cash(balance).sub(amount);\n        uint256 currentManaged = managed(balance);\n        uint256 newLastChangeBlock = block.number;\n\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\n    }\n\n    /**\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\n     * from the Vault.\n     */\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\n        uint256 newCash = cash(balance).sub(amount);\n        uint256 newManaged = managed(balance).add(amount);\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\n\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\n    }\n\n    /**\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\n     * into the Vault.\n     */\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\n        uint256 newCash = cash(balance).add(amount);\n        uint256 newManaged = managed(balance).sub(amount);\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\n\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\n    }\n\n    /**\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\n     *\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\n     */\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\n        uint256 currentCash = cash(balance);\n        uint256 newLastChangeBlock = block.number;\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\n    }\n\n    // Alternative mode for Pools with the Two Token specialization setting\n\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\n    //\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\n    // uses the next least significant 112 bits.\n    //\n    // Because only cash is written to during a swap, we store the last total balance change block with the\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\n    // are the same.\n\n    /**\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\n     * shared cash and managed balances.\n     */\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\n        uint256 mask = 2**(112) - 1;\n        return uint256(sharedBalance) & mask;\n    }\n\n    /**\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\n     * shared cash and managed balances.\n     */\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\n        uint256 mask = 2**(112) - 1;\n        return uint256(sharedBalance >> 112) & mask;\n    }\n\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\n\n    /**\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\n     */\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\n        // Both token A and token B use the same block\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\n    }\n\n    /**\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\n     */\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\n        // Both token A and token B use the same block\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\n    }\n\n    /**\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\n     */\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\n        // example, in an Asset Manager update), we keep the latest (largest) one.\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\n\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\n    }\n\n    /**\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\n     */\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\n        // We don't bother storing a last change block, as it is read from the shared cash field.\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\n    }\n\n    // Shared functions\n\n    /**\n     * @dev Packs together two uint112 and one uint32 into a bytes32\n     */\n    function _pack(\n        uint256 _leastSignificant,\n        uint256 _midSignificant,\n        uint256 _mostSignificant\n    ) private pure returns (bytes32) {\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\n    }\n}\n"
      },
      "src.sol/amm/vault/balances/GeneralPoolsBalance.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../../lib/helpers/BalancerErrors.sol\";\nimport \"../../lib/openzeppelin/EnumerableMap.sol\";\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\nimport \"./BalanceAllocation.sol\";\n\nabstract contract GeneralPoolsBalance {\n    using BalanceAllocation for bytes32;\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\n\n    // Data for Pools with the General specialization setting\n    //\n    // These Pools use the IGeneralPool interface, which means the Vault must query the balance for *all* of their\n    // tokens in every swap. If we kept a mapping of token to balance plus a set (array) of tokens, it'd be very gas\n    // intensive to read all token addresses just to then do a lookup on the balance mapping.\n    //\n    // Instead, we use our customized EnumerableMap, which lets us read the N balances in N+1 storage accesses (one for\n    // each token in the Pool), access the index of any 'token in' a single read (required for the IGeneralPool call),\n    // and update an entry's value given its index.\n\n    // Map of token -> balance pairs for each Pool with this specialization. Many functions rely on storage pointers to\n    // a Pool's EnumerableMap to save gas when computing storage slots.\n    mapping(bytes32 => EnumerableMap.IERC20ToBytes32Map) internal _generalPoolsBalances;\n\n    /**\n     * @dev Registers a list of tokens in a General Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\n     *\n     * Requirements:\n     *\n     * - `tokens` must not be registered in the Pool\n     * - `tokens` must not contain duplicates\n     */\n    function _registerGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            // EnumerableMaps require an explicit initial value when creating a key-value pair: we use zero, the same\n            // value that is found in uninitialized storage, which corresponds to an empty balance.\n            bool added = poolBalances.set(tokens[i], 0);\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\n        }\n    }\n\n    /**\n     * @dev Deregisters a list of tokens in a General Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\n     *\n     * Requirements:\n     *\n     * - `tokens` must be registered in the Pool\n     * - `tokens` must have zero balance in the Vault\n     * - `tokens` must not contain duplicates\n     */\n    function _deregisterGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            IERC20 token = tokens[i];\n            bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\n            _require(currentBalance.isZero(), Errors.NONZERO_TOKEN_BALANCE);\n\n            // We don't need to check remove's return value, since _getGeneralPoolBalance already checks that the token\n            // was registered.\n            poolBalances.remove(token);\n        }\n    }\n\n    /**\n     * @dev Sets the balances of a General Pool's tokens to `balances`.\n     *\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\n     */\n    function _setGeneralPoolBalances(bytes32 poolId, bytes32[] memory balances) internal {\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\n\n        for (uint256 i = 0; i < balances.length; ++i) {\n            // Since we assume all balances are properly ordered, we can simply use `unchecked_setAt` to avoid one less\n            // storage read per token.\n            poolBalances.unchecked_setAt(i, balances[i]);\n        }\n    }\n\n    /**\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from cash into managed.\n     *\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\n     * registered for that Pool.\n     */\n    function _generalPoolCashToManaged(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal {\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\n    }\n\n    /**\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from managed into cash.\n     *\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\n     * registered for that Pool.\n     */\n    function _generalPoolManagedToCash(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal {\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\n    }\n\n    /**\n     * @dev Sets `token`'s managed balance in a General Pool to `amount`.\n     *\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\n     * registered for that Pool.\n     *\n     * Returns the managed balance delta as a result of this call.\n     */\n    function _setGeneralPoolManagedBalance(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal returns (int256) {\n        return _updateGeneralPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\n    }\n\n    /**\n     * @dev Sets `token`'s balance in a General Pool to the result of the `mutation` function when called with the\n     * current balance and `amount`.\n     *\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\n     * registered for that Pool.\n     *\n     * Returns the managed balance delta as a result of this call.\n     */\n    function _updateGeneralPoolBalance(\n        bytes32 poolId,\n        IERC20 token,\n        function(bytes32, uint256) returns (bytes32) mutation,\n        uint256 amount\n    ) private returns (int256) {\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\n        bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\n\n        bytes32 newBalance = mutation(currentBalance, amount);\n        poolBalances.set(token, newBalance);\n\n        return newBalance.managedDelta(currentBalance);\n    }\n\n    /**\n     * @dev Returns an array with all the tokens and balances in a General Pool. The order may change when tokens are\n     * registered or deregistered.\n     *\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\n     */\n    function _getGeneralPoolTokens(bytes32 poolId)\n        internal\n        view\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\n    {\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\n        tokens = new IERC20[](poolBalances.length());\n        balances = new bytes32[](tokens.length);\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableMap's length, we can use\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\n            (tokens[i], balances[i]) = poolBalances.unchecked_at(i);\n        }\n    }\n\n    /**\n     * @dev Returns the balance of a token in a General Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\n     *\n     * Requirements:\n     *\n     * - `token` must be registered in the Pool\n     */\n    function _getGeneralPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\n        return _getGeneralPoolBalance(poolBalances, token);\n    }\n\n    /**\n     * @dev Same as `_getGeneralPoolBalance` but using a Pool's storage pointer, which saves gas in repeated reads and\n     * writes.\n     */\n    function _getGeneralPoolBalance(EnumerableMap.IERC20ToBytes32Map storage poolBalances, IERC20 token)\n        private\n        view\n        returns (bytes32)\n    {\n        return poolBalances.get(token, Errors.TOKEN_NOT_REGISTERED);\n    }\n\n    /**\n     * @dev Returns true if `token` is registered in a General Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\n     */\n    function _isGeneralPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\n        return poolBalances.contains(token);\n    }\n}\n"
      },
      "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../../lib/helpers/BalancerErrors.sol\";\nimport \"../../lib/openzeppelin/EnumerableSet.sol\";\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\nimport \"./BalanceAllocation.sol\";\nimport \"../PoolRegistry.sol\";\n\nabstract contract MinimalSwapInfoPoolsBalance is PoolRegistry {\n    using BalanceAllocation for bytes32;\n    using EnumerableSet for EnumerableSet.AddressSet;\n\n    // Data for Pools with the Minimal Swap Info specialization setting\n    //\n    // These Pools use the IMinimalSwapInfoPool interface, and so the Vault must read the balance of the two tokens\n    // in the swap. The best solution is to use a mapping from token to balance, which lets us read or write any token's\n    // balance in a single storage access.\n    //\n    // We also keep a set of registered tokens. Because tokens with non-zero balance are by definition registered, in\n    // some balance getters we skip checking for token registration if a non-zero balance is found, saving gas by\n    // performing a single read instead of two.\n\n    mapping(bytes32 => mapping(IERC20 => bytes32)) internal _minimalSwapInfoPoolsBalances;\n    mapping(bytes32 => EnumerableSet.AddressSet) internal _minimalSwapInfoPoolsTokens;\n\n    /**\n     * @dev Registers a list of tokens in a Minimal Swap Info Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\n     *\n     * Requirements:\n     *\n     * - `tokens` must not be registered in the Pool\n     * - `tokens` must not contain duplicates\n     */\n    function _registerMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            bool added = poolTokens.add(address(tokens[i]));\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\n            // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\n            // balance.\n        }\n    }\n\n    /**\n     * @dev Deregisters a list of tokens in a Minimal Swap Info Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\n     *\n     * Requirements:\n     *\n     * - `tokens` must be registered in the Pool\n     * - `tokens` must have zero balance in the Vault\n     * - `tokens` must not contain duplicates\n     */\n    function _deregisterMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            IERC20 token = tokens[i];\n            _require(_minimalSwapInfoPoolsBalances[poolId][token].isZero(), Errors.NONZERO_TOKEN_BALANCE);\n\n            // For consistency with other Pool specialization settings, we explicitly reset the balance (which may have\n            // a non-zero last change block).\n            delete _minimalSwapInfoPoolsBalances[poolId][token];\n\n            bool removed = poolTokens.remove(address(token));\n            _require(removed, Errors.TOKEN_NOT_REGISTERED);\n        }\n    }\n\n    /**\n     * @dev Sets the balances of a Minimal Swap Info Pool's tokens to `balances`.\n     *\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\n     */\n    function _setMinimalSwapInfoPoolBalances(\n        bytes32 poolId,\n        IERC20[] memory tokens,\n        bytes32[] memory balances\n    ) internal {\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            _minimalSwapInfoPoolsBalances[poolId][tokens[i]] = balances[i];\n        }\n    }\n\n    /**\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from cash into managed.\n     *\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\n     * `token` is registered for that Pool.\n     */\n    function _minimalSwapInfoPoolCashToManaged(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal {\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\n    }\n\n    /**\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from managed into cash.\n     *\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\n     * `token` is registered for that Pool.\n     */\n    function _minimalSwapInfoPoolManagedToCash(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal {\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\n    }\n\n    /**\n     * @dev Sets `token`'s managed balance in a Minimal Swap Info Pool to `amount`.\n     *\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\n     * `token` is registered for that Pool.\n     *\n     * Returns the managed balance delta as a result of this call.\n     */\n    function _setMinimalSwapInfoPoolManagedBalance(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal returns (int256) {\n        return _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\n    }\n\n    /**\n     * @dev Sets `token`'s balance in a Minimal Swap Info Pool to the result of the `mutation` function when called with\n     * the current balance and `amount`.\n     *\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\n     * `token` is registered for that Pool.\n     *\n     * Returns the managed balance delta as a result of this call.\n     */\n    function _updateMinimalSwapInfoPoolBalance(\n        bytes32 poolId,\n        IERC20 token,\n        function(bytes32, uint256) returns (bytes32) mutation,\n        uint256 amount\n    ) internal returns (int256) {\n        bytes32 currentBalance = _getMinimalSwapInfoPoolBalance(poolId, token);\n\n        bytes32 newBalance = mutation(currentBalance, amount);\n        _minimalSwapInfoPoolsBalances[poolId][token] = newBalance;\n\n        return newBalance.managedDelta(currentBalance);\n    }\n\n    /**\n     * @dev Returns an array with all the tokens and balances in a Minimal Swap Info Pool. The order may change when\n     * tokens are registered or deregistered.\n     *\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\n     */\n    function _getMinimalSwapInfoPoolTokens(bytes32 poolId)\n        internal\n        view\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\n    {\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\n        tokens = new IERC20[](poolTokens.length());\n        balances = new bytes32[](tokens.length);\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableSet's length, we can use\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\n            IERC20 token = IERC20(poolTokens.unchecked_at(i));\n            tokens[i] = token;\n            balances[i] = _minimalSwapInfoPoolsBalances[poolId][token];\n        }\n    }\n\n    /**\n     * @dev Returns the balance of a token in a Minimal Swap Info Pool.\n     *\n     * Requirements:\n     *\n     * - `poolId` must be a Minimal Swap Info Pool\n     * - `token` must be registered in the Pool\n     */\n    function _getMinimalSwapInfoPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\n        bytes32 balance = _minimalSwapInfoPoolsBalances[poolId][token];\n\n        // A non-zero balance guarantees that the token is registered. If zero, we manually check if the token is\n        // registered in the Pool. Token registration implies that the Pool is registered as well, which lets us save\n        // gas by not performing the check.\n        bool tokenRegistered = balance.isNotZero() || _minimalSwapInfoPoolsTokens[poolId].contains(address(token));\n\n        if (!tokenRegistered) {\n            // The token might not be registered because the Pool itself is not registered. We check this to provide a\n            // more accurate revert reason.\n            _ensureRegisteredPool(poolId);\n            _revert(Errors.TOKEN_NOT_REGISTERED);\n        }\n\n        return balance;\n    }\n\n    /**\n     * @dev Returns true if `token` is registered in a Minimal Swap Info Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\n     */\n    function _isMinimalSwapInfoPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\n        return poolTokens.contains(address(token));\n    }\n}\n"
      },
      "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../../lib/helpers/BalancerErrors.sol\";\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\nimport \"./BalanceAllocation.sol\";\nimport \"../PoolRegistry.sol\";\n\nabstract contract TwoTokenPoolsBalance is PoolRegistry {\n    using BalanceAllocation for bytes32;\n\n    // Data for Pools with the Two Token specialization setting\n    //\n    // These are similar to the Minimal Swap Info Pool case (because the Pool only has two tokens, and therefore there\n    // are only two balances to read), but there's a key difference in how data is stored. Keeping a set makes little\n    // sense, as it will only ever hold two tokens, so we can just store those two directly.\n    //\n    // The gas savings associated with using these Pools come from how token balances are stored: cash amounts for token\n    // A and token B are packed together, as are managed amounts. Because only cash changes in a swap, there's no need\n    // to write to this second storage slot. A single last change block number for both tokens is stored with the packed\n    // cash fields.\n\n    struct TwoTokenPoolBalances {\n        bytes32 sharedCash;\n        bytes32 sharedManaged;\n    }\n\n    // We could just keep a mapping from Pool ID to TwoTokenSharedBalances, but there's an issue: we wouldn't know to\n    // which tokens those balances correspond. This would mean having to also check which are registered with the Pool.\n    //\n    // What we do instead to save those storage reads is keep a nested mapping from the token pair hash to the balances\n    // struct. The Pool only has two tokens, so only a single entry of this mapping is set (the one that corresponds to\n    // that pair's hash).\n    //\n    // This has the trade-off of making Vault code that interacts with these Pools cumbersome: both balances must be\n    // accessed at the same time by using both token addresses, and some logic is needed to determine how the pair hash\n    // is computed. We do this by sorting the tokens, calling the token with the lowest numerical address value token A,\n    // and the other one token B. In functions where the token arguments could be either A or B, we use X and Y instead.\n    //\n    // If users query a token pair containing an unregistered token, the Pool will generate a hash for a mapping entry\n    // that was not set, and return zero balances. Non-zero balances are only possible if both tokens in the pair\n    // are registered with the Pool, which means we don't have to check the TwoTokenPoolTokens struct, and can save\n    // storage reads.\n\n    struct TwoTokenPoolTokens {\n        IERC20 tokenA;\n        IERC20 tokenB;\n        mapping(bytes32 => TwoTokenPoolBalances) balances;\n    }\n\n    mapping(bytes32 => TwoTokenPoolTokens) private _twoTokenPoolTokens;\n\n    /**\n     * @dev Registers tokens in a Two Token Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\n     *\n     * Requirements:\n     *\n     * - `tokenX` and `tokenY` must not be the same\n     * - The tokens must be ordered: tokenX < tokenY\n     */\n    function _registerTwoTokenPoolTokens(\n        bytes32 poolId,\n        IERC20 tokenX,\n        IERC20 tokenY\n    ) internal {\n        // Not technically true since we didn't register yet, but this is consistent with the error messages of other\n        // specialization settings.\n        _require(tokenX != tokenY, Errors.TOKEN_ALREADY_REGISTERED);\n\n        _require(tokenX < tokenY, Errors.UNSORTED_TOKENS);\n\n        // A Two Token Pool with no registered tokens is identified by having zero addresses for tokens A and B.\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\n        _require(poolTokens.tokenA == IERC20(0) && poolTokens.tokenB == IERC20(0), Errors.TOKENS_ALREADY_SET);\n\n        // Since tokenX < tokenY, tokenX is A and tokenY is B\n        poolTokens.tokenA = tokenX;\n        poolTokens.tokenB = tokenY;\n\n        // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\n        // balance.\n    }\n\n    /**\n     * @dev Deregisters tokens in a Two Token Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\n     *\n     * Requirements:\n     *\n     * - `tokenX` and `tokenY` must be registered in the Pool\n     * - both tokens must have zero balance in the Vault\n     */\n    function _deregisterTwoTokenPoolTokens(\n        bytes32 poolId,\n        IERC20 tokenX,\n        IERC20 tokenY\n    ) internal {\n        (\n            bytes32 balanceA,\n            bytes32 balanceB,\n            TwoTokenPoolBalances storage poolBalances\n        ) = _getTwoTokenPoolSharedBalances(poolId, tokenX, tokenY);\n\n        _require(balanceA.isZero() && balanceB.isZero(), Errors.NONZERO_TOKEN_BALANCE);\n\n        delete _twoTokenPoolTokens[poolId];\n\n        // For consistency with other Pool specialization settings, we explicitly reset the packed cash field (which may\n        // have a non-zero last change block).\n        delete poolBalances.sharedCash;\n    }\n\n    /**\n     * @dev Sets the cash balances of a Two Token Pool's tokens.\n     *\n     * WARNING: this assumes `tokenA` and `tokenB` are the Pool's two registered tokens, and are in the correct order.\n     */\n    function _setTwoTokenPoolCashBalances(\n        bytes32 poolId,\n        IERC20 tokenA,\n        bytes32 balanceA,\n        IERC20 tokenB,\n        bytes32 balanceB\n    ) internal {\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\n        TwoTokenPoolBalances storage poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\n        poolBalances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\n    }\n\n    /**\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from cash into managed.\n     *\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\n     * registered for that Pool.\n     */\n    function _twoTokenPoolCashToManaged(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal {\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\n    }\n\n    /**\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from managed into cash.\n     *\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\n     * registered for that Pool.\n     */\n    function _twoTokenPoolManagedToCash(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal {\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.managedToCash, amount);\n    }\n\n    /**\n     * @dev Sets `token`'s managed balance in a Two Token Pool to `amount`.\n     *\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\n     * registered for that Pool.\n     *\n     * Returns the managed balance delta as a result of this call.\n     */\n    function _setTwoTokenPoolManagedBalance(\n        bytes32 poolId,\n        IERC20 token,\n        uint256 amount\n    ) internal returns (int256) {\n        return _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.setManaged, amount);\n    }\n\n    /**\n     * @dev Sets `token`'s balance in a Two Token Pool to the result of the `mutation` function when called with\n     * the current balance and `amount`.\n     *\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\n     * registered for that Pool.\n     *\n     * Returns the managed balance delta as a result of this call.\n     */\n    function _updateTwoTokenPoolSharedBalance(\n        bytes32 poolId,\n        IERC20 token,\n        function(bytes32, uint256) returns (bytes32) mutation,\n        uint256 amount\n    ) private returns (int256) {\n        (\n            TwoTokenPoolBalances storage balances,\n            IERC20 tokenA,\n            bytes32 balanceA,\n            ,\n            bytes32 balanceB\n        ) = _getTwoTokenPoolBalances(poolId);\n\n        int256 delta;\n        if (token == tokenA) {\n            bytes32 newBalance = mutation(balanceA, amount);\n            delta = newBalance.managedDelta(balanceA);\n            balanceA = newBalance;\n        } else {\n            // token == tokenB\n            bytes32 newBalance = mutation(balanceB, amount);\n            delta = newBalance.managedDelta(balanceB);\n            balanceB = newBalance;\n        }\n\n        balances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\n        balances.sharedManaged = BalanceAllocation.toSharedManaged(balanceA, balanceB);\n\n        return delta;\n    }\n\n    /*\n     * @dev Returns an array with all the tokens and balances in a Two Token Pool. The order may change when\n     * tokens are registered or deregistered.\n     *\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\n     */\n    function _getTwoTokenPoolTokens(bytes32 poolId)\n        internal\n        view\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\n    {\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\n\n        // Both tokens will either be zero (if unregistered) or non-zero (if registered), but we keep the full check for\n        // clarity.\n        if (tokenA == IERC20(0) || tokenB == IERC20(0)) {\n            return (new IERC20[](0), new bytes32[](0));\n        }\n\n        // Note that functions relying on this getter expect tokens to be properly ordered, so we use the (A, B)\n        // ordering.\n\n        tokens = new IERC20[](2);\n        tokens[0] = tokenA;\n        tokens[1] = tokenB;\n\n        balances = new bytes32[](2);\n        balances[0] = balanceA;\n        balances[1] = balanceB;\n    }\n\n    /**\n     * @dev Same as `_getTwoTokenPoolTokens`, except it returns the two tokens and balances directly instead of using\n     * an array, as well as a storage pointer to the `TwoTokenPoolBalances` struct, which can be used to update it\n     * without having to recompute the pair hash and storage slot.\n     */\n    function _getTwoTokenPoolBalances(bytes32 poolId)\n        private\n        view\n        returns (\n            TwoTokenPoolBalances storage poolBalances,\n            IERC20 tokenA,\n            bytes32 balanceA,\n            IERC20 tokenB,\n            bytes32 balanceB\n        )\n    {\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\n        tokenA = poolTokens.tokenA;\n        tokenB = poolTokens.tokenB;\n\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\n        poolBalances = poolTokens.balances[pairHash];\n\n        bytes32 sharedCash = poolBalances.sharedCash;\n        bytes32 sharedManaged = poolBalances.sharedManaged;\n\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\n    }\n\n    /**\n     * @dev Returns the balance of a token in a Two Token Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\n     *\n     * This function is convenient but not particularly gas efficient, and should be avoided during gas-sensitive\n     * operations, such as swaps. For those, _getTwoTokenPoolSharedBalances provides a more flexible interface.\n     *\n     * Requirements:\n     *\n     * - `token` must be registered in the Pool\n     */\n    function _getTwoTokenPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\n        // We can't just read the balance of token, because we need to know the full pair in order to compute the pair\n        // hash and access the balance mapping. We therefore rely on `_getTwoTokenPoolBalances`.\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\n\n        if (token == tokenA) {\n            return balanceA;\n        } else if (token == tokenB) {\n            return balanceB;\n        } else {\n            _revert(Errors.TOKEN_NOT_REGISTERED);\n        }\n    }\n\n    /**\n     * @dev Returns the balance of the two tokens in a Two Token Pool.\n     *\n     * The returned balances are those of token A and token B, where token A is the lowest of token X and token Y, and\n     * token B the other.\n     *\n     * This function also returns a storage pointer to the TwoTokenPoolBalances struct associated with the token pair,\n     * which can be used to update it without having to recompute the pair hash and storage slot.\n     *\n     * Requirements:\n     *\n     * - `poolId` must be a Minimal Swap Info Pool\n     * - `tokenX` and `tokenY` must be registered in the Pool\n     */\n    function _getTwoTokenPoolSharedBalances(\n        bytes32 poolId,\n        IERC20 tokenX,\n        IERC20 tokenY\n    )\n        internal\n        view\n        returns (\n            bytes32 balanceA,\n            bytes32 balanceB,\n            TwoTokenPoolBalances storage poolBalances\n        )\n    {\n        (IERC20 tokenA, IERC20 tokenB) = _sortTwoTokens(tokenX, tokenY);\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\n\n        poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\n\n        // Because we're reading balances using the pair hash, if either token X or token Y is not registered then\n        // *both* balance entries will be zero.\n        bytes32 sharedCash = poolBalances.sharedCash;\n        bytes32 sharedManaged = poolBalances.sharedManaged;\n\n        // A non-zero balance guarantees that both tokens are registered. If zero, we manually check whether each\n        // token is registered in the Pool. Token registration implies that the Pool is registered as well, which\n        // lets us save gas by not performing the check.\n        bool tokensRegistered = sharedCash.isNotZero() ||\n            sharedManaged.isNotZero() ||\n            (_isTwoTokenPoolTokenRegistered(poolId, tokenA) && _isTwoTokenPoolTokenRegistered(poolId, tokenB));\n\n        if (!tokensRegistered) {\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\n            // more accurate revert reason.\n            _ensureRegisteredPool(poolId);\n            _revert(Errors.TOKEN_NOT_REGISTERED);\n        }\n\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\n    }\n\n    /**\n     * @dev Returns true if `token` is registered in a Two Token Pool.\n     *\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\n     */\n    function _isTwoTokenPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\n\n        // The zero address can never be a registered token.\n        return (token == poolTokens.tokenA || token == poolTokens.tokenB) && token != IERC20(0);\n    }\n\n    /**\n     * @dev Returns the hash associated with a given token pair.\n     */\n    function _getTwoTokenPairHash(IERC20 tokenA, IERC20 tokenB) private pure returns (bytes32) {\n        return keccak256(abi.encodePacked(tokenA, tokenB));\n    }\n\n    /**\n     * @dev Sorts two tokens in ascending order, returning them as a (tokenA, tokenB) tuple.\n     */\n    function _sortTwoTokens(IERC20 tokenX, IERC20 tokenY) private pure returns (IERC20, IERC20) {\n        return tokenX < tokenY ? (tokenX, tokenY) : (tokenY, tokenX);\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/SafeCast.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        _require(value < 2**255, Errors.SAFE_CAST_VALUE_CANT_FIT_INT256);\n        return int256(value);\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/EnumerableMap.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n// Based on the EnumerableMap library from OpenZeppelin contracts, altered to include the following:\n//  * a map from IERC20 to bytes32\n//  * entries are stored in mappings instead of arrays, reducing implicit storage reads for out-of-bounds checks\n//  * unchecked_at and unchecked_valueAt, which allow for more gas efficient data reads in some scenarios\n//  * unchecked_indexOf and unchecked_setAt, which allow for more gas efficient data writes in some scenarios\n//\n// Additionally, the base private functions that work on bytes32 were removed and replaced with a native implementation\n// for IERC20 keys, to reduce bytecode size and runtime costs.\n\n// We're using non-standard casing for the unchecked functions to differentiate them, so we need to turn off that rule\n// solhint-disable func-name-mixedcase\n\nimport \"./IERC20.sol\";\n\nimport \"../helpers/BalancerErrors.sol\";\n\n/**\n * @dev Library for managing an enumerable variant of Solidity's\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n * type.\n *\n * Maps have the following properties:\n *\n * - Entries are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\n *\n *     // Declare a set state variable\n *     EnumerableMap.UintToAddressMap private myMap;\n * }\n * ```\n */\nlibrary EnumerableMap {\n    // The original OpenZeppelin implementation uses a generic Map type with bytes32 keys: this was replaced with\n    // IERC20ToBytes32Map, which uses IERC20 keys natively, resulting in more dense bytecode.\n\n    struct IERC20ToBytes32MapEntry {\n        IERC20 _key;\n        bytes32 _value;\n    }\n\n    struct IERC20ToBytes32Map {\n        // Number of entries in the map\n        uint256 _length;\n        // Storage of map keys and values\n        mapping(uint256 => IERC20ToBytes32MapEntry) _entries;\n        // Position of the entry defined by a key in the `entries` array, plus 1\n        // because index 0 means a key is not in the map.\n        mapping(IERC20 => uint256) _indexes;\n    }\n\n    /**\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\n     * key. O(1).\n     *\n     * Returns true if the key was added to the map, that is if it was not\n     * already present.\n     */\n    function set(\n        IERC20ToBytes32Map storage map,\n        IERC20 key,\n        bytes32 value\n    ) internal returns (bool) {\n        // We read and store the key's index to prevent multiple reads from the same storage slot\n        uint256 keyIndex = map._indexes[key];\n\n        // Equivalent to !contains(map, key)\n        if (keyIndex == 0) {\n            uint256 previousLength = map._length;\n            map._entries[previousLength] = IERC20ToBytes32MapEntry({ _key: key, _value: value });\n            map._length = previousLength + 1;\n\n            // The entry is stored at previousLength, but we add 1 to all indexes\n            // and use 0 as a sentinel value\n            map._indexes[key] = previousLength + 1;\n            return true;\n        } else {\n            map._entries[keyIndex - 1]._value = value;\n            return false;\n        }\n    }\n\n    /**\n     * @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\n     * {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\n     *\n     * This function performs one less storage read than {set}, but it should only be used when `index` is known to be\n     * within bounds.\n     */\n    function unchecked_setAt(\n        IERC20ToBytes32Map storage map,\n        uint256 index,\n        bytes32 value\n    ) internal {\n        map._entries[index]._value = value;\n    }\n\n    /**\n     * @dev Removes a key-value pair from a map. O(1).\n     *\n     * Returns true if the key was removed from the map, that is if it was present.\n     */\n    function remove(IERC20ToBytes32Map storage map, IERC20 key) internal returns (bool) {\n        // We read and store the key's index to prevent multiple reads from the same storage slot\n        uint256 keyIndex = map._indexes[key];\n\n        // Equivalent to contains(map, key)\n        if (keyIndex != 0) {\n            // To delete a key-value pair from the _entries pseudo-array in O(1), we swap the entry to delete with the\n            // one at the highest index, and then remove this last entry (sometimes called as 'swap and pop').\n            // This modifies the order of the pseudo-array, as noted in {at}.\n\n            uint256 toDeleteIndex = keyIndex - 1;\n            uint256 lastIndex = map._length - 1;\n\n            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\n            IERC20ToBytes32MapEntry storage lastEntry = map._entries[lastIndex];\n\n            // Move the last entry to the index where the entry to delete is\n            map._entries[toDeleteIndex] = lastEntry;\n            // Update the index for the moved entry\n            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\n\n            // Delete the slot where the moved entry was stored\n            delete map._entries[lastIndex];\n            map._length = lastIndex;\n\n            // Delete the index for the deleted slot\n            delete map._indexes[key];\n\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Returns true if the key is in the map. O(1).\n     */\n    function contains(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (bool) {\n        return map._indexes[key] != 0;\n    }\n\n    /**\n     * @dev Returns the number of key-value pairs in the map. O(1).\n     */\n    function length(IERC20ToBytes32Map storage map) internal view returns (uint256) {\n        return map._length;\n    }\n\n    /**\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\n     *\n     * Note that there are no guarantees on the ordering of entries inside the\n     * array, and it may change when more entries are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\n        _require(map._length > index, Errors.OUT_OF_BOUNDS);\n        return unchecked_at(map, index);\n    }\n\n    /**\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\n     * than {length}). O(1).\n     *\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\n     * within bounds.\n     */\n    function unchecked_at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\n        IERC20ToBytes32MapEntry storage entry = map._entries[index];\n        return (entry._key, entry._value);\n    }\n\n    /**\n     * @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\n     * read). O(1).\n     */\n    function unchecked_valueAt(IERC20ToBytes32Map storage map, uint256 index) internal view returns (bytes32) {\n        return map._entries[index]._value;\n    }\n\n    /**\n     * @dev Returns the value associated with `key`. O(1).\n     *\n     * Requirements:\n     *\n     * - `key` must be in the map. Reverts with `errorCode` otherwise.\n     */\n    function get(\n        IERC20ToBytes32Map storage map,\n        IERC20 key,\n        uint256 errorCode\n    ) internal view returns (bytes32) {\n        uint256 index = map._indexes[key];\n        _require(index > 0, errorCode);\n        return unchecked_valueAt(map, index - 1);\n    }\n\n    /**\n     * @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\n     * instead.\n     */\n    function unchecked_indexOf(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (uint256) {\n        return map._indexes[key];\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/EnumerableSet.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\n// costs.\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSet {\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\n\n    struct AddressSet {\n        // Storage of set values\n        address[] _values;\n        // Position of the value in the `values` array, plus 1 because index 0\n        // means a value is not in the set.\n        mapping(address => uint256) _indexes;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(AddressSet storage set, address value) internal returns (bool) {\n        if (!contains(set, value)) {\n            set._values.push(value);\n            // The value is stored at length-1, but we add 1 to all indexes\n            // and use 0 as a sentinel value\n            set._indexes[value] = set._values.length;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(AddressSet storage set, address value) internal returns (bool) {\n        // We read and store the value's index to prevent multiple reads from the same storage slot\n        uint256 valueIndex = set._indexes[value];\n\n        if (valueIndex != 0) {\n            // Equivalent to contains(set, value)\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\n            // This modifies the order of the array, as noted in {at}.\n\n            uint256 toDeleteIndex = valueIndex - 1;\n            uint256 lastIndex = set._values.length - 1;\n\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\n\n            address lastValue = set._values[lastIndex];\n\n            // Move the last value to the index where the value to delete is\n            set._values[toDeleteIndex] = lastValue;\n            // Update the index for the moved value\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\n\n            // Delete the slot where the moved value was stored\n            set._values.pop();\n\n            // Delete the index for the deleted slot\n            delete set._indexes[value];\n\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\n        return set._indexes[value] != 0;\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function length(AddressSet storage set) internal view returns (uint256) {\n        return set._values.length;\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\n        return unchecked_at(set, index);\n    }\n\n    /**\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\n     * than {length}). O(1).\n     *\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\n     * within bounds.\n     */\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\n        return set._values[index];\n    }\n}\n"
      },
      "src.sol/amm/vault/interfaces/IPoolSwapStructs.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\nimport \"./IVault.sol\";\n\ninterface IPoolSwapStructs {\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\n    // IMinimalSwapInfoPool.\n    //\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\n    //\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\n    //\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\n    // some Pools.\n    //\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\n    // one Pool.\n    //\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\n    //    balance.\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\n    //\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\n    // where the Pool sends the outgoing tokens.\n    //\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\n    struct SwapRequest {\n        IVault.SwapKind kind;\n        IERC20 tokenIn;\n        IERC20 tokenOut;\n        uint256 amount;\n        // Misc data\n        bytes32 poolId;\n        uint256 lastChangeBlock;\n        address from;\n        address to;\n        bytes userData;\n    }\n}\n"
      },
      "src.sol/amm/vault/Swaps.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/math/Math.sol\";\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/helpers/InputHelpers.sol\";\nimport \"../lib/openzeppelin/EnumerableMap.sol\";\nimport \"../lib/openzeppelin/EnumerableSet.sol\";\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\nimport \"../lib/openzeppelin/SafeCast.sol\";\nimport \"../lib/openzeppelin/SafeERC20.sol\";\n\nimport \"./PoolBalances.sol\";\nimport \"./interfaces/IPoolSwapStructs.sol\";\nimport \"./interfaces/IGeneralPool.sol\";\nimport \"./interfaces/IMinimalSwapInfoPool.sol\";\nimport \"./balances/BalanceAllocation.sol\";\n\n/**\n * Implements the Vault's high-level swap functionality.\n *\n * Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. They need not trust the Pool\n * contracts to do this: all security checks are made by the Vault.\n *\n * The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\n * In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\n * and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\n * More complex swaps, such as one 'token in' to multiple tokens out can be achieved by batching together\n * individual swaps.\n */\nabstract contract Swaps is ReentrancyGuard, PoolBalances {\n    using SafeERC20 for IERC20;\n    using EnumerableSet for EnumerableSet.AddressSet;\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\n\n    using Math for int256;\n    using Math for uint256;\n    using SafeCast for uint256;\n    using BalanceAllocation for bytes32;\n\n    function swap(\n        SingleSwap memory singleSwap,\n        FundManagement memory funds,\n        uint256 limit,\n        uint256 deadline\n    )\n        external\n        payable\n        override\n        nonReentrant\n        whenNotPaused\n        authenticateFor(funds.sender)\n        returns (uint256 amountCalculated)\n    {\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\n        // solhint-disable-next-line not-rely-on-time\n        _require(block.timestamp <= deadline, Errors.SWAP_DEADLINE);\n\n        // This revert reason is for consistency with `batchSwap`: an equivalent `swap` performed using that function\n        // would result in this error.\n        _require(singleSwap.amount > 0, Errors.UNKNOWN_AMOUNT_IN_FIRST_SWAP);\n\n        IERC20 tokenIn = _translateToIERC20(singleSwap.assetIn);\n        IERC20 tokenOut = _translateToIERC20(singleSwap.assetOut);\n        _require(tokenIn != tokenOut, Errors.CANNOT_SWAP_SAME_TOKEN);\n\n        // Initializing each struct field one-by-one uses less gas than setting all at once.\n        IPoolSwapStructs.SwapRequest memory poolRequest;\n        poolRequest.poolId = singleSwap.poolId;\n        poolRequest.kind = singleSwap.kind;\n        poolRequest.tokenIn = tokenIn;\n        poolRequest.tokenOut = tokenOut;\n        poolRequest.amount = singleSwap.amount;\n        poolRequest.userData = singleSwap.userData;\n        poolRequest.from = funds.sender;\n        poolRequest.to = funds.recipient;\n        // The lastChangeBlock field is left uninitialized.\n\n        uint256 amountIn;\n        uint256 amountOut;\n\n        (amountCalculated, amountIn, amountOut) = _swapWithPool(poolRequest);\n        _require(singleSwap.kind == SwapKind.GIVEN_IN ? amountOut >= limit : amountIn <= limit, Errors.SWAP_LIMIT);\n\n        _receiveAsset(singleSwap.assetIn, amountIn, funds.sender, funds.fromInternalBalance);\n        _sendAsset(singleSwap.assetOut, amountOut, funds.recipient, funds.toInternalBalance);\n\n        // If the asset in is ETH, then `amountIn` ETH was wrapped into WETH.\n        _handleRemainingEth(_isETH(singleSwap.assetIn) ? amountIn : 0);\n    }\n\n    function batchSwap(\n        SwapKind kind,\n        BatchSwapStep[] memory swaps,\n        IAsset[] memory assets,\n        FundManagement memory funds,\n        int256[] memory limits,\n        uint256 deadline\n    )\n        external\n        payable\n        override\n        nonReentrant\n        whenNotPaused\n        authenticateFor(funds.sender)\n        returns (int256[] memory assetDeltas)\n    {\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\n        // solhint-disable-next-line not-rely-on-time\n        _require(block.timestamp <= deadline, Errors.SWAP_DEADLINE);\n\n        InputHelpers.ensureInputLengthMatch(assets.length, limits.length);\n\n        // Perform the swaps, updating the Pool token balances and computing the net Vault asset deltas.\n        assetDeltas = _swapWithPools(swaps, assets, funds, kind);\n\n        // Process asset deltas, by either transferring assets from the sender (for positive deltas) or to the recipient\n        // (for negative deltas).\n        uint256 wrappedEth = 0;\n        for (uint256 i = 0; i < assets.length; ++i) {\n            IAsset asset = assets[i];\n            int256 delta = assetDeltas[i];\n            _require(delta <= limits[i], Errors.SWAP_LIMIT);\n\n            if (delta > 0) {\n                uint256 toReceive = uint256(delta);\n                _receiveAsset(asset, toReceive, funds.sender, funds.fromInternalBalance);\n\n                if (_isETH(asset)) {\n                    wrappedEth = wrappedEth.add(toReceive);\n                }\n            } else if (delta < 0) {\n                uint256 toSend = uint256(-delta);\n                _sendAsset(asset, toSend, funds.recipient, funds.toInternalBalance);\n            }\n        }\n\n        // Handle any used and remaining ETH.\n        _handleRemainingEth(wrappedEth);\n    }\n\n    // For `_swapWithPools` to handle both 'given in' and 'given out' swaps, it internally tracks the 'given' amount\n    // (supplied by the caller), and the 'calculated' amount (returned by the Pool in response to the swap request).\n\n    /**\n     * @dev Given the two swap tokens and the swap kind, returns which one is the 'given' token (the token whose\n     * amount is supplied by the caller).\n     */\n    function _tokenGiven(\n        SwapKind kind,\n        IERC20 tokenIn,\n        IERC20 tokenOut\n    ) private pure returns (IERC20) {\n        return kind == SwapKind.GIVEN_IN ? tokenIn : tokenOut;\n    }\n\n    /**\n     * @dev Given the two swap tokens and the swap kind, returns which one is the 'calculated' token (the token whose\n     * amount is calculated by the Pool).\n     */\n    function _tokenCalculated(\n        SwapKind kind,\n        IERC20 tokenIn,\n        IERC20 tokenOut\n    ) private pure returns (IERC20) {\n        return kind == SwapKind.GIVEN_IN ? tokenOut : tokenIn;\n    }\n\n    /**\n     * @dev Returns an ordered pair (amountIn, amountOut) given the 'given' and 'calculated' amounts, and the swap kind.\n     */\n    function _getAmounts(\n        SwapKind kind,\n        uint256 amountGiven,\n        uint256 amountCalculated\n    ) private pure returns (uint256 amountIn, uint256 amountOut) {\n        if (kind == SwapKind.GIVEN_IN) {\n            (amountIn, amountOut) = (amountGiven, amountCalculated);\n        } else {\n            // SwapKind.GIVEN_OUT\n            (amountIn, amountOut) = (amountCalculated, amountGiven);\n        }\n    }\n\n    /**\n     * @dev Performs all `swaps`, calling swap hooks on the Pool contracts and updating their balances. Does not cause\n     * any transfer of tokens - instead it returns the net Vault token deltas: positive if the Vault should receive\n     * tokens, and negative if it should send them.\n     */\n    function _swapWithPools(\n        BatchSwapStep[] memory swaps,\n        IAsset[] memory assets,\n        FundManagement memory funds,\n        SwapKind kind\n    ) private returns (int256[] memory assetDeltas) {\n        assetDeltas = new int256[](assets.length);\n\n        // These variables could be declared inside the loop, but that causes the compiler to allocate memory on each\n        // loop iteration, increasing gas costs.\n        BatchSwapStep memory batchSwapStep;\n        IPoolSwapStructs.SwapRequest memory poolRequest;\n\n        // These store data about the previous swap here to implement multihop logic across swaps.\n        IERC20 previousTokenCalculated;\n        uint256 previousAmountCalculated;\n\n        for (uint256 i = 0; i < swaps.length; ++i) {\n            batchSwapStep = swaps[i];\n\n            bool withinBounds = batchSwapStep.assetInIndex < assets.length &&\n                batchSwapStep.assetOutIndex < assets.length;\n            _require(withinBounds, Errors.OUT_OF_BOUNDS);\n\n            IERC20 tokenIn = _translateToIERC20(assets[batchSwapStep.assetInIndex]);\n            IERC20 tokenOut = _translateToIERC20(assets[batchSwapStep.assetOutIndex]);\n            _require(tokenIn != tokenOut, Errors.CANNOT_SWAP_SAME_TOKEN);\n\n            // Sentinel value for multihop logic\n            if (batchSwapStep.amount == 0) {\n                // When the amount given is zero, we use the calculated amount for the previous swap, as long as the\n                // current swap's given token is the previous calculated token. This makes it possible to swap a\n                // given amount of token A for token B, and then use the resulting token B amount to swap for token C.\n                _require(i > 0, Errors.UNKNOWN_AMOUNT_IN_FIRST_SWAP);\n                bool usingPreviousToken = previousTokenCalculated == _tokenGiven(kind, tokenIn, tokenOut);\n                _require(usingPreviousToken, Errors.MALCONSTRUCTED_MULTIHOP_SWAP);\n                batchSwapStep.amount = previousAmountCalculated;\n            }\n\n            // Initializing each struct field one-by-one uses less gas than setting all at once\n            poolRequest.poolId = batchSwapStep.poolId;\n            poolRequest.kind = kind;\n            poolRequest.tokenIn = tokenIn;\n            poolRequest.tokenOut = tokenOut;\n            poolRequest.amount = batchSwapStep.amount;\n            poolRequest.userData = batchSwapStep.userData;\n            poolRequest.from = funds.sender;\n            poolRequest.to = funds.recipient;\n            // The lastChangeBlock field is left uninitialized\n\n            uint256 amountIn;\n            uint256 amountOut;\n            (previousAmountCalculated, amountIn, amountOut) = _swapWithPool(poolRequest);\n\n            previousTokenCalculated = _tokenCalculated(kind, tokenIn, tokenOut);\n\n            // Accumulate Vault deltas across swaps\n            assetDeltas[batchSwapStep.assetInIndex] = assetDeltas[batchSwapStep.assetInIndex].add(amountIn.toInt256());\n            assetDeltas[batchSwapStep.assetOutIndex] = assetDeltas[batchSwapStep.assetOutIndex].sub(\n                amountOut.toInt256()\n            );\n        }\n    }\n\n    /**\n     * @dev Performs a swap according to the parameters specified in `request`, calling the Pool's contract hook and\n     * updating the Pool's balance.\n     *\n     * Returns the amount of tokens going into or out of the Vault as a result of this swap, depending on the swap kind.\n     */\n    function _swapWithPool(IPoolSwapStructs.SwapRequest memory request)\n        private\n        returns (\n            uint256 amountCalculated,\n            uint256 amountIn,\n            uint256 amountOut\n        )\n    {\n        // Get the calculated amount from the Pool and update its balances\n        address pool = _getPoolAddress(request.poolId);\n        PoolSpecialization specialization = _getPoolSpecialization(request.poolId);\n\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\n            amountCalculated = _processTwoTokenPoolSwapRequest(request, IMinimalSwapInfoPool(pool));\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\n            amountCalculated = _processMinimalSwapInfoPoolSwapRequest(request, IMinimalSwapInfoPool(pool));\n        } else {\n            // PoolSpecialization.GENERAL\n            amountCalculated = _processGeneralPoolSwapRequest(request, IGeneralPool(pool));\n        }\n\n        (amountIn, amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\n        emit Swap(request.poolId, request.tokenIn, request.tokenOut, amountIn, amountOut);\n    }\n\n    function _processTwoTokenPoolSwapRequest(IPoolSwapStructs.SwapRequest memory request, IMinimalSwapInfoPool pool)\n        private\n        returns (uint256 amountCalculated)\n    {\n        // For gas efficiency reasons, this function uses low-level knowledge of how Two Token Pool balances are\n        // stored internally, instead of using getters and setters for all operations.\n\n        (\n            bytes32 tokenABalance,\n            bytes32 tokenBBalance,\n            TwoTokenPoolBalances storage poolBalances\n        ) = _getTwoTokenPoolSharedBalances(request.poolId, request.tokenIn, request.tokenOut);\n\n        // We have the two Pool balances, but we don't know which one is 'token in' or 'token out'.\n        bytes32 tokenInBalance;\n        bytes32 tokenOutBalance;\n\n        // In Two Token Pools, token A has a smaller address than token B\n        if (request.tokenIn < request.tokenOut) {\n            // in is A, out is B\n            tokenInBalance = tokenABalance;\n            tokenOutBalance = tokenBBalance;\n        } else {\n            // in is B, out is A\n            tokenOutBalance = tokenABalance;\n            tokenInBalance = tokenBBalance;\n        }\n\n        // Perform the swap request and compute the new balances for 'token in' and 'token out' after the swap\n        (tokenInBalance, tokenOutBalance, amountCalculated) = _callMinimalSwapInfoPoolOnSwapHook(\n            request,\n            pool,\n            tokenInBalance,\n            tokenOutBalance\n        );\n\n        // We check the token ordering again to create the new shared cash packed struct\n        poolBalances.sharedCash = request.tokenIn < request.tokenOut\n            ? BalanceAllocation.toSharedCash(tokenInBalance, tokenOutBalance) // in is A, out is B\n            : BalanceAllocation.toSharedCash(tokenOutBalance, tokenInBalance); // in is B, out is A\n    }\n\n    function _processMinimalSwapInfoPoolSwapRequest(\n        IPoolSwapStructs.SwapRequest memory request,\n        IMinimalSwapInfoPool pool\n    ) private returns (uint256 amountCalculated) {\n        bytes32 tokenInBalance = _getMinimalSwapInfoPoolBalance(request.poolId, request.tokenIn);\n        bytes32 tokenOutBalance = _getMinimalSwapInfoPoolBalance(request.poolId, request.tokenOut);\n\n        // Perform the swap request and compute the new balances for 'token in' and 'token out' after the swap\n        (tokenInBalance, tokenOutBalance, amountCalculated) = _callMinimalSwapInfoPoolOnSwapHook(\n            request,\n            pool,\n            tokenInBalance,\n            tokenOutBalance\n        );\n\n        _minimalSwapInfoPoolsBalances[request.poolId][request.tokenIn] = tokenInBalance;\n        _minimalSwapInfoPoolsBalances[request.poolId][request.tokenOut] = tokenOutBalance;\n    }\n\n    /**\n     * @dev Calls the onSwap hook for a Pool that implements IMinimalSwapInfoPool: both Minimal Swap Info and Two Token\n     * Pools do this.\n     */\n    function _callMinimalSwapInfoPoolOnSwapHook(\n        IPoolSwapStructs.SwapRequest memory request,\n        IMinimalSwapInfoPool pool,\n        bytes32 tokenInBalance,\n        bytes32 tokenOutBalance\n    )\n        internal\n        returns (\n            bytes32 newTokenInBalance,\n            bytes32 newTokenOutBalance,\n            uint256 amountCalculated\n        )\n    {\n        uint256 tokenInTotal = tokenInBalance.total();\n        uint256 tokenOutTotal = tokenOutBalance.total();\n        request.lastChangeBlock = Math.max(tokenInBalance.lastChangeBlock(), tokenOutBalance.lastChangeBlock());\n\n        // Perform the swap request callback, and compute the new balances for 'token in' and 'token out' after the swap\n        amountCalculated = pool.onSwap(request, tokenInTotal, tokenOutTotal);\n        (uint256 amountIn, uint256 amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\n\n        newTokenInBalance = tokenInBalance.increaseCash(amountIn);\n        newTokenOutBalance = tokenOutBalance.decreaseCash(amountOut);\n    }\n\n    function _processGeneralPoolSwapRequest(IPoolSwapStructs.SwapRequest memory request, IGeneralPool pool)\n        private\n        returns (uint256 amountCalculated)\n    {\n        bytes32 tokenInBalance;\n        bytes32 tokenOutBalance;\n\n        // We access both token indexes without checking existence, because we will do it manually immediately after.\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[request.poolId];\n        uint256 indexIn = poolBalances.unchecked_indexOf(request.tokenIn);\n        uint256 indexOut = poolBalances.unchecked_indexOf(request.tokenOut);\n\n        if (indexIn == 0 || indexOut == 0) {\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\n            // more accurate revert reason.\n            _ensureRegisteredPool(request.poolId);\n            _revert(Errors.TOKEN_NOT_REGISTERED);\n        }\n\n        // EnumerableMap stores indices *plus one* to use the zero index as a sentinel value - because these are valid,\n        // we can undo this.\n        indexIn -= 1;\n        indexOut -= 1;\n\n        uint256 tokenAmount = poolBalances.length();\n        uint256[] memory currentBalances = new uint256[](tokenAmount);\n\n        request.lastChangeBlock = 0;\n        for (uint256 i = 0; i < tokenAmount; i++) {\n            // Because the iteration is bounded by `tokenAmount`, and no tokens are registered or deregistered here, we\n            // know `i` is a valid token index and can use `unchecked_valueAt` to save storage reads.\n            bytes32 balance = poolBalances.unchecked_valueAt(i);\n\n            currentBalances[i] = balance.total();\n            request.lastChangeBlock = Math.max(request.lastChangeBlock, balance.lastChangeBlock());\n\n            if (i == indexIn) {\n                tokenInBalance = balance;\n            } else if (i == indexOut) {\n                tokenOutBalance = balance;\n            }\n        }\n\n        // Perform the swap request callback and compute the new balances for 'token in' and 'token out' after the swap\n        amountCalculated = pool.onSwap(request, currentBalances, indexIn, indexOut);\n        (uint256 amountIn, uint256 amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\n        tokenInBalance = tokenInBalance.increaseCash(amountIn);\n        tokenOutBalance = tokenOutBalance.decreaseCash(amountOut);\n\n        // Because no tokens were registered or deregistered between now or when we retrieved the indexes for\n        // 'token in' and 'token out', we can use `unchecked_setAt` to save storage reads.\n        poolBalances.unchecked_setAt(indexIn, tokenInBalance);\n        poolBalances.unchecked_setAt(indexOut, tokenOutBalance);\n    }\n\n    // This function is not marked as `nonReentrant` because the underlying mechanism relies on reentrancy\n    function queryBatchSwap(\n        SwapKind kind,\n        BatchSwapStep[] memory swaps,\n        IAsset[] memory assets,\n        FundManagement memory funds\n    ) external override returns (int256[] memory) {\n        // In order to accurately 'simulate' swaps, this function actually does perform the swaps, including calling the\n        // Pool hooks and updating balances in storage. However, once it computes the final Vault Deltas, it\n        // reverts unconditionally, returning this array as the revert data.\n        //\n        // By wrapping this reverting call, we can decode the deltas 'returned' and return them as a normal Solidity\n        // function would. The only caveat is the function becomes non-view, but off-chain clients can still call it\n        // via eth_call to get the expected result.\n        //\n        // This technique was inspired by the work from the Gnosis team in the Gnosis Safe contract:\n        // https://github.com/gnosis/safe-contracts/blob/v1.2.0/contracts/GnosisSafe.sol#L265\n        //\n        // Most of this function is implemented using inline assembly, as the actual work it needs to do is not\n        // significant, and Solidity is not particularly well-suited to generate this behavior, resulting in a large\n        // amount of generated bytecode.\n\n        if (msg.sender != address(this)) {\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\n            // the preceding if statement will be executed instead.\n\n            // solhint-disable-next-line avoid-low-level-calls\n            (bool success, ) = address(this).call(msg.data);\n\n            // solhint-disable-next-line no-inline-assembly\n            assembly {\n                // This call should always revert to decode the actual asset deltas from the revert reason\n                switch success\n                    case 0 {\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\n                        // stored there as we take full control of the execution and then immediately return.\n\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\n                        // there was another revert reason and we should forward it.\n                        returndatacopy(0, 0, 0x04)\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\n\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\n                        if eq(eq(error, 0xfa61cc1200000000000000000000000000000000000000000000000000000000), 0) {\n                            returndatacopy(0, 0, returndatasize())\n                            revert(0, returndatasize())\n                        }\n\n                        // The returndata contains the signature, followed by the raw memory representation of an array:\n                        // length + data. We need to return an ABI-encoded representation of this array.\n                        // An ABI-encoded array contains an additional field when compared to its raw memory\n                        // representation: an offset to the location of the length. The offset itself is 32 bytes long,\n                        // so the smallest value we  can use is 32 for the data to be located immediately after it.\n                        mstore(0, 32)\n\n                        // We now copy the raw memory array from returndata into memory. Since the offset takes up 32\n                        // bytes, we start copying at address 0x20. We also get rid of the error signature, which takes\n                        // the first four bytes of returndata.\n                        let size := sub(returndatasize(), 0x04)\n                        returndatacopy(0x20, 0x04, size)\n\n                        // We finally return the ABI-encoded array, which has a total length equal to that of the array\n                        // (returndata), plus the 32 bytes for the offset.\n                        return(0, add(size, 32))\n                    }\n                    default {\n                        // This call should always revert, but we fail nonetheless if that didn't happen\n                        invalid()\n                    }\n            }\n        } else {\n            int256[] memory deltas = _swapWithPools(swaps, assets, funds, kind);\n\n            // solhint-disable-next-line no-inline-assembly\n            assembly {\n                // We will return a raw representation of the array in memory, which is composed of a 32 byte length,\n                // followed by the 32 byte int256 values. Because revert expects a size in bytes, we multiply the array\n                // length (stored at `deltas`) by 32.\n                let size := mul(mload(deltas), 32)\n\n                // We send one extra value for the error signature \"QueryError(int256[])\" which is 0xfa61cc12.\n                // We store it in the previous slot to the `deltas` array. We know there will be at least one available\n                // slot due to how the memory scratch space works.\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\n                mstore(sub(deltas, 0x20), 0x00000000000000000000000000000000000000000000000000000000fa61cc12)\n                let start := sub(deltas, 0x04)\n\n                // When copying from `deltas` into returndata, we copy an additional 36 bytes to also return the array's\n                // length and the error signature.\n                revert(start, add(size, 36))\n            }\n        }\n    }\n}\n"
      },
      "src.sol/amm/vault/interfaces/IGeneralPool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"./IBasePool.sol\";\n\n/**\n * @dev IPools with the General specialization setting should implement this interface.\n *\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\n * grant to the pool in a 'given out' swap.\n *\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\n * indeed the Vault.\n */\ninterface IGeneralPool is IBasePool {\n    function onSwap(\n        SwapRequest memory swapRequest,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut\n    ) external returns (uint256 amount);\n}\n"
      },
      "src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"./IBasePool.sol\";\n\n/**\n * @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\n *\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\n * to the pool in a 'given out' swap.\n *\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\n * indeed the Vault.\n */\ninterface IMinimalSwapInfoPool is IBasePool {\n    function onSwap(\n        SwapRequest memory swapRequest,\n        uint256 currentBalanceTokenIn,\n        uint256 currentBalanceTokenOut\n    ) external returns (uint256 amount);\n}\n"
      },
      "src.sol/amm/vault/Vault.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"./interfaces/IAuthorizer.sol\";\nimport \"./interfaces/IWETH.sol\";\n\nimport \"./VaultAuthorization.sol\";\nimport \"./FlashLoans.sol\";\nimport \"./Swaps.sol\";\n\n/**\n * @dev The `Vault` is Balancer V2's core contract. A single instance of it exists for the entire network, and it is the\n * entity used to interact with Pools by Liquidity Providers who join and exit them, Traders who swap, and Asset\n * Managers who withdraw and deposit tokens.\n *\n * The `Vault`'s source code is split among a number of sub-contracts, with the goal of improving readability and making\n * understanding the system easier. Most sub-contracts have been marked as `abstract` to explicitly indicate that only\n * the full `Vault` is meant to be deployed.\n *\n * Roughly speaking, these are the contents of each sub-contract:\n *\n *  - `AssetManagers`: Pool token Asset Manager registry, and Asset Manager interactions.\n *  - `Fees`: set and compute protocol fees.\n *  - `FlashLoans`: flash loan transfers and fees.\n *  - `PoolBalances`: Pool joins and exits.\n *  - `PoolRegistry`: Pool registration, ID management, and basic queries.\n *  - `PoolTokens`: Pool token registration and registration, and balance queries.\n *  - `Swaps`: Pool swaps.\n *  - `UserBalance`: manage user balances (Internal Balance operations and external balance transfers)\n *  - `VaultAuthorization`: access control, relayers and signature validation.\n *\n * Additionally, the different Pool specializations are handled by the `GeneralPoolsBalance`,\n * `MinimalSwapInfoPoolsBalance` and `TwoTokenPoolsBalance` sub-contracts, which in turn make use of the\n * `BalanceAllocation` library.\n *\n * The most important goal of the `Vault` is to make token swaps use as little gas as possible. This is reflected in a\n * multitude of design decisions, from minor things like the format used to store Pool IDs, to major features such as\n * the different Pool specialization settings.\n *\n * Finally, the large number of tasks carried out by the Vault means its bytecode is very large, close to exceeding\n * the contract size limit imposed by EIP 170 (https://eips.ethereum.org/EIPS/eip-170). Manual tuning of the source code\n * was required to improve code generation and bring the bytecode size below this limit. This includes extensive\n * utilization of `internal` functions (particularly inside modifiers), usage of named return arguments, dedicated\n * storage access methods, dynamic revert reason generation, and usage of inline assembly, to name a few.\n */\ncontract Vault is VaultAuthorization, FlashLoans, Swaps {\n    constructor(\n        IAuthorizer authorizer,\n        IWETH weth,\n        uint256 pauseWindowDuration,\n        uint256 bufferPeriodDuration\n    ) VaultAuthorization(authorizer) AssetHelpers(weth) TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration) {\n        // solhint-disable-previous-line no-empty-blocks\n    }\n\n    function setPaused(bool paused) external override nonReentrant authenticate {\n        _setPaused(paused);\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function WETH() external view override returns (IWETH) {\n        return _WETH();\n    }\n}\n"
      },
      "src.sol/amm/vault/FlashLoans.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n// This flash loan provider was based on the Aave protocol's open source\n// implementation and terminology and interfaces are intentionally kept\n// similar\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/helpers/BalancerErrors.sol\";\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/openzeppelin/ReentrancyGuard.sol\";\nimport \"../lib/openzeppelin/SafeERC20.sol\";\n\nimport \"./Fees.sol\";\nimport \"./interfaces/IFlashLoanRecipient.sol\";\n\n/**\n * @dev Handles Flash Loans through the Vault. Calls the `receiveFlashLoan` hook on the flash loan recipient\n * contract, which implements the `IFlashLoanRecipient` interface.\n */\nabstract contract FlashLoans is Fees, ReentrancyGuard, TemporarilyPausable {\n    using SafeERC20 for IERC20;\n\n    function flashLoan(\n        IFlashLoanRecipient recipient,\n        IERC20[] memory tokens,\n        uint256[] memory amounts,\n        bytes memory userData\n    ) external override nonReentrant whenNotPaused {\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\n\n        uint256[] memory feeAmounts = new uint256[](tokens.length);\n        uint256[] memory preLoanBalances = new uint256[](tokens.length);\n\n        // Used to ensure `tokens` is sorted in ascending order, which ensures token uniqueness.\n        IERC20 previousToken = IERC20(0);\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            IERC20 token = tokens[i];\n            uint256 amount = amounts[i];\n\n            _require(token > previousToken, token == IERC20(0) ? Errors.ZERO_TOKEN : Errors.UNSORTED_TOKENS);\n            previousToken = token;\n\n            preLoanBalances[i] = token.balanceOf(address(this));\n            feeAmounts[i] = _calculateFlashLoanFeeAmount(amount);\n\n            _require(preLoanBalances[i] >= amount, Errors.INSUFFICIENT_FLASH_LOAN_BALANCE);\n            token.safeTransfer(address(recipient), amount);\n        }\n\n        recipient.receiveFlashLoan(tokens, amounts, feeAmounts, userData);\n\n        for (uint256 i = 0; i < tokens.length; ++i) {\n            IERC20 token = tokens[i];\n            uint256 preLoanBalance = preLoanBalances[i];\n\n            // Checking for loan repayment first (without accounting for fees) makes for simpler debugging, and results\n            // in more accurate revert reasons if the flash loan protocol fee percentage is zero.\n            uint256 postLoanBalance = token.balanceOf(address(this));\n            _require(postLoanBalance >= preLoanBalance, Errors.INVALID_POST_LOAN_BALANCE);\n\n            // No need for checked arithmetic since we know the loan was fully repaid.\n            uint256 receivedFees = postLoanBalance - preLoanBalance;\n            _require(receivedFees >= feeAmounts[i], Errors.INSUFFICIENT_FLASH_LOAN_FEES);\n\n            _payFee(token, receivedFees);\n        }\n    }\n}\n"
      },
      "src.sol/amm/vault/Authorizer.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"./interfaces/IAuthorizer.sol\";\nimport \"../lib/openzeppelin/AccessControl.sol\";\nimport \"../lib/helpers/InputHelpers.sol\";\n\n/**\n * @dev Basic Authorizer implementation, based on OpenZeppelin's Access Control.\n *\n * Users are allowed to perform actions if they have the role with the same identifier. In this sense, roles are not\n * being truly used as such, since they each map to a single action identifier.\n *\n * This temporary implementation is expected to be replaced soon after launch by a more sophisticated one, able to\n * manage permissions across multiple contracts and to natively handle timelocks.\n */\ncontract Authorizer is AccessControl, IAuthorizer {\n    constructor(address admin) {\n        _setupRole(DEFAULT_ADMIN_ROLE, admin);\n    }\n\n    function canPerform(\n        bytes32 actionId,\n        address account,\n        address\n    ) public view override returns (bool) {\n        // This Authorizer ignores the 'where' field completely.\n        return AccessControl.hasRole(actionId, account);\n    }\n\n    /**\n     * @dev Grants multiple roles to a single account.\n     */\n    function grantRoles(bytes32[] memory roles, address account) external {\n        for (uint256 i = 0; i < roles.length; i++) {\n            grantRole(roles[i], account);\n        }\n    }\n\n    /**\n     * @dev Grants roles to a list of accounts.\n     */\n    function grantRolesToMany(bytes32[] memory roles, address[] memory accounts) external {\n        InputHelpers.ensureInputLengthMatch(roles.length, accounts.length);\n        for (uint256 i = 0; i < roles.length; i++) {\n            grantRole(roles[i], accounts[i]);\n        }\n    }\n\n    /**\n     * @dev Revokes multiple roles from a single account.\n     */\n    function revokeRoles(bytes32[] memory roles, address account) external {\n        for (uint256 i = 0; i < roles.length; i++) {\n            revokeRole(roles[i], account);\n        }\n    }\n\n    /**\n     * @dev Revokes roles from a list of accounts.\n     */\n    function revokeRolesFromMany(bytes32[] memory roles, address[] memory accounts) external {\n        InputHelpers.ensureInputLengthMatch(roles.length, accounts.length);\n        for (uint256 i = 0; i < roles.length; i++) {\n            revokeRole(roles[i], accounts[i]);\n        }\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/AccessControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\nimport \"./EnumerableSet.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl {\n    using EnumerableSet for EnumerableSet.AddressSet;\n\n    struct RoleData {\n        EnumerableSet.AddressSet members;\n        bytes32 adminRole;\n    }\n\n    mapping(bytes32 => RoleData) private _roles;\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     *\n     * _Available since v3.1._\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call, an admin role\n     * bearer except when using {_setupRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual returns (bool) {\n        return _roles[role].members.contains(account);\n    }\n\n    /**\n     * @dev Returns the number of accounts that have `role`. Can be used\n     * together with {getRoleMember} to enumerate all bearers of a role.\n     */\n    function getRoleMemberCount(bytes32 role) public view returns (uint256) {\n        return _roles[role].members.length();\n    }\n\n    /**\n     * @dev Returns one of the accounts that have `role`. `index` must be a\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\n     *\n     * Role bearers are not sorted in any particular way, and their ordering may\n     * change at any point.\n     *\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n     * you perform all queries on the same block. See the following\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n     * for more information.\n     */\n    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\n        return _roles[role].members.at(index);\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view returns (bytes32) {\n        return _roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) public virtual {\n        _require(hasRole(_roles[role].adminRole, msg.sender), Errors.GRANT_SENDER_NOT_ADMIN);\n\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had already been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) public virtual {\n        _require(hasRole(_roles[role].adminRole, msg.sender), Errors.REVOKE_SENDER_NOT_ADMIN);\n\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) public virtual {\n        _require(account == msg.sender, Errors.RENOUNCE_SENDER_NOT_ALLOWED);\n\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event. Note that unlike {grantRole}, this function doesn't perform any\n     * checks on the calling account.\n     *\n     * [WARNING]\n     * ====\n     * This function should only be called from the constructor when setting\n     * up the initial roles for the system.\n     *\n     * Using this function in any other way is effectively circumventing the admin\n     * system imposed by {AccessControl}.\n     * ====\n     */\n    function _setupRole(bytes32 role, address account) internal virtual {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\n        _roles[role].adminRole = adminRole;\n    }\n\n    function _grantRole(bytes32 role, address account) private {\n        if (_roles[role].members.add(account)) {\n            emit RoleGranted(role, account, msg.sender);\n        }\n    }\n\n    function _revokeRole(bytes32 role, address account) private {\n        if (_roles[role].members.remove(account)) {\n            emit RoleRevoked(role, account, msg.sender);\n        }\n    }\n}\n"
      },
      "src.sol/amm/pools/weighted/WeightedPool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../../lib/math/FixedPoint.sol\";\nimport \"../../lib/helpers/InputHelpers.sol\";\n\nimport \"../BaseMinimalSwapInfoPool.sol\";\n\nimport \"./WeightedMath.sol\";\nimport \"./WeightedPoolUserDataHelpers.sol\";\n\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus total\n// count, resulting in a large number of state variables.\n\ncontract WeightedPool is BaseMinimalSwapInfoPool, WeightedMath {\n    using FixedPoint for uint256;\n    using WeightedPoolUserDataHelpers for bytes;\n\n    // The protocol fees will always be charged using the token associated with the max weight in the pool.\n    // Since these Pools will register tokens only once, we can assume this index will be constant.\n    uint256 private immutable _maxWeightTokenIndex;\n\n    uint256 private immutable _normalizedWeight0;\n    uint256 private immutable _normalizedWeight1;\n    uint256 private immutable _normalizedWeight2;\n    uint256 private immutable _normalizedWeight3;\n    uint256 private immutable _normalizedWeight4;\n    uint256 private immutable _normalizedWeight5;\n    uint256 private immutable _normalizedWeight6;\n    uint256 private immutable _normalizedWeight7;\n\n    uint256 private _lastInvariant;\n\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\n\n    constructor(\n        IVault vault,\n        string memory name,\n        string memory symbol,\n        IERC20[] memory tokens,\n        uint256[] memory normalizedWeights,\n        uint256 swapFeePercentage,\n        uint256 pauseWindowDuration,\n        uint256 bufferPeriodDuration,\n        address owner\n    )\n        BaseMinimalSwapInfoPool(\n            vault,\n            name,\n            symbol,\n            tokens,\n            swapFeePercentage,\n            pauseWindowDuration,\n            bufferPeriodDuration,\n            owner\n        )\n    {\n        uint256 numTokens = tokens.length;\n        InputHelpers.ensureInputLengthMatch(numTokens, normalizedWeights.length);\n\n        // Ensure  each normalized weight is above them minimum and find the token index of the maximum weight\n        uint256 normalizedSum = 0;\n        uint256 maxWeightTokenIndex = 0;\n        uint256 maxNormalizedWeight = 0;\n        for (uint8 i = 0; i < numTokens; i++) {\n            uint256 normalizedWeight = normalizedWeights[i];\n            _require(normalizedWeight >= _MIN_WEIGHT, Errors.MIN_WEIGHT);\n\n            normalizedSum = normalizedSum.add(normalizedWeight);\n            if (normalizedWeight > maxNormalizedWeight) {\n                maxWeightTokenIndex = i;\n                maxNormalizedWeight = normalizedWeight;\n            }\n        }\n        // Ensure that the normalized weights sum to ONE\n        _require(normalizedSum == FixedPoint.ONE, Errors.NORMALIZED_WEIGHT_INVARIANT);\n\n        _maxWeightTokenIndex = maxWeightTokenIndex;\n        _normalizedWeight0 = normalizedWeights.length > 0 ? normalizedWeights[0] : 0;\n        _normalizedWeight1 = normalizedWeights.length > 1 ? normalizedWeights[1] : 0;\n        _normalizedWeight2 = normalizedWeights.length > 2 ? normalizedWeights[2] : 0;\n        _normalizedWeight3 = normalizedWeights.length > 3 ? normalizedWeights[3] : 0;\n        _normalizedWeight4 = normalizedWeights.length > 4 ? normalizedWeights[4] : 0;\n        _normalizedWeight5 = normalizedWeights.length > 5 ? normalizedWeights[5] : 0;\n        _normalizedWeight6 = normalizedWeights.length > 6 ? normalizedWeights[6] : 0;\n        _normalizedWeight7 = normalizedWeights.length > 7 ? normalizedWeights[7] : 0;\n    }\n\n    function _normalizedWeight(IERC20 token) internal view virtual returns (uint256) {\n        // prettier-ignore\n        if (token == _token0) { return _normalizedWeight0; }\n        else if (token == _token1) { return _normalizedWeight1; }\n        else if (token == _token2) { return _normalizedWeight2; }\n        else if (token == _token3) { return _normalizedWeight3; }\n        else if (token == _token4) { return _normalizedWeight4; }\n        else if (token == _token5) { return _normalizedWeight5; }\n        else if (token == _token6) { return _normalizedWeight6; }\n        else if (token == _token7) { return _normalizedWeight7; }\n        else {\n            _revert(Errors.INVALID_TOKEN);\n        }\n    }\n\n    function _normalizedWeights() internal view virtual returns (uint256[] memory) {\n        uint256 totalTokens = _getTotalTokens();\n        uint256[] memory normalizedWeights = new uint256[](totalTokens);\n\n        // prettier-ignore\n        {\n            if (totalTokens > 0) { normalizedWeights[0] = _normalizedWeight0; } else { return normalizedWeights; }\n            if (totalTokens > 1) { normalizedWeights[1] = _normalizedWeight1; } else { return normalizedWeights; }\n            if (totalTokens > 2) { normalizedWeights[2] = _normalizedWeight2; } else { return normalizedWeights; }\n            if (totalTokens > 3) { normalizedWeights[3] = _normalizedWeight3; } else { return normalizedWeights; }\n            if (totalTokens > 4) { normalizedWeights[4] = _normalizedWeight4; } else { return normalizedWeights; }\n            if (totalTokens > 5) { normalizedWeights[5] = _normalizedWeight5; } else { return normalizedWeights; }\n            if (totalTokens > 6) { normalizedWeights[6] = _normalizedWeight6; } else { return normalizedWeights; }\n            if (totalTokens > 7) { normalizedWeights[7] = _normalizedWeight7; } else { return normalizedWeights; }\n        }\n\n        return normalizedWeights;\n    }\n\n    function getLastInvariant() external view returns (uint256) {\n        return _lastInvariant;\n    }\n\n    /**\n     * @dev Returns the current value of the invariant.\n     */\n    function getInvariant() public view returns (uint256) {\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\n\n        // Since the Pool hooks always work with upscaled balances, we manually\n        // upscale here for consistency\n        _upscaleArray(balances, _scalingFactors());\n\n        uint256[] memory normalizedWeights = _normalizedWeights();\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\n    }\n\n    function getNormalizedWeights() external view returns (uint256[] memory) {\n        return _normalizedWeights();\n    }\n\n    // Base Pool handlers\n\n    // Swap\n\n    function _onSwapGivenIn(\n        SwapRequest memory swapRequest,\n        uint256 currentBalanceTokenIn,\n        uint256 currentBalanceTokenOut\n    ) internal view virtual override whenNotPaused returns (uint256) {\n        // Swaps are disabled while the contract is paused.\n\n        return\n            WeightedMath._calcOutGivenIn(\n                currentBalanceTokenIn,\n                _normalizedWeight(swapRequest.tokenIn),\n                currentBalanceTokenOut,\n                _normalizedWeight(swapRequest.tokenOut),\n                swapRequest.amount\n            );\n    }\n\n    function _onSwapGivenOut(\n        SwapRequest memory swapRequest,\n        uint256 currentBalanceTokenIn,\n        uint256 currentBalanceTokenOut\n    ) internal view virtual override whenNotPaused returns (uint256) {\n        // Swaps are disabled while the contract is paused.\n\n        return\n            WeightedMath._calcInGivenOut(\n                currentBalanceTokenIn,\n                _normalizedWeight(swapRequest.tokenIn),\n                currentBalanceTokenOut,\n                _normalizedWeight(swapRequest.tokenOut),\n                swapRequest.amount\n            );\n    }\n\n    // Initialize\n\n    function _onInitializePool(\n        bytes32,\n        address,\n        address,\n        bytes memory userData\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\n        // It would be strange for the Pool to be paused before it is initialized, but for consistency we prevent\n        // initialization in this case.\n\n        WeightedPool.JoinKind kind = userData.joinKind();\n        _require(kind == WeightedPool.JoinKind.INIT, Errors.UNINITIALIZED);\n\n        uint256[] memory amountsIn = userData.initialAmountsIn();\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\n        _upscaleArray(amountsIn, _scalingFactors());\n\n        uint256[] memory normalizedWeights = _normalizedWeights();\n\n        uint256 invariantAfterJoin = WeightedMath._calculateInvariant(normalizedWeights, amountsIn);\n\n        // Set the initial BPT to the value of the invariant times the number of tokens. This makes BPT supply more\n        // consistent in Pools with similar compositions but different number of tokens.\n        uint256 bptAmountOut = Math.mul(invariantAfterJoin, _getTotalTokens());\n\n        _lastInvariant = invariantAfterJoin;\n\n        return (bptAmountOut, amountsIn);\n    }\n\n    // Join\n\n    function _onJoinPool(\n        bytes32,\n        address,\n        address,\n        uint256[] memory balances,\n        uint256,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    )\n        internal\n        virtual\n        override\n        whenNotPaused\n        returns (\n            uint256,\n            uint256[] memory,\n            uint256[] memory\n        )\n    {\n        // All joins are disabled while the contract is paused.\n\n        uint256[] memory normalizedWeights = _normalizedWeights();\n\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas\n        // computing them on each individual swap\n        uint256 invariantBeforeJoin = WeightedMath._calculateInvariant(normalizedWeights, balances);\n\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\n            balances,\n            normalizedWeights,\n            _lastInvariant,\n            invariantBeforeJoin,\n            protocolSwapFeePercentage\n        );\n\n        // Update current balances by subtracting the protocol fee amounts\n        _mutateAmounts(balances, dueProtocolFeeAmounts, FixedPoint.sub);\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, normalizedWeights, userData);\n\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\n        // protocol swap fee amounts due in future joins and exits.\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn, normalizedWeights);\n\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\n    }\n\n    function _doJoin(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        bytes memory userData\n    ) private view returns (uint256, uint256[] memory) {\n        JoinKind kind = userData.joinKind();\n\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\n            return _joinExactTokensInForBPTOut(balances, normalizedWeights, userData);\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\n            return _joinTokenInForExactBPTOut(balances, normalizedWeights, userData);\n        } else {\n            _revert(Errors.UNHANDLED_JOIN_KIND);\n        }\n    }\n\n    function _joinExactTokensInForBPTOut(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        bytes memory userData\n    ) private view returns (uint256, uint256[] memory) {\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\n\n        _upscaleArray(amountsIn, _scalingFactors());\n\n        uint256 bptAmountOut = WeightedMath._calcBptOutGivenExactTokensIn(\n            balances,\n            normalizedWeights,\n            amountsIn,\n            totalSupply(),\n            _swapFeePercentage\n        );\n\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\n\n        return (bptAmountOut, amountsIn);\n    }\n\n    function _joinTokenInForExactBPTOut(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        bytes memory userData\n    ) private view returns (uint256, uint256[] memory) {\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\n        // Note that there is no maximum amountIn parameter: this is handled by `IVault.joinPool`.\n\n        _require(tokenIndex < _getTotalTokens(), Errors.OUT_OF_BOUNDS);\n\n        uint256[] memory amountsIn = new uint256[](_getTotalTokens());\n        amountsIn[tokenIndex] = WeightedMath._calcTokenInGivenExactBptOut(\n            balances[tokenIndex],\n            normalizedWeights[tokenIndex],\n            bptAmountOut,\n            totalSupply(),\n            _swapFeePercentage\n        );\n\n        return (bptAmountOut, amountsIn);\n    }\n\n    // Exit\n\n    function _onExitPool(\n        bytes32,\n        address,\n        address,\n        uint256[] memory balances,\n        uint256,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    )\n        internal\n        virtual\n        override\n        returns (\n            uint256 bptAmountIn,\n            uint256[] memory amountsOut,\n            uint256[] memory dueProtocolFeeAmounts\n        )\n    {\n        // Exits are not completely disabled while the contract is paused: proportional exits (exact BPT in for tokens\n        // out) remain functional.\n\n        uint256[] memory normalizedWeights = _normalizedWeights();\n\n        if (_isNotPaused()) {\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\n            // spending gas calculating the fees on each individual swap.\n            uint256 invariantBeforeExit = WeightedMath._calculateInvariant(normalizedWeights, balances);\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\n                balances,\n                normalizedWeights,\n                _lastInvariant,\n                invariantBeforeExit,\n                protocolSwapFeePercentage\n            );\n\n            // Update current balances by subtracting the protocol fee amounts\n            _mutateAmounts(balances, dueProtocolFeeAmounts, FixedPoint.sub);\n        } else {\n            // If the contract is paused, swap protocol fee amounts are not charged to avoid extra calculations and\n            // reduce the potential for errors.\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\n        }\n\n        (bptAmountIn, amountsOut) = _doExit(balances, normalizedWeights, userData);\n\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\n        // protocol swap fees due in future joins and exits.\n        _lastInvariant = _invariantAfterExit(balances, amountsOut, normalizedWeights);\n\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\n    }\n\n    function _doExit(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        bytes memory userData\n    ) private view returns (uint256, uint256[] memory) {\n        ExitKind kind = userData.exitKind();\n\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\n            return _exitExactBPTInForTokenOut(balances, normalizedWeights, userData);\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\n            return _exitExactBPTInForTokensOut(balances, userData);\n        } else {\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\n            return _exitBPTInForExactTokensOut(balances, normalizedWeights, userData);\n        }\n    }\n\n    function _exitExactBPTInForTokenOut(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        bytes memory userData\n    ) private view whenNotPaused returns (uint256, uint256[] memory) {\n        // This exit function is disabled if the contract is paused.\n\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\n        // Note that there is no minimum amountOut parameter: this is handled by `IVault.exitPool`.\n\n        _require(tokenIndex < _getTotalTokens(), Errors.OUT_OF_BOUNDS);\n\n        // We exit in a single token, so we initialize amountsOut with zeros\n        uint256[] memory amountsOut = new uint256[](_getTotalTokens());\n\n        // And then assign the result to the selected token\n        amountsOut[tokenIndex] = WeightedMath._calcTokenOutGivenExactBptIn(\n            balances[tokenIndex],\n            normalizedWeights[tokenIndex],\n            bptAmountIn,\n            totalSupply(),\n            _swapFeePercentage\n        );\n\n        return (bptAmountIn, amountsOut);\n    }\n\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\n        private\n        view\n        returns (uint256, uint256[] memory)\n    {\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\n        // This particular exit function is the only one that remains available because it is the simplest one, and\n        // therefore the one with the lowest likelihood of errors.\n\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\n        // Note that there is no minimum amountOut parameter: this is handled by `IVault.exitPool`.\n\n        uint256[] memory amountsOut = WeightedMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\n        return (bptAmountIn, amountsOut);\n    }\n\n    function _exitBPTInForExactTokensOut(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        bytes memory userData\n    ) private view whenNotPaused returns (uint256, uint256[] memory) {\n        // This exit function is disabled if the contract is paused.\n\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\n        _upscaleArray(amountsOut, _scalingFactors());\n\n        uint256 bptAmountIn = WeightedMath._calcBptInGivenExactTokensOut(\n            balances,\n            normalizedWeights,\n            amountsOut,\n            totalSupply(),\n            _swapFeePercentage\n        );\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\n\n        return (bptAmountIn, amountsOut);\n    }\n\n    // Helpers\n\n    function _getDueProtocolFeeAmounts(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        uint256 previousInvariant,\n        uint256 currentInvariant,\n        uint256 protocolSwapFeePercentage\n    ) private view returns (uint256[] memory) {\n        // Initialize with zeros\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\n\n        // Early return if the protocol swap fee percentage is zero, saving gas.\n        if (protocolSwapFeePercentage == 0) {\n            return dueProtocolFeeAmounts;\n        }\n\n        // The protocol swap fees are always paid using the token with the largest weight in the Pool. As this is the\n        // token that is expected to have the largest balance, using it to pay fees should not unbalance the Pool.\n        dueProtocolFeeAmounts[_maxWeightTokenIndex] = WeightedMath._calcDueTokenProtocolSwapFeeAmount(\n            balances[_maxWeightTokenIndex],\n            normalizedWeights[_maxWeightTokenIndex],\n            previousInvariant,\n            currentInvariant,\n            protocolSwapFeePercentage\n        );\n\n        return dueProtocolFeeAmounts;\n    }\n\n    /**\n     * @dev Returns the value of the invariant given `balances`, assuming they are increased by `amountsIn`. All\n     * amounts are expected to be upscaled.\n     */\n    function _invariantAfterJoin(\n        uint256[] memory balances,\n        uint256[] memory amountsIn,\n        uint256[] memory normalizedWeights\n    ) private view returns (uint256) {\n        _mutateAmounts(balances, amountsIn, FixedPoint.add);\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\n    }\n\n    function _invariantAfterExit(\n        uint256[] memory balances,\n        uint256[] memory amountsOut,\n        uint256[] memory normalizedWeights\n    ) private view returns (uint256) {\n        _mutateAmounts(balances, amountsOut, FixedPoint.sub);\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\n    }\n\n    /**\n     * @dev Mutates `amounts` by applying `mutation` with each entry in `arguments`.\n     *\n     * Equivalent to `amounts = amounts.map(mutation)`.\n     */\n    function _mutateAmounts(\n        uint256[] memory toMutate,\n        uint256[] memory arguments,\n        function(uint256, uint256) pure returns (uint256) mutation\n    ) private view {\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\n            toMutate[i] = mutation(toMutate[i], arguments[i]);\n        }\n    }\n\n    /**\n     * @dev This function returns the appreciation of one BPT relative to the\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\n     */\n    function getRate() public view returns (uint256) {\n        // The initial BPT supply is equal to the invariant times the number of tokens.\n        return Math.mul(getInvariant(), _getTotalTokens()).divDown(totalSupply());\n    }\n}\n"
      },
      "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"./BasePool.sol\";\nimport \"../vault/interfaces/IMinimalSwapInfoPool.sol\";\n\n/**\n * @dev Extension of `BasePool`, adding a handler for `IMinimalSwapInfoPool.onSwap`.\n *\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\n */\nabstract contract BaseMinimalSwapInfoPool is IMinimalSwapInfoPool, BasePool {\n    constructor(\n        IVault vault,\n        string memory name,\n        string memory symbol,\n        IERC20[] memory tokens,\n        uint256 swapFeePercentage,\n        uint256 pauseWindowDuration,\n        uint256 bufferPeriodDuration,\n        address owner\n    )\n        BasePool(\n            vault,\n            tokens.length == 2 ? IVault.PoolSpecialization.TWO_TOKEN : IVault.PoolSpecialization.MINIMAL_SWAP_INFO,\n            name,\n            symbol,\n            tokens,\n            swapFeePercentage,\n            pauseWindowDuration,\n            bufferPeriodDuration,\n            owner\n        )\n    {\n        // solhint-disable-previous-line no-empty-blocks\n    }\n\n    // Swap Hooks\n\n    function onSwap(\n        SwapRequest memory request,\n        uint256 balanceTokenIn,\n        uint256 balanceTokenOut\n    ) external view virtual override returns (uint256) {\n        uint256 scalingFactorTokenIn = _scalingFactor(request.tokenIn);\n        uint256 scalingFactorTokenOut = _scalingFactor(request.tokenOut);\n\n        if (request.kind == IVault.SwapKind.GIVEN_IN) {\n            // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\n            request.amount = _subtractSwapFeeAmount(request.amount);\n\n            // All token amounts are upscaled.\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\n            request.amount = _upscale(request.amount, scalingFactorTokenIn);\n\n            uint256 amountOut = _onSwapGivenIn(request, balanceTokenIn, balanceTokenOut);\n\n            // amountOut tokens are exiting the Pool, so we round down.\n            return _downscaleDown(amountOut, scalingFactorTokenOut);\n        } else {\n            // All token amounts are upscaled.\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\n            request.amount = _upscale(request.amount, scalingFactorTokenOut);\n\n            uint256 amountIn = _onSwapGivenOut(request, balanceTokenIn, balanceTokenOut);\n\n            // amountIn tokens are entering the Pool, so we round up.\n            amountIn = _downscaleUp(amountIn, scalingFactorTokenIn);\n\n            // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\n            return _addSwapFeeAmount(amountIn);\n        }\n    }\n\n    /*\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\n     *\n     * Returns the amount of tokens that will be taken from the Pool in return.\n     *\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled. The swap fee has already\n     * been deducted from `swapRequest.amount`.\n     *\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\n     * Vault.\n     */\n    function _onSwapGivenIn(\n        SwapRequest memory swapRequest,\n        uint256 balanceTokenIn,\n        uint256 balanceTokenOut\n    ) internal view virtual returns (uint256);\n\n    /*\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\n     *\n     * Returns the amount of tokens that will be granted to the Pool in return.\n     *\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled.\n     *\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\n     * and returning it to the Vault.\n     */\n    function _onSwapGivenOut(\n        SwapRequest memory swapRequest,\n        uint256 balanceTokenIn,\n        uint256 balanceTokenOut\n    ) internal view virtual returns (uint256);\n}\n"
      },
      "src.sol/amm/pools/weighted/WeightedMath.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../../lib/math/FixedPoint.sol\";\nimport \"../../lib/math/Math.sol\";\nimport \"../../lib/helpers/InputHelpers.sol\";\n\n/* solhint-disable private-vars-leading-underscore */\n\ncontract WeightedMath {\n    using FixedPoint for uint256;\n    // A minimum normalized weight imposes a maximum weight ratio. We need this due to limitations in the\n    // implementation of the power function, as these ratios are often exponents.\n    uint256 internal constant _MIN_WEIGHT = 0.01e18;\n    // Having a minimum normalized weight imposes a limit on the maximum number of tokens;\n    // i.e., the largest possible pool is one where all tokens have exactly the minimum weight.\n    uint256 internal constant _MAX_WEIGHTED_TOKENS = 100;\n\n    // Pool limits that arise from limitations in the fixed point power function (and the imposed 1:100 maximum weight\n    // ratio).\n\n    // Swap limits: amounts swapped may not be larger than this percentage of total balance.\n    uint256 internal constant _MAX_IN_RATIO = 0.3e18;\n    uint256 internal constant _MAX_OUT_RATIO = 0.3e18;\n\n    // Invariant growth limit: non-proportional joins cannot cause the invariant to increase by more than this ratio.\n    uint256 internal constant _MAX_INVARIANT_RATIO = 3e18;\n    // Invariant shrink limit: non-proportional exits cannot cause the invariant to decrease by less than this ratio.\n    uint256 internal constant _MIN_INVARIANT_RATIO = 0.7e18;\n\n    // Invariant is used to collect protocol swap fees by comparing its value between two times.\n    // So we can round always to the same direction. It is also used to initiate the BPT amount\n    // and, because there is a minimum BPT, we round down the invariant.\n    function _calculateInvariant(uint256[] memory normalizedWeights, uint256[] memory balances)\n        internal\n        pure\n        returns (uint256 invariant)\n    {\n        /**********************************************************************************************\n        // invariant               _____                                                             //\n        // wi = weight index i      | |      wi                                                      //\n        // bi = balance index i     | |  bi ^   = i                                                  //\n        // i = invariant                                                                             //\n        **********************************************************************************************/\n\n        invariant = FixedPoint.ONE;\n        for (uint256 i = 0; i < normalizedWeights.length; i++) {\n            invariant = invariant.mulDown(balances[i].powDown(normalizedWeights[i]));\n        }\n\n        _require(invariant > 0, Errors.ZERO_INVARIANT);\n    }\n\n    // Computes how many tokens can be taken out of a pool if `amountIn` are sent, given the\n    // current balances and weights.\n    function _calcOutGivenIn(\n        uint256 balanceIn,\n        uint256 weightIn,\n        uint256 balanceOut,\n        uint256 weightOut,\n        uint256 amountIn\n    ) internal pure returns (uint256) {\n        /**********************************************************************************************\n        // outGivenIn                                                                                //\n        // aO = amountOut                                                                            //\n        // bO = balanceOut                                                                           //\n        // bI = balanceIn              /      /            bI             \\    (wI / wO) \\           //\n        // aI = amountIn    aO = bO * |  1 - | --------------------------  | ^            |          //\n        // wI = weightIn               \\      \\       ( bI + aI )         /              /           //\n        // wO = weightOut                                                                            //\n        **********************************************************************************************/\n\n        // Amount out, so we round down overall.\n\n        // The multiplication rounds down, and the subtrahend (power) rounds up (so the base rounds up too).\n        // Because bI / (bI + aI) <= 1, the exponent rounds down.\n\n        // Cannot exceed maximum in ratio\n        _require(amountIn <= balanceIn.mulDown(_MAX_IN_RATIO), Errors.MAX_IN_RATIO);\n\n        uint256 denominator = balanceIn.add(amountIn);\n        uint256 base = balanceIn.divUp(denominator);\n        uint256 exponent = weightIn.divDown(weightOut);\n        uint256 power = base.powUp(exponent);\n\n        return balanceOut.mulDown(power.complement());\n    }\n\n    // Computes how many tokens must be sent to a pool in order to take `amountOut`, given the\n    // current balances and weights.\n    function _calcInGivenOut(\n        uint256 balanceIn,\n        uint256 weightIn,\n        uint256 balanceOut,\n        uint256 weightOut,\n        uint256 amountOut\n    ) internal pure returns (uint256) {\n        /**********************************************************************************************\n        // inGivenOut                                                                                //\n        // aO = amountOut                                                                            //\n        // bO = balanceOut                                                                           //\n        // bI = balanceIn              /  /            bO             \\    (wO / wI)      \\          //\n        // aI = amountIn    aI = bI * |  | --------------------------  | ^            - 1  |         //\n        // wI = weightIn               \\  \\       ( bO - aO )         /                   /          //\n        // wO = weightOut                                                                            //\n        **********************************************************************************************/\n\n        // Amount in, so we round up overall.\n\n        // The multiplication rounds up, and the power rounds up (so the base rounds up too).\n        // Because b0 / (b0 - a0) >= 1, the exponent rounds up.\n\n        // Cannot exceed maximum out ratio\n        _require(amountOut <= balanceOut.mulDown(_MAX_OUT_RATIO), Errors.MAX_OUT_RATIO);\n\n        uint256 base = balanceOut.divUp(balanceOut.sub(amountOut));\n        uint256 exponent = weightOut.divUp(weightIn);\n        uint256 power = base.powUp(exponent);\n\n        // Because the base is larger than one (and the power rounds up), the power should always be larger than one, so\n        // the following subtraction should never revert.\n        uint256 ratio = power.sub(FixedPoint.ONE);\n\n        return balanceIn.mulUp(ratio);\n    }\n\n    function _calcBptOutGivenExactTokensIn(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        uint256[] memory amountsIn,\n        uint256 bptTotalSupply,\n        uint256 swapFee\n    ) internal pure returns (uint256) {\n        // BPT out, so we round down overall.\n\n        uint256[] memory balanceRatiosWithFee = new uint256[](amountsIn.length);\n\n        uint256 invariantRatioWithFees = 0;\n        for (uint256 i = 0; i < balances.length; i++) {\n            balanceRatiosWithFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\n            invariantRatioWithFees = invariantRatioWithFees.add(balanceRatiosWithFee[i].mulDown(normalizedWeights[i]));\n        }\n\n        uint256 invariantRatio = FixedPoint.ONE;\n        for (uint256 i = 0; i < balances.length; i++) {\n            uint256 amountInWithoutFee;\n\n            if (balanceRatiosWithFee[i] > invariantRatioWithFees) {\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithFees.sub(FixedPoint.ONE));\n                uint256 taxableAmount = amountsIn[i].sub(nonTaxableAmount);\n                amountInWithoutFee = nonTaxableAmount.add(taxableAmount.mulDown(FixedPoint.ONE.sub(swapFee)));\n            } else {\n                amountInWithoutFee = amountsIn[i];\n            }\n\n            uint256 balanceRatio = balances[i].add(amountInWithoutFee).divDown(balances[i]);\n\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\n        }\n\n        if (invariantRatio >= FixedPoint.ONE) {\n            return bptTotalSupply.mulDown(invariantRatio.sub(FixedPoint.ONE));\n        } else {\n            return 0;\n        }\n    }\n\n    function _calcTokenInGivenExactBptOut(\n        uint256 balance,\n        uint256 normalizedWeight,\n        uint256 bptAmountOut,\n        uint256 bptTotalSupply,\n        uint256 swapFee\n    ) internal pure returns (uint256) {\n        /******************************************************************************************\n        // tokenInForExactBPTOut                                                                 //\n        // a = amountIn                                                                          //\n        // b = balance                      /  /    totalBPT + bptOut      \\    (1 / w)       \\  //\n        // bptOut = bptAmountOut   a = b * |  | --------------------------  | ^          - 1  |  //\n        // bpt = totalBPT                   \\  \\       totalBPT            /                  /  //\n        // w = weight                                                                            //\n        ******************************************************************************************/\n\n        // Token in, so we round up overall.\n\n        // Calculate the factor by which the invariant will increase after minting BPTAmountOut\n        uint256 invariantRatio = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply);\n        _require(invariantRatio <= _MAX_INVARIANT_RATIO, Errors.MAX_OUT_BPT_FOR_TOKEN_IN);\n\n        // Calculate by how much the token balance has to increase to match the invariantRatio\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divUp(normalizedWeight));\n\n        uint256 amountInWithoutFee = balance.mulUp(balanceRatio.sub(FixedPoint.ONE));\n\n        // We can now compute how much extra balance is being deposited and used in virtual swaps, and charge swap fees\n        // accordingly.\n        uint256 taxablePercentage = normalizedWeight.complement();\n        uint256 taxableAmount = amountInWithoutFee.mulUp(taxablePercentage);\n        uint256 nonTaxableAmount = amountInWithoutFee.sub(taxableAmount);\n\n        return nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\n    }\n\n    function _calcBptInGivenExactTokensOut(\n        uint256[] memory balances,\n        uint256[] memory normalizedWeights,\n        uint256[] memory amountsOut,\n        uint256 bptTotalSupply,\n        uint256 swapFee\n    ) internal pure returns (uint256) {\n        // BPT in, so we round up overall.\n\n        uint256[] memory balanceRatiosWithoutFee = new uint256[](amountsOut.length);\n        uint256 invariantRatioWithoutFees = 0;\n        for (uint256 i = 0; i < balances.length; i++) {\n            balanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\n            invariantRatioWithoutFees = invariantRatioWithoutFees.add(\n                balanceRatiosWithoutFee[i].mulUp(normalizedWeights[i])\n            );\n        }\n\n        uint256 invariantRatio = FixedPoint.ONE;\n        for (uint256 i = 0; i < balances.length; i++) {\n            // Swap fees are typically charged on 'token in', but there is no 'token in' here,\n            // o we apply it to 'token out'.\n            // This results in slightly larger price impact.\n\n            uint256 amountOutWithFee;\n            if (invariantRatioWithoutFees > balanceRatiosWithoutFee[i]) {\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithoutFees.complement());\n                uint256 taxableAmount = amountsOut[i].sub(nonTaxableAmount);\n\n                amountOutWithFee = nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\n            } else {\n                amountOutWithFee = amountsOut[i];\n            }\n\n            uint256 balanceRatio = balances[i].sub(amountOutWithFee).divDown(balances[i]);\n\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\n        }\n\n        return bptTotalSupply.mulUp(invariantRatio.complement());\n    }\n\n    function _calcTokenOutGivenExactBptIn(\n        uint256 balance,\n        uint256 normalizedWeight,\n        uint256 bptAmountIn,\n        uint256 bptTotalSupply,\n        uint256 swapFee\n    ) internal pure returns (uint256) {\n        /*****************************************************************************************\n        // exactBPTInForTokenOut                                                                //\n        // a = amountOut                                                                        //\n        // b = balance                     /      /    totalBPT - bptIn       \\    (1 / w)  \\   //\n        // bptIn = bptAmountIn    a = b * |  1 - | --------------------------  | ^           |  //\n        // bpt = totalBPT                  \\      \\       totalBPT            /             /   //\n        // w = weight                                                                           //\n        *****************************************************************************************/\n\n        // Token out, so we round down overall. The multiplication rounds down, but the power rounds up (so the base\n        // rounds up). Because (totalBPT - bptIn) / totalBPT <= 1, the exponent rounds down.\n\n        // Calculate the factor by which the invariant will decrease after burning BPTAmountIn\n        uint256 invariantRatio = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply);\n        _require(invariantRatio >= _MIN_INVARIANT_RATIO, Errors.MIN_BPT_IN_FOR_TOKEN_OUT);\n\n        // Calculate by how much the token balance has to decrease to match invariantRatio\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divDown(normalizedWeight));\n\n        // Because of rounding up, balanceRatio can be greater than one. Using complement prevents reverts.\n        uint256 amountOutWithoutFee = balance.mulDown(balanceRatio.complement());\n\n        // We can now compute how much excess balance is being withdrawn as a result of the virtual swaps, which result\n        // in swap fees.\n        uint256 taxablePercentage = normalizedWeight.complement();\n\n        // Swap fees are typically charged on 'token in', but there is no 'token in' here, so we apply it\n        // to 'token out'. This results in slightly larger price impact. Fees are rounded up.\n        uint256 taxableAmount = amountOutWithoutFee.mulUp(taxablePercentage);\n        uint256 nonTaxableAmount = amountOutWithoutFee.sub(taxableAmount);\n\n        return nonTaxableAmount.add(taxableAmount.mulDown(swapFee.complement()));\n    }\n\n    function _calcTokensOutGivenExactBptIn(\n        uint256[] memory balances,\n        uint256 bptAmountIn,\n        uint256 totalBPT\n    ) internal pure returns (uint256[] memory) {\n        /**********************************************************************************************\n        // exactBPTInForTokensOut                                                                    //\n        // (per token)                                                                               //\n        // aO = amountOut                  /        bptIn         \\                                  //\n        // b = balance           a0 = b * | ---------------------  |                                 //\n        // bptIn = bptAmountIn             \\       totalBPT       /                                  //\n        // bpt = totalBPT                                                                            //\n        **********************************************************************************************/\n\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\n        // multiplication and division.\n\n        uint256 bptRatio = bptAmountIn.divDown(totalBPT);\n\n        uint256[] memory amountsOut = new uint256[](balances.length);\n        for (uint256 i = 0; i < balances.length; i++) {\n            amountsOut[i] = balances[i].mulDown(bptRatio);\n        }\n\n        return amountsOut;\n    }\n\n    function _calcDueTokenProtocolSwapFeeAmount(\n        uint256 balance,\n        uint256 normalizedWeight,\n        uint256 previousInvariant,\n        uint256 currentInvariant,\n        uint256 protocolSwapFeePercentage\n    ) internal pure returns (uint256) {\n        /*********************************************************************************\n        /*  protocolSwapFeePercentage * balanceToken * ( 1 - (previousInvariant / currentInvariant) ^ (1 / weightToken))\n        *********************************************************************************/\n\n        if (currentInvariant <= previousInvariant) {\n            // This shouldn't happen outside of rounding errors, but have this safeguard nonetheless to prevent the Pool\n            // from entering a locked state in which joins and exits revert while computing accumulated swap fees.\n            return 0;\n        }\n\n        // We round down to prevent issues in the Pool's accounting, even if it means paying slightly less in protocol\n        // fees to the Vault.\n\n        // Fee percentage and balance multiplications round down, while the subtrahend (power) rounds up (as does the\n        // base). Because previousInvariant / currentInvariant <= 1, the exponent rounds down.\n\n        uint256 base = previousInvariant.divUp(currentInvariant);\n        uint256 exponent = FixedPoint.ONE.divDown(normalizedWeight);\n\n        // Because the exponent is larger than one, the base of the power function has a lower bound. We cap to this\n        // value to avoid numeric issues, which means in the extreme case (where the invariant growth is larger than\n        // 1 / min exponent) the Pool will pay less in protocol fees than it should.\n        base = Math.max(base, FixedPoint.MIN_POW_BASE_FREE_EXPONENT);\n\n        uint256 power = base.powUp(exponent);\n\n        uint256 tokenAccruedFees = balance.mulDown(power.complement());\n        return tokenAccruedFees.mulDown(protocolSwapFeePercentage);\n    }\n}\n"
      },
      "src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\nimport \"./WeightedPool.sol\";\n\nlibrary WeightedPoolUserDataHelpers {\n    function joinKind(bytes memory self) internal pure returns (WeightedPool.JoinKind) {\n        return abi.decode(self, (WeightedPool.JoinKind));\n    }\n\n    function exitKind(bytes memory self) internal pure returns (WeightedPool.ExitKind) {\n        return abi.decode(self, (WeightedPool.ExitKind));\n    }\n\n    // Joins\n\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\n        (, amountsIn) = abi.decode(self, (WeightedPool.JoinKind, uint256[]));\n    }\n\n    function exactTokensInForBptOut(bytes memory self)\n        internal\n        pure\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountOut)\n    {\n        (, amountsIn, minBPTAmountOut) = abi.decode(self, (WeightedPool.JoinKind, uint256[], uint256));\n    }\n\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (WeightedPool.JoinKind, uint256, uint256));\n    }\n\n    // Exits\n\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (WeightedPool.ExitKind, uint256, uint256));\n    }\n\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\n        (, bptAmountIn) = abi.decode(self, (WeightedPool.ExitKind, uint256));\n    }\n\n    function bptInForExactTokensOut(bytes memory self)\n        internal\n        pure\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\n    {\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (WeightedPool.ExitKind, uint256[], uint256));\n    }\n}\n"
      },
      "src.sol/amm/pools/BasePool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../lib/math/FixedPoint.sol\";\nimport \"../lib/helpers/InputHelpers.sol\";\nimport \"../lib/helpers/TemporarilyPausable.sol\";\nimport \"../lib/openzeppelin/ERC20.sol\";\n\nimport \"./BalancerPoolToken.sol\";\nimport \"./BasePoolAuthorization.sol\";\nimport \"../vault/interfaces/IVault.sol\";\nimport \"../vault/interfaces/IBasePool.sol\";\n\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\n// count, resulting in a large number of state variables.\n\n// solhint-disable max-states-count\n\n/**\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\n *\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\n * `whenNotPaused` modifier.\n *\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\n *\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\n * and implement the swap callbacks themselves.\n */\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\n    using FixedPoint for uint256;\n\n    uint256 private constant _MIN_TOKENS = 2;\n    uint256 private constant _MAX_TOKENS = 8;\n\n    // 1e18 corresponds to 1.0, or a 100% fee\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\n\n    uint256 private constant _MINIMUM_BPT = 1e6;\n\n    uint256 internal _swapFeePercentage;\n\n    IVault private immutable _vault;\n    bytes32 private immutable _poolId;\n    uint256 private immutable _totalTokens;\n\n    IERC20 internal immutable _token0;\n    IERC20 internal immutable _token1;\n    IERC20 internal immutable _token2;\n    IERC20 internal immutable _token3;\n    IERC20 internal immutable _token4;\n    IERC20 internal immutable _token5;\n    IERC20 internal immutable _token6;\n    IERC20 internal immutable _token7;\n\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\n\n    uint256 internal immutable _scalingFactor0;\n    uint256 internal immutable _scalingFactor1;\n    uint256 internal immutable _scalingFactor2;\n    uint256 internal immutable _scalingFactor3;\n    uint256 internal immutable _scalingFactor4;\n    uint256 internal immutable _scalingFactor5;\n    uint256 internal immutable _scalingFactor6;\n    uint256 internal immutable _scalingFactor7;\n\n    event SwapFeeChanged(uint256 swapFeePercentage);\n\n    constructor(\n        IVault vault,\n        IVault.PoolSpecialization specialization,\n        string memory name,\n        string memory symbol,\n        IERC20[] memory tokens,\n        uint256 swapFeePercentage,\n        uint256 pauseWindowDuration,\n        uint256 bufferPeriodDuration,\n        address owner\n    )\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\n        // if the selectors match, preventing accidental errors.\n        Authentication(bytes32(uint256(msg.sender)))\n        BalancerPoolToken(name, symbol)\n        BasePoolAuthorization(owner)\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\n    {\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\n\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\n        // order of token-specific parameters (such as token weights) will not change.\n        InputHelpers.ensureArrayIsSorted(tokens);\n\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\n\n        bytes32 poolId = vault.registerPool(specialization);\n\n        // Pass in zero addresses for Asset Managers\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\n\n        // Set immutable state variables - these cannot be read from during construction\n\n        _vault = vault;\n        _poolId = poolId;\n        _swapFeePercentage = swapFeePercentage;\n        _totalTokens = tokens.length;\n\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\n\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\n\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\n    }\n\n    // Getters / Setters\n\n    function getVault() public view returns (IVault) {\n        return _vault;\n    }\n\n    function getPoolId() public view returns (bytes32) {\n        return _poolId;\n    }\n\n    function _getTotalTokens() internal view returns (uint256) {\n        return _totalTokens;\n    }\n\n    function getSwapFeePercentage() external view returns (uint256) {\n        return _swapFeePercentage;\n    }\n\n    // Caller must be approved by the Vault's Authorizer\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\n\n        _swapFeePercentage = swapFeePercentage;\n        emit SwapFeeChanged(swapFeePercentage);\n    }\n\n    // Caller must be approved by the Vault's Authorizer\n    function setPaused(bool paused) external authenticate {\n        _setPaused(paused);\n    }\n\n    // Join / Exit Hooks\n\n    modifier onlyVault(bytes32 poolId) {\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\n        _;\n    }\n\n    function onJoinPool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\n        uint256[] memory scalingFactors = _scalingFactors();\n\n        if (totalSupply() == 0) {\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\n\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\n            // ever being fully drained.\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\n\n            // amountsIn are amounts entering the Pool, so we round up.\n            _downscaleUpArray(amountsIn, scalingFactors);\n\n            return (amountsIn, new uint256[](_getTotalTokens()));\n        } else {\n            _upscaleArray(balances, scalingFactors);\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\n                poolId,\n                sender,\n                recipient,\n                balances,\n                lastChangeBlock,\n                protocolSwapFeePercentage,\n                userData\n            );\n\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\n\n            _mintPoolTokens(recipient, bptAmountOut);\n\n            // amountsIn are amounts entering the Pool, so we round up.\n            _downscaleUpArray(amountsIn, scalingFactors);\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\n\n            return (amountsIn, dueProtocolFeeAmounts);\n        }\n    }\n\n    function onExitPool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\n        uint256[] memory scalingFactors = _scalingFactors();\n        _upscaleArray(balances, scalingFactors);\n\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\n            poolId,\n            sender,\n            recipient,\n            balances,\n            lastChangeBlock,\n            protocolSwapFeePercentage,\n            userData\n        );\n\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\n\n        _burnPoolTokens(sender, bptAmountIn);\n\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\n        _downscaleDownArray(amountsOut, scalingFactors);\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\n\n        return (amountsOut, dueProtocolFeeAmounts);\n    }\n\n    // Query functions\n\n    /**\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\n     *\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\n     * data, such as the protocol swap fee percentage and Pool balances.\n     *\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\n     * explicitly use eth_call instead of eth_sendTransaction.\n     */\n    function queryJoin(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\n\n        _queryAction(\n            poolId,\n            sender,\n            recipient,\n            balances,\n            lastChangeBlock,\n            protocolSwapFeePercentage,\n            userData,\n            _onJoinPool,\n            _downscaleUpArray\n        );\n\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\n        // and we don't need to return anything here - it just silences compiler warnings.\n        return (bptOut, amountsIn);\n    }\n\n    /**\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\n     *\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\n     * data, such as the protocol swap fee percentage and Pool balances.\n     *\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\n     * explicitly use eth_call instead of eth_sendTransaction.\n     */\n    function queryExit(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\n\n        _queryAction(\n            poolId,\n            sender,\n            recipient,\n            balances,\n            lastChangeBlock,\n            protocolSwapFeePercentage,\n            userData,\n            _onExitPool,\n            _downscaleDownArray\n        );\n\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\n        // and we don't need to return anything here - it just silences compiler warnings.\n        return (bptIn, amountsOut);\n    }\n\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\n    // upscaled.\n\n    /**\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\n     *\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\n     *\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\n     * lifetime.\n     *\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\n     * be downscaled (rounding up) before being returned to the Vault.\n     */\n    function _onInitializePool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        bytes memory userData\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\n\n    /**\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\n     *\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\n     * tokens to pay in protocol swap fees.\n     *\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\n     *\n     * Minted BPT will be sent to `recipient`.\n     *\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\n     * be downscaled (rounding up) before being returned to the Vault.\n     *\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\n     */\n    function _onJoinPool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    )\n        internal\n        virtual\n        returns (\n            uint256 bptAmountOut,\n            uint256[] memory amountsIn,\n            uint256[] memory dueProtocolFeeAmounts\n        );\n\n    /**\n     * @dev Called whenever the Pool is exited.\n     *\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\n     * the number of tokens to pay in protocol swap fees.\n     *\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\n     *\n     * BPT will be burnt from `sender`.\n     *\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\n     * (rounding down) before being returned to the Vault.\n     *\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\n     */\n    function _onExitPool(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    )\n        internal\n        virtual\n        returns (\n            uint256 bptAmountIn,\n            uint256[] memory amountsOut,\n            uint256[] memory dueProtocolFeeAmounts\n        );\n\n    // Internal functions\n\n    /**\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\n     */\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\n        return amount.divUp(_swapFeePercentage.complement());\n    }\n\n    /**\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\n     */\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\n        return amount.sub(feeAmount);\n    }\n\n    // Scaling\n\n    /**\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\n     * it had 18 decimals.\n     */\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\n        // Tokens that don't implement the `decimals` method are not supported.\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\n\n        // Tokens with more than 18 decimals are not supported.\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\n        return 10**decimalsDifference;\n    }\n\n    /**\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\n     * Pool.\n     */\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\n        // prettier-ignore\n        if (token == _token0) { return _scalingFactor0; }\n        else if (token == _token1) { return _scalingFactor1; }\n        else if (token == _token2) { return _scalingFactor2; }\n        else if (token == _token3) { return _scalingFactor3; }\n        else if (token == _token4) { return _scalingFactor4; }\n        else if (token == _token5) { return _scalingFactor5; }\n        else if (token == _token6) { return _scalingFactor6; }\n        else if (token == _token7) { return _scalingFactor7; }\n        else {\n            _revert(Errors.INVALID_TOKEN);\n        }\n    }\n\n    /**\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\n     * pass balances in this order when calling any of the Pool hooks\n     */\n    function _scalingFactors() internal view returns (uint256[] memory) {\n        uint256 totalTokens = _getTotalTokens();\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\n\n        // prettier-ignore\n        {\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\n        }\n\n        return scalingFactors;\n    }\n\n    /**\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\n     * scaling or not.\n     */\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\n        return Math.mul(amount, scalingFactor);\n    }\n\n    /**\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\n     * the `amounts` array.\n     */\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\n        }\n    }\n\n    /**\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n     * whether it needed scaling or not. The result is rounded down.\n     */\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\n        return Math.divDown(amount, scalingFactor);\n    }\n\n    /**\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\n     * *mutates* the `amounts` array.\n     */\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\n        }\n    }\n\n    /**\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n     * whether it needed scaling or not. The result is rounded up.\n     */\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\n        return Math.divUp(amount, scalingFactor);\n    }\n\n    /**\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\n     * *mutates* the `amounts` array.\n     */\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\n        }\n    }\n\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\n        // Governance control.\n        return getVault().getAuthorizer();\n    }\n\n    function _queryAction(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        uint256[] memory balances,\n        uint256 lastChangeBlock,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData,\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\n            internal\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\n    ) private {\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\n        // explanation.\n\n        if (msg.sender != address(this)) {\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\n            // the preceding if statement will be executed instead.\n\n            // solhint-disable-next-line avoid-low-level-calls\n            (bool success, ) = address(this).call(msg.data);\n\n            // solhint-disable-next-line no-inline-assembly\n            assembly {\n                // This call should always revert to decode the bpt and token amounts from the revert reason\n                switch success\n                    case 0 {\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\n                        // stored there as we take full control of the execution and then immediately return.\n\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\n                        // there was another revert reason and we should forward it.\n                        returndatacopy(0, 0, 0x04)\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\n\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\n                            returndatacopy(0, 0, returndatasize())\n                            revert(0, returndatasize())\n                        }\n\n                        // The returndata contains the signature, followed by the raw memory representation of the\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\n                        // representation of these.\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\n                        // returndata.\n                        //\n                        // In returndata:\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\n                        //\n                        // We now need to return (ABI-encoded values):\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\n\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\n                        // Note that we skip the first 4 bytes for the error signature\n                        returndatacopy(0, 0x04, 32)\n\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\n                        // the initial 64 bytes.\n                        mstore(0x20, 64)\n\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\n\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\n                        // error signature.\n                        return(0, add(returndatasize(), 28))\n                    }\n                    default {\n                        // This call should always revert, but we fail nonetheless if that didn't happen\n                        invalid()\n                    }\n            }\n        } else {\n            uint256[] memory scalingFactors = _scalingFactors();\n            _upscaleArray(balances, scalingFactors);\n\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\n                poolId,\n                sender,\n                recipient,\n                balances,\n                lastChangeBlock,\n                protocolSwapFeePercentage,\n                userData\n            );\n\n            _downscaleArray(tokenAmounts, scalingFactors);\n\n            // solhint-disable-next-line no-inline-assembly\n            assembly {\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\n                let size := mul(mload(tokenAmounts), 32)\n\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\n                // will be at least one available slot due to how the memory scratch space works.\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\n                let start := sub(tokenAmounts, 0x20)\n                mstore(start, bptAmount)\n\n                // We send one extra value for the error signature \"QueryError(uint256,uint256[])\" which is 0x43adbafb\n                // We use the previous slot to `bptAmount`.\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\n                start := sub(start, 0x04)\n\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\n                // the `bptAmount`, the array 's length, and the error signature.\n                revert(start, add(size, 68))\n            }\n        }\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/ERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\nimport \"./IERC20.sol\";\nimport \"./SafeMath.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is IERC20 {\n    using SafeMath for uint256;\n\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n    uint8 private _decimals;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n     * a default value of 18.\n     *\n     * To select a different value for {decimals}, use {_setupDecimals}.\n     *\n     * All three of these values are immutable: they can only be set once during\n     * construction.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n        _decimals = 18;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n     * called.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view returns (uint8) {\n        return _decimals;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(msg.sender, recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        _approve(msg.sender, spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n        _approve(\n            sender,\n            msg.sender,\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\n        );\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        _approve(\n            msg.sender,\n            spender,\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\n        );\n        return true;\n    }\n\n    /**\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\n     *\n     * This is internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal virtual {\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\n        _balances[recipient] = _balances[recipient].add(amount);\n        emit Transfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply = _totalSupply.add(amount);\n        _balances[account] = _balances[account].add(amount);\n        emit Transfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\n        _totalSupply = _totalSupply.sub(amount);\n        emit Transfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Sets {decimals} to a value other than the default one of 18.\n     *\n     * WARNING: This function should only be called from the constructor. Most\n     * applications that interact with token contracts will not expect\n     * {decimals} to ever change, and may work incorrectly if it does.\n     */\n    function _setupDecimals(uint8 decimals_) internal {\n        _decimals = decimals_;\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be to transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n}\n"
      },
      "src.sol/amm/pools/BalancerPoolToken.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../lib/math/Math.sol\";\nimport \"../lib/openzeppelin/IERC20.sol\";\nimport \"../lib/openzeppelin/IERC20Permit.sol\";\nimport \"../lib/openzeppelin/EIP712.sol\";\n\n/**\n * @title Highly opinionated token implementation\n * @author Balancer Labs\n * @dev\n * - Includes functions to increase and decrease allowance as a workaround\n *   for the well-known issue with `approve`:\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\n *   decreased by calls to transferFrom\n * - Lets a token holder use `transferFrom` to send their own tokens,\n *   without first setting allowance\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\n */\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\n    using Math for uint256;\n\n    // State variables\n\n    uint8 private constant _DECIMALS = 18;\n\n    mapping(address => uint256) private _balance;\n    mapping(address => mapping(address => uint256)) private _allowance;\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    mapping(address => uint256) private _nonces;\n\n    // solhint-disable-next-line var-name-mixedcase\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\n        \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\"\n    );\n\n    // Function declarations\n\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \"1\") {\n        _name = tokenName;\n        _symbol = tokenSymbol;\n    }\n\n    // External functions\n\n    function allowance(address owner, address spender) external view override returns (uint256) {\n        return _allowance[owner][spender];\n    }\n\n    function balanceOf(address account) external view override returns (uint256) {\n        return _balance[account];\n    }\n\n    function approve(address spender, uint256 amount) external override returns (bool) {\n        _setAllowance(msg.sender, spender, amount);\n\n        return true;\n    }\n\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\n\n        return true;\n    }\n\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\n        uint256 currentAllowance = _allowance[msg.sender][spender];\n\n        if (amount >= currentAllowance) {\n            _setAllowance(msg.sender, spender, 0);\n        } else {\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\n        }\n\n        return true;\n    }\n\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\n        _move(msg.sender, recipient, amount);\n\n        return true;\n    }\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external override returns (bool) {\n        uint256 currentAllowance = _allowance[sender][msg.sender];\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\n\n        _move(sender, recipient, amount);\n\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual override {\n        // solhint-disable-next-line not-rely-on-time\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\n\n        uint256 nonce = _nonces[owner];\n\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\n\n        bytes32 hash = _hashTypedDataV4(structHash);\n\n        address signer = ecrecover(hash, v, r, s);\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\n\n        _nonces[owner] = nonce + 1;\n        _setAllowance(owner, spender, value);\n    }\n\n    // Public functions\n\n    function name() public view returns (string memory) {\n        return _name;\n    }\n\n    function symbol() public view returns (string memory) {\n        return _symbol;\n    }\n\n    function decimals() public pure returns (uint8) {\n        return _DECIMALS;\n    }\n\n    function totalSupply() public view override returns (uint256) {\n        return _totalSupply;\n    }\n\n    function nonces(address owner) external view override returns (uint256) {\n        return _nonces[owner];\n    }\n\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n        return _domainSeparatorV4();\n    }\n\n    // Internal functions\n\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\n        _balance[recipient] = _balance[recipient].add(amount);\n        _totalSupply = _totalSupply.add(amount);\n        emit Transfer(address(0), recipient, amount);\n    }\n\n    function _burnPoolTokens(address sender, uint256 amount) internal {\n        uint256 currentBalance = _balance[sender];\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\n\n        _balance[sender] = currentBalance - amount;\n        _totalSupply = _totalSupply.sub(amount);\n        emit Transfer(sender, address(0), amount);\n    }\n\n    function _move(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal {\n        uint256 currentBalance = _balance[sender];\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\n        // Prohibit transfers to the zero address to avoid confusion with the\n        // Transfer event emitted by `_burnPoolTokens`\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\n\n        _balance[sender] = currentBalance - amount;\n        _balance[recipient] = _balance[recipient].add(amount);\n\n        emit Transfer(sender, recipient, amount);\n    }\n\n    // Private functions\n\n    function _setAllowance(\n        address owner,\n        address spender,\n        uint256 amount\n    ) private {\n        _allowance[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n}\n"
      },
      "src.sol/amm/pools/BasePoolAuthorization.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../lib/helpers/Authentication.sol\";\nimport \"../vault/interfaces/IAuthorizer.sol\";\n\nimport \"./BasePool.sol\";\n\n/**\n * @dev Base authorization layer implementation for Pools.\n *\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\n *\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\n */\nabstract contract BasePoolAuthorization is Authentication {\n    address private immutable _owner;\n\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\n\n    constructor(address owner) {\n        _owner = owner;\n    }\n\n    function getOwner() public view returns (address) {\n        return _owner;\n    }\n\n    function getAuthorizer() external view returns (IAuthorizer) {\n        return _getAuthorizer();\n    }\n\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\n            // Only the owner can perform \"owner only\" actions, unless the owner is delegated.\n            return msg.sender == getOwner();\n        } else {\n            // Non-owner actions are always processed via the Authorizer, as \"owner only\" ones are when delegated.\n            return _getAuthorizer().canPerform(actionId, account, address(this));\n        }\n    }\n\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\n    }\n\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/SafeMath.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        _require(c >= a, Errors.ADD_OVERFLOW);\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return sub(a, b, Errors.SUB_OVERFLOW);\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\n        _require(b <= a, errorCode);\n        uint256 c = a - b;\n\n        return c;\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/IERC20Permit.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\n     * given `owner`'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"
      },
      "src.sol/amm/pools/weighted/WeightedPoolFactory.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../../vault/interfaces/IVault.sol\";\n\nimport \"../factories/BasePoolFactory.sol\";\nimport \"../factories/FactoryWidePauseWindow.sol\";\n\nimport \"./WeightedPool.sol\";\n\ncontract WeightedPoolFactory is BasePoolFactory, FactoryWidePauseWindow {\n    constructor(IVault vault) BasePoolFactory(vault) {\n        // solhint-disable-previous-line no-empty-blocks\n    }\n\n    /**\n     * @dev Deploys a new `WeightedPool`.\n     */\n    function create(\n        string memory name,\n        string memory symbol,\n        IERC20[] memory tokens,\n        uint256[] memory weights,\n        uint256 swapFeePercentage,\n        address owner\n    ) external returns (address) {\n        (uint256 pauseWindowDuration, uint256 bufferPeriodDuration) = getPauseConfiguration();\n\n        address pool = address(\n            new WeightedPool(\n                getVault(),\n                name,\n                symbol,\n                tokens,\n                weights,\n                swapFeePercentage,\n                pauseWindowDuration,\n                bufferPeriodDuration,\n                owner\n            )\n        );\n        _register(pool);\n        return pool;\n    }\n}\n"
      },
      "src.sol/amm/pools/factories/BasePoolFactory.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../../vault/interfaces/IVault.sol\";\nimport \"../../vault/interfaces/IBasePool.sol\";\n\n/**\n * @dev Base contract for Pool factories.\n *\n * Pools are deployed from factories to allow third parties to reason about them. Unknown Pools may have arbitrary\n * logic: being able to assert that a Pool's behavior follows certain rules (those imposed by the contracts created by\n * the factory) is very powerful.\n */\nabstract contract BasePoolFactory {\n    IVault private immutable _vault;\n    mapping(address => bool) private _isPoolFromFactory;\n\n    event PoolCreated(address indexed pool);\n\n    constructor(IVault vault) {\n        _vault = vault;\n    }\n\n    /**\n     * @dev Returns the Vault's address.\n     */\n    function getVault() public view returns (IVault) {\n        return _vault;\n    }\n\n    /**\n     * @dev Returns true if `pool` was created by this factory.\n     */\n    function isPoolFromFactory(address pool) external view returns (bool) {\n        return _isPoolFromFactory[pool];\n    }\n\n    /**\n     * @dev Registers a new created pool.\n     *\n     * Emits a `PoolCreated` event.\n     */\n    function _register(address pool) internal {\n        _isPoolFromFactory[pool] = true;\n        emit PoolCreated(pool);\n    }\n}\n"
      },
      "src.sol/amm/pools/factories/FactoryWidePauseWindow.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\n/**\n * @dev Utility to create Pool factories for Pools that use the `TemporarilyPausable` contract.\n *\n * By calling `TemporarilyPausable`'s constructor with the result of `getPauseConfiguration`, all Pools created by this\n * factory will share the same Pause Window end time, after which both old and new Pools will not be pausable.\n */\ncontract FactoryWidePauseWindow {\n    // This contract relies on timestamps in a similar way as `TemporarilyPausable` does - the same caveats apply.\n    // solhint-disable not-rely-on-time\n\n    uint256 private constant _INITIAL_PAUSE_WINDOW_DURATION = 90 days;\n    uint256 private constant _BUFFER_PERIOD_DURATION = 30 days;\n\n    // Time when the pause window for all created Pools expires, and the pause window duration of new Pools becomes\n    // zero.\n    uint256 private immutable _poolsPauseWindowEndTime;\n\n    constructor() {\n        _poolsPauseWindowEndTime = block.timestamp + _INITIAL_PAUSE_WINDOW_DURATION;\n    }\n\n    /**\n     * @dev Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this\n     * factory.\n     *\n     * `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and\n     * `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable.\n     */\n    function getPauseConfiguration() public view returns (uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\n        uint256 currentTime = block.timestamp;\n        if (currentTime < _poolsPauseWindowEndTime) {\n            // The buffer period is always the same since its duration is related to how much time is needed to respond\n            // to a potential emergency. The Pause Window duration however decreases as the end time approaches.\n\n            pauseWindowDuration = _poolsPauseWindowEndTime - currentTime; // No need for checked arithmetic.\n            bufferPeriodDuration = _BUFFER_PERIOD_DURATION;\n        } else {\n            // After the end time, newly created Pools have no Pause Window, nor Buffer Period (since they are not\n            // pausable in the first place).\n\n            pauseWindowDuration = 0;\n            bufferPeriodDuration = 0;\n        }\n    }\n}\n"
      },
      "src.sol/amm/pools/stable/StablePoolFactory.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../../vault/interfaces/IVault.sol\";\n\nimport \"../factories/BasePoolFactory.sol\";\nimport \"../factories/FactoryWidePauseWindow.sol\";\n\nimport \"./StablePool.sol\";\n\ncontract StablePoolFactory is BasePoolFactory, FactoryWidePauseWindow {\n    constructor(IVault vault) BasePoolFactory(vault) {\n        // solhint-disable-previous-line no-empty-blocks\n    }\n\n    /**\n     * @dev Deploys a new `StablePool`.\n     */\n    function create(\n        string memory name,\n        string memory symbol,\n        IERC20[] memory tokens,\n        uint256 amplificationParameter,\n        uint256 swapFeePercentage,\n        address owner\n    ) external returns (address) {\n        (uint256 pauseWindowDuration, uint256 bufferPeriodDuration) = getPauseConfiguration();\n\n        address pool = address(\n            new StablePool(\n                getVault(),\n                name,\n                symbol,\n                tokens,\n                amplificationParameter,\n                swapFeePercentage,\n                pauseWindowDuration,\n                bufferPeriodDuration,\n                owner\n            )\n        );\n        _register(pool);\n        return pool;\n    }\n}\n"
      },
      "src.sol/amm/pools/stable/StablePool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../../lib/math/FixedPoint.sol\";\nimport \"../../lib/helpers/InputHelpers.sol\";\n\nimport \"../BaseGeneralPool.sol\";\n\nimport \"./StableMath.sol\";\nimport \"./StablePoolUserDataHelpers.sol\";\n\ncontract StablePool is BaseGeneralPool, StableMath {\n    using FixedPoint for uint256;\n    using StablePoolUserDataHelpers for bytes;\n\n    uint256 private immutable _amplificationParameter;\n\n    uint256 private _lastInvariant;\n\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\n\n    constructor(\n        IVault vault,\n        string memory name,\n        string memory symbol,\n        IERC20[] memory tokens,\n        uint256 amplificationParameter,\n        uint256 swapFeePercentage,\n        uint256 pauseWindowDuration,\n        uint256 bufferPeriodDuration,\n        address owner\n    )\n        BaseGeneralPool(\n            vault,\n            name,\n            symbol,\n            tokens,\n            swapFeePercentage,\n            pauseWindowDuration,\n            bufferPeriodDuration,\n            owner\n        )\n    {\n        _require(amplificationParameter >= _MIN_AMP, Errors.MIN_AMP);\n        _require(amplificationParameter <= _MAX_AMP, Errors.MAX_AMP);\n\n        _require(tokens.length <= _MAX_STABLE_TOKENS, Errors.MAX_STABLE_TOKENS);\n\n        _amplificationParameter = amplificationParameter;\n    }\n\n    function getAmplificationParameter() external view returns (uint256) {\n        return _amplificationParameter;\n    }\n\n    // Base Pool handlers\n\n    // Swap\n\n    function _onSwapGivenIn(\n        SwapRequest memory swapRequest,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut\n    ) internal view virtual override whenNotPaused returns (uint256) {\n        uint256 amountOut = StableMath._calcOutGivenIn(\n            _amplificationParameter,\n            balances,\n            indexIn,\n            indexOut,\n            swapRequest.amount\n        );\n\n        return amountOut;\n    }\n\n    function _onSwapGivenOut(\n        SwapRequest memory swapRequest,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut\n    ) internal view virtual override whenNotPaused returns (uint256) {\n        uint256 amountIn = StableMath._calcInGivenOut(\n            _amplificationParameter,\n            balances,\n            indexIn,\n            indexOut,\n            swapRequest.amount\n        );\n\n        return amountIn;\n    }\n\n    // Initialize\n\n    function _onInitializePool(\n        bytes32,\n        address,\n        address,\n        bytes memory userData\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\n        StablePool.JoinKind kind = userData.joinKind();\n        _require(kind == StablePool.JoinKind.INIT, Errors.UNINITIALIZED);\n\n        uint256[] memory amountsIn = userData.initialAmountsIn();\n        InputHelpers.ensureInputLengthMatch(amountsIn.length, _getTotalTokens());\n        _upscaleArray(amountsIn, _scalingFactors());\n\n        uint256 invariantAfterJoin = StableMath._calculateInvariant(_amplificationParameter, amountsIn);\n        uint256 bptAmountOut = invariantAfterJoin;\n\n        _lastInvariant = invariantAfterJoin;\n\n        return (bptAmountOut, amountsIn);\n    }\n\n    // Join\n\n    function _onJoinPool(\n        bytes32,\n        address,\n        address,\n        uint256[] memory balances,\n        uint256,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    )\n        internal\n        virtual\n        override\n        whenNotPaused\n        returns (\n            uint256,\n            uint256[] memory,\n            uint256[] memory\n        )\n    {\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas to\n        // calculate the fee amounts during each individual swap.\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\n            balances,\n            _lastInvariant,\n            protocolSwapFeePercentage\n        );\n\n        // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\n        // function returns.\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\n            balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\n        }\n\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, userData);\n\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\n        // protocol swap fee amounts due in future joins and exits.\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn);\n\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\n    }\n\n    function _doJoin(uint256[] memory balances, bytes memory userData)\n        private\n        view\n        returns (uint256, uint256[] memory)\n    {\n        JoinKind kind = userData.joinKind();\n\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\n            return _joinExactTokensInForBPTOut(balances, userData);\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\n            return _joinTokenInForExactBPTOut(balances, userData);\n        } else {\n            _revert(Errors.UNHANDLED_JOIN_KIND);\n        }\n    }\n\n    function _joinExactTokensInForBPTOut(uint256[] memory balances, bytes memory userData)\n        private\n        view\n        returns (uint256, uint256[] memory)\n    {\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\n        _upscaleArray(amountsIn, _scalingFactors());\n\n        uint256 bptAmountOut = StableMath._calcBptOutGivenExactTokensIn(\n            _amplificationParameter,\n            balances,\n            amountsIn,\n            totalSupply(),\n            _swapFeePercentage\n        );\n\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\n\n        return (bptAmountOut, amountsIn);\n    }\n\n    function _joinTokenInForExactBPTOut(uint256[] memory balances, bytes memory userData)\n        private\n        view\n        returns (uint256, uint256[] memory)\n    {\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\n\n        uint256 amountIn = StableMath._calcTokenInGivenExactBptOut(\n            _amplificationParameter,\n            balances,\n            tokenIndex,\n            bptAmountOut,\n            totalSupply(),\n            _swapFeePercentage\n        );\n\n        // We are joining with a single token, so initialize downscaledAmountsIn with zeros, and\n        // only set downscaledAmountsIn[tokenIndex]\n        uint256[] memory downscaledAmountsIn = new uint256[](_getTotalTokens());\n        downscaledAmountsIn[tokenIndex] = amountIn;\n\n        return (bptAmountOut, downscaledAmountsIn);\n    }\n\n    // Exit\n\n    function _onExitPool(\n        bytes32,\n        address,\n        address,\n        uint256[] memory balances,\n        uint256,\n        uint256 protocolSwapFeePercentage,\n        bytes memory userData\n    )\n        internal\n        virtual\n        override\n        returns (\n            uint256 bptAmountIn,\n            uint256[] memory amountsOut,\n            uint256[] memory dueProtocolFeeAmounts\n        )\n    {\n        if (_isNotPaused()) {\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\n            // spending gas calculating fee amounts during each individual swap\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(balances, _lastInvariant, protocolSwapFeePercentage);\n\n            // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\n            // function returns.\n            for (uint256 i = 0; i < _getTotalTokens(); ++i) {\n                balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\n            }\n        } else {\n            // To avoid extra calculations, swap protocol fee amounts are not charged when the contract is paused.\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\n        }\n\n        (bptAmountIn, amountsOut) = _doExit(balances, userData);\n\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\n        // protocol swap fee amounts due in future joins and exits.\n        _lastInvariant = _invariantAfterExit(balances, amountsOut);\n\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\n    }\n\n    function _doExit(uint256[] memory balances, bytes memory userData)\n        private\n        view\n        returns (uint256, uint256[] memory)\n    {\n        ExitKind kind = userData.exitKind();\n\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\n            return _exitExactBPTInForTokenOut(balances, userData);\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\n            return _exitExactBPTInForTokensOut(balances, userData);\n        } else {\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\n            return _exitBPTInForExactTokensOut(balances, userData);\n        }\n    }\n\n    function _exitExactBPTInForTokenOut(uint256[] memory balances, bytes memory userData)\n        private\n        view\n        whenNotPaused\n        returns (uint256, uint256[] memory)\n    {\n        // This exit function is disabled if the contract is paused.\n        uint256 totalTokens = _getTotalTokens();\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\n        _require(tokenIndex < totalTokens, Errors.OUT_OF_BOUNDS);\n\n        // We exit in a single token, so initialize amountsOut with zeros and only set amountsOut[tokenIndex]\n        uint256[] memory amountsOut = new uint256[](totalTokens);\n\n        amountsOut[tokenIndex] = StableMath._calcTokenOutGivenExactBptIn(\n            _amplificationParameter,\n            balances,\n            tokenIndex,\n            bptAmountIn,\n            totalSupply(),\n            _swapFeePercentage\n        );\n\n        return (bptAmountIn, amountsOut);\n    }\n\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\n        private\n        view\n        returns (uint256, uint256[] memory)\n    {\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\n        // This particular exit function is the only one that remains available because it is the simplest one, and\n        // therefore the one with the lowest likelihood of errors.\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\n\n        uint256[] memory amountsOut = StableMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\n\n        return (bptAmountIn, amountsOut);\n    }\n\n    function _exitBPTInForExactTokensOut(uint256[] memory balances, bytes memory userData)\n        private\n        view\n        whenNotPaused\n        returns (uint256, uint256[] memory)\n    {\n        // This exit function is disabled if the contract is paused.\n\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\n\n        _upscaleArray(amountsOut, _scalingFactors());\n\n        uint256 bptAmountIn = StableMath._calcBptInGivenExactTokensOut(\n            _amplificationParameter,\n            balances,\n            amountsOut,\n            totalSupply(),\n            _swapFeePercentage\n        );\n\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\n\n        return (bptAmountIn, amountsOut);\n    }\n\n    // Helpers\n\n    function _getDueProtocolFeeAmounts(\n        uint256[] memory balances,\n        uint256 previousInvariant,\n        uint256 protocolSwapFeePercentage\n    ) private view returns (uint256[] memory) {\n        // Initialize with zeros\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\n\n        // Early exit if there is no protocol swap fee\n        if (protocolSwapFeePercentage == 0) {\n            return dueProtocolFeeAmounts;\n        }\n\n        // Instead of paying the protocol swap fee in all tokens proportionally, we will pay it in a single one. This\n        // will reduce gas costs for single asset joins and exits, as at most only two Pool balances will change (the\n        // token joined/exited, and the token in which fees will be paid).\n\n        // The protocol fee is charged using the token with the highest balance in the pool.\n        uint256 chosenTokenIndex = 0;\n        uint256 maxBalance = balances[0];\n        for (uint256 i = 1; i < _getTotalTokens(); ++i) {\n            uint256 currentBalance = balances[i];\n            if (currentBalance > maxBalance) {\n                chosenTokenIndex = i;\n                maxBalance = currentBalance;\n            }\n        }\n\n        // Set the fee amount to pay in the selected token\n        dueProtocolFeeAmounts[chosenTokenIndex] = StableMath._calcDueTokenProtocolSwapFeeAmount(\n            _amplificationParameter,\n            balances,\n            previousInvariant,\n            chosenTokenIndex,\n            protocolSwapFeePercentage\n        );\n\n        return dueProtocolFeeAmounts;\n    }\n\n    function _invariantAfterJoin(uint256[] memory balances, uint256[] memory amountsIn) private view returns (uint256) {\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\n            balances[i] = balances[i].add(amountsIn[i]);\n        }\n\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\n    }\n\n    function _invariantAfterExit(uint256[] memory balances, uint256[] memory amountsOut)\n        private\n        view\n        returns (uint256)\n    {\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\n            balances[i] = balances[i].sub(amountsOut[i]);\n        }\n\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\n    }\n\n    /**\n     * @dev This function returns the appreciation of one BPT relative to the\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\n     */\n    function getRate() public view returns (uint256) {\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\n        return StableMath._calculateInvariant(_amplificationParameter, balances).divDown(totalSupply());\n    }\n}\n"
      },
      "src.sol/amm/pools/BaseGeneralPool.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"./BasePool.sol\";\nimport \"../vault/interfaces/IGeneralPool.sol\";\n\n/**\n * @dev Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`.\n *\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\n */\nabstract contract BaseGeneralPool is IGeneralPool, BasePool {\n    constructor(\n        IVault vault,\n        string memory name,\n        string memory symbol,\n        IERC20[] memory tokens,\n        uint256 swapFeePercentage,\n        uint256 pauseWindowDuration,\n        uint256 bufferPeriodDuration,\n        address owner\n    )\n        BasePool(\n            vault,\n            IVault.PoolSpecialization.GENERAL,\n            name,\n            symbol,\n            tokens,\n            swapFeePercentage,\n            pauseWindowDuration,\n            bufferPeriodDuration,\n            owner\n        )\n    {\n        // solhint-disable-previous-line no-empty-blocks\n    }\n\n    // Swap Hooks\n\n    function onSwap(\n        SwapRequest memory swapRequest,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut\n    ) external view virtual override returns (uint256) {\n        _validateIndexes(indexIn, indexOut, _getTotalTokens());\n        uint256[] memory scalingFactors = _scalingFactors();\n\n        return\n            swapRequest.kind == IVault.SwapKind.GIVEN_IN\n                ? _swapGivenIn(swapRequest, balances, indexIn, indexOut, scalingFactors)\n                : _swapGivenOut(swapRequest, balances, indexIn, indexOut, scalingFactors);\n    }\n\n    function _swapGivenIn(\n        SwapRequest memory swapRequest,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut,\n        uint256[] memory scalingFactors\n    ) internal view returns (uint256) {\n        // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\n        swapRequest.amount = _subtractSwapFeeAmount(swapRequest.amount);\n\n        _upscaleArray(balances, scalingFactors);\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexIn]);\n\n        uint256 amountOut = _onSwapGivenIn(swapRequest, balances, indexIn, indexOut);\n\n        // amountOut tokens are exiting the Pool, so we round down.\n        return _downscaleDown(amountOut, scalingFactors[indexOut]);\n    }\n\n    function _swapGivenOut(\n        SwapRequest memory swapRequest,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut,\n        uint256[] memory scalingFactors\n    ) internal view returns (uint256) {\n        _upscaleArray(balances, scalingFactors);\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexOut]);\n\n        uint256 amountIn = _onSwapGivenOut(swapRequest, balances, indexIn, indexOut);\n\n        // amountIn tokens are entering the Pool, so we round up.\n        amountIn = _downscaleUp(amountIn, scalingFactors[indexIn]);\n\n        // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\n        return _addSwapFeeAmount(amountIn);\n    }\n\n    /*\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\n     *\n     * Returns the amount of tokens that will be taken from the Pool in return.\n     *\n     * All amounts inside `swapRequest` and `balances` are upscaled. The swap fee has already been deducted from\n     * `swapRequest.amount`.\n     *\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\n     * Vault.\n     */\n    function _onSwapGivenIn(\n        SwapRequest memory swapRequest,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut\n    ) internal view virtual returns (uint256);\n\n    /*\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\n     *\n     * Returns the amount of tokens that will be granted to the Pool in return.\n     *\n     * All amounts inside `swapRequest` and `balances` are upscaled.\n     *\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\n     * and returning it to the Vault.\n     */\n    function _onSwapGivenOut(\n        SwapRequest memory swapRequest,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut\n    ) internal view virtual returns (uint256);\n\n    function _validateIndexes(\n        uint256 indexIn,\n        uint256 indexOut,\n        uint256 limit\n    ) private pure {\n        _require(indexIn < limit && indexOut < limit, Errors.OUT_OF_BOUNDS);\n    }\n}\n"
      },
      "src.sol/amm/pools/stable/StableMath.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../../lib/math/Math.sol\";\nimport \"../../lib/math/FixedPoint.sol\";\n\n// This is a contract to emulate file-level functions. Convert to a library\n// after the migration to solc v0.7.1.\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable var-name-mixedcase\n\ncontract StableMath {\n    using FixedPoint for uint256;\n\n    uint256 internal constant _MIN_AMP = 1e18;\n    uint256 internal constant _MAX_AMP = 5000 * (1e18);\n\n    uint256 internal constant _MAX_STABLE_TOKENS = 5;\n\n    // Computes the invariant given the current balances, using the Newton-Raphson approximation.\n    // The amplification parameter equals: A n^(n-1)\n    function _calculateInvariant(uint256 amplificationParameter, uint256[] memory balances)\n        internal\n        pure\n        returns (uint256)\n    {\n        /**********************************************************************************************\n        // invariant                                                                                 //\n        // D = invariant                                                  D^(n+1)                    //\n        // A = amplification coefficient      A  n^n S + D = A D n^n + -----------                   //\n        // S = sum of balances                                             n^n P                     //\n        // P = product of balances                                                                   //\n        // n = number of tokens                                                                      //\n        *********x************************************************************************************/\n\n        // We round up the invariant.\n\n        uint256 sum = 0;\n        uint256 numTokens = balances.length;\n        for (uint256 i = 0; i < numTokens; i++) {\n            sum = sum.add(balances[i]);\n        }\n        if (sum == 0) {\n            return 0;\n        }\n        uint256 prevInvariant = 0;\n        uint256 invariant = sum;\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, numTokens);\n\n        for (uint256 i = 0; i < 255; i++) {\n            uint256 P_D = Math.mul(numTokens, balances[0]);\n            for (uint256 j = 1; j < numTokens; j++) {\n                P_D = Math.divUp(Math.mul(Math.mul(P_D, balances[j]), numTokens), invariant);\n            }\n            prevInvariant = invariant;\n            invariant = Math.divUp(\n                Math.mul(Math.mul(numTokens, invariant), invariant).add(Math.mul(Math.mul(ampTimesTotal, sum), P_D)),\n                Math.mul(numTokens.add(1), invariant).add(Math.mul(ampTimesTotal.sub(1), P_D))\n            );\n\n            if (invariant > prevInvariant) {\n                if (invariant.sub(prevInvariant) <= 1) {\n                    break;\n                }\n            } else if (prevInvariant.sub(invariant) <= 1) {\n                break;\n            }\n        }\n        return invariant;\n    }\n\n    // Computes how many tokens can be taken out of a pool if `tokenAmountIn` are sent, given the current balances.\n    // The amplification parameter equals: A n^(n-1)\n    function _calcOutGivenIn(\n        uint256 amplificationParameter,\n        uint256[] memory balances,\n        uint256 tokenIndexIn,\n        uint256 tokenIndexOut,\n        uint256 tokenAmountIn\n    ) internal pure returns (uint256) {\n        /**************************************************************************************************************\n        // outGivenIn token x for y - polynomial equation to solve                                                   //\n        // ay = amount out to calculate                                                                              //\n        // by = balance token out                                                                                    //\n        // y = by - ay (finalBalanceOut)                                                                             //\n        // D = invariant                                               D                     D^(n+1)                 //\n        // A = amplification coefficient               y^2 + ( S - ----------  - D) * y -  ------------- = 0         //\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\n        // S = sum of final balances but y                                                                           //\n        // P = product of final balances but y                                                                       //\n        **************************************************************************************************************/\n\n        // Amount out, so we round down overall.\n\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\n\n        balances[tokenIndexIn] = balances[tokenIndexIn].add(tokenAmountIn);\n\n        uint256 finalBalanceOut = _getTokenBalanceGivenInvariantAndAllOtherBalances(\n            amplificationParameter,\n            balances,\n            invariant,\n            tokenIndexOut\n        );\n\n        balances[tokenIndexIn] = balances[tokenIndexIn].sub(tokenAmountIn);\n\n        return balances[tokenIndexOut].sub(finalBalanceOut).sub(1);\n    }\n\n    // Computes how many tokens must be sent to a pool if `tokenAmountOut` are sent given the\n    // current balances, using the Newton-Raphson approximation.\n    // The amplification parameter equals: A n^(n-1)\n    function _calcInGivenOut(\n        uint256 amplificationParameter,\n        uint256[] memory balances,\n        uint256 tokenIndexIn,\n        uint256 tokenIndexOut,\n        uint256 tokenAmountOut\n    ) internal pure returns (uint256) {\n        /**************************************************************************************************************\n        // inGivenOut token x for y - polynomial equation to solve                                                   //\n        // ax = amount in to calculate                                                                               //\n        // bx = balance token in                                                                                     //\n        // x = bx + ax (finalBalanceIn)                                                                              //\n        // D = invariant                                                D                     D^(n+1)                //\n        // A = amplification coefficient               x^2 + ( S - ----------  - D) * x -  ------------- = 0         //\n        // n = number of tokens                                     (A * n^n)               A * n^2n * P             //\n        // S = sum of final balances but x                                                                           //\n        // P = product of final balances but x                                                                       //\n        **************************************************************************************************************/\n\n        // Amount in, so we round up overall.\n\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\n\n        balances[tokenIndexOut] = balances[tokenIndexOut].sub(tokenAmountOut);\n\n        uint256 finalBalanceIn = _getTokenBalanceGivenInvariantAndAllOtherBalances(\n            amplificationParameter,\n            balances,\n            invariant,\n            tokenIndexIn\n        );\n\n        balances[tokenIndexOut] = balances[tokenIndexOut].add(tokenAmountOut);\n\n        return finalBalanceIn.sub(balances[tokenIndexIn]).add(1);\n    }\n\n    /*\n    TODO: document it correctly\n    Flow of calculations:\n    amountsTokenIn -> amountsInProportional ->\n    amountsInPercentageExcess -> amountsInAfterFee -> newInvariant -> amountBPTOut\n    TODO: remove equations below and save them to Notion documentation\n    amountInPercentageExcess = 1 - amountInProportional/amountIn (if amountIn>amountInProportional)\n    amountInAfterFee = amountIn * (1 - swapFeePercentage * amountInPercentageExcess)\n    amountInAfterFee = amountIn - fee amount\n    fee amount = (amountIn - amountInProportional) * swapFeePercentage\n    amountInAfterFee = amountIn - (amountIn - amountInProportional) * swapFeePercentage\n    amountInAfterFee = amountIn * (1 - (1 - amountInProportional/amountIn) * swapFeePercentage)\n    amountInAfterFee = amountIn * (1 - amountInPercentageExcess * swapFeePercentage)\n    */\n    function _calcBptOutGivenExactTokensIn(\n        uint256 amp,\n        uint256[] memory balances,\n        uint256[] memory amountsIn,\n        uint256 bptTotalSupply,\n        uint256 swapFeePercentage\n    ) internal pure returns (uint256) {\n        // BPT out, so we round down overall.\n\n        // Get current invariant\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\n\n        // First loop calculates the sum of all token balances, which will be used to calculate\n        // the current weights of each token, relative to this sum\n        uint256 sumBalances = 0;\n        for (uint256 i = 0; i < balances.length; i++) {\n            sumBalances = sumBalances.add(balances[i]);\n        }\n\n        // Calculate the weighted balance ratio without considering fees\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsIn.length);\n        // The weighted sum of token balance ratios without fee\n        uint256 weightedBalanceRatio = 0;\n        for (uint256 i = 0; i < balances.length; i++) {\n            uint256 currentWeight = balances[i].divDown(sumBalances);\n            tokenBalanceRatiosWithoutFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulDown(currentWeight));\n        }\n\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\n        uint256[] memory newBalances = new uint256[](balances.length);\n        for (uint256 i = 0; i < balances.length; i++) {\n            // Percentage of the amount supplied that will be implicitly swapped for other tokens in the pool\n            uint256 tokenBalancePercentageExcess;\n            // Some tokens might have amounts supplied in excess of a 'balanced' join: these are identified if\n            // the token's balance ratio without fee is larger than the weighted balance ratio, and swap fees are\n            // charged on the swap amount\n            if (weightedBalanceRatio >= tokenBalanceRatiosWithoutFee[i]) {\n                tokenBalancePercentageExcess = 0;\n            } else {\n                tokenBalancePercentageExcess = tokenBalanceRatiosWithoutFee[i].sub(weightedBalanceRatio).divUp(\n                    tokenBalanceRatiosWithoutFee[i].sub(FixedPoint.ONE)\n                );\n            }\n\n            uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\n\n            uint256 amountInAfterFee = amountsIn[i].mulDown(swapFeeExcess.complement());\n\n            newBalances[i] = balances[i].add(amountInAfterFee);\n        }\n\n        // get the new invariant, taking swap fees into account\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\n\n        // return amountBPTOut\n        return bptTotalSupply.mulDown(newInvariant.divDown(currentInvariant).sub(FixedPoint.ONE));\n    }\n\n    /*\n    TODO: document it correctly\n    Flow of calculations:\n    amountBPTOut -> newInvariant -> (amountInProportional, amountInAfterFee) ->\n    amountInPercentageExcess -> amountIn\n    */\n    function _calcTokenInGivenExactBptOut(\n        uint256 amp,\n        uint256[] memory balances,\n        uint256 tokenIndex,\n        uint256 bptAmountOut,\n        uint256 bptTotalSupply,\n        uint256 swapFeePercentage\n    ) internal pure returns (uint256) {\n        // Token in, so we round up overall.\n\n        // Get the current invariant\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\n\n        // Calculate new invariant\n        uint256 newInvariant = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply).mulUp(currentInvariant);\n\n        // First calculate the sum of all token balances, which will be used to calculate\n        // the current weight of each token\n        uint256 sumBalances = 0;\n        for (uint256 i = 0; i < balances.length; i++) {\n            sumBalances = sumBalances.add(balances[i]);\n        }\n\n        // get amountInAfterFee\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\n            amp,\n            balances,\n            newInvariant,\n            tokenIndex\n        );\n        uint256 amountInAfterFee = newBalanceTokenIndex.sub(balances[tokenIndex]);\n\n        // Get tokenBalancePercentageExcess\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\n\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\n\n        return amountInAfterFee.divUp(swapFeeExcess.complement());\n    }\n\n    /*\n    Flow of calculations:\n    amountsTokenOut -> amountsOutProportional ->\n    amountOutPercentageExcess -> amountOutBeforeFee -> newInvariant -> amountBPTIn\n    */\n    function _calcBptInGivenExactTokensOut(\n        uint256 amp,\n        uint256[] memory balances,\n        uint256[] memory amountsOut,\n        uint256 bptTotalSupply,\n        uint256 swapFee\n    ) internal pure returns (uint256) {\n        // BPT in, so we round up overall.\n\n        // Get the current invariant\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\n\n        // First loop calculates the sum of all token balances, which will be used to calculate\n        // the current weights of each token relative to this sum\n        uint256 sumBalances = 0;\n        for (uint256 i = 0; i < balances.length; i++) {\n            sumBalances = sumBalances.add(balances[i]);\n        }\n\n        // Calculate the weighted balance ratio without considering fees\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsOut.length);\n        uint256 weightedBalanceRatio = 0;\n        for (uint256 i = 0; i < balances.length; i++) {\n            uint256 currentWeight = balances[i].divUp(sumBalances);\n            tokenBalanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulUp(currentWeight));\n        }\n\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\n        uint256[] memory newBalances = new uint256[](balances.length);\n        for (uint256 i = 0; i < balances.length; i++) {\n            uint256 tokenBalancePercentageExcess;\n            // Compare each tokenBalanceRatioWithoutFee to the total weighted ratio (weightedBalanceRatio), and\n            // decrease the fee by the excess amount\n            if (weightedBalanceRatio <= tokenBalanceRatiosWithoutFee[i]) {\n                tokenBalancePercentageExcess = 0;\n            } else {\n                tokenBalancePercentageExcess = weightedBalanceRatio.sub(tokenBalanceRatiosWithoutFee[i]).divUp(\n                    tokenBalanceRatiosWithoutFee[i].complement()\n                );\n            }\n\n            uint256 swapFeeExcess = swapFee.mulUp(tokenBalancePercentageExcess);\n\n            uint256 amountOutBeforeFee = amountsOut[i].divUp(swapFeeExcess.complement());\n\n            newBalances[i] = balances[i].sub(amountOutBeforeFee);\n        }\n\n        // get the new invariant, taking into account swap fees\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\n\n        // return amountBPTIn\n        return bptTotalSupply.mulUp(newInvariant.divUp(currentInvariant).complement());\n    }\n\n    /*\n    TODO: document it correctly\n    Flow of calculations:\n    amountBPTin -> newInvariant -> (amountOutProportional, amountOutBeforeFee) ->\n    amountOutPercentageExcess -> amountOut\n    */\n    function _calcTokenOutGivenExactBptIn(\n        uint256 amp,\n        uint256[] memory balances,\n        uint256 tokenIndex,\n        uint256 bptAmountIn,\n        uint256 bptTotalSupply,\n        uint256 swapFeePercentage\n    ) internal pure returns (uint256) {\n        // Get the current invariant\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\n        // Calculate the new invariant\n        uint256 newInvariant = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply).mulUp(currentInvariant);\n\n        // First calculate the sum of all token balances, which will be used to calculate\n        // the current weight of each token\n        uint256 sumBalances = 0;\n        for (uint256 i = 0; i < balances.length; i++) {\n            sumBalances = sumBalances.add(balances[i]);\n        }\n\n        // get amountOutBeforeFee\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\n            amp,\n            balances,\n            newInvariant,\n            tokenIndex\n        );\n        uint256 amountOutBeforeFee = balances[tokenIndex].sub(newBalanceTokenIndex);\n\n        // Calculate tokenBalancePercentageExcess\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\n\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\n\n        return amountOutBeforeFee.mulDown(swapFeeExcess.complement());\n    }\n\n    function _calcTokensOutGivenExactBptIn(\n        uint256[] memory balances,\n        uint256 bptAmountIn,\n        uint256 bptTotalSupply\n    ) internal pure returns (uint256[] memory) {\n        /**********************************************************************************************\n        // exactBPTInForTokensOut                                                                    //\n        // (per token)                                                                               //\n        // aO = tokenAmountOut             /        bptIn         \\                                  //\n        // b = tokenBalance      a0 = b * | ---------------------  |                                 //\n        // bptIn = bptAmountIn             \\     bptTotalSupply    /                                 //\n        // bpt = bptTotalSupply                                                                      //\n        **********************************************************************************************/\n\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\n        // multiplication and division.\n\n        uint256 bptRatio = bptAmountIn.divDown(bptTotalSupply);\n\n        uint256[] memory amountsOut = new uint256[](balances.length);\n        for (uint256 i = 0; i < balances.length; i++) {\n            amountsOut[i] = balances[i].mulDown(bptRatio);\n        }\n\n        return amountsOut;\n    }\n\n    // The amplification parameter equals: A n^(n-1)\n    function _calcDueTokenProtocolSwapFeeAmount(\n        uint256 amplificationParameter,\n        uint256[] memory balances,\n        uint256 lastInvariant,\n        uint256 tokenIndex,\n        uint256 protocolSwapFeePercentage\n    ) internal pure returns (uint256) {\n        /**************************************************************************************************************\n        // oneTokenSwapFee - polynomial equation to solve                                                            //\n        // af = fee amount to calculate in one token                                                                 //\n        // bf = balance of fee token                                                                                 //\n        // f = bf - af (finalBalanceFeeToken)                                                                        //\n        // D = old invariant                                            D                     D^(n+1)                //\n        // A = amplification coefficient               f^2 + ( S - ----------  - D) * f -  ------------- = 0         //\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\n        // S = sum of final balances but f                                                                           //\n        // P = product of final balances but f                                                                       //\n        **************************************************************************************************************/\n\n        // Protocol swap fee amount, so we round down overall.\n\n        uint256 finalBalanceFeeToken = _getTokenBalanceGivenInvariantAndAllOtherBalances(\n            amplificationParameter,\n            balances,\n            lastInvariant,\n            tokenIndex\n        );\n\n        // Result is rounded down\n        uint256 accumulatedTokenSwapFees = balances[tokenIndex] > finalBalanceFeeToken\n            ? balances[tokenIndex].sub(finalBalanceFeeToken)\n            : 0;\n        return accumulatedTokenSwapFees.mulDown(protocolSwapFeePercentage).divDown(FixedPoint.ONE);\n    }\n\n    // Private functions\n\n    // This function calculates the balance of a given token (tokenIndex)\n    // given all the other balances and the invariant\n    function _getTokenBalanceGivenInvariantAndAllOtherBalances(\n        uint256 amplificationParameter,\n        uint256[] memory balances,\n        uint256 invariant,\n        uint256 tokenIndex\n    ) private pure returns (uint256) {\n        // Rounds result up overall\n\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, balances.length);\n        uint256 sum = balances[0];\n        uint256 P_D = Math.mul(balances.length, balances[0]);\n        for (uint256 j = 1; j < balances.length; j++) {\n            P_D = Math.divDown(Math.mul(Math.mul(P_D, balances[j]), balances.length), invariant);\n            sum = sum.add(balances[j]);\n        }\n        sum = sum.sub(balances[tokenIndex]);\n\n        uint256 c = Math.divUp(Math.mul(invariant, invariant), ampTimesTotal);\n        // We remove the balance fromm c by multiplying it\n        c = c.mulUp(balances[tokenIndex]).divUp(P_D);\n\n        uint256 b = sum.add(invariant.divDown(ampTimesTotal));\n\n        // We iterate to find the balance\n        uint256 prevTokenBalance = 0;\n        // We multiply the first iteration outside the loop with the invariant to set the value of the\n        // initial approximation.\n        uint256 tokenBalance = invariant.mulUp(invariant).add(c).divUp(invariant.add(b));\n\n        for (uint256 i = 0; i < 255; i++) {\n            prevTokenBalance = tokenBalance;\n\n            tokenBalance = tokenBalance.mulUp(tokenBalance).add(c).divUp(\n                Math.mul(tokenBalance, 2).add(b).sub(invariant)\n            );\n\n            if (tokenBalance > prevTokenBalance) {\n                if (tokenBalance.sub(prevTokenBalance) <= 1) {\n                    break;\n                }\n            } else if (prevTokenBalance.sub(tokenBalance) <= 1) {\n                break;\n            }\n        }\n        return tokenBalance;\n    }\n}\n"
      },
      "src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\n\nimport \"../../lib/openzeppelin/IERC20.sol\";\n\nimport \"./StablePool.sol\";\n\nlibrary StablePoolUserDataHelpers {\n    function joinKind(bytes memory self) internal pure returns (StablePool.JoinKind) {\n        return abi.decode(self, (StablePool.JoinKind));\n    }\n\n    function exitKind(bytes memory self) internal pure returns (StablePool.ExitKind) {\n        return abi.decode(self, (StablePool.ExitKind));\n    }\n\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\n        (, amountsIn) = abi.decode(self, (StablePool.JoinKind, uint256[]));\n    }\n\n    function exactTokensInForBptOut(bytes memory self)\n        internal\n        pure\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountIn)\n    {\n        (, amountsIn, minBPTAmountIn) = abi.decode(self, (StablePool.JoinKind, uint256[], uint256));\n    }\n\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (StablePool.JoinKind, uint256, uint256));\n    }\n\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (StablePool.ExitKind, uint256, uint256));\n    }\n\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\n        (, bptAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256));\n    }\n\n    function bptInForExactTokensOut(bytes memory self)\n        internal\n        pure\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\n    {\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256[], uint256));\n    }\n}\n"
      },
      "src.sol/amm/StableSwap.sol": {
        "content": "// Wrapper StableMath\npragma solidity ^0.7.0;\n\nimport \"./lib/math/FixedPoint.sol\";\n\nimport \"./pools/stable/StablePoolUserDataHelpers.sol\";\nimport \"./pools/stable/StableMath.sol\";\n\ncontract StableSwap is StableMath {\n    using FixedPoint for uint256;\n    using StablePoolUserDataHelpers for bytes;\n    address immutable owner;\n    uint256 public amplificationParameter;\n\n    constructor(uint256 _amplificationParameter) {\n        owner = msg.sender;\n        _require(_amplificationParameter >= _MIN_AMP, Errors.MIN_AMP);\n        _require(_amplificationParameter <= _MAX_AMP, Errors.MAX_AMP);\n\n        amplificationParameter = _amplificationParameter;\n    }\n\n    modifier onlyOwner {\n        require(msg.sender == owner, \"Only owner can call this function.\");\n        _;\n    }\n\n    function updateAmplificationParameter(uint256 _amplificationParameter)\n        public\n        onlyOwner\n    {\n        amplificationParameter = _amplificationParameter;\n    }\n\n    function getAmplificationParameter() external view returns (uint256) {\n        return amplificationParameter;\n    }\n\n    // Swap\n\n    function onSwapGivenIn(\n        uint256 amount,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut\n    ) external view virtual returns (uint256) {\n        uint256 amountOut =\n            StableMath._calcOutGivenIn(\n                amplificationParameter,\n                balances,\n                indexIn,\n                indexOut,\n                amount\n            );\n\n        return amountOut;\n    }\n\n    function onSwapGivenOut(\n        uint256 amount,\n        uint256[] memory balances,\n        uint256 indexIn,\n        uint256 indexOut\n    ) external view virtual returns (uint256) {\n        uint256 amountIn =\n            StableMath._calcInGivenOut(\n                amplificationParameter,\n                balances,\n                indexIn,\n                indexOut,\n                amount\n            );\n\n        return amountIn;\n    }\n}\n"
      },
      "src.sol/amm/lib/helpers/BalancerHelpers.sol": {
        "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.7.0;\npragma experimental ABIEncoderV2;\n\nimport \"../math/Math.sol\";\nimport \"../math/FixedPoint.sol\";\n\nimport \"./InputHelpers.sol\";\nimport \"./AssetHelpers.sol\";\nimport \"./BalancerErrors.sol\";\n\nimport \"../../pools/BasePool.sol\";\nimport \"../../vault/ProtocolFeesCollector.sol\";\nimport \"../../vault/interfaces/IWETH.sol\";\nimport \"../../vault/interfaces/IVault.sol\";\nimport \"../../vault/balances/BalanceAllocation.sol\";\n\n/**\n * @dev This contract simply builds on top of the Balancer V2 architecture to provide useful helpers to users.\n * It connects different functionalities of the protocol components to allow accessing information that would\n * have required a more cumbersome setup if we wanted to provide these already built-in.\n */\ncontract BalancerHelpers is AssetHelpers {\n    using Math for uint256;\n    using BalanceAllocation for bytes32;\n    using BalanceAllocation for bytes32[];\n\n    IVault public immutable vault;\n\n    constructor(IVault _vault) AssetHelpers(_vault.WETH()) {\n        vault = _vault;\n    }\n\n    function queryJoin(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        IVault.JoinPoolRequest memory request\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\n        (address pool, ) = vault.getPool(poolId);\n        (uint256[] memory balances, uint256 lastChangeBlock) = _validateAssetsAndGetBalances(poolId, request.assets);\n        ProtocolFeesCollector feesCollector = vault.getProtocolFeesCollector();\n\n        (bptOut, amountsIn) = BasePool(pool).queryJoin(\n            poolId,\n            sender,\n            recipient,\n            balances,\n            lastChangeBlock,\n            feesCollector.getSwapFeePercentage(),\n            request.userData\n        );\n    }\n\n    function queryExit(\n        bytes32 poolId,\n        address sender,\n        address recipient,\n        IVault.ExitPoolRequest memory request\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\n        (address pool, ) = vault.getPool(poolId);\n        (uint256[] memory balances, uint256 lastChangeBlock) = _validateAssetsAndGetBalances(poolId, request.assets);\n        ProtocolFeesCollector feesCollector = vault.getProtocolFeesCollector();\n\n        (bptIn, amountsOut) = BasePool(pool).queryExit(\n            poolId,\n            sender,\n            recipient,\n            balances,\n            lastChangeBlock,\n            feesCollector.getSwapFeePercentage(),\n            request.userData\n        );\n    }\n\n    function _validateAssetsAndGetBalances(bytes32 poolId, IAsset[] memory expectedAssets)\n        internal\n        view\n        returns (uint256[] memory balances, uint256 lastChangeBlock)\n    {\n        IERC20[] memory actualTokens;\n        IERC20[] memory expectedTokens = _translateToIERC20(expectedAssets);\n\n        (actualTokens, balances, lastChangeBlock) = vault.getPoolTokens(poolId);\n        InputHelpers.ensureInputLengthMatch(actualTokens.length, expectedTokens.length);\n\n        for (uint256 i = 0; i < actualTokens.length; ++i) {\n            IERC20 token = actualTokens[i];\n            _require(token == expectedTokens[i], Errors.TOKENS_MISMATCH);\n        }\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"./ERC20.sol\";\n\n/**\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\n * tokens and those that they have an allowance for, in a way that can be\n * recognized off-chain (via event analysis).\n */\nabstract contract ERC20Burnable is ERC20 {\n    using SafeMath for uint256;\n\n    /**\n     * @dev Destroys `amount` tokens from the caller.\n     *\n     * See {ERC20-_burn}.\n     */\n    function burn(uint256 amount) public virtual {\n        _burn(msg.sender, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, deducting from the caller's\n     * allowance.\n     *\n     * See {ERC20-_burn} and {ERC20-allowance}.\n     *\n     * Requirements:\n     *\n     * - the caller must have allowance for ``accounts``'s tokens of at least\n     * `amount`.\n     */\n    function burnFrom(address account, uint256 amount) public virtual {\n        uint256 decreasedAllowance = allowance(account, msg.sender).sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\n\n        _approve(account, msg.sender, decreasedAllowance);\n        _burn(account, amount);\n    }\n}\n"
      },
      "src.sol/amm/lib/openzeppelin/Create2.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../helpers/BalancerErrors.sol\";\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as 'counterfactual interactions'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n    /**\n     * @dev Deploys a contract using `CREATE2`. The address where the contract\n     * will be deployed can be known in advance via {computeAddress}.\n     *\n     * The bytecode for a contract can be obtained from Solidity with\n     * `type(contractName).creationCode`.\n     *\n     * Requirements:\n     *\n     * - `bytecode` must not be empty.\n     * - `salt` must have not been used for `bytecode` already.\n     * - the factory must have a balance of at least `amount`.\n     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n     */\n    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address) {\n        address addr;\n        require(address(this).balance >= amount, 'CREATE2_INSUFFICIENT_BALANCE');\n        require(bytecode.length != 0, 'CREATE2_BYTECODE_ZERO');\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n        }\n        require(addr != address(0), 'CREATE2_DEPLOY_FAILED');\n        return addr;\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n     * `bytecodeHash` or `salt` will result in a new destination address.\n     */\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n        return computeAddress(salt, bytecodeHash, address(this));\n    }\n\n    /**\n     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\n     */\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address) {\n        bytes32 _data = keccak256(\n            abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)\n        );\n        return address(uint256(_data));\n    }\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "abi",
            "evm.bytecode",
            "evm.deployedBytecode",
            "evm.methodIdentifiers",
            "metadata",
            "devdoc",
            "userdoc",
            "storageLayout",
            "evm.gasEstimates"
          ],
          "": [
            "ast"
          ]
        }
      },
      "metadata": {
        "useLiteralContent": true
      }
    }
  },
  "output": {
    "contracts": {
      "src.sol/amm/StableSwap.sol": {
        "StableSwap": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "_amplificationParameter",
                  "type": "uint256"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "inputs": [],
              "name": "amplificationParameter",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAmplificationParameter",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "indexIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "indexOut",
                  "type": "uint256"
                }
              ],
              "name": "onSwapGivenIn",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "indexIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "indexOut",
                  "type": "uint256"
                }
              ],
              "name": "onSwapGivenOut",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "_amplificationParameter",
                  "type": "uint256"
                }
              ],
              "name": "updateAmplificationParameter",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60a060405234801561001057600080fd5b50604051610a62380380610a628339818101604052602081101561003357600080fd5b50513360601b608052610053670de0b6b3a764000082101561012c610074565b61006c69010f0cf064dd5920000082111561012d610074565b6000556100d9565b816100825761008281610086565b5050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b60805160601c61096c6100f660003980610240525061096c6000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80631cb2333d1461005c5780631ff3bc6b146100765780636daccffa1461012557806377a743021461012d57806397010c6f146101dc575b600080fd5b6100646101fb565b60408051918252519081900360200190f35b6100646004803603608081101561008c57600080fd5b813591908101906040810160208201356401000000008111156100ae57600080fd5b8201836020820111156100c057600080fd5b803590602001918460208302840111640100000000831117156100e257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135610201565b61006461021d565b6100646004803603608081101561014357600080fd5b8135919081019060408101602082013564010000000081111561016557600080fd5b82018360208201111561017757600080fd5b8035906020019184602083028401116401000000008311171561019957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135610223565b6101f9600480360360208110156101f257600080fd5b5035610235565b005b60005481565b6000806102136000548686868a6102a1565b9695505050505050565b60005490565b6000806102136000548686868a610379565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461029c5760405162461bcd60e51b81526004018080602001828103825260228152602001806109156022913960400191505060405180910390fd5b600055565b6000806102ae8787610403565b90506102d6838786815181106102c057fe5b602002602001015161057990919063ffffffff16565b8685815181106102e257fe5b60200260200101818152505060006102fc8888848961058f565b90506103248488878151811061030e57fe5b602002602001015161074890919063ffffffff16565b87868151811061033057fe5b60200260200101818152505061036d600161036789898151811061035057fe5b60200260200101518461057990919063ffffffff16565b90610748565b98975050505050505050565b6000806103868787610403565b90506103988387878151811061030e57fe5b8686815181106103a457fe5b60200260200101818152505060006103be8888848861058f565b90506103d0848888815181106102c057fe5b8787815181106103dc57fe5b60200260200101818152505061036d60016103fd838a89815181106102c057fe5b90610579565b80516000908190815b818110156104445761043a85828151811061042357fe5b60200260200101518461074890919063ffffffff16565b925060010161040c565b508161045557600092505050610573565b600082816104638885610761565b905060005b60ff81101561056a576000610491868a60008151811061048457fe5b6020026020010151610761565b905060015b868110156104ca576104c06104ba6104b4848d858151811061048457fe5b89610761565b86610785565b9150600101610496565b508394506105246104fa6104e76104e1868b610761565b84610761565b6103676104f48a89610761565b88610761565b61051f61051161050b876001610579565b85610761565b6103676104b48b6001610748565b610785565b93508484111561054a57600161053a8587610579565b11610545575061056a565b610561565b60016105568686610579565b11610561575061056a565b50600101610468565b50909450505050505b92915050565b60006105898383111560016107b8565b50900390565b60008061059d868651610761565b90506000856000815181106105ae57fe5b6020026020010151905060006105cc87518860008151811061048457fe5b905060015b8751811015610618576105fd6105f76105f0848b858151811061048457fe5b8a51610761565b886107ca565b915061060e88828151811061042357fe5b92506001016105d1565b5061063f87868151811061062857fe5b60200260200101518361057990919063ffffffff16565b915060006106566106508889610761565b85610785565b9050610688826106828a898151811061066b57fe5b6020026020010151846107ea90919063ffffffff16565b9061082e565b905060006106a06106998987610879565b8590610748565b90506000806106c06106b28b85610748565b610682866103678e806107ea565b905060005b60ff811015610738578192506106f56106e78c6103fd87610367876002610761565b6106828761036786806107ea565b91508282111561071a57600161070b8385610579565b1161071557610738565b610730565b60016107268484610579565b1161073057610738565b6001016106c5565b509b9a5050505050505050505050565b600082820161075a84821015836107b8565b9392505050565b600082820261075a84158061077e57508385838161077b57fe5b04145b60036107b8565b600061079482151560046107b8565b826107a157506000610573565b8160018403816107ad57fe5b046001019050610573565b816107c6576107c6816108c1565b5050565b60006107d982151560046107b8565b8183816107e257fe5b049392505050565b600082820261080484158061077e57508385838161077b57fe5b80610813576000915050610573565b670de0b6b3a764000060001982015b04600101915050610573565b600061083d82151560046107b8565b8261084a57506000610573565b670de0b6b3a76400008381029061086d9085838161086457fe5b041460056107b8565b82600182038161082257fe5b600061088882151560046107b8565b8261089557506000610573565b670de0b6b3a7640000838102906108af9085838161086457fe5b8281816108b857fe5b04915050610573565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fdfe4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6e2ea26469706673582212209cb985ae52e8ec76288dbf80f8dd131ac7839088dfa76f3e69293ce96a8bde7c64736f6c63430007010033",
              "opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0xA62 CODESIZE SUB DUP1 PUSH2 0xA62 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x33 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD CALLER PUSH1 0x60 SHL PUSH1 0x80 MSTORE PUSH2 0x53 PUSH8 0xDE0B6B3A7640000 DUP3 LT ISZERO PUSH2 0x12C PUSH2 0x74 JUMP JUMPDEST PUSH2 0x6C PUSH10 0x10F0CF064DD59200000 DUP3 GT ISZERO PUSH2 0x12D PUSH2 0x74 JUMP JUMPDEST PUSH1 0x0 SSTORE PUSH2 0xD9 JUMP JUMPDEST DUP2 PUSH2 0x82 JUMPI PUSH2 0x82 DUP2 PUSH2 0x86 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH2 0x96C PUSH2 0xF6 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x240 MSTORE POP PUSH2 0x96C PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x57 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x1CB2333D EQ PUSH2 0x5C JUMPI DUP1 PUSH4 0x1FF3BC6B EQ PUSH2 0x76 JUMPI DUP1 PUSH4 0x6DACCFFA EQ PUSH2 0x125 JUMPI DUP1 PUSH4 0x77A74302 EQ PUSH2 0x12D JUMPI DUP1 PUSH4 0x97010C6F EQ PUSH2 0x1DC JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x64 PUSH2 0x1FB JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x64 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x80 DUP2 LT ISZERO PUSH2 0x8C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x40 DUP2 ADD PUSH1 0x20 DUP3 ADD CALLDATALOAD PUSH5 0x100000000 DUP2 GT ISZERO PUSH2 0xAE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0xC0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH2 0xE2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP DUP3 CALLDATALOAD SWAP4 POP POP POP PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x201 JUMP JUMPDEST PUSH2 0x64 PUSH2 0x21D JUMP JUMPDEST PUSH2 0x64 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x80 DUP2 LT ISZERO PUSH2 0x143 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x40 DUP2 ADD PUSH1 0x20 DUP3 ADD CALLDATALOAD PUSH5 0x100000000 DUP2 GT ISZERO PUSH2 0x165 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x177 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH2 0x199 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP DUP3 CALLDATALOAD SWAP4 POP POP POP PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x223 JUMP JUMPDEST PUSH2 0x1F9 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1F2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x235 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x213 PUSH1 0x0 SLOAD DUP7 DUP7 DUP7 DUP11 PUSH2 0x2A1 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x213 PUSH1 0x0 SLOAD DUP7 DUP7 DUP7 DUP11 PUSH2 0x379 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND EQ PUSH2 0x29C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x915 PUSH1 0x22 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2AE DUP8 DUP8 PUSH2 0x403 JUMP JUMPDEST SWAP1 POP PUSH2 0x2D6 DUP4 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2C0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x579 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2E2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x2FC DUP9 DUP9 DUP5 DUP10 PUSH2 0x58F JUMP JUMPDEST SWAP1 POP PUSH2 0x324 DUP5 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x30E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x748 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x330 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x36D PUSH1 0x1 PUSH2 0x367 DUP10 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x350 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x579 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 PUSH2 0x748 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x386 DUP8 DUP8 PUSH2 0x403 JUMP JUMPDEST SWAP1 POP PUSH2 0x398 DUP4 DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x30E JUMPI INVALID JUMPDEST DUP7 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3A4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x3BE DUP9 DUP9 DUP5 DUP9 PUSH2 0x58F JUMP JUMPDEST SWAP1 POP PUSH2 0x3D0 DUP5 DUP9 DUP9 DUP2 MLOAD DUP2 LT PUSH2 0x2C0 JUMPI INVALID JUMPDEST DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3DC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x36D PUSH1 0x1 PUSH2 0x3FD DUP4 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x2C0 JUMPI INVALID JUMPDEST SWAP1 PUSH2 0x579 JUMP JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x444 JUMPI PUSH2 0x43A DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x423 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x748 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x40C JUMP JUMPDEST POP DUP2 PUSH2 0x455 JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x573 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 PUSH2 0x463 DUP9 DUP6 PUSH2 0x761 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x56A JUMPI PUSH1 0x0 PUSH2 0x491 DUP7 DUP11 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x484 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x761 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x4CA JUMPI PUSH2 0x4C0 PUSH2 0x4BA PUSH2 0x4B4 DUP5 DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x484 JUMPI INVALID JUMPDEST DUP10 PUSH2 0x761 JUMP JUMPDEST DUP7 PUSH2 0x785 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x496 JUMP JUMPDEST POP DUP4 SWAP5 POP PUSH2 0x524 PUSH2 0x4FA PUSH2 0x4E7 PUSH2 0x4E1 DUP7 DUP12 PUSH2 0x761 JUMP JUMPDEST DUP5 PUSH2 0x761 JUMP JUMPDEST PUSH2 0x367 PUSH2 0x4F4 DUP11 DUP10 PUSH2 0x761 JUMP JUMPDEST DUP9 PUSH2 0x761 JUMP JUMPDEST PUSH2 0x51F PUSH2 0x511 PUSH2 0x50B DUP8 PUSH1 0x1 PUSH2 0x579 JUMP JUMPDEST DUP6 PUSH2 0x761 JUMP JUMPDEST PUSH2 0x367 PUSH2 0x4B4 DUP12 PUSH1 0x1 PUSH2 0x748 JUMP JUMPDEST PUSH2 0x785 JUMP JUMPDEST SWAP4 POP DUP5 DUP5 GT ISZERO PUSH2 0x54A JUMPI PUSH1 0x1 PUSH2 0x53A DUP6 DUP8 PUSH2 0x579 JUMP JUMPDEST GT PUSH2 0x545 JUMPI POP PUSH2 0x56A JUMP JUMPDEST PUSH2 0x561 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x556 DUP7 DUP7 PUSH2 0x579 JUMP JUMPDEST GT PUSH2 0x561 JUMPI POP PUSH2 0x56A JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x468 JUMP JUMPDEST POP SWAP1 SWAP5 POP POP POP POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x589 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x7B8 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x59D DUP7 DUP7 MLOAD PUSH2 0x761 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x5AE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH2 0x5CC DUP8 MLOAD DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x484 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x618 JUMPI PUSH2 0x5FD PUSH2 0x5F7 PUSH2 0x5F0 DUP5 DUP12 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x484 JUMPI INVALID JUMPDEST DUP11 MLOAD PUSH2 0x761 JUMP JUMPDEST DUP9 PUSH2 0x7CA JUMP JUMPDEST SWAP2 POP PUSH2 0x60E DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x423 JUMPI INVALID JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x5D1 JUMP JUMPDEST POP PUSH2 0x63F DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x628 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x579 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x656 PUSH2 0x650 DUP9 DUP10 PUSH2 0x761 JUMP JUMPDEST DUP6 PUSH2 0x785 JUMP JUMPDEST SWAP1 POP PUSH2 0x688 DUP3 PUSH2 0x682 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x66B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x7EA SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 PUSH2 0x82E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6A0 PUSH2 0x699 DUP10 DUP8 PUSH2 0x879 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x748 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x6C0 PUSH2 0x6B2 DUP12 DUP6 PUSH2 0x748 JUMP JUMPDEST PUSH2 0x682 DUP7 PUSH2 0x367 DUP15 DUP1 PUSH2 0x7EA JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x738 JUMPI DUP2 SWAP3 POP PUSH2 0x6F5 PUSH2 0x6E7 DUP13 PUSH2 0x3FD DUP8 PUSH2 0x367 DUP8 PUSH1 0x2 PUSH2 0x761 JUMP JUMPDEST PUSH2 0x682 DUP8 PUSH2 0x367 DUP7 DUP1 PUSH2 0x7EA JUMP JUMPDEST SWAP2 POP DUP3 DUP3 GT ISZERO PUSH2 0x71A JUMPI PUSH1 0x1 PUSH2 0x70B DUP4 DUP6 PUSH2 0x579 JUMP JUMPDEST GT PUSH2 0x715 JUMPI PUSH2 0x738 JUMP JUMPDEST PUSH2 0x730 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x726 DUP5 DUP5 PUSH2 0x579 JUMP JUMPDEST GT PUSH2 0x730 JUMPI PUSH2 0x738 JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x6C5 JUMP JUMPDEST POP SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x75A DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x7B8 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x75A DUP5 ISZERO DUP1 PUSH2 0x77E JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x77B JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0x7B8 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x794 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x7B8 JUMP JUMPDEST DUP3 PUSH2 0x7A1 JUMPI POP PUSH1 0x0 PUSH2 0x573 JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x7AD JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x573 JUMP JUMPDEST DUP2 PUSH2 0x7C6 JUMPI PUSH2 0x7C6 DUP2 PUSH2 0x8C1 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x7D9 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x7B8 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x7E2 JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x804 DUP5 ISZERO DUP1 PUSH2 0x77E JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x77B JUMPI INVALID JUMPDEST DUP1 PUSH2 0x813 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x573 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x573 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x83D DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x7B8 JUMP JUMPDEST DUP3 PUSH2 0x84A JUMPI POP PUSH1 0x0 PUSH2 0x573 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x86D SWAP1 DUP6 DUP4 DUP2 PUSH2 0x864 JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0x7B8 JUMP JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x822 JUMPI INVALID JUMPDEST PUSH1 0x0 PUSH2 0x888 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x7B8 JUMP JUMPDEST DUP3 PUSH2 0x895 JUMPI POP PUSH1 0x0 PUSH2 0x573 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x8AF SWAP1 DUP6 DUP4 DUP2 PUSH2 0x864 JUMPI INVALID JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x8B8 JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x573 JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT INVALID 0x4F PUSH15 0x6C79206F776E65722063616E206361 PUSH13 0x6C20746869732066756E637469 PUSH16 0x6E2EA26469706673582212209CB985AE MSTORE 0xE8 0xEC PUSH23 0x288DBF80F8DD131AC7839088DFA76F3E69293CE96A8BDE PUSH29 0x64736F6C63430007010033000000000000000000000000000000000000 ",
              "sourceMap": "180:1792:0:-:0;;;374:281;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;374:281:0;437:10;429:18;;;;457:61;1092:4:33;466:35:0;;;5665:3:3;457:8:0;:61::i;:::-;528;1139:13:33;537:35:0;;;5710:3:3;528:8:0;:61::i;:::-;600:22;:48;180:1792;;866:101:3;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;1074:3172::-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2999:73;2210:2;2243:18;;;2288;;;2215:4;2284:29;;;3040:1;3036:14;2195:18;;;;3025:26;;;;2336:18;;;;2383;;;2379:29;;;3057:2;3053:17;3021:50;;;;2999:73;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;180:1792:0;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "14": [
                  {
                    "length": 32,
                    "start": 576
                  }
                ]
              },
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50600436106100575760003560e01c80631cb2333d1461005c5780631ff3bc6b146100765780636daccffa1461012557806377a743021461012d57806397010c6f146101dc575b600080fd5b6100646101fb565b60408051918252519081900360200190f35b6100646004803603608081101561008c57600080fd5b813591908101906040810160208201356401000000008111156100ae57600080fd5b8201836020820111156100c057600080fd5b803590602001918460208302840111640100000000831117156100e257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135610201565b61006461021d565b6100646004803603608081101561014357600080fd5b8135919081019060408101602082013564010000000081111561016557600080fd5b82018360208201111561017757600080fd5b8035906020019184602083028401116401000000008311171561019957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135610223565b6101f9600480360360208110156101f257600080fd5b5035610235565b005b60005481565b6000806102136000548686868a6102a1565b9695505050505050565b60005490565b6000806102136000548686868a610379565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461029c5760405162461bcd60e51b81526004018080602001828103825260228152602001806109156022913960400191505060405180910390fd5b600055565b6000806102ae8787610403565b90506102d6838786815181106102c057fe5b602002602001015161057990919063ffffffff16565b8685815181106102e257fe5b60200260200101818152505060006102fc8888848961058f565b90506103248488878151811061030e57fe5b602002602001015161074890919063ffffffff16565b87868151811061033057fe5b60200260200101818152505061036d600161036789898151811061035057fe5b60200260200101518461057990919063ffffffff16565b90610748565b98975050505050505050565b6000806103868787610403565b90506103988387878151811061030e57fe5b8686815181106103a457fe5b60200260200101818152505060006103be8888848861058f565b90506103d0848888815181106102c057fe5b8787815181106103dc57fe5b60200260200101818152505061036d60016103fd838a89815181106102c057fe5b90610579565b80516000908190815b818110156104445761043a85828151811061042357fe5b60200260200101518461074890919063ffffffff16565b925060010161040c565b508161045557600092505050610573565b600082816104638885610761565b905060005b60ff81101561056a576000610491868a60008151811061048457fe5b6020026020010151610761565b905060015b868110156104ca576104c06104ba6104b4848d858151811061048457fe5b89610761565b86610785565b9150600101610496565b508394506105246104fa6104e76104e1868b610761565b84610761565b6103676104f48a89610761565b88610761565b61051f61051161050b876001610579565b85610761565b6103676104b48b6001610748565b610785565b93508484111561054a57600161053a8587610579565b11610545575061056a565b610561565b60016105568686610579565b11610561575061056a565b50600101610468565b50909450505050505b92915050565b60006105898383111560016107b8565b50900390565b60008061059d868651610761565b90506000856000815181106105ae57fe5b6020026020010151905060006105cc87518860008151811061048457fe5b905060015b8751811015610618576105fd6105f76105f0848b858151811061048457fe5b8a51610761565b886107ca565b915061060e88828151811061042357fe5b92506001016105d1565b5061063f87868151811061062857fe5b60200260200101518361057990919063ffffffff16565b915060006106566106508889610761565b85610785565b9050610688826106828a898151811061066b57fe5b6020026020010151846107ea90919063ffffffff16565b9061082e565b905060006106a06106998987610879565b8590610748565b90506000806106c06106b28b85610748565b610682866103678e806107ea565b905060005b60ff811015610738578192506106f56106e78c6103fd87610367876002610761565b6106828761036786806107ea565b91508282111561071a57600161070b8385610579565b1161071557610738565b610730565b60016107268484610579565b1161073057610738565b6001016106c5565b509b9a5050505050505050505050565b600082820161075a84821015836107b8565b9392505050565b600082820261075a84158061077e57508385838161077b57fe5b04145b60036107b8565b600061079482151560046107b8565b826107a157506000610573565b8160018403816107ad57fe5b046001019050610573565b816107c6576107c6816108c1565b5050565b60006107d982151560046107b8565b8183816107e257fe5b049392505050565b600082820261080484158061077e57508385838161077b57fe5b80610813576000915050610573565b670de0b6b3a764000060001982015b04600101915050610573565b600061083d82151560046107b8565b8261084a57506000610573565b670de0b6b3a76400008381029061086d9085838161086457fe5b041460056107b8565b82600182038161082257fe5b600061088882151560046107b8565b8261089557506000610573565b670de0b6b3a7640000838102906108af9085838161086457fe5b8281816108b857fe5b04915050610573565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fdfe4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6e2ea26469706673582212209cb985ae52e8ec76288dbf80f8dd131ac7839088dfa76f3e69293ce96a8bde7c64736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x57 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x1CB2333D EQ PUSH2 0x5C JUMPI DUP1 PUSH4 0x1FF3BC6B EQ PUSH2 0x76 JUMPI DUP1 PUSH4 0x6DACCFFA EQ PUSH2 0x125 JUMPI DUP1 PUSH4 0x77A74302 EQ PUSH2 0x12D JUMPI DUP1 PUSH4 0x97010C6F EQ PUSH2 0x1DC JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x64 PUSH2 0x1FB JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x64 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x80 DUP2 LT ISZERO PUSH2 0x8C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x40 DUP2 ADD PUSH1 0x20 DUP3 ADD CALLDATALOAD PUSH5 0x100000000 DUP2 GT ISZERO PUSH2 0xAE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0xC0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH2 0xE2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP DUP3 CALLDATALOAD SWAP4 POP POP POP PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x201 JUMP JUMPDEST PUSH2 0x64 PUSH2 0x21D JUMP JUMPDEST PUSH2 0x64 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x80 DUP2 LT ISZERO PUSH2 0x143 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x40 DUP2 ADD PUSH1 0x20 DUP3 ADD CALLDATALOAD PUSH5 0x100000000 DUP2 GT ISZERO PUSH2 0x165 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x177 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH5 0x100000000 DUP4 GT OR ISZERO PUSH2 0x199 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP DUP3 CALLDATALOAD SWAP4 POP POP POP PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x223 JUMP JUMPDEST PUSH2 0x1F9 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1F2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x235 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x213 PUSH1 0x0 SLOAD DUP7 DUP7 DUP7 DUP11 PUSH2 0x2A1 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x213 PUSH1 0x0 SLOAD DUP7 DUP7 DUP7 DUP11 PUSH2 0x379 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND EQ PUSH2 0x29C JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH2 0x915 PUSH1 0x22 SWAP2 CODECOPY PUSH1 0x40 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2AE DUP8 DUP8 PUSH2 0x403 JUMP JUMPDEST SWAP1 POP PUSH2 0x2D6 DUP4 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2C0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x579 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2E2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x2FC DUP9 DUP9 DUP5 DUP10 PUSH2 0x58F JUMP JUMPDEST SWAP1 POP PUSH2 0x324 DUP5 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x30E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x748 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x330 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x36D PUSH1 0x1 PUSH2 0x367 DUP10 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x350 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x579 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 PUSH2 0x748 JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x386 DUP8 DUP8 PUSH2 0x403 JUMP JUMPDEST SWAP1 POP PUSH2 0x398 DUP4 DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x30E JUMPI INVALID JUMPDEST DUP7 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3A4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x3BE DUP9 DUP9 DUP5 DUP9 PUSH2 0x58F JUMP JUMPDEST SWAP1 POP PUSH2 0x3D0 DUP5 DUP9 DUP9 DUP2 MLOAD DUP2 LT PUSH2 0x2C0 JUMPI INVALID JUMPDEST DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3DC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x36D PUSH1 0x1 PUSH2 0x3FD DUP4 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x2C0 JUMPI INVALID JUMPDEST SWAP1 PUSH2 0x579 JUMP JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x444 JUMPI PUSH2 0x43A DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x423 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x748 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x40C JUMP JUMPDEST POP DUP2 PUSH2 0x455 JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x573 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 PUSH2 0x463 DUP9 DUP6 PUSH2 0x761 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x56A JUMPI PUSH1 0x0 PUSH2 0x491 DUP7 DUP11 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x484 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x761 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x4CA JUMPI PUSH2 0x4C0 PUSH2 0x4BA PUSH2 0x4B4 DUP5 DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x484 JUMPI INVALID JUMPDEST DUP10 PUSH2 0x761 JUMP JUMPDEST DUP7 PUSH2 0x785 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x496 JUMP JUMPDEST POP DUP4 SWAP5 POP PUSH2 0x524 PUSH2 0x4FA PUSH2 0x4E7 PUSH2 0x4E1 DUP7 DUP12 PUSH2 0x761 JUMP JUMPDEST DUP5 PUSH2 0x761 JUMP JUMPDEST PUSH2 0x367 PUSH2 0x4F4 DUP11 DUP10 PUSH2 0x761 JUMP JUMPDEST DUP9 PUSH2 0x761 JUMP JUMPDEST PUSH2 0x51F PUSH2 0x511 PUSH2 0x50B DUP8 PUSH1 0x1 PUSH2 0x579 JUMP JUMPDEST DUP6 PUSH2 0x761 JUMP JUMPDEST PUSH2 0x367 PUSH2 0x4B4 DUP12 PUSH1 0x1 PUSH2 0x748 JUMP JUMPDEST PUSH2 0x785 JUMP JUMPDEST SWAP4 POP DUP5 DUP5 GT ISZERO PUSH2 0x54A JUMPI PUSH1 0x1 PUSH2 0x53A DUP6 DUP8 PUSH2 0x579 JUMP JUMPDEST GT PUSH2 0x545 JUMPI POP PUSH2 0x56A JUMP JUMPDEST PUSH2 0x561 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x556 DUP7 DUP7 PUSH2 0x579 JUMP JUMPDEST GT PUSH2 0x561 JUMPI POP PUSH2 0x56A JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x468 JUMP JUMPDEST POP SWAP1 SWAP5 POP POP POP POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x589 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x7B8 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x59D DUP7 DUP7 MLOAD PUSH2 0x761 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x5AE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH2 0x5CC DUP8 MLOAD DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x484 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x618 JUMPI PUSH2 0x5FD PUSH2 0x5F7 PUSH2 0x5F0 DUP5 DUP12 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x484 JUMPI INVALID JUMPDEST DUP11 MLOAD PUSH2 0x761 JUMP JUMPDEST DUP9 PUSH2 0x7CA JUMP JUMPDEST SWAP2 POP PUSH2 0x60E DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x423 JUMPI INVALID JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x5D1 JUMP JUMPDEST POP PUSH2 0x63F DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x628 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x579 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x656 PUSH2 0x650 DUP9 DUP10 PUSH2 0x761 JUMP JUMPDEST DUP6 PUSH2 0x785 JUMP JUMPDEST SWAP1 POP PUSH2 0x688 DUP3 PUSH2 0x682 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x66B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x7EA SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 PUSH2 0x82E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x6A0 PUSH2 0x699 DUP10 DUP8 PUSH2 0x879 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x748 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x6C0 PUSH2 0x6B2 DUP12 DUP6 PUSH2 0x748 JUMP JUMPDEST PUSH2 0x682 DUP7 PUSH2 0x367 DUP15 DUP1 PUSH2 0x7EA JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x738 JUMPI DUP2 SWAP3 POP PUSH2 0x6F5 PUSH2 0x6E7 DUP13 PUSH2 0x3FD DUP8 PUSH2 0x367 DUP8 PUSH1 0x2 PUSH2 0x761 JUMP JUMPDEST PUSH2 0x682 DUP8 PUSH2 0x367 DUP7 DUP1 PUSH2 0x7EA JUMP JUMPDEST SWAP2 POP DUP3 DUP3 GT ISZERO PUSH2 0x71A JUMPI PUSH1 0x1 PUSH2 0x70B DUP4 DUP6 PUSH2 0x579 JUMP JUMPDEST GT PUSH2 0x715 JUMPI PUSH2 0x738 JUMP JUMPDEST PUSH2 0x730 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x726 DUP5 DUP5 PUSH2 0x579 JUMP JUMPDEST GT PUSH2 0x730 JUMPI PUSH2 0x738 JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x6C5 JUMP JUMPDEST POP SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x75A DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x7B8 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x75A DUP5 ISZERO DUP1 PUSH2 0x77E JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x77B JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0x7B8 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x794 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x7B8 JUMP JUMPDEST DUP3 PUSH2 0x7A1 JUMPI POP PUSH1 0x0 PUSH2 0x573 JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x7AD JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x573 JUMP JUMPDEST DUP2 PUSH2 0x7C6 JUMPI PUSH2 0x7C6 DUP2 PUSH2 0x8C1 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x7D9 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x7B8 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x7E2 JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x804 DUP5 ISZERO DUP1 PUSH2 0x77E JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x77B JUMPI INVALID JUMPDEST DUP1 PUSH2 0x813 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x573 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x573 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x83D DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x7B8 JUMP JUMPDEST DUP3 PUSH2 0x84A JUMPI POP PUSH1 0x0 PUSH2 0x573 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x86D SWAP1 DUP6 DUP4 DUP2 PUSH2 0x864 JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0x7B8 JUMP JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x822 JUMPI INVALID JUMPDEST PUSH1 0x0 PUSH2 0x888 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x7B8 JUMP JUMPDEST DUP3 PUSH2 0x895 JUMPI POP PUSH1 0x0 PUSH2 0x573 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x8AF SWAP1 DUP6 DUP4 DUP2 PUSH2 0x864 JUMPI INVALID JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x8B8 JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x573 JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT INVALID 0x4F PUSH15 0x6C79206F776E65722063616E206361 PUSH13 0x6C20746869732066756E637469 PUSH16 0x6E2EA26469706673582212209CB985AE MSTORE 0xE8 0xEC PUSH23 0x288DBF80F8DD131AC7839088DFA76F3E69293CE96A8BDE PUSH29 0x64736F6C63430007010033000000000000000000000000000000000000 ",
              "sourceMap": "180:1792:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;330:37;;;:::i;:::-;;;;;;;;;;;;;;;;1535:435;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1535:435:0;;-1:-1:-1;;1535:435:0;;;-1:-1:-1;;;1535:435:0;;;;:::i;959:115::-;;;:::i;1093:436::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1093:436:0;;-1:-1:-1;;1093:436:0;;;-1:-1:-1;;;1093:436:0;;;;:::i;780:173::-;;;;;;;;;;;;;;;;-1:-1:-1;780:173:0;;:::i;:::-;;330:37;;;;:::o;1535:435::-;1706:7;1725:16;1756:181;1800:22;;1840:8;1866:7;1891:8;1917:6;1756:26;:181::i;:::-;1725:212;1535:435;-1:-1:-1;;;;;;1535:435:0:o;959:115::-;1019:7;1045:22;959:115;:::o;1093:436::-;1263:7;1282:17;1314:181;1358:22;;1398:8;1424:7;1449:8;1475:6;1314:26;:181::i;780:173::-;698:10;-1:-1:-1;;;;;712:5:0;698:19;;690:66;;;;-1:-1:-1;;;690:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;898:22:::1;:48:::0;780:173::o;6125:2118:33:-;6347:7;7734:17;7754:53;7774:22;7798:8;7754:19;:53::i;:::-;7734:73;;7844:43;7872:14;7844:8;7853:13;7844:23;;;;;;;;;;;;;;:27;;:43;;;;:::i;:::-;7818:8;7827:13;7818:23;;;;;;;;;;;;;:69;;;;;7898:22;7923:166;7986:22;8022:8;8044:9;8067:12;7923:49;:166::i;:::-;7898:191;;8126:43;8154:14;8126:8;8135:13;8126:23;;;;;;;;;;;;;;:27;;:43;;;;:::i;:::-;8100:8;8109:13;8100:23;;;;;;;;;;;;;:69;;;;;8187:49;8234:1;8187:42;8206:8;8215:12;8206:22;;;;;;;;;;;;;;8187:14;:18;;:42;;;;:::i;:::-;:46;;:49::i;:::-;8180:56;6125:2118;-1:-1:-1;;;;;;;;6125:2118:33:o;3789:::-;4010:7;5400:17;5420:53;5440:22;5464:8;5420:19;:53::i;:::-;5400:73;;5509:41;5536:13;5509:8;5518:12;5509:22;;;;;;;:41;5484:8;5493:12;5484:22;;;;;;;;;;;;;:66;;;;;5561:23;5587:167;5650:22;5686:8;5708:9;5731:13;5587:49;:167::i;:::-;5561:193;;5790:41;5817:13;5790:8;5799:12;5790:22;;;;;;;:41;5765:8;5774:12;5765:22;;;;;;;;;;;;;:66;;;;;5849:51;5898:1;5849:44;5877:15;5849:8;5858:13;5849:23;;;;;;;:44;:48;;:51::i;1365:2249::-;2440:15;;1500:7;;;;;2465:91;2489:9;2485:1;:13;2465:91;;;2525:20;2533:8;2542:1;2533:11;;;;;;;;;;;;;;2525:3;:7;;:20;;;;:::i;:::-;2519:26;-1:-1:-1;2500:3:33;;2465:91;;;-1:-1:-1;2569:8:33;2565:47;;2600:1;2593:8;;;;;;2565:47;2621:21;2676:3;2621:21;2713:43;2722:22;2746:9;2713:8;:43::i;:::-;2689:67;;2772:9;2767:815;2791:3;2787:1;:7;2767:815;;;2815:11;2829:32;2838:9;2849:8;2858:1;2849:11;;;;;;;;;;;;;;2829:8;:32::i;:::-;2815:46;-1:-1:-1;2892:1:33;2875:149;2899:9;2895:1;:13;2875:149;;;2939:70;2950:47;2959:26;2968:3;2973:8;2982:1;2973:11;;;;;;;2959:26;2987:9;2950:8;:47::i;:::-;2999:9;2939:10;:70::i;:::-;2933:76;-1:-1:-1;2910:3:33;;2875:149;;;;3053:9;3037:25;;3088:238;3116:100;3172:43;3181:28;3190:13;3205:3;3181:8;:28::i;:::-;3211:3;3172:8;:43::i;:::-;3116:51;3125:30;3134:9;3145;3125:8;:30::i;:::-;3157:9;3116:8;:51::i;:100::-;3234:78;3276:35;3285:20;:13;3303:1;3285:17;:20::i;:::-;3307:3;3276:8;:35::i;:::-;3234:37;3243:16;:9;3257:1;3243:13;:16::i;3234:78::-;3088:10;:238::i;:::-;3076:250;;3357:13;3345:9;:25;3341:231;;;3426:1;3394:28;:9;3408:13;3394;:28::i;:::-;:33;3390:85;;3451:5;;;3390:85;3341:231;;;3531:1;3499:28;:13;3517:9;3499:17;:28::i;:::-;:33;3495:77;;3552:5;;;3495:77;-1:-1:-1;2796:3:33;;2767:815;;;-1:-1:-1;3598:9:33;;-1:-1:-1;;;;;1365:2249:33;;;;;:::o;1402:239:9:-;1460:7;1552:37;1566:1;1561;:6;;4370:1:3;1552:8:9;:37::i;:::-;-1:-1:-1;1611:5:9;;;1402:239::o;21946:1810:33:-;22163:7;22219:21;22243:49;22252:22;22276:8;:15;22243:8;:49::i;:::-;22219:73;;22302:11;22316:8;22325:1;22316:11;;;;;;;;;;;;;;22302:25;;22337:11;22351:38;22360:8;:15;22377:8;22386:1;22377:11;;;;;;;22351:38;22337:52;-1:-1:-1;22416:1:33;22399:195;22423:8;:15;22419:1;:19;22399:195;;;22465:78;22478:53;22487:26;22496:3;22501:8;22510:1;22501:11;;;;;;;22487:26;22515:8;:15;22478:8;:53::i;:::-;22533:9;22465:12;:78::i;:::-;22459:84;;22563:20;22571:8;22580:1;22571:11;;;;;;;22563:20;22557:26;-1:-1:-1;22440:3:33;;22399:195;;;;22609:29;22617:8;22626:10;22617:20;;;;;;;;;;;;;;22609:3;:7;;:29;;;;:::i;:::-;22603:35;;22649:9;22661:57;22672:30;22681:9;22692;22672:8;:30::i;:::-;22704:13;22661:10;:57::i;:::-;22649:69;;22791:40;22827:3;22791:29;22799:8;22808:10;22799:20;;;;;;;;;;;;;;22791:1;:7;;:29;;;;:::i;:::-;:35;;:40::i;:::-;22787:44;-1:-1:-1;22842:9:33;22854:41;22862:32;:9;22880:13;22862:17;:32::i;:::-;22854:3;;:7;:41::i;:::-;22842:53;-1:-1:-1;22948:24:33;;23146:57;23186:16;:9;22842:53;23186:13;:16::i;:::-;23146:33;23177:1;23146:26;23162:9;;23146:15;:26::i;:57::-;23123:80;;23219:9;23214:507;23238:3;23234:1;:7;23214:507;;;23281:12;23262:31;;23323:124;23386:47;23423:9;23386:32;23416:1;23386:25;23395:12;23409:1;23386:8;:25::i;:47::-;23323:39;23360:1;23323:32;23342:12;;23323:18;:32::i;:124::-;23308:139;;23481:16;23466:12;:31;23462:249;;;23559:1;23521:34;:12;23538:16;23521;:34::i;:::-;:39;23517:91;;23584:5;;23517:91;23462:249;;;23670:1;23632:34;:16;23653:12;23632:20;:34::i;:::-;:39;23628:83;;23691:5;;23628:83;23243:3;;23214:507;;;-1:-1:-1;23737:12:33;21946:1810;-1:-1:-1;;;;;;;;;;;21946:1810:33:o;1157:239:9:-;1215:7;1319:5;;;1334:37;1343:6;;;;1215:7;1334:8;:37::i;:::-;1388:1;1157:239;-1:-1:-1;;;1157:239:9:o;1793:180:11:-;1851:7;1882:5;;;1897:51;1906:6;;;:20;;;1925:1;1920;1916;:5;;;;;;:10;1906:20;4467:1:3;1897:8:11;:51::i;2133:232::-;2193:7;2212:38;2221:6;;;4516:1:3;2212:8:11;:38::i;:::-;2265:6;2261:98;;-1:-1:-1;2294:1:11;2287:8;;2261:98;2347:1;2342;2338;:5;2337:11;;;;;;2333:1;:15;2326:22;;;;866:101:3;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;1979:148:11:-;2041:7;2060:38;2069:6;;;4516:1:3;2060:8:11;:38::i;:::-;2119:1;2115;:5;;;;;;;1979:148;-1:-1:-1;;;1979:148:11:o;1862:617:9:-;1922:7;1959:5;;;1974:57;1983:6;;;:26;;;2008:1;2003;1993:7;:11;;;;1974:57;2046:12;2042:431;;2081:1;2074:8;;;;;2042:431;893:4;-1:-1:-1;;2439:11:9;;2438:19;;2461:1;2437:25;2430:32;;;;;2846:682;2906:7;2925:38;2934:6;;;4516:1:3;2925:8:9;:38::i;:::-;2978:6;2974:548;;-1:-1:-1;3007:1:9;3000:8;;2974:548;893:4;3059:7;;;;3080:51;;3059:1;:7;:1;3089:13;;;;;:20;4564:1:3;3080:8:9;:51::i;:::-;3505:1;3500;3488:9;:13;3487:19;;;;2485:355;2547:7;2566:38;2575:6;;;4516:1:3;2566:8:9;:38::i;:::-;2619:6;2615:219;;-1:-1:-1;2648:1:9;2641:8;;2615:219;893:4;2700:7;;;;2721:51;;2700:1;:7;:1;2730:13;;;2721:51;2822:1;2810:9;:13;;;;;;2803:20;;;;;1074:3172:3;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2999:73;2210:2;2243:18;;;2288;;;2215:4;2284:29;;;3040:1;3036:14;2195:18;;;;3025:26;;;;2336:18;;;;2383;;;2379:29;;;3057:2;3053:17;3021:50;;;;2999:73;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "482400",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "amplificationParameter()": "976",
                "getAmplificationParameter()": "1020",
                "onSwapGivenIn(uint256,uint256[],uint256,uint256)": "infinite",
                "onSwapGivenOut(uint256,uint256[],uint256,uint256)": "infinite",
                "updateAmplificationParameter(uint256)": "infinite"
              }
            },
            "methodIdentifiers": {
              "amplificationParameter()": "1cb2333d",
              "getAmplificationParameter()": "6daccffa",
              "onSwapGivenIn(uint256,uint256[],uint256,uint256)": "77a74302",
              "onSwapGivenOut(uint256,uint256[],uint256,uint256)": "1ff3bc6b",
              "updateAmplificationParameter(uint256)": "97010c6f"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amplificationParameter\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"amplificationParameter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAmplificationParameter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"indexIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexOut\",\"type\":\"uint256\"}],\"name\":\"onSwapGivenIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"indexIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexOut\",\"type\":\"uint256\"}],\"name\":\"onSwapGivenOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amplificationParameter\",\"type\":\"uint256\"}],\"name\":\"updateAmplificationParameter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/StableSwap.sol\":\"StableSwap\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/StableSwap.sol\":{\"content\":\"// Wrapper StableMath\\npragma solidity ^0.7.0;\\n\\nimport \\\"./lib/math/FixedPoint.sol\\\";\\n\\nimport \\\"./pools/stable/StablePoolUserDataHelpers.sol\\\";\\nimport \\\"./pools/stable/StableMath.sol\\\";\\n\\ncontract StableSwap is StableMath {\\n    using FixedPoint for uint256;\\n    using StablePoolUserDataHelpers for bytes;\\n    address immutable owner;\\n    uint256 public amplificationParameter;\\n\\n    constructor(uint256 _amplificationParameter) {\\n        owner = msg.sender;\\n        _require(_amplificationParameter >= _MIN_AMP, Errors.MIN_AMP);\\n        _require(_amplificationParameter <= _MAX_AMP, Errors.MAX_AMP);\\n\\n        amplificationParameter = _amplificationParameter;\\n    }\\n\\n    modifier onlyOwner {\\n        require(msg.sender == owner, \\\"Only owner can call this function.\\\");\\n        _;\\n    }\\n\\n    function updateAmplificationParameter(uint256 _amplificationParameter)\\n        public\\n        onlyOwner\\n    {\\n        amplificationParameter = _amplificationParameter;\\n    }\\n\\n    function getAmplificationParameter() external view returns (uint256) {\\n        return amplificationParameter;\\n    }\\n\\n    // Swap\\n\\n    function onSwapGivenIn(\\n        uint256 amount,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external view virtual returns (uint256) {\\n        uint256 amountOut =\\n            StableMath._calcOutGivenIn(\\n                amplificationParameter,\\n                balances,\\n                indexIn,\\n                indexOut,\\n                amount\\n            );\\n\\n        return amountOut;\\n    }\\n\\n    function onSwapGivenOut(\\n        uint256 amount,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external view virtual returns (uint256) {\\n        uint256 amountIn =\\n            StableMath._calcInGivenOut(\\n                amplificationParameter,\\n                balances,\\n                indexIn,\\n                indexOut,\\n                amount\\n            );\\n\\n        return amountIn;\\n    }\\n}\\n\",\"keccak256\":\"0xe6c8af61c54b6cba85bb13b4b8a2ea8095994dfe5dd7a393a41950abdc404bce\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IGeneralPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseGeneralPool is IGeneralPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            IVault.PoolSpecialization.GENERAL,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external view virtual override returns (uint256) {\\n        _validateIndexes(indexIn, indexOut, _getTotalTokens());\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        return\\n            swapRequest.kind == IVault.SwapKind.GIVEN_IN\\n                ? _swapGivenIn(swapRequest, balances, indexIn, indexOut, scalingFactors)\\n                : _swapGivenOut(swapRequest, balances, indexIn, indexOut, scalingFactors);\\n    }\\n\\n    function _swapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n        swapRequest.amount = _subtractSwapFeeAmount(swapRequest.amount);\\n\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexIn]);\\n\\n        uint256 amountOut = _onSwapGivenIn(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountOut tokens are exiting the Pool, so we round down.\\n        return _downscaleDown(amountOut, scalingFactors[indexOut]);\\n    }\\n\\n    function _swapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexOut]);\\n\\n        uint256 amountIn = _onSwapGivenOut(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountIn tokens are entering the Pool, so we round up.\\n        amountIn = _downscaleUp(amountIn, scalingFactors[indexIn]);\\n\\n        // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n        return _addSwapFeeAmount(amountIn);\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled. The swap fee has already been deducted from\\n     * `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    function _validateIndexes(\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256 limit\\n    ) private pure {\\n        _require(indexIn < limit && indexOut < limit, Errors.OUT_OF_BOUNDS);\\n    }\\n}\\n\",\"keccak256\":\"0x5d7c075a9885e120f7bb1844efe6d20b118840f04e359ce25ea1d9f14af647a8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\n\\n// This is a contract to emulate file-level functions. Convert to a library\\n// after the migration to solc v0.7.1.\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable var-name-mixedcase\\n\\ncontract StableMath {\\n    using FixedPoint for uint256;\\n\\n    uint256 internal constant _MIN_AMP = 1e18;\\n    uint256 internal constant _MAX_AMP = 5000 * (1e18);\\n\\n    uint256 internal constant _MAX_STABLE_TOKENS = 5;\\n\\n    // Computes the invariant given the current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calculateInvariant(uint256 amplificationParameter, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256)\\n    {\\n        /**********************************************************************************************\\n        // invariant                                                                                 //\\n        // D = invariant                                                  D^(n+1)                    //\\n        // A = amplification coefficient      A  n^n S + D = A D n^n + -----------                   //\\n        // S = sum of balances                                             n^n P                     //\\n        // P = product of balances                                                                   //\\n        // n = number of tokens                                                                      //\\n        *********x************************************************************************************/\\n\\n        // We round up the invariant.\\n\\n        uint256 sum = 0;\\n        uint256 numTokens = balances.length;\\n        for (uint256 i = 0; i < numTokens; i++) {\\n            sum = sum.add(balances[i]);\\n        }\\n        if (sum == 0) {\\n            return 0;\\n        }\\n        uint256 prevInvariant = 0;\\n        uint256 invariant = sum;\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, numTokens);\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            uint256 P_D = Math.mul(numTokens, balances[0]);\\n            for (uint256 j = 1; j < numTokens; j++) {\\n                P_D = Math.divUp(Math.mul(Math.mul(P_D, balances[j]), numTokens), invariant);\\n            }\\n            prevInvariant = invariant;\\n            invariant = Math.divUp(\\n                Math.mul(Math.mul(numTokens, invariant), invariant).add(Math.mul(Math.mul(ampTimesTotal, sum), P_D)),\\n                Math.mul(numTokens.add(1), invariant).add(Math.mul(ampTimesTotal.sub(1), P_D))\\n            );\\n\\n            if (invariant > prevInvariant) {\\n                if (invariant.sub(prevInvariant) <= 1) {\\n                    break;\\n                }\\n            } else if (prevInvariant.sub(invariant) <= 1) {\\n                break;\\n            }\\n        }\\n        return invariant;\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `tokenAmountIn` are sent, given the current balances.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcOutGivenIn(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountIn\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // outGivenIn token x for y - polynomial equation to solve                                                   //\\n        // ay = amount out to calculate                                                                              //\\n        // by = balance token out                                                                                    //\\n        // y = by - ay (finalBalanceOut)                                                                             //\\n        // D = invariant                                               D                     D^(n+1)                 //\\n        // A = amplification coefficient               y^2 + ( S - ----------  - D) * y -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but y                                                                           //\\n        // P = product of final balances but y                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].add(tokenAmountIn);\\n\\n        uint256 finalBalanceOut = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexOut\\n        );\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].sub(tokenAmountIn);\\n\\n        return balances[tokenIndexOut].sub(finalBalanceOut).sub(1);\\n    }\\n\\n    // Computes how many tokens must be sent to a pool if `tokenAmountOut` are sent given the\\n    // current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcInGivenOut(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountOut\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // inGivenOut token x for y - polynomial equation to solve                                                   //\\n        // ax = amount in to calculate                                                                               //\\n        // bx = balance token in                                                                                     //\\n        // x = bx + ax (finalBalanceIn)                                                                              //\\n        // D = invariant                                                D                     D^(n+1)                //\\n        // A = amplification coefficient               x^2 + ( S - ----------  - D) * x -  ------------- = 0         //\\n        // n = number of tokens                                     (A * n^n)               A * n^2n * P             //\\n        // S = sum of final balances but x                                                                           //\\n        // P = product of final balances but x                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].sub(tokenAmountOut);\\n\\n        uint256 finalBalanceIn = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexIn\\n        );\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].add(tokenAmountOut);\\n\\n        return finalBalanceIn.sub(balances[tokenIndexIn]).add(1);\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountsTokenIn -> amountsInProportional ->\\n    amountsInPercentageExcess -> amountsInAfterFee -> newInvariant -> amountBPTOut\\n    TODO: remove equations below and save them to Notion documentation\\n    amountInPercentageExcess = 1 - amountInProportional/amountIn (if amountIn>amountInProportional)\\n    amountInAfterFee = amountIn * (1 - swapFeePercentage * amountInPercentageExcess)\\n    amountInAfterFee = amountIn - fee amount\\n    fee amount = (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn - (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn * (1 - (1 - amountInProportional/amountIn) * swapFeePercentage)\\n    amountInAfterFee = amountIn * (1 - amountInPercentageExcess * swapFeePercentage)\\n    */\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        // Get current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token, relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsIn.length);\\n        // The weighted sum of token balance ratios without fee\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divDown(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulDown(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Percentage of the amount supplied that will be implicitly swapped for other tokens in the pool\\n            uint256 tokenBalancePercentageExcess;\\n            // Some tokens might have amounts supplied in excess of a 'balanced' join: these are identified if\\n            // the token's balance ratio without fee is larger than the weighted balance ratio, and swap fees are\\n            // charged on the swap amount\\n            if (weightedBalanceRatio >= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = tokenBalanceRatiosWithoutFee[i].sub(weightedBalanceRatio).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].sub(FixedPoint.ONE)\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountInAfterFee = amountsIn[i].mulDown(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].add(amountInAfterFee);\\n        }\\n\\n        // get the new invariant, taking swap fees into account\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTOut\\n        return bptTotalSupply.mulDown(newInvariant.divDown(currentInvariant).sub(FixedPoint.ONE));\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTOut -> newInvariant -> (amountInProportional, amountInAfterFee) ->\\n    amountInPercentageExcess -> amountIn\\n    */\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Token in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // Calculate new invariant\\n        uint256 newInvariant = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountInAfterFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountInAfterFee = newBalanceTokenIndex.sub(balances[tokenIndex]);\\n\\n        // Get tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountInAfterFee.divUp(swapFeeExcess.complement());\\n    }\\n\\n    /*\\n    Flow of calculations:\\n    amountsTokenOut -> amountsOutProportional ->\\n    amountOutPercentageExcess -> amountOutBeforeFee -> newInvariant -> amountBPTIn\\n    */\\n    function _calcBptInGivenExactTokensOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divUp(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulUp(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 tokenBalancePercentageExcess;\\n            // Compare each tokenBalanceRatioWithoutFee to the total weighted ratio (weightedBalanceRatio), and\\n            // decrease the fee by the excess amount\\n            if (weightedBalanceRatio <= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = weightedBalanceRatio.sub(tokenBalanceRatiosWithoutFee[i]).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].complement()\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFee.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountOutBeforeFee = amountsOut[i].divUp(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].sub(amountOutBeforeFee);\\n        }\\n\\n        // get the new invariant, taking into account swap fees\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTIn\\n        return bptTotalSupply.mulUp(newInvariant.divUp(currentInvariant).complement());\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTin -> newInvariant -> (amountOutProportional, amountOutBeforeFee) ->\\n    amountOutPercentageExcess -> amountOut\\n    */\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n        // Calculate the new invariant\\n        uint256 newInvariant = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountOutBeforeFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountOutBeforeFee = balances[tokenIndex].sub(newBalanceTokenIndex);\\n\\n        // Calculate tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountOutBeforeFee.mulDown(swapFeeExcess.complement());\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = tokenAmountOut             /        bptIn         \\\\                                  //\\n        // b = tokenBalance      a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\     bptTotalSupply    /                                 //\\n        // bpt = bptTotalSupply                                                                      //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(bptTotalSupply);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 lastInvariant,\\n        uint256 tokenIndex,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // oneTokenSwapFee - polynomial equation to solve                                                            //\\n        // af = fee amount to calculate in one token                                                                 //\\n        // bf = balance of fee token                                                                                 //\\n        // f = bf - af (finalBalanceFeeToken)                                                                        //\\n        // D = old invariant                                            D                     D^(n+1)                //\\n        // A = amplification coefficient               f^2 + ( S - ----------  - D) * f -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but f                                                                           //\\n        // P = product of final balances but f                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Protocol swap fee amount, so we round down overall.\\n\\n        uint256 finalBalanceFeeToken = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            lastInvariant,\\n            tokenIndex\\n        );\\n\\n        // Result is rounded down\\n        uint256 accumulatedTokenSwapFees = balances[tokenIndex] > finalBalanceFeeToken\\n            ? balances[tokenIndex].sub(finalBalanceFeeToken)\\n            : 0;\\n        return accumulatedTokenSwapFees.mulDown(protocolSwapFeePercentage).divDown(FixedPoint.ONE);\\n    }\\n\\n    // Private functions\\n\\n    // This function calculates the balance of a given token (tokenIndex)\\n    // given all the other balances and the invariant\\n    function _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 invariant,\\n        uint256 tokenIndex\\n    ) private pure returns (uint256) {\\n        // Rounds result up overall\\n\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, balances.length);\\n        uint256 sum = balances[0];\\n        uint256 P_D = Math.mul(balances.length, balances[0]);\\n        for (uint256 j = 1; j < balances.length; j++) {\\n            P_D = Math.divDown(Math.mul(Math.mul(P_D, balances[j]), balances.length), invariant);\\n            sum = sum.add(balances[j]);\\n        }\\n        sum = sum.sub(balances[tokenIndex]);\\n\\n        uint256 c = Math.divUp(Math.mul(invariant, invariant), ampTimesTotal);\\n        // We remove the balance fromm c by multiplying it\\n        c = c.mulUp(balances[tokenIndex]).divUp(P_D);\\n\\n        uint256 b = sum.add(invariant.divDown(ampTimesTotal));\\n\\n        // We iterate to find the balance\\n        uint256 prevTokenBalance = 0;\\n        // We multiply the first iteration outside the loop with the invariant to set the value of the\\n        // initial approximation.\\n        uint256 tokenBalance = invariant.mulUp(invariant).add(c).divUp(invariant.add(b));\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            prevTokenBalance = tokenBalance;\\n\\n            tokenBalance = tokenBalance.mulUp(tokenBalance).add(c).divUp(\\n                Math.mul(tokenBalance, 2).add(b).sub(invariant)\\n            );\\n\\n            if (tokenBalance > prevTokenBalance) {\\n                if (tokenBalance.sub(prevTokenBalance) <= 1) {\\n                    break;\\n                }\\n            } else if (prevTokenBalance.sub(tokenBalance) <= 1) {\\n                break;\\n            }\\n        }\\n        return tokenBalance;\\n    }\\n}\\n\",\"keccak256\":\"0x74dc5f28798be90708c30ce59d65de8a99128e642c1ed554248807ac3aaecae8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\nimport \\\"../BaseGeneralPool.sol\\\";\\n\\nimport \\\"./StableMath.sol\\\";\\nimport \\\"./StablePoolUserDataHelpers.sol\\\";\\n\\ncontract StablePool is BaseGeneralPool, StableMath {\\n    using FixedPoint for uint256;\\n    using StablePoolUserDataHelpers for bytes;\\n\\n    uint256 private immutable _amplificationParameter;\\n\\n    uint256 private _lastInvariant;\\n\\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\\n\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 amplificationParameter,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BaseGeneralPool(\\n            vault,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        _require(amplificationParameter >= _MIN_AMP, Errors.MIN_AMP);\\n        _require(amplificationParameter <= _MAX_AMP, Errors.MAX_AMP);\\n\\n        _require(tokens.length <= _MAX_STABLE_TOKENS, Errors.MAX_STABLE_TOKENS);\\n\\n        _amplificationParameter = amplificationParameter;\\n    }\\n\\n    function getAmplificationParameter() external view returns (uint256) {\\n        return _amplificationParameter;\\n    }\\n\\n    // Base Pool handlers\\n\\n    // Swap\\n\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        uint256 amountOut = StableMath._calcOutGivenIn(\\n            _amplificationParameter,\\n            balances,\\n            indexIn,\\n            indexOut,\\n            swapRequest.amount\\n        );\\n\\n        return amountOut;\\n    }\\n\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        uint256 amountIn = StableMath._calcInGivenOut(\\n            _amplificationParameter,\\n            balances,\\n            indexIn,\\n            indexOut,\\n            swapRequest.amount\\n        );\\n\\n        return amountIn;\\n    }\\n\\n    // Initialize\\n\\n    function _onInitializePool(\\n        bytes32,\\n        address,\\n        address,\\n        bytes memory userData\\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\\n        StablePool.JoinKind kind = userData.joinKind();\\n        _require(kind == StablePool.JoinKind.INIT, Errors.UNINITIALIZED);\\n\\n        uint256[] memory amountsIn = userData.initialAmountsIn();\\n        InputHelpers.ensureInputLengthMatch(amountsIn.length, _getTotalTokens());\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 invariantAfterJoin = StableMath._calculateInvariant(_amplificationParameter, amountsIn);\\n        uint256 bptAmountOut = invariantAfterJoin;\\n\\n        _lastInvariant = invariantAfterJoin;\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Join\\n\\n    function _onJoinPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        whenNotPaused\\n        returns (\\n            uint256,\\n            uint256[] memory,\\n            uint256[] memory\\n        )\\n    {\\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas to\\n        // calculate the fee amounts during each individual swap.\\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n            balances,\\n            _lastInvariant,\\n            protocolSwapFeePercentage\\n        );\\n\\n        // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\\n        // function returns.\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\\n        }\\n\\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn);\\n\\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doJoin(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        JoinKind kind = userData.joinKind();\\n\\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\\n            return _joinExactTokensInForBPTOut(balances, userData);\\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\\n            return _joinTokenInForExactBPTOut(balances, userData);\\n        } else {\\n            _revert(Errors.UNHANDLED_JOIN_KIND);\\n        }\\n    }\\n\\n    function _joinExactTokensInForBPTOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 bptAmountOut = StableMath._calcBptOutGivenExactTokensIn(\\n            _amplificationParameter,\\n            balances,\\n            amountsIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    function _joinTokenInForExactBPTOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\\n\\n        uint256 amountIn = StableMath._calcTokenInGivenExactBptOut(\\n            _amplificationParameter,\\n            balances,\\n            tokenIndex,\\n            bptAmountOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        // We are joining with a single token, so initialize downscaledAmountsIn with zeros, and\\n        // only set downscaledAmountsIn[tokenIndex]\\n        uint256[] memory downscaledAmountsIn = new uint256[](_getTotalTokens());\\n        downscaledAmountsIn[tokenIndex] = amountIn;\\n\\n        return (bptAmountOut, downscaledAmountsIn);\\n    }\\n\\n    // Exit\\n\\n    function _onExitPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        if (_isNotPaused()) {\\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\\n            // spending gas calculating fee amounts during each individual swap\\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(balances, _lastInvariant, protocolSwapFeePercentage);\\n\\n            // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\\n            // function returns.\\n            for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n                balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\\n            }\\n        } else {\\n            // To avoid extra calculations, swap protocol fee amounts are not charged when the contract is paused.\\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n        }\\n\\n        (bptAmountIn, amountsOut) = _doExit(balances, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterExit(balances, amountsOut);\\n\\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doExit(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        ExitKind kind = userData.exitKind();\\n\\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\\n            return _exitExactBPTInForTokenOut(balances, userData);\\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\\n            return _exitExactBPTInForTokensOut(balances, userData);\\n        } else {\\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\\n            return _exitBPTInForExactTokensOut(balances, userData);\\n        }\\n    }\\n\\n    function _exitExactBPTInForTokenOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        whenNotPaused\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is disabled if the contract is paused.\\n        uint256 totalTokens = _getTotalTokens();\\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\\n        _require(tokenIndex < totalTokens, Errors.OUT_OF_BOUNDS);\\n\\n        // We exit in a single token, so initialize amountsOut with zeros and only set amountsOut[tokenIndex]\\n        uint256[] memory amountsOut = new uint256[](totalTokens);\\n\\n        amountsOut[tokenIndex] = StableMath._calcTokenOutGivenExactBptIn(\\n            _amplificationParameter,\\n            balances,\\n            tokenIndex,\\n            bptAmountIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\\n        // This particular exit function is the only one that remains available because it is the simplest one, and\\n        // therefore the one with the lowest likelihood of errors.\\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\\n\\n        uint256[] memory amountsOut = StableMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitBPTInForExactTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        whenNotPaused\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\\n\\n        _upscaleArray(amountsOut, _scalingFactors());\\n\\n        uint256 bptAmountIn = StableMath._calcBptInGivenExactTokensOut(\\n            _amplificationParameter,\\n            balances,\\n            amountsOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    // Helpers\\n\\n    function _getDueProtocolFeeAmounts(\\n        uint256[] memory balances,\\n        uint256 previousInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) private view returns (uint256[] memory) {\\n        // Initialize with zeros\\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n\\n        // Early exit if there is no protocol swap fee\\n        if (protocolSwapFeePercentage == 0) {\\n            return dueProtocolFeeAmounts;\\n        }\\n\\n        // Instead of paying the protocol swap fee in all tokens proportionally, we will pay it in a single one. This\\n        // will reduce gas costs for single asset joins and exits, as at most only two Pool balances will change (the\\n        // token joined/exited, and the token in which fees will be paid).\\n\\n        // The protocol fee is charged using the token with the highest balance in the pool.\\n        uint256 chosenTokenIndex = 0;\\n        uint256 maxBalance = balances[0];\\n        for (uint256 i = 1; i < _getTotalTokens(); ++i) {\\n            uint256 currentBalance = balances[i];\\n            if (currentBalance > maxBalance) {\\n                chosenTokenIndex = i;\\n                maxBalance = currentBalance;\\n            }\\n        }\\n\\n        // Set the fee amount to pay in the selected token\\n        dueProtocolFeeAmounts[chosenTokenIndex] = StableMath._calcDueTokenProtocolSwapFeeAmount(\\n            _amplificationParameter,\\n            balances,\\n            previousInvariant,\\n            chosenTokenIndex,\\n            protocolSwapFeePercentage\\n        );\\n\\n        return dueProtocolFeeAmounts;\\n    }\\n\\n    function _invariantAfterJoin(uint256[] memory balances, uint256[] memory amountsIn) private view returns (uint256) {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].add(amountsIn[i]);\\n        }\\n\\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\\n    }\\n\\n    function _invariantAfterExit(uint256[] memory balances, uint256[] memory amountsOut)\\n        private\\n        view\\n        returns (uint256)\\n    {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].sub(amountsOut[i]);\\n        }\\n\\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\\n    }\\n\\n    /**\\n     * @dev This function returns the appreciation of one BPT relative to the\\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\\n     */\\n    function getRate() public view returns (uint256) {\\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\\n        return StableMath._calculateInvariant(_amplificationParameter, balances).divDown(totalSupply());\\n    }\\n}\\n\",\"keccak256\":\"0x30dc67f7ae8053481e9a8ee13c1caef632eb88667393374ce961e4ba870055db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./StablePool.sol\\\";\\n\\nlibrary StablePoolUserDataHelpers {\\n    function joinKind(bytes memory self) internal pure returns (StablePool.JoinKind) {\\n        return abi.decode(self, (StablePool.JoinKind));\\n    }\\n\\n    function exitKind(bytes memory self) internal pure returns (StablePool.ExitKind) {\\n        return abi.decode(self, (StablePool.ExitKind));\\n    }\\n\\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\\n        (, amountsIn) = abi.decode(self, (StablePool.JoinKind, uint256[]));\\n    }\\n\\n    function exactTokensInForBptOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountIn)\\n    {\\n        (, amountsIn, minBPTAmountIn) = abi.decode(self, (StablePool.JoinKind, uint256[], uint256));\\n    }\\n\\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (StablePool.JoinKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (StablePool.ExitKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\\n        (, bptAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256));\\n    }\\n\\n    function bptInForExactTokensOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\\n    {\\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256[], uint256));\\n    }\\n}\\n\",\"keccak256\":\"0xc098d1ec4fc41f10ec46a12dbf0bd5e1ffca9cafcbf4f8fa3b3815fd837d4f8d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev IPools with the General specialization setting should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\\n * grant to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IGeneralPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7f11733a5cd8f81c123c02f79d94ead7b65217021ebddafda10e796a25e1ef41\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 16,
                "contract": "src.sol/amm/StableSwap.sol:StableSwap",
                "label": "amplificationParameter",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/helpers/AssetHelpers.sol": {
        "AssetHelpers": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":\"AssetHelpers\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/helpers/Authentication.sol": {
        "Authentication": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Building block for performing access control on external functions. This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied to external functions to only make them callable by authorized accounts. Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.",
            "kind": "dev",
            "methods": {
              "constructor": {
                "details": "The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in multi contract systems. There are two main uses for it:  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers    unique. The contract's own address is a good option.  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier    shared by the entire family (and no other contract) should be used instead."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "getActionId(bytes4)": "851c1bb3"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Building block for performing access control on external functions. This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied to external functions to only make them callable by authorized accounts. Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in multi contract systems. There are two main uses for it:  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers    unique. The contract's own address is a good option.  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier    shared by the entire family (and no other contract) should be used instead.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/helpers/Authentication.sol\":\"Authentication\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/helpers/BalancerErrors.sol": {
        "Errors": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203cd90a87dce92f912f93317e92f286156dbd69fc96e0e65df72cd6e066b0b9bd64736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 EXTCODECOPY 0xD9 EXP DUP8 0xDC 0xE9 0x2F SWAP2 0x2F SWAP4 BALANCE PUSH31 0x92F286156DBD69FC96E0E65DF72CD6E066B0B9BD64736F6C63430007010033 ",
              "sourceMap": "4248:5588:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203cd90a87dce92f912f93317e92f286156dbd69fc96e0e65df72cd6e066b0b9bd64736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 EXTCODECOPY 0xD9 EXP DUP8 0xDC 0xE9 0x2F SWAP2 0x2F SWAP4 BALANCE PUSH31 0x92F286156DBD69FC96E0E65DF72CD6E066B0B9BD64736F6C63430007010033 ",
              "sourceMap": "4248:5588:3:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":\"Errors\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/helpers/BalancerHelpers.sol": {
        "BalancerHelpers": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "contract IVault",
                  "name": "_vault",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "queryExit",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "queryJoin",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptOut",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "vault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "This contract simply builds on top of the Balancer V2 architecture to provide useful helpers to users. It connects different functionalities of the protocol components to allow accessing information that would have required a more cumbersome setup if we wanted to provide these already built-in.",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60c060405234801561001057600080fd5b50604051610e93380380610e9383398101604081905261002f916100bf565b806001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561006857600080fd5b505afa15801561007c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a091906100bf565b6001600160601b0319606091821b811660805291901b1660a0526100fa565b6000602082840312156100d0578081fd5b81516100db816100e2565b9392505050565b6001600160a01b03811681146100f757600080fd5b50565b60805160601c60a05160601c610d5861013b6000398060a05280610156528061030252806103b8528061049852806104e45250806107405250610d586000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80639ebbf05d14610046578063c7b2c52c14610070578063fbfa77cf14610083575b600080fd5b610059610054366004610b27565b610098565b604051610067929190610ca2565b60405180910390f35b61005961007e366004610abd565b6102fa565b61008b610496565b6040516100679190610c8e565b6000606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f6c00927886040518263ffffffff1660e01b81526004016100ea9190610bf6565b604080518083038186803b15801561010157600080fd5b505afa158015610115573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013991906109b5565b5090506060600061014e8987600001516104ba565b9150915060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2946c2b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ad57600080fd5b505afa1580156101c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e59190610b3c565b9050836001600160a01b03166387ec68178b8b8b8787876001600160a01b03166355c676286040518163ffffffff1660e01b815260040160206040518083038186803b15801561023457600080fd5b505afa158015610248573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026c9190610b5f565b8e604001516040518863ffffffff1660e01b81526004016102939796959493929190610bff565b600060405180830381600087803b1580156102ad57600080fd5b505af11580156102c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102e99190810190610b77565b909b909a5098505050505050505050565b6000606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f6c00927886040518263ffffffff1660e01b815260040161034c9190610bf6565b604080518083038186803b15801561036357600080fd5b505afa158015610377573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039b91906109b5565b509050606060006103b08987600001516104ba565b9150915060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2946c2b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561040f57600080fd5b505afa158015610423573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104479190610b3c565b9050836001600160a01b0316636028bfd48b8b8b8787876001600160a01b03166355c676286040518163ffffffff1660e01b815260040160206040518083038186803b15801561023457600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b606060006060806104ca856105ee565b604051631f29a8cd60e31b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f94d466890610519908990600401610bf6565b60006040518083038186803b15801561053157600080fd5b505afa158015610545573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261056d91908101906109f1565b825184519297509095509193506105849190610691565b60005b82518110156105e457600083828151811061059e57fe5b602002602001015190506105db8383815181106105b757fe5b60200260200101516001600160a01b0316826001600160a01b0316146102086106a2565b50600101610587565b5050509250929050565b606080825167ffffffffffffffff8111801561060957600080fd5b50604051908082528060200260200182016040528015610633578160200160208202803683370190505b50905060005b835181101561068a5761065e84828151811061065157fe5b60200260200101516106b0565b82828151811061066a57fe5b6001600160a01b0390921660209283029190910190910152600101610639565b5092915050565b61069e81831460676106a2565b5050565b8161069e5761069e816106db565b60006106bb8261072e565b6106cd576106c88261073b565b6106d5565b6106d561073e565b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6001600160a01b03161590565b90565b7f000000000000000000000000000000000000000000000000000000000000000090565b600082601f830112610772578081fd5b813561078561078082610cea565b610cc3565b8181529150602080830190848101818402860182018710156107a657600080fd5b60005b848110156107ce5781356107bc81610d0a565b845292820192908201906001016107a9565b505050505092915050565b600082601f8301126107e9578081fd5b81356107f761078082610cea565b81815291506020808301908481018184028601820187101561081857600080fd5b60005b848110156107ce5781358452928201929082019060010161081b565b600082601f830112610847578081fd5b815161085561078082610cea565b81815291506020808301908481018184028601820187101561087657600080fd5b60005b848110156107ce57815184529282019290820190600101610879565b803580151581146106d557600080fd5b600082601f8301126108b5578081fd5b813567ffffffffffffffff8111156108cb578182fd5b6108de601f8201601f1916602001610cc3565b91508082528360208285010111156108f557600080fd5b8060208401602084013760009082016020015292915050565b60006080828403121561091f578081fd5b6109296080610cc3565b9050813567ffffffffffffffff8082111561094357600080fd5b61094f85838601610762565b8352602084013591508082111561096557600080fd5b610971858386016107d9565b6020840152604084013591508082111561098a57600080fd5b50610997848285016108a5565b6040830152506109aa8360608401610895565b606082015292915050565b600080604083850312156109c7578182fd5b82516109d281610d0a565b6020840151909250600381106109e6578182fd5b809150509250929050565b600080600060608486031215610a05578081fd5b835167ffffffffffffffff80821115610a1c578283fd5b818601915086601f830112610a2f578283fd5b8151610a3d61078082610cea565b80828252602080830192508086018b828387028901011115610a5d578788fd5b8796505b84871015610a88578051610a7481610d0a565b845260019690960195928101928101610a61565b508901519097509350505080821115610a9f578283fd5b50610aac86828701610837565b925050604084015190509250925092565b60008060008060808587031215610ad2578081fd5b843593506020850135610ae481610d0a565b92506040850135610af481610d0a565b9150606085013567ffffffffffffffff811115610b0f578182fd5b610b1b8782880161090e565b91505092959194509250565b60008060008060808587031215610ad2578384fd5b600060208284031215610b4d578081fd5b8151610b5881610d0a565b9392505050565b600060208284031215610b70578081fd5b5051919050565b60008060408385031215610b89578182fd5b82519150602083015167ffffffffffffffff811115610ba6578182fd5b610bb285828601610837565b9150509250929050565b6000815180845260208085019450808401835b83811015610beb57815187529582019590820190600101610bcf565b509495945050505050565b90815260200190565b6000888252602060018060a01b03808a168285015280891660408501525060e06060840152610c3160e0840188610bbc565b8660808501528560a085015283810360c08501528451808252835b81811015610c67578681018401518382018501528301610c4c565b81811115610c7757848483850101525b50601f01601f191601019998505050505050505050565b6001600160a01b0391909116815260200190565b600083825260406020830152610cbb6040830184610bbc565b949350505050565b60405181810167ffffffffffffffff81118282101715610ce257600080fd5b604052919050565b600067ffffffffffffffff821115610d00578081fd5b5060209081020190565b6001600160a01b0381168114610d1f57600080fd5b5056fea2646970667358221220d48377bfea28de33c1b447d99277d0671212fd7e6e49a41aef255c9464f5ba4d64736f6c63430007010033",
              "opcodes": "PUSH1 0xC0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0xE93 CODESIZE SUB DUP1 PUSH2 0xE93 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0xBF JUMP JUMPDEST DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAD5C4648 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x68 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x7C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xA0 SWAP2 SWAP1 PUSH2 0xBF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 SWAP2 DUP3 SHL DUP2 AND PUSH1 0x80 MSTORE SWAP2 SWAP1 SHL AND PUSH1 0xA0 MSTORE PUSH2 0xFA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xD0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xDB DUP2 PUSH2 0xE2 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0xF7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH2 0xD58 PUSH2 0x13B PUSH1 0x0 CODECOPY DUP1 PUSH1 0xA0 MSTORE DUP1 PUSH2 0x156 MSTORE DUP1 PUSH2 0x302 MSTORE DUP1 PUSH2 0x3B8 MSTORE DUP1 PUSH2 0x498 MSTORE DUP1 PUSH2 0x4E4 MSTORE POP DUP1 PUSH2 0x740 MSTORE POP PUSH2 0xD58 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9EBBF05D EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0xC7B2C52C EQ PUSH2 0x70 JUMPI DUP1 PUSH4 0xFBFA77CF EQ PUSH2 0x83 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x59 PUSH2 0x54 CALLDATASIZE PUSH1 0x4 PUSH2 0xB27 JUMP JUMPDEST PUSH2 0x98 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x67 SWAP3 SWAP2 SWAP1 PUSH2 0xCA2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x59 PUSH2 0x7E CALLDATASIZE PUSH1 0x4 PUSH2 0xABD JUMP JUMPDEST PUSH2 0x2FA JUMP JUMPDEST PUSH2 0x8B PUSH2 0x496 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x67 SWAP2 SWAP1 PUSH2 0xC8E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF6C00927 DUP9 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xEA SWAP2 SWAP1 PUSH2 0xBF6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x101 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x115 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x139 SWAP2 SWAP1 PUSH2 0x9B5 JUMP JUMPDEST POP SWAP1 POP PUSH1 0x60 PUSH1 0x0 PUSH2 0x14E DUP10 DUP8 PUSH1 0x0 ADD MLOAD PUSH2 0x4BA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD2946C2B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1C1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0xB3C JUMP JUMPDEST SWAP1 POP DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x87EC6817 DUP12 DUP12 DUP12 DUP8 DUP8 DUP8 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x55C67628 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x234 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x248 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x26C SWAP2 SWAP1 PUSH2 0xB5F JUMP JUMPDEST DUP15 PUSH1 0x40 ADD MLOAD PUSH1 0x40 MLOAD DUP9 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x293 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xBFF JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2C1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x2E9 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0xB77 JUMP JUMPDEST SWAP1 SWAP12 SWAP1 SWAP11 POP SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF6C00927 DUP9 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x34C SWAP2 SWAP1 PUSH2 0xBF6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x363 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x377 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x39B SWAP2 SWAP1 PUSH2 0x9B5 JUMP JUMPDEST POP SWAP1 POP PUSH1 0x60 PUSH1 0x0 PUSH2 0x3B0 DUP10 DUP8 PUSH1 0x0 ADD MLOAD PUSH2 0x4BA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD2946C2B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x40F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x423 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x447 SWAP2 SWAP1 PUSH2 0xB3C JUMP JUMPDEST SWAP1 POP DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x6028BFD4 DUP12 DUP12 DUP12 DUP8 DUP8 DUP8 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x55C67628 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x234 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x4CA DUP6 PUSH2 0x5EE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x1F29A8CD PUSH1 0xE3 SHL DUP2 MSTORE SWAP1 SWAP2 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND SWAP1 PUSH4 0xF94D4668 SWAP1 PUSH2 0x519 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0xBF6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x531 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x545 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x56D SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x9F1 JUMP JUMPDEST DUP3 MLOAD DUP5 MLOAD SWAP3 SWAP8 POP SWAP1 SWAP6 POP SWAP2 SWAP4 POP PUSH2 0x584 SWAP2 SWAP1 PUSH2 0x691 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x5E4 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x59E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x5DB DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x5B7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x208 PUSH2 0x6A2 JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x587 JUMP JUMPDEST POP POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x609 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x633 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x68A JUMPI PUSH2 0x65E DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x651 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x6B0 JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x66A JUMPI INVALID JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 ADD PUSH2 0x639 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x69E DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x6A2 JUMP JUMPDEST POP POP JUMP JUMPDEST DUP2 PUSH2 0x69E JUMPI PUSH2 0x69E DUP2 PUSH2 0x6DB JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6BB DUP3 PUSH2 0x72E JUMP JUMPDEST PUSH2 0x6CD JUMPI PUSH2 0x6C8 DUP3 PUSH2 0x73B JUMP JUMPDEST PUSH2 0x6D5 JUMP JUMPDEST PUSH2 0x6D5 PUSH2 0x73E JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x772 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x785 PUSH2 0x780 DUP3 PUSH2 0xCEA JUMP JUMPDEST PUSH2 0xCC3 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x7A6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x7CE JUMPI DUP2 CALLDATALOAD PUSH2 0x7BC DUP2 PUSH2 0xD0A JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x7A9 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x7E9 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x7F7 PUSH2 0x780 DUP3 PUSH2 0xCEA JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x818 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x7CE JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x81B JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x847 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x855 PUSH2 0x780 DUP3 PUSH2 0xCEA JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x876 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x7CE JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x879 JUMP JUMPDEST DUP1 CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x6D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x8B5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x8CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x8DE PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0xCC3 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x8F5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x91F JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x929 PUSH1 0x80 PUSH2 0xCC3 JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x943 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x94F DUP6 DUP4 DUP7 ADD PUSH2 0x762 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x20 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x965 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x971 DUP6 DUP4 DUP7 ADD PUSH2 0x7D9 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x98A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x997 DUP5 DUP3 DUP6 ADD PUSH2 0x8A5 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP PUSH2 0x9AA DUP4 PUSH1 0x60 DUP5 ADD PUSH2 0x895 JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x9C7 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x9D2 DUP2 PUSH2 0xD0A JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x3 DUP2 LT PUSH2 0x9E6 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xA05 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xA1C JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xA2F JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xA3D PUSH2 0x780 DUP3 PUSH2 0xCEA JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0xA5D JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0xA88 JUMPI DUP1 MLOAD PUSH2 0xA74 DUP2 PUSH2 0xD0A JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0xA61 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0xA9F JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xAAC DUP7 DUP3 DUP8 ADD PUSH2 0x837 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xAD2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH2 0xAE4 DUP2 PUSH2 0xD0A JUMP JUMPDEST SWAP3 POP PUSH1 0x40 DUP6 ADD CALLDATALOAD PUSH2 0xAF4 DUP2 PUSH2 0xD0A JUMP JUMPDEST SWAP2 POP PUSH1 0x60 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB0F JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xB1B DUP8 DUP3 DUP9 ADD PUSH2 0x90E JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xAD2 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB4D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xB58 DUP2 PUSH2 0xD0A JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB70 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xB89 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD SWAP2 POP PUSH1 0x20 DUP4 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xBA6 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xBB2 DUP6 DUP3 DUP7 ADD PUSH2 0x837 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xBEB JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xBCF JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP9 DUP3 MSTORE PUSH1 0x20 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP1 DUP11 AND DUP3 DUP6 ADD MSTORE DUP1 DUP10 AND PUSH1 0x40 DUP6 ADD MSTORE POP PUSH1 0xE0 PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0xC31 PUSH1 0xE0 DUP5 ADD DUP9 PUSH2 0xBBC JUMP JUMPDEST DUP7 PUSH1 0x80 DUP6 ADD MSTORE DUP6 PUSH1 0xA0 DUP6 ADD MSTORE DUP4 DUP2 SUB PUSH1 0xC0 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE DUP4 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xC67 JUMPI DUP7 DUP2 ADD DUP5 ADD MLOAD DUP4 DUP3 ADD DUP6 ADD MSTORE DUP4 ADD PUSH2 0xC4C JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0xC77 JUMPI DUP5 DUP5 DUP4 DUP6 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND ADD ADD SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xCBB PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xBBC JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0xCE2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0xD00 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0xD1F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD4 DUP4 PUSH24 0xBFEA28DE33C1B447D99277D0671212FD7E6E49A41AEF255C SWAP5 PUSH5 0xF5BA4D6473 PUSH16 0x6C634300070100330000000000000000 ",
              "sourceMap": "1440:2424:4:-:0;;;1636:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1676:6;-1:-1:-1;;;;;1676:11:4;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;;1342:12:1;;;;;;;;1701:14:4;;;;::::1;::::0;1440:2424;;349:295:-1;;480:2;468:9;459:7;455:23;451:32;448:2;;;-1:-1;;486:12;448:2;105:6;99:13;117:49;160:5;117:49;:::i;:::-;538:90;442:202;-1:-1;;;442:202::o;1404:149::-;-1:-1;;;;;1338:54;;1479:51;;1469:2;;1544:1;;1534:12;1469:2;1463:90;:::o;:::-;1440:2424:4;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "143": [
                  {
                    "length": 32,
                    "start": 1856
                  }
                ],
                "683": [
                  {
                    "length": 32,
                    "start": 160
                  },
                  {
                    "length": 32,
                    "start": 342
                  },
                  {
                    "length": 32,
                    "start": 770
                  },
                  {
                    "length": 32,
                    "start": 952
                  },
                  {
                    "length": 32,
                    "start": 1176
                  },
                  {
                    "length": 32,
                    "start": 1252
                  }
                ]
              },
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50600436106100415760003560e01c80639ebbf05d14610046578063c7b2c52c14610070578063fbfa77cf14610083575b600080fd5b610059610054366004610b27565b610098565b604051610067929190610ca2565b60405180910390f35b61005961007e366004610abd565b6102fa565b61008b610496565b6040516100679190610c8e565b6000606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f6c00927886040518263ffffffff1660e01b81526004016100ea9190610bf6565b604080518083038186803b15801561010157600080fd5b505afa158015610115573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013991906109b5565b5090506060600061014e8987600001516104ba565b9150915060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2946c2b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ad57600080fd5b505afa1580156101c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e59190610b3c565b9050836001600160a01b03166387ec68178b8b8b8787876001600160a01b03166355c676286040518163ffffffff1660e01b815260040160206040518083038186803b15801561023457600080fd5b505afa158015610248573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026c9190610b5f565b8e604001516040518863ffffffff1660e01b81526004016102939796959493929190610bff565b600060405180830381600087803b1580156102ad57600080fd5b505af11580156102c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102e99190810190610b77565b909b909a5098505050505050505050565b6000606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f6c00927886040518263ffffffff1660e01b815260040161034c9190610bf6565b604080518083038186803b15801561036357600080fd5b505afa158015610377573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039b91906109b5565b509050606060006103b08987600001516104ba565b9150915060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d2946c2b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561040f57600080fd5b505afa158015610423573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104479190610b3c565b9050836001600160a01b0316636028bfd48b8b8b8787876001600160a01b03166355c676286040518163ffffffff1660e01b815260040160206040518083038186803b15801561023457600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b606060006060806104ca856105ee565b604051631f29a8cd60e31b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f94d466890610519908990600401610bf6565b60006040518083038186803b15801561053157600080fd5b505afa158015610545573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261056d91908101906109f1565b825184519297509095509193506105849190610691565b60005b82518110156105e457600083828151811061059e57fe5b602002602001015190506105db8383815181106105b757fe5b60200260200101516001600160a01b0316826001600160a01b0316146102086106a2565b50600101610587565b5050509250929050565b606080825167ffffffffffffffff8111801561060957600080fd5b50604051908082528060200260200182016040528015610633578160200160208202803683370190505b50905060005b835181101561068a5761065e84828151811061065157fe5b60200260200101516106b0565b82828151811061066a57fe5b6001600160a01b0390921660209283029190910190910152600101610639565b5092915050565b61069e81831460676106a2565b5050565b8161069e5761069e816106db565b60006106bb8261072e565b6106cd576106c88261073b565b6106d5565b6106d561073e565b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6001600160a01b03161590565b90565b7f000000000000000000000000000000000000000000000000000000000000000090565b600082601f830112610772578081fd5b813561078561078082610cea565b610cc3565b8181529150602080830190848101818402860182018710156107a657600080fd5b60005b848110156107ce5781356107bc81610d0a565b845292820192908201906001016107a9565b505050505092915050565b600082601f8301126107e9578081fd5b81356107f761078082610cea565b81815291506020808301908481018184028601820187101561081857600080fd5b60005b848110156107ce5781358452928201929082019060010161081b565b600082601f830112610847578081fd5b815161085561078082610cea565b81815291506020808301908481018184028601820187101561087657600080fd5b60005b848110156107ce57815184529282019290820190600101610879565b803580151581146106d557600080fd5b600082601f8301126108b5578081fd5b813567ffffffffffffffff8111156108cb578182fd5b6108de601f8201601f1916602001610cc3565b91508082528360208285010111156108f557600080fd5b8060208401602084013760009082016020015292915050565b60006080828403121561091f578081fd5b6109296080610cc3565b9050813567ffffffffffffffff8082111561094357600080fd5b61094f85838601610762565b8352602084013591508082111561096557600080fd5b610971858386016107d9565b6020840152604084013591508082111561098a57600080fd5b50610997848285016108a5565b6040830152506109aa8360608401610895565b606082015292915050565b600080604083850312156109c7578182fd5b82516109d281610d0a565b6020840151909250600381106109e6578182fd5b809150509250929050565b600080600060608486031215610a05578081fd5b835167ffffffffffffffff80821115610a1c578283fd5b818601915086601f830112610a2f578283fd5b8151610a3d61078082610cea565b80828252602080830192508086018b828387028901011115610a5d578788fd5b8796505b84871015610a88578051610a7481610d0a565b845260019690960195928101928101610a61565b508901519097509350505080821115610a9f578283fd5b50610aac86828701610837565b925050604084015190509250925092565b60008060008060808587031215610ad2578081fd5b843593506020850135610ae481610d0a565b92506040850135610af481610d0a565b9150606085013567ffffffffffffffff811115610b0f578182fd5b610b1b8782880161090e565b91505092959194509250565b60008060008060808587031215610ad2578384fd5b600060208284031215610b4d578081fd5b8151610b5881610d0a565b9392505050565b600060208284031215610b70578081fd5b5051919050565b60008060408385031215610b89578182fd5b82519150602083015167ffffffffffffffff811115610ba6578182fd5b610bb285828601610837565b9150509250929050565b6000815180845260208085019450808401835b83811015610beb57815187529582019590820190600101610bcf565b509495945050505050565b90815260200190565b6000888252602060018060a01b03808a168285015280891660408501525060e06060840152610c3160e0840188610bbc565b8660808501528560a085015283810360c08501528451808252835b81811015610c67578681018401518382018501528301610c4c565b81811115610c7757848483850101525b50601f01601f191601019998505050505050505050565b6001600160a01b0391909116815260200190565b600083825260406020830152610cbb6040830184610bbc565b949350505050565b60405181810167ffffffffffffffff81118282101715610ce257600080fd5b604052919050565b600067ffffffffffffffff821115610d00578081fd5b5060209081020190565b6001600160a01b0381168114610d1f57600080fd5b5056fea2646970667358221220d48377bfea28de33c1b447d99277d0671212fd7e6e49a41aef255c9464f5ba4d64736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x9EBBF05D EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0xC7B2C52C EQ PUSH2 0x70 JUMPI DUP1 PUSH4 0xFBFA77CF EQ PUSH2 0x83 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x59 PUSH2 0x54 CALLDATASIZE PUSH1 0x4 PUSH2 0xB27 JUMP JUMPDEST PUSH2 0x98 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x67 SWAP3 SWAP2 SWAP1 PUSH2 0xCA2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x59 PUSH2 0x7E CALLDATASIZE PUSH1 0x4 PUSH2 0xABD JUMP JUMPDEST PUSH2 0x2FA JUMP JUMPDEST PUSH2 0x8B PUSH2 0x496 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x67 SWAP2 SWAP1 PUSH2 0xC8E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF6C00927 DUP9 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xEA SWAP2 SWAP1 PUSH2 0xBF6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x101 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x115 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x139 SWAP2 SWAP1 PUSH2 0x9B5 JUMP JUMPDEST POP SWAP1 POP PUSH1 0x60 PUSH1 0x0 PUSH2 0x14E DUP10 DUP8 PUSH1 0x0 ADD MLOAD PUSH2 0x4BA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD2946C2B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1C1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0xB3C JUMP JUMPDEST SWAP1 POP DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x87EC6817 DUP12 DUP12 DUP12 DUP8 DUP8 DUP8 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x55C67628 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x234 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x248 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x26C SWAP2 SWAP1 PUSH2 0xB5F JUMP JUMPDEST DUP15 PUSH1 0x40 ADD MLOAD PUSH1 0x40 MLOAD DUP9 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x293 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xBFF JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2AD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2C1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x2E9 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0xB77 JUMP JUMPDEST SWAP1 SWAP12 SWAP1 SWAP11 POP SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF6C00927 DUP9 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x34C SWAP2 SWAP1 PUSH2 0xBF6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x363 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x377 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x39B SWAP2 SWAP1 PUSH2 0x9B5 JUMP JUMPDEST POP SWAP1 POP PUSH1 0x60 PUSH1 0x0 PUSH2 0x3B0 DUP10 DUP8 PUSH1 0x0 ADD MLOAD PUSH2 0x4BA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD2946C2B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x40F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x423 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x447 SWAP2 SWAP1 PUSH2 0xB3C JUMP JUMPDEST SWAP1 POP DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x6028BFD4 DUP12 DUP12 DUP12 DUP8 DUP8 DUP8 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x55C67628 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x234 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x4CA DUP6 PUSH2 0x5EE JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x1F29A8CD PUSH1 0xE3 SHL DUP2 MSTORE SWAP1 SWAP2 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND SWAP1 PUSH4 0xF94D4668 SWAP1 PUSH2 0x519 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0xBF6 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x531 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x545 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x56D SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x9F1 JUMP JUMPDEST DUP3 MLOAD DUP5 MLOAD SWAP3 SWAP8 POP SWAP1 SWAP6 POP SWAP2 SWAP4 POP PUSH2 0x584 SWAP2 SWAP1 PUSH2 0x691 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x5E4 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x59E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x5DB DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x5B7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x208 PUSH2 0x6A2 JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x587 JUMP JUMPDEST POP POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x609 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x633 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x68A JUMPI PUSH2 0x65E DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x651 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x6B0 JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x66A JUMPI INVALID JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 ADD PUSH2 0x639 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x69E DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x6A2 JUMP JUMPDEST POP POP JUMP JUMPDEST DUP2 PUSH2 0x69E JUMPI PUSH2 0x69E DUP2 PUSH2 0x6DB JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6BB DUP3 PUSH2 0x72E JUMP JUMPDEST PUSH2 0x6CD JUMPI PUSH2 0x6C8 DUP3 PUSH2 0x73B JUMP JUMPDEST PUSH2 0x6D5 JUMP JUMPDEST PUSH2 0x6D5 PUSH2 0x73E JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x772 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x785 PUSH2 0x780 DUP3 PUSH2 0xCEA JUMP JUMPDEST PUSH2 0xCC3 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x7A6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x7CE JUMPI DUP2 CALLDATALOAD PUSH2 0x7BC DUP2 PUSH2 0xD0A JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x7A9 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x7E9 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x7F7 PUSH2 0x780 DUP3 PUSH2 0xCEA JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x818 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x7CE JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x81B JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x847 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x855 PUSH2 0x780 DUP3 PUSH2 0xCEA JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x876 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x7CE JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x879 JUMP JUMPDEST DUP1 CALLDATALOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x6D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x8B5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x8CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x8DE PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0xCC3 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x8F5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x91F JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x929 PUSH1 0x80 PUSH2 0xCC3 JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x943 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x94F DUP6 DUP4 DUP7 ADD PUSH2 0x762 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x20 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x965 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x971 DUP6 DUP4 DUP7 ADD PUSH2 0x7D9 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x98A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x997 DUP5 DUP3 DUP6 ADD PUSH2 0x8A5 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP PUSH2 0x9AA DUP4 PUSH1 0x60 DUP5 ADD PUSH2 0x895 JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x9C7 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x9D2 DUP2 PUSH2 0xD0A JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x3 DUP2 LT PUSH2 0x9E6 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xA05 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xA1C JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0xA2F JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xA3D PUSH2 0x780 DUP3 PUSH2 0xCEA JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0xA5D JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0xA88 JUMPI DUP1 MLOAD PUSH2 0xA74 DUP2 PUSH2 0xD0A JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0xA61 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0xA9F JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0xAAC DUP7 DUP3 DUP8 ADD PUSH2 0x837 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xAD2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH2 0xAE4 DUP2 PUSH2 0xD0A JUMP JUMPDEST SWAP3 POP PUSH1 0x40 DUP6 ADD CALLDATALOAD PUSH2 0xAF4 DUP2 PUSH2 0xD0A JUMP JUMPDEST SWAP2 POP PUSH1 0x60 DUP6 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xB0F JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xB1B DUP8 DUP3 DUP9 ADD PUSH2 0x90E JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0xAD2 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB4D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0xB58 DUP2 PUSH2 0xD0A JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB70 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xB89 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD SWAP2 POP PUSH1 0x20 DUP4 ADD MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xBA6 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0xBB2 DUP6 DUP3 DUP7 ADD PUSH2 0x837 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xBEB JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0xBCF JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP9 DUP3 MSTORE PUSH1 0x20 PUSH1 0x1 DUP1 PUSH1 0xA0 SHL SUB DUP1 DUP11 AND DUP3 DUP6 ADD MSTORE DUP1 DUP10 AND PUSH1 0x40 DUP6 ADD MSTORE POP PUSH1 0xE0 PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0xC31 PUSH1 0xE0 DUP5 ADD DUP9 PUSH2 0xBBC JUMP JUMPDEST DUP7 PUSH1 0x80 DUP6 ADD MSTORE DUP6 PUSH1 0xA0 DUP6 ADD MSTORE DUP4 DUP2 SUB PUSH1 0xC0 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE DUP4 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xC67 JUMPI DUP7 DUP2 ADD DUP5 ADD MLOAD DUP4 DUP3 ADD DUP6 ADD MSTORE DUP4 ADD PUSH2 0xC4C JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0xC77 JUMPI DUP5 DUP5 DUP4 DUP6 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND ADD ADD SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xCBB PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0xBBC JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0xCE2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0xD00 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0xD1F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD4 DUP4 PUSH24 0xBFEA28DE33C1B447D99277D0671212FD7E6E49A41AEF255C SWAP5 PUSH5 0xF5BA4D6473 PUSH16 0x6C634300070100330000000000000000 ",
              "sourceMap": "1440:2424:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1728:725;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;2459;;;;;;:::i;:::-;;:::i;1600:29::-;;;:::i;:::-;;;;;;;:::i;1728:725::-;1893:14;1909:26;1948:12;1966:5;-1:-1:-1;;;;;1966:13:4;;1980:6;1966:21;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1947:40;;;1998:25;2025:23;2052:53;2082:6;2090:7;:14;;;2052:29;:53::i;:::-;1997:108;;;;2115:35;2153:5;-1:-1:-1;;;;;2153:30:4;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2115:70;;2227:4;-1:-1:-1;;;;;2218:24:4;;2256:6;2276;2296:9;2319:8;2341:15;2370:13;-1:-1:-1;;;;;2370:34:4;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2420:7;:16;;;2218:228;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2218:228:4;;;;;;;;;;;;:::i;:::-;2196:250;;;;-1:-1:-1;1728:725:4;-1:-1:-1;;;;;;;;;1728:725:4:o;2459:::-;2624:13;2639:27;2679:12;2697:5;-1:-1:-1;;;;;2697:13:4;;2711:6;2697:21;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2678:40;;;2729:25;2756:23;2783:53;2813:6;2821:7;:14;;;2783:29;:53::i;:::-;2728:108;;;;2846:35;2884:5;-1:-1:-1;;;;;2884:30:4;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2846:70;;2958:4;-1:-1:-1;;;;;2949:24:4;;2987:6;3007;3027:9;3050:8;3072:15;3101:13;-1:-1:-1;;;;;3101:34:4;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1600:29;;;:::o;3190:672::-;3324:25;3351:23;3390:28;3428:30;3461:34;3480:14;3461:18;:34::i;:::-;3550:27;;-1:-1:-1;;;3550:27:4;;3428:67;;-1:-1:-1;;;;;;3550:5:4;:19;;;;:27;;3570:6;;3550:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3550:27:4;;;;;;;;;;;;:::i;:::-;3623:19;;3644:21;;3506:71;;-1:-1:-1;3506:71:4;;-1:-1:-1;3506:71:4;;-1:-1:-1;3587:79:4;;3623:19;3587:35;:79::i;:::-;3682:9;3677:179;3701:12;:19;3697:1;:23;3677:179;;;3741:12;3756;3769:1;3756:15;;;;;;;;;;;;;;3741:30;;3785:60;3803:14;3818:1;3803:17;;;;;;;;;;;;;;-1:-1:-1;;;;;3794:26:4;:5;-1:-1:-1;;;;;3794:26:4;;9136:3:3;3785:8:4;:60::i;:::-;-1:-1:-1;3722:3:4;;3677:179;;;;3190:672;;;;;;;:::o;2110:303:1:-;2185:15;2212:22;2250:6;:13;2237:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2237:27:1;;2212:52;;2279:9;2274:110;2298:6;:13;2294:1;:17;2274:110;;;2344:29;2363:6;2370:1;2363:9;;;;;;;;;;;;;;2344:18;:29::i;:::-;2332:6;2339:1;2332:9;;;;;;;;-1:-1:-1;;;;;2332:41:1;;;:9;;;;;;;;;;;:41;2313:3;;2274:110;;;-1:-1:-1;2400:6:1;2110:303;-1:-1:-1;;2110:303:1:o;855:131:6:-;933:46;947:1;942;:6;5002:3:3;933:8:6;:46::i;:::-;855:131;;:::o;866:101:3:-;935:9;930:34;;946:18;954:9;946:7;:18::i;1874:139:1:-;1939:6;1964:13;1971:5;1964:6;:13::i;:::-;:42;;1990:16;2000:5;1990:9;:16::i;:::-;1964:42;;;1980:7;:5;:7::i;:::-;1957:49;1874:139;-1:-1:-1;;1874:139:1:o;1074:3172:3:-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2999:73;2210:2;2243:18;;;2288;;;2215:4;2284:29;;;3040:1;3036:14;2195:18;;;;3025:26;;;;2336:18;;;;2383;;;2379:29;;;3057:2;3053:17;3021:50;;;;2999:73;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;1597:105:1;-1:-1:-1;;;;;1673:22:1;;;1597:105::o;2654:110::-;2750:5;2654:110::o;1420:76::-;1484:5;1420:76;:::o;309:755:-1:-;;442:3;435:4;427:6;423:17;419:27;409:2;;-1:-1;;450:12;409:2;497:6;484:20;519:96;534:80;607:6;534:80;:::i;:::-;519:96;:::i;:::-;643:21;;;510:105;-1:-1;687:4;700:14;;;;675:17;;;789;;;780:27;;;;777:36;-1:-1;774:2;;;826:1;;816:12;774:2;851:1;836:222;861:6;858:1;855:13;836:222;;;4167:6;4154:20;4179:49;4222:5;4179:49;:::i;:::-;929:66;;1009:14;;;;1037;;;;883:1;876:9;836:222;;;840:14;;;;;402:662;;;;:::o;1891:707::-;;2008:3;2001:4;1993:6;1989:17;1985:27;1975:2;;-1:-1;;2016:12;1975:2;2063:6;2050:20;2085:80;2100:64;2157:6;2100:64;:::i;2085:80::-;2193:21;;;2076:89;-1:-1;2237:4;2250:14;;;;2225:17;;;2339;;;2330:27;;;;2327:36;-1:-1;2324:2;;;2376:1;;2366:12;2324:2;2401:1;2386:206;2411:6;2408:1;2405:13;2386:206;;;7201:20;;2479:50;;2543:14;;;;2571;;;;2433:1;2426:9;2386:206;;2624:722;;2752:3;2745:4;2737:6;2733:17;2729:27;2719:2;;-1:-1;;2760:12;2719:2;2800:6;2794:13;2822:80;2837:64;2894:6;2837:64;:::i;2822:80::-;2930:21;;;2813:89;-1:-1;2974:4;2987:14;;;;2962:17;;;3076;;;3067:27;;;;3064:36;-1:-1;3061:2;;;3113:1;;3103:12;3061:2;3138:1;3123:217;3148:6;3145:1;3142:13;3123:217;;;7349:13;;3216:61;;3291:14;;;;3319;;;;3170:1;3163:9;3123:217;;3354:124;3418:20;;18016:13;;18009:21;19691:32;;19681:2;;19737:1;;19727:12;3623:440;;3724:3;3717:4;3709:6;3705:17;3701:27;3691:2;;-1:-1;;3732:12;3691:2;3779:6;3766:20;16764:18;16756:6;16753:30;16750:2;;;-1:-1;;16786:12;16750:2;3801:64;16859:9;16840:17;;-1:-1;;16836:33;16927:4;16917:15;3801:64;:::i;:::-;3792:73;;3885:6;3878:5;3871:21;3989:3;16927:4;3980:6;3913;3971:16;;3968:25;3965:2;;;4006:1;;3996:12;3965:2;19057:6;16927:4;3913:6;3909:17;16927:4;3947:5;3943:16;19034:30;19113:1;19095:16;;;16927:4;19095:16;19088:27;3947:5;3684:379;-1:-1;;3684:379::o;4839:1122::-;;4962:4;4950:9;4945:3;4941:19;4937:30;4934:2;;;-1:-1;;4970:12;4934:2;4998:20;4962:4;4998:20;:::i;:::-;4989:29;;5083:17;5070:31;5121:18;;5113:6;5110:30;5107:2;;;5098:1;;5143:12;5107:2;5188:90;5274:3;5265:6;5254:9;5250:22;5188:90;:::i;:::-;5170:16;5163:116;5377:2;5366:9;5362:18;5349:32;5335:46;;5121:18;5393:6;5390:30;5387:2;;;5098:1;;5423:12;5387:2;5468:74;5538:3;5529:6;5518:9;5514:22;5468:74;:::i;:::-;5377:2;5454:5;5450:16;5443:100;5636:2;5625:9;5621:18;5608:32;5594:46;;5121:18;5652:6;5649:30;5646:2;;;5098:1;;5682:12;5646:2;;5727:58;5781:3;5772:6;5761:9;5757:22;5727:58;:::i;:::-;5636:2;5713:5;5709:16;5702:84;;5893:46;5935:3;5860:2;5915:9;5911:22;5893:46;:::i;:::-;5860:2;5879:5;5875:16;5868:72;4928:1033;;;;:::o;7412:447::-;;;7568:2;7556:9;7547:7;7543:23;7539:32;7536:2;;;-1:-1;;7574:12;7536:2;226:6;220:13;238:33;265:5;238:33;:::i;:::-;7737:2;7811:22;;4716:13;7626:74;;-1:-1;20466:1;20456:12;;20446:2;;-1:-1;;20472:12;20446:2;7745:98;;;;7530:329;;;;;:::o;7866:823::-;;;;8080:2;8068:9;8059:7;8055:23;8051:32;8048:2;;;-1:-1;;8086:12;8048:2;8137:17;8131:24;8175:18;;8167:6;8164:30;8161:2;;;-1:-1;;8197:12;8161:2;8314:6;8303:9;8299:22;;;1241:3;1234:4;1226:6;1222:17;1218:27;1208:2;;-1:-1;;1249:12;1208:2;1289:6;1283:13;1311:95;1326:79;1398:6;1326:79;:::i;1311:95::-;1412:16;1448:6;1441:5;1434:21;1478:4;;1495:3;1491:14;1484:21;;1478:4;1470:6;1466:17;1600:3;1478:4;;1584:6;1580:17;1470:6;1571:27;;1568:36;1565:2;;;-1:-1;;1607:12;1565:2;-1:-1;1633:10;;1627:232;1652:6;1649:1;1646:13;1627:232;;;4339:6;4333:13;4351:48;4393:5;4351:48;:::i;:::-;1720:76;;1674:1;1667:9;;;;;1810:14;;;;1838;;1627:232;;;-1:-1;8374:18;;8368:25;8217:114;;-1:-1;8368:25;-1:-1;;;8402:30;;;8399:2;;;-1:-1;;8435:12;8399:2;;8465:89;8546:7;8537:6;8526:9;8522:22;8465:89;:::i;:::-;8455:99;;;8591:2;8645:9;8641:22;7349:13;8599:74;;8042:647;;;;;:::o;8696:771::-;;;;;8885:3;8873:9;8864:7;8860:23;8856:33;8853:2;;;-1:-1;;8892:12;8853:2;3565:6;3552:20;8944:63;;9044:2;9087:9;9083:22;72:20;97:33;124:5;97:33;:::i;:::-;9052:63;-1:-1;9152:2;9191:22;;72:20;97:33;72:20;97:33;:::i;:::-;9160:63;-1:-1;9288:2;9273:18;;9260:32;9312:18;9301:30;;9298:2;;;-1:-1;;9334:12;9298:2;9364:87;9443:7;9434:6;9423:9;9419:22;9364:87;:::i;:::-;9354:97;;;8847:620;;;;;;;:::o;9474:771::-;;;;;9663:3;9651:9;9642:7;9638:23;9634:33;9631:2;;;-1:-1;;9670:12;10252:325;;10398:2;10386:9;10377:7;10373:23;10369:32;10366:2;;;-1:-1;;10404:12;10366:2;4526:6;4520:13;4538:64;4596:5;4538:64;:::i;:::-;10456:105;10360:217;-1:-1;;;10360:217::o;10584:263::-;;10699:2;10687:9;10678:7;10674:23;10670:32;10667:2;;;-1:-1;;10705:12;10667:2;-1:-1;7349:13;;10661:186;-1:-1;10661:186::o;10854:528::-;;;11011:2;10999:9;10990:7;10986:23;10982:32;10979:2;;;-1:-1;;11017:12;10979:2;7355:6;7349:13;11069:74;;11201:2;11190:9;11186:18;11180:25;11225:18;11217:6;11214:30;11211:2;;;-1:-1;;11247:12;11211:2;11277:89;11358:7;11349:6;11338:9;11334:22;11277:89;:::i;:::-;11267:99;;;10973:409;;;;;:::o;11722:690::-;;11915:5;17210:12;17625:6;17620:3;17613:19;17662:4;;17657:3;17653:14;11927:93;;17662:4;12091:5;17064:14;-1:-1;12130:260;12155:6;12152:1;12149:13;12130:260;;;12216:13;;12491:37;;11543:14;;;;17468;;;;12177:1;12170:9;12130:260;;;-1:-1;12396:10;;11846:566;-1:-1;;;;;11846:566::o;13285:222::-;12491:37;;;13412:2;13397:18;;13383:124::o;13514:1124::-;;12521:5;12498:3;12491:37;14042:2;16764:18;;18550:42;;;;17932:5;18539:54;14042:2;14031:9;14027:18;11642:37;18550:42;17932:5;18539:54;14125:2;14114:9;14110:18;11642:37;;13877:3;14162:2;14151:9;14147:18;14140:48;14202:108;13877:3;13866:9;13862:19;14296:6;14202:108;:::i;:::-;12521:5;14389:3;14378:9;14374:19;12491:37;12521:5;14473:3;14462:9;14458:19;12491:37;14527:9;14521:4;14517:20;14511:3;14500:9;14496:19;14489:49;12682:5;17210:12;17625:6;17620:3;17613:19;-1:-1;19202:101;19216:6;19213:1;19210:13;19202:101;;;19283:11;;;;;19277:18;19264:11;;;;;19257:39;19231:10;;19202:101;;;19318:6;19315:1;19312:13;19309:2;;;-1:-1;14042:2;19374:6;17657:3;19365:16;;19358:27;19309:2;-1:-1;16859:9;19474:14;-1:-1;;19470:28;12839:39;;;13848:790;-1:-1;;;;;;;;;13848:790::o;14645:254::-;-1:-1;;;;;18539:54;;;;12977:66;;14788:2;14773:18;;14759:140::o;14906:481::-;;12521:5;12498:3;12491:37;15111:2;15229;15218:9;15214:18;15207:48;15269:108;15111:2;15100:9;15096:18;15363:6;15269:108;:::i;:::-;15261:116;15082:305;-1:-1;;;;15082:305::o;15394:256::-;15456:2;15450:9;15482:17;;;15557:18;15542:34;;15578:22;;;15539:62;15536:2;;;15614:1;;15604:12;15536:2;15456;15623:22;15434:216;;-1:-1;15434:216::o;15657:320::-;;15832:18;15824:6;15821:30;15818:2;;;-1:-1;;15854:12;15818:2;-1:-1;15899:4;15887:17;;;15952:15;;15755:222::o;19511:117::-;-1:-1;;;;;18539:54;;19570:35;;19560:2;;19619:1;;19609:12;19560:2;19554:74;:::o"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "683200",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "queryExit(bytes32,address,address,(address[],uint256[],bytes,bool))": "infinite",
                "queryJoin(bytes32,address,address,(address[],uint256[],bytes,bool))": "infinite",
                "vault()": "infinite"
              },
              "internal": {
                "_validateAssetsAndGetBalances(bytes32,contract IAsset[] memory)": "infinite"
              }
            },
            "methodIdentifiers": {
              "queryExit(bytes32,address,address,(address[],uint256[],bytes,bool))": "c7b2c52c",
              "queryJoin(bytes32,address,address,(address[],uint256[],bytes,bool))": "9ebbf05d",
              "vault()": "fbfa77cf"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVault\",\"name\":\"_vault\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"queryExit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"queryJoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract simply builds on top of the Balancer V2 architecture to provide useful helpers to users. It connects different functionalities of the protocol components to allow accessing information that would have required a more cumbersome setup if we wanted to provide these already built-in.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/helpers/BalancerHelpers.sol\":\"BalancerHelpers\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../math/Math.sol\\\";\\nimport \\\"../math/FixedPoint.sol\\\";\\n\\nimport \\\"./InputHelpers.sol\\\";\\nimport \\\"./AssetHelpers.sol\\\";\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../pools/BasePool.sol\\\";\\nimport \\\"../../vault/ProtocolFeesCollector.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\nimport \\\"../../vault/interfaces/IVault.sol\\\";\\nimport \\\"../../vault/balances/BalanceAllocation.sol\\\";\\n\\n/**\\n * @dev This contract simply builds on top of the Balancer V2 architecture to provide useful helpers to users.\\n * It connects different functionalities of the protocol components to allow accessing information that would\\n * have required a more cumbersome setup if we wanted to provide these already built-in.\\n */\\ncontract BalancerHelpers is AssetHelpers {\\n    using Math for uint256;\\n    using BalanceAllocation for bytes32;\\n    using BalanceAllocation for bytes32[];\\n\\n    IVault public immutable vault;\\n\\n    constructor(IVault _vault) AssetHelpers(_vault.WETH()) {\\n        vault = _vault;\\n    }\\n\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        IVault.JoinPoolRequest memory request\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        (address pool, ) = vault.getPool(poolId);\\n        (uint256[] memory balances, uint256 lastChangeBlock) = _validateAssetsAndGetBalances(poolId, request.assets);\\n        ProtocolFeesCollector feesCollector = vault.getProtocolFeesCollector();\\n\\n        (bptOut, amountsIn) = BasePool(pool).queryJoin(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            feesCollector.getSwapFeePercentage(),\\n            request.userData\\n        );\\n    }\\n\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        IVault.ExitPoolRequest memory request\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        (address pool, ) = vault.getPool(poolId);\\n        (uint256[] memory balances, uint256 lastChangeBlock) = _validateAssetsAndGetBalances(poolId, request.assets);\\n        ProtocolFeesCollector feesCollector = vault.getProtocolFeesCollector();\\n\\n        (bptIn, amountsOut) = BasePool(pool).queryExit(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            feesCollector.getSwapFeePercentage(),\\n            request.userData\\n        );\\n    }\\n\\n    function _validateAssetsAndGetBalances(bytes32 poolId, IAsset[] memory expectedAssets)\\n        internal\\n        view\\n        returns (uint256[] memory balances, uint256 lastChangeBlock)\\n    {\\n        IERC20[] memory actualTokens;\\n        IERC20[] memory expectedTokens = _translateToIERC20(expectedAssets);\\n\\n        (actualTokens, balances, lastChangeBlock) = vault.getPoolTokens(poolId);\\n        InputHelpers.ensureInputLengthMatch(actualTokens.length, expectedTokens.length);\\n\\n        for (uint256 i = 0; i < actualTokens.length; ++i) {\\n            IERC20 token = actualTokens[i];\\n            _require(token == expectedTokens[i], Errors.TOKENS_MISMATCH);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xb98ecf8181b6c9912c738ed3b013822ec465b6b91a7c5c7594ad66ae1c0ef7d6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/helpers/IAuthentication.sol": {
        "IAuthentication": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "getActionId(bytes4)": "851c1bb3"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/helpers/IAuthentication.sol\":\"IAuthentication\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/helpers/InputHelpers.sol": {
        "InputHelpers": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122091aeaeeeebf2a2eea571227653b049fc4dbd2cfbdd029b48b3798e280451b36064736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP2 0xAE 0xAE 0xEE 0xEB CALLCODE LOG2 0xEE 0xA5 PUSH18 0x227653B049FC4DBD2CFBDD029B48B3798E28 DIV MLOAD 0xB3 PUSH1 0x64 PUSH20 0x6F6C634300070100330000000000000000000000 ",
              "sourceMap": "828:1288:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122091aeaeeeebf2a2eea571227653b049fc4dbd2cfbdd029b48b3798e280451b36064736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP2 0xAE 0xAE 0xEE 0xEB CALLCODE LOG2 0xEE 0xA5 PUSH18 0x227653B049FC4DBD2CFBDD029B48B3798E28 DIV MLOAD 0xB3 PUSH1 0x64 PUSH20 0x6F6C634300070100330000000000000000000000 ",
              "sourceMap": "828:1288:6:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "ensureArrayIsSorted(address[] memory)": "infinite",
                "ensureArrayIsSorted(contract IAsset[] memory)": "infinite",
                "ensureArrayIsSorted(contract IERC20[] memory)": "infinite",
                "ensureInputLengthMatch(uint256,uint256)": "infinite",
                "ensureInputLengthMatch(uint256,uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/helpers/InputHelpers.sol\":\"InputHelpers\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/helpers/SignaturesValidator.sol": {
        "SignaturesValidator": {
          "abi": [
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Utility for signing Solidity function calls. This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables metatransaction schemes by appending an EIP712 signature of the original calldata at the end. Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.",
            "kind": "dev",
            "methods": {
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "getDomainSeparator()": "ed24911d",
              "getNextNonce(address)": "90193b7c"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Utility for signing Solidity function calls. This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables metatransaction schemes by appending an EIP712 signature of the original calldata at the end. Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\",\"kind\":\"dev\",\"methods\":{\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":\"SignaturesValidator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 1061,
                "contract": "src.sol/amm/lib/helpers/SignaturesValidator.sol:SignaturesValidator",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/helpers/TemporarilyPausable.sol": {
        "TemporarilyPausable": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be used as an emergency switch in case a security vulnerability or threat is identified. The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful analysis later determines there was a false alarm. If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time to react to an emergency, even if the threat is discovered shortly before the Pause Window expires. Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is irreversible.",
            "kind": "dev",
            "methods": {
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "getPausedState()": "1c0de051"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be used as an emergency switch in case a security vulnerability or threat is identified. The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful analysis later determines there was a false alarm. If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time to react to an emergency, even if the threat is discovered shortly before the Pause Window expires. Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is irreversible.\",\"kind\":\"dev\",\"methods\":{\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":\"TemporarilyPausable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 1309,
                "contract": "src.sol/amm/lib/helpers/TemporarilyPausable.sol:TemporarilyPausable",
                "label": "_paused",
                "offset": 0,
                "slot": "0",
                "type": "t_bool"
              }
            ],
            "types": {
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/math/FixedPoint.sol": {
        "FixedPoint": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220462c4346787614a21891ed8c4ebbeb896801277b0a20fd8ca6d281def69ea24a64736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CHAINID 0x2C NUMBER CHAINID PUSH25 0x7614A21891ED8C4EBBEB896801277B0A20FD8CA6D281DEF69E LOG2 0x4A PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "836:4090:9:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220462c4346787614a21891ed8c4ebbeb896801277b0a20fd8ca6d281def69ea24a64736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CHAINID 0x2C NUMBER CHAINID PUSH25 0x7614A21891ED8C4EBBEB896801277B0A20FD8CA6D281DEF69E LOG2 0x4A PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "836:4090:9:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "add(uint256,uint256)": "infinite",
                "complement(uint256)": "infinite",
                "divDown(uint256,uint256)": "infinite",
                "divUp(uint256,uint256)": "infinite",
                "mulDown(uint256,uint256)": "infinite",
                "mulUp(uint256,uint256)": "infinite",
                "powDown(uint256,uint256)": "infinite",
                "powUp(uint256,uint256)": "infinite",
                "sub(uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/math/FixedPoint.sol\":\"FixedPoint\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/math/LogExpMath.sol": {
        "LogExpMath": {
          "abi": [],
          "devdoc": {
            "author": "Fernando Martinelli - @fernandomartinelliSergio Yuhjtman - @sergioyuhjtmanDaniel Fernandez - @dmf7z",
            "details": "Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument). Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural exponentiation and logarithm (where the base is Euler's number).",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f98cdf59d84987b1dcb306494fa1793954a05ac3b4960ffce7a205c7fe45cce964736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 DUP13 0xDF MSIZE 0xD8 0x49 DUP8 0xB1 0xDC 0xB3 MOD 0x49 0x4F LOG1 PUSH26 0x3954A05AC3B4960FFCE7A205C7FE45CCE964736F6C6343000701 STOP CALLER ",
              "sourceMap": "1228:19122:10:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f98cdf59d84987b1dcb306494fa1793954a05ac3b4960ffce7a205c7fe45cce964736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF9 DUP13 0xDF MSIZE 0xD8 0x49 DUP8 0xB1 0xDC 0xB3 MOD 0x49 0x4F LOG1 PUSH26 0x3954A05AC3B4960FFCE7A205C7FE45CCE964736F6C6343000701 STOP CALLER ",
              "sourceMap": "1228:19122:10:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "exp(int256)": "infinite",
                "ln(int256)": "infinite",
                "ln_36(int256)": "infinite",
                "log(int256,int256)": "infinite",
                "pow(uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Fernando Martinelli - @fernandomartinelliSergio Yuhjtman - @sergioyuhjtmanDaniel Fernandez - @dmf7z\",\"details\":\"Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument). Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural exponentiation and logarithm (where the base is Euler's number).\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/math/LogExpMath.sol\":\"LogExpMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/math/Math.sol": {
        "Math": {
          "abi": [],
          "devdoc": {
            "details": "Wrappers over Solidity's arithmetic operations with added overflow checks. Adapted from OpenZeppelin's SafeMath library",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209f829a4501ac5b9c3b79de2d286602fac9937360992efab22fdc344bd33e2e1764736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP16 DUP3 SWAP11 GASLIMIT ADD 0xAC JUMPDEST SWAP13 EXTCODESIZE PUSH26 0xDE2D286602FAC9937360992EFAB22FDC344BD33E2E1764736F6C PUSH4 0x43000701 STOP CALLER ",
              "sourceMap": "238:2129:11:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209f829a4501ac5b9c3b79de2d286602fac9937360992efab22fdc344bd33e2e1764736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP16 DUP3 SWAP11 GASLIMIT ADD 0xAC JUMPDEST SWAP13 EXTCODESIZE PUSH26 0xDE2D286602FAC9937360992EFAB22FDC344BD33E2E1764736F6C PUSH4 0x43000701 STOP CALLER ",
              "sourceMap": "238:2129:11:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "add(int256,int256)": "infinite",
                "add(uint256,uint256)": "infinite",
                "divDown(uint256,uint256)": "infinite",
                "divUp(uint256,uint256)": "infinite",
                "max(uint256,uint256)": "infinite",
                "min(uint256,uint256)": "infinite",
                "mul(uint256,uint256)": "infinite",
                "sub(int256,int256)": "infinite",
                "sub(uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. Adapted from OpenZeppelin's SafeMath library\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/math/Math.sol\":\"Math\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/AccessControl.sol": {
        "AccessControl": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "previousAdminRole",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "newAdminRole",
                  "type": "bytes32"
                }
              ],
              "name": "RoleAdminChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                }
              ],
              "name": "RoleGranted",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                }
              ],
              "name": "RoleRevoked",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "DEFAULT_ADMIN_ROLE",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                }
              ],
              "name": "getRoleAdmin",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "uint256",
                  "name": "index",
                  "type": "uint256"
                }
              ],
              "name": "getRoleMember",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                }
              ],
              "name": "getRoleMemberCount",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "grantRole",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "hasRole",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "renounceRole",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "revokeRole",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Contract module that allows children to implement role-based access control mechanisms. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ``` bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ``` function foo() public {     require(hasRole(MY_ROLE, msg.sender));     ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it.",
            "events": {
              "RoleAdminChanged(bytes32,bytes32,bytes32)": {
                "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._"
              },
              "RoleGranted(bytes32,address,address)": {
                "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {_setupRole}."
              },
              "RoleRevoked(bytes32,address,address)": {
                "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call:   - if using `revokeRole`, it is the admin role bearer   - if using `renounceRole`, it is the role bearer (i.e. `account`)"
              }
            },
            "kind": "dev",
            "methods": {
              "getRoleAdmin(bytes32)": {
                "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."
              },
              "getRoleMember(bytes32,uint256)": {
                "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information."
              },
              "getRoleMemberCount(bytes32)": {
                "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role."
              },
              "grantRole(bytes32,address)": {
                "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role."
              },
              "hasRole(bytes32,address)": {
                "details": "Returns `true` if `account` has been granted `role`."
              },
              "renounceRole(bytes32,address)": {
                "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`."
              },
              "revokeRole(bytes32,address)": {
                "details": "Revokes `role` from `account`. If `account` had already been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "DEFAULT_ADMIN_ROLE()": "a217fddf",
              "getRoleAdmin(bytes32)": "248a9ca3",
              "getRoleMember(bytes32,uint256)": "9010d07c",
              "getRoleMemberCount(bytes32)": "ca15c873",
              "grantRole(bytes32,address)": "2f2ff15d",
              "hasRole(bytes32,address)": "91d14854",
              "renounceRole(bytes32,address)": "36568abe",
              "revokeRole(bytes32,address)": "d547741f"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module that allows children to implement role-based access control mechanisms. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ``` bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ``` function foo() public {     require(hasRole(MY_ROLE, msg.sender));     ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it.\",\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call:   - if using `revokeRole`, it is the admin role bearer   - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had already been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/AccessControl.sol\":\"AccessControl\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n *     require(hasRole(MY_ROLE, msg.sender));\\n *     ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl {\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n\\n    struct RoleData {\\n        EnumerableSet.AddressSet members;\\n        bytes32 adminRole;\\n    }\\n\\n    mapping(bytes32 => RoleData) private _roles;\\n\\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n    /**\\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n     *\\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n     * {RoleAdminChanged} not being emitted signaling this.\\n     *\\n     * _Available since v3.1._\\n     */\\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n    /**\\n     * @dev Emitted when `account` is granted `role`.\\n     *\\n     * `sender` is the account that originated the contract call, an admin role\\n     * bearer except when using {_setupRole}.\\n     */\\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n    /**\\n     * @dev Emitted when `account` is revoked `role`.\\n     *\\n     * `sender` is the account that originated the contract call:\\n     *   - if using `revokeRole`, it is the admin role bearer\\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n     */\\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n    /**\\n     * @dev Returns `true` if `account` has been granted `role`.\\n     */\\n    function hasRole(bytes32 role, address account) public view virtual returns (bool) {\\n        return _roles[role].members.contains(account);\\n    }\\n\\n    /**\\n     * @dev Returns the number of accounts that have `role`. Can be used\\n     * together with {getRoleMember} to enumerate all bearers of a role.\\n     */\\n    function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n        return _roles[role].members.length();\\n    }\\n\\n    /**\\n     * @dev Returns one of the accounts that have `role`. `index` must be a\\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\\n     *\\n     * Role bearers are not sorted in any particular way, and their ordering may\\n     * change at any point.\\n     *\\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n     * you perform all queries on the same block. See the following\\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n     * for more information.\\n     */\\n    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n        return _roles[role].members.at(index);\\n    }\\n\\n    /**\\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\\n     * {revokeRole}.\\n     *\\n     * To change a role's admin, use {_setRoleAdmin}.\\n     */\\n    function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n        return _roles[role].adminRole;\\n    }\\n\\n    /**\\n     * @dev Grants `role` to `account`.\\n     *\\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\\n     * event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have ``role``'s admin role.\\n     */\\n    function grantRole(bytes32 role, address account) public virtual {\\n        _require(hasRole(_roles[role].adminRole, msg.sender), Errors.GRANT_SENDER_NOT_ADMIN);\\n\\n        _grantRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Revokes `role` from `account`.\\n     *\\n     * If `account` had already been granted `role`, emits a {RoleRevoked} event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have ``role``'s admin role.\\n     */\\n    function revokeRole(bytes32 role, address account) public virtual {\\n        _require(hasRole(_roles[role].adminRole, msg.sender), Errors.REVOKE_SENDER_NOT_ADMIN);\\n\\n        _revokeRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Revokes `role` from the calling account.\\n     *\\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n     * purpose is to provide a mechanism for accounts to lose their privileges\\n     * if they are compromised (such as when a trusted device is misplaced).\\n     *\\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\\n     * event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must be `account`.\\n     */\\n    function renounceRole(bytes32 role, address account) public virtual {\\n        _require(account == msg.sender, Errors.RENOUNCE_SENDER_NOT_ALLOWED);\\n\\n        _revokeRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Grants `role` to `account`.\\n     *\\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\\n     * event. Note that unlike {grantRole}, this function doesn't perform any\\n     * checks on the calling account.\\n     *\\n     * [WARNING]\\n     * ====\\n     * This function should only be called from the constructor when setting\\n     * up the initial roles for the system.\\n     *\\n     * Using this function in any other way is effectively circumventing the admin\\n     * system imposed by {AccessControl}.\\n     * ====\\n     */\\n    function _setupRole(bytes32 role, address account) internal virtual {\\n        _grantRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Sets `adminRole` as ``role``'s admin role.\\n     *\\n     * Emits a {RoleAdminChanged} event.\\n     */\\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n        _roles[role].adminRole = adminRole;\\n    }\\n\\n    function _grantRole(bytes32 role, address account) private {\\n        if (_roles[role].members.add(account)) {\\n            emit RoleGranted(role, account, msg.sender);\\n        }\\n    }\\n\\n    function _revokeRole(bytes32 role, address account) private {\\n        if (_roles[role].members.remove(account)) {\\n            emit RoleRevoked(role, account, msg.sender);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9fd091441925ba3fa46391c0417721b116065fc5a50cacb1ec3e974d46627fa5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 3367,
                "contract": "src.sol/amm/lib/openzeppelin/AccessControl.sol:AccessControl",
                "label": "_roles",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_bytes32,t_struct(RoleData)3363_storage)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_array(t_address)dyn_storage": {
                "base": "t_address",
                "encoding": "dynamic_array",
                "label": "address[]",
                "numberOfBytes": "32"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_struct(RoleData)3363_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct AccessControl.RoleData)",
                "numberOfBytes": "32",
                "value": "t_struct(RoleData)3363_storage"
              },
              "t_struct(AddressSet)4822_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableSet.AddressSet",
                "members": [
                  {
                    "astId": 4817,
                    "contract": "src.sol/amm/lib/openzeppelin/AccessControl.sol:AccessControl",
                    "label": "_values",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_array(t_address)dyn_storage"
                  },
                  {
                    "astId": 4821,
                    "contract": "src.sol/amm/lib/openzeppelin/AccessControl.sol:AccessControl",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_address,t_uint256)"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(RoleData)3363_storage": {
                "encoding": "inplace",
                "label": "struct AccessControl.RoleData",
                "members": [
                  {
                    "astId": 3360,
                    "contract": "src.sol/amm/lib/openzeppelin/AccessControl.sol:AccessControl",
                    "label": "members",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_struct(AddressSet)4822_storage"
                  },
                  {
                    "astId": 3362,
                    "contract": "src.sol/amm/lib/openzeppelin/AccessControl.sol:AccessControl",
                    "label": "adminRole",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/Address.sol": {
        "Address": {
          "abi": [],
          "devdoc": {
            "details": "Collection of functions related to the address type",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209a4ba528bd683bd95f466750a58bdcd6f4bb3d5d498a62e4859064997355756864736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP11 0x4B 0xA5 0x28 0xBD PUSH9 0x3BD95F466750A58BDC 0xD6 DELEGATECALL 0xBB RETURNDATASIZE 0x5D 0x49 DUP11 PUSH3 0xE48590 PUSH5 0x9973557568 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "167:2313:13:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209a4ba528bd683bd95f466750a58bdcd6f4bb3d5d498a62e4859064997355756864736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP11 0x4B 0xA5 0x28 0xBD PUSH9 0x3BD95F466750A58BDC 0xD6 DELEGATECALL 0xBB RETURNDATASIZE 0x5D 0x49 DUP11 PUSH3 0xE48590 PUSH5 0x9973557568 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "167:2313:13:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "isContract(address)": "infinite",
                "sendValue(address payable,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Collection of functions related to the address type\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/Address.sol\":\"Address\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\\n    }\\n}\\n\",\"keccak256\":\"0x5f83465783b239828f83c626bae1ac944cfff074c8919c245d14b208bcf317d5\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/Create2.sol": {
        "Create2": {
          "abi": [],
          "devdoc": {
            "details": "Helper to make usage of the `CREATE2` EVM opcode easier and safer. `CREATE2` can be used to compute in advance the address where a smart contract will be deployed, which allows for interesting new mechanisms known as 'counterfactual interactions'. See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more information.",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f2223488492ed0a7ff275f0fb1961fce386f47b62b0a548937e393ba4eb8e98964736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CALLCODE 0x22 CALLVALUE DUP9 0x49 0x2E 0xD0 0xA7 SELFDESTRUCT 0x27 0x5F 0xF 0xB1 SWAP7 0x1F 0xCE CODESIZE PUSH16 0x47B62B0A548937E393BA4EB8E9896473 PUSH16 0x6C634300070100330000000000000000 ",
              "sourceMap": "467:1996:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f2223488492ed0a7ff275f0fb1961fce386f47b62b0a548937e393ba4eb8e98964736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CALLCODE 0x22 CALLVALUE DUP9 0x49 0x2E 0xD0 0xA7 SELFDESTRUCT 0x27 0x5F 0xF 0xB1 SWAP7 0x1F 0xCE CODESIZE PUSH16 0x47B62B0A548937E393BA4EB8E9896473 PUSH16 0x6C634300070100330000000000000000 ",
              "sourceMap": "467:1996:14:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "computeAddress(bytes32,bytes32)": "infinite",
                "computeAddress(bytes32,bytes32,address)": "infinite",
                "deploy(uint256,bytes32,bytes memory)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Helper to make usage of the `CREATE2` EVM opcode easier and safer. `CREATE2` can be used to compute in advance the address where a smart contract will be deployed, which allows for interesting new mechanisms known as 'counterfactual interactions'. See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more information.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/Create2.sol\":\"Create2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/Create2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\\n * `CREATE2` can be used to compute in advance the address where a smart\\n * contract will be deployed, which allows for interesting new mechanisms known\\n * as 'counterfactual interactions'.\\n *\\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\\n * information.\\n */\\nlibrary Create2 {\\n    /**\\n     * @dev Deploys a contract using `CREATE2`. The address where the contract\\n     * will be deployed can be known in advance via {computeAddress}.\\n     *\\n     * The bytecode for a contract can be obtained from Solidity with\\n     * `type(contractName).creationCode`.\\n     *\\n     * Requirements:\\n     *\\n     * - `bytecode` must not be empty.\\n     * - `salt` must have not been used for `bytecode` already.\\n     * - the factory must have a balance of at least `amount`.\\n     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\\n     */\\n    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address) {\\n        address addr;\\n        require(address(this).balance >= amount, 'CREATE2_INSUFFICIENT_BALANCE');\\n        require(bytecode.length != 0, 'CREATE2_BYTECODE_ZERO');\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\\n        }\\n        require(addr != address(0), 'CREATE2_DEPLOY_FAILED');\\n        return addr;\\n    }\\n\\n    /**\\n     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\\n     * `bytecodeHash` or `salt` will result in a new destination address.\\n     */\\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\\n        return computeAddress(salt, bytecodeHash, address(this));\\n    }\\n\\n    /**\\n     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\\n     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.\\n     */\\n    function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address) {\\n        bytes32 _data = keccak256(\\n            abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)\\n        );\\n        return address(uint256(_data));\\n    }\\n}\\n\",\"keccak256\":\"0xc270f43f248076ba74c51459fbe66a8d6ae4842f24b2a056d7018c80b5742fe6\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/EIP712.sol": {
        "EIP712": {
          "abi": [],
          "devdoc": {
            "details": "https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in their contracts using a combination of `abi.encode` and `keccak256`. This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA ({_hashTypedDataV4}). The implementation of the domain separator was designed to be as efficient as possible while still properly updating the chain id to protect against replay attacks on an eventual fork of the chain. NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. _Available since v3.4._",
            "kind": "dev",
            "methods": {
              "constructor": {
                "details": "Initializes the domain separator and parameter caches. The meaning of `name` and `version` is specified in https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. - `version`: the current major version of the signing domain. NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart contract upgrade]."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in their contracts using a combination of `abi.encode` and `keccak256`. This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA ({_hashTypedDataV4}). The implementation of the domain separator was designed to be as efficient as possible while still properly updating the chain id to protect against replay attacks on an eventual fork of the chain. NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. _Available since v3.4._\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the domain separator and parameter caches. The meaning of `name` and `version` is specified in https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. - `version`: the current major version of the signing domain. NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart contract upgrade].\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/EIP712.sol\":\"EIP712\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/ERC20.sol": {
        "ERC20": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "string",
                  "name": "name_",
                  "type": "string"
                },
                {
                  "internalType": "string",
                  "name": "symbol_",
                  "type": "string"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "decimals",
              "outputs": [
                {
                  "internalType": "uint8",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "subtractedValue",
                  "type": "uint256"
                }
              ],
              "name": "decreaseAllowance",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "addedValue",
                  "type": "uint256"
                }
              ],
              "name": "increaseAllowance",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "name",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "symbol",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20PresetMinterPauser}. TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.",
            "kind": "dev",
            "methods": {
              "allowance(address,address)": {
                "details": "See {IERC20-allowance}."
              },
              "approve(address,uint256)": {
                "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address."
              },
              "balanceOf(address)": {
                "details": "See {IERC20-balanceOf}."
              },
              "constructor": {
                "details": "Sets the values for {name} and {symbol}, initializes {decimals} with a default value of 18. To select a different value for {decimals}, use {_setupDecimals}. All three of these values are immutable: they can only be set once during construction."
              },
              "decimals()": {
                "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."
              },
              "decreaseAllowance(address,uint256)": {
                "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."
              },
              "increaseAllowance(address,uint256)": {
                "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."
              },
              "name()": {
                "details": "Returns the name of the token."
              },
              "symbol()": {
                "details": "Returns the symbol of the token, usually a shorter version of the name."
              },
              "totalSupply()": {
                "details": "See {IERC20-totalSupply}."
              },
              "transfer(address,uint256)": {
                "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."
              },
              "transferFrom(address,address,uint256)": {
                "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b5060405161099f38038061099f8339818101604052604081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156100ff57600080fd5b90830190602082018581111561011457600080fd5b825164010000000081118282018810171561012e57600080fd5b82525081516020918201929091019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b50604052505082516101a2915060039060208501906101cb565b5080516101b69060049060208401906101cb565b50506005805460ff191660121790555061025e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061020c57805160ff1916838001178555610239565b82800160010185558215610239579182015b8281111561023957825182559160200191906001019061021e565b50610245929150610249565b5090565b5b80821115610245576000815560010161024a565b6107328061026d6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b610173610365565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b0381358116916020810135909116906040013561036b565b6101c36103bf565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b0381351690602001356103c8565b6101736004803603602081101561021b57600080fd5b50356001600160a01b03166103fe565b6100b6610419565b6101576004803603604081101561024957600080fd5b506001600160a01b03813516906020013561047a565b6101576004803603604081101561027557600080fd5b506001600160a01b0381351690602001356104b3565b610173600480360360408110156102a157600080fd5b506001600160a01b03813581169160200135166104c0565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061035c3384846104eb565b50600192915050565b60025490565b600061037884848461057b565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546103b59186916103b0908661019e610663565b6104eb565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161035c9185906103b09086610679565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161035c9185906103b0908661019f610663565b600061035c33848461057b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6105026001600160a01b038416151561019c610692565b6105196001600160a01b038316151561019d610692565b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6105926001600160a01b0384161515610198610692565b6105a96001600160a01b0383161515610199610692565b6105b48383836106a4565b6001600160a01b0383166000908152602081905260409020546105da90826101a0610663565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106099082610679565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60006106728484111583610692565b5050900390565b600082820161068b8482101583610692565b9392505050565b816106a0576106a0816106a9565b5050565b505050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fdfea264697066735822122031d9b35c82d5ea27398e28152aa5e64d47e34925e5a13a26f48ee3e0b27e87f764736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x99F CODESIZE SUB DUP1 PUSH2 0x99F DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x33 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD PUSH1 0x40 MLOAD SWAP4 SWAP3 SWAP2 SWAP1 DUP5 PUSH5 0x100000000 DUP3 GT ISZERO PUSH2 0x53 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP1 DUP4 ADD SWAP1 PUSH1 0x20 DUP3 ADD DUP6 DUP2 GT ISZERO PUSH2 0x68 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH5 0x100000000 DUP2 GT DUP3 DUP3 ADD DUP9 LT OR ISZERO PUSH2 0x82 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MSTORE POP DUP2 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP3 SWAP1 SWAP2 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xAF JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x97 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xDC JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP PUSH1 0x40 MSTORE PUSH1 0x20 ADD DUP1 MLOAD PUSH1 0x40 MLOAD SWAP4 SWAP3 SWAP2 SWAP1 DUP5 PUSH5 0x100000000 DUP3 GT ISZERO PUSH2 0xFF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP1 DUP4 ADD SWAP1 PUSH1 0x20 DUP3 ADD DUP6 DUP2 GT ISZERO PUSH2 0x114 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH5 0x100000000 DUP2 GT DUP3 DUP3 ADD DUP9 LT OR ISZERO PUSH2 0x12E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MSTORE POP DUP2 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP3 SWAP1 SWAP2 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x15B JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x143 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x188 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP PUSH1 0x40 MSTORE POP POP DUP3 MLOAD PUSH2 0x1A2 SWAP2 POP PUSH1 0x3 SWAP1 PUSH1 0x20 DUP6 ADD SWAP1 PUSH2 0x1CB JUMP JUMPDEST POP DUP1 MLOAD PUSH2 0x1B6 SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH2 0x1CB JUMP JUMPDEST POP POP PUSH1 0x5 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x12 OR SWAP1 SSTORE POP PUSH2 0x25E JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x20C JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x239 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x239 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x239 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x21E JUMP JUMPDEST POP PUSH2 0x245 SWAP3 SWAP2 POP PUSH2 0x249 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x245 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x24A JUMP JUMPDEST PUSH2 0x732 DUP1 PUSH2 0x26D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xA9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x39509351 GT PUSH2 0x71 JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x1D9 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x205 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x22B JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x233 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x25F JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x28B JUMPI PUSH2 0xA9 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0xAE JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x12B JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x16B JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x185 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1BB JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xB6 PUSH2 0x2B9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xF0 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xD8 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x11D JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x141 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x34F JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x173 PUSH2 0x365 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x19B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x36B JUMP JUMPDEST PUSH2 0x1C3 PUSH2 0x3BF JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x1EF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x3C8 JUMP JUMPDEST PUSH2 0x173 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x21B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x3FE JUMP JUMPDEST PUSH2 0xB6 PUSH2 0x419 JUMP JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x249 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x47A JUMP JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x275 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x4B3 JUMP JUMPDEST PUSH2 0x173 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x2A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x4C0 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x345 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x31A JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x345 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x328 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x35C CALLER DUP5 DUP5 PUSH2 0x4EB JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x378 DUP5 DUP5 DUP5 PUSH2 0x57B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD PUSH2 0x3B5 SWAP2 DUP7 SWAP2 PUSH2 0x3B0 SWAP1 DUP7 PUSH2 0x19E PUSH2 0x663 JUMP JUMPDEST PUSH2 0x4EB JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x5 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x35C SWAP2 DUP6 SWAP1 PUSH2 0x3B0 SWAP1 DUP7 PUSH2 0x679 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x345 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x31A JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x345 JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x35C SWAP2 DUP6 SWAP1 PUSH2 0x3B0 SWAP1 DUP7 PUSH2 0x19F PUSH2 0x663 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x35C CALLER DUP5 DUP5 PUSH2 0x57B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH2 0x502 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x19C PUSH2 0x692 JUMP JUMPDEST PUSH2 0x519 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND ISZERO ISZERO PUSH2 0x19D PUSH2 0x692 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE DUP2 MLOAD DUP6 DUP2 MSTORE SWAP2 MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH2 0x592 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x198 PUSH2 0x692 JUMP JUMPDEST PUSH2 0x5A9 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0x692 JUMP JUMPDEST PUSH2 0x5B4 DUP4 DUP4 DUP4 PUSH2 0x6A4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x5DA SWAP1 DUP3 PUSH2 0x1A0 PUSH2 0x663 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP1 DUP5 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x609 SWAP1 DUP3 PUSH2 0x679 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP6 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP4 SWAP3 DUP8 AND SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP2 DUP3 SWAP1 SUB ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x672 DUP5 DUP5 GT ISZERO DUP4 PUSH2 0x692 JUMP JUMPDEST POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x68B DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x692 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP2 PUSH2 0x6A0 JUMPI PUSH2 0x6A0 DUP2 PUSH2 0x6A9 JUMP JUMPDEST POP POP JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BALANCE 0xD9 0xB3 0x5C DUP3 0xD5 0xEA 0x27 CODECOPY DUP15 0x28 ISZERO 0x2A 0xA5 0xE6 0x4D SELFBALANCE 0xE3 0x49 0x25 0xE5 LOG1 GASPRICE 0x26 DELEGATECALL DUP15 0xE3 0xE0 0xB2 PUSH31 0x87F764736F6C63430007010033000000000000000000000000000000000000 ",
              "sourceMap": "1311:9604:16:-:0;;;1936:137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1936:137:16;;;;;;;;;;-1:-1:-1;1936:137:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1936:137:16;;;;;;;;;;-1:-1:-1;1936:137:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1936:137:16;;-1:-1:-1;;2002:13:16;;;;-1:-1:-1;2002:5:16;;:13;;;;;:::i;:::-;-1:-1:-1;2025:17:16;;;;:7;;:17;;;;;:::i;:::-;-1:-1:-1;;2052:9:16;:14;;-1:-1:-1;;2052:14:16;2064:2;2052:14;;;-1:-1:-1;1311:9604:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1311:9604:16;;;-1:-1:-1;1311:9604:16;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b610173610365565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b0381358116916020810135909116906040013561036b565b6101c36103bf565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b0381351690602001356103c8565b6101736004803603602081101561021b57600080fd5b50356001600160a01b03166103fe565b6100b6610419565b6101576004803603604081101561024957600080fd5b506001600160a01b03813516906020013561047a565b6101576004803603604081101561027557600080fd5b506001600160a01b0381351690602001356104b3565b610173600480360360408110156102a157600080fd5b506001600160a01b03813581169160200135166104c0565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061035c3384846104eb565b50600192915050565b60025490565b600061037884848461057b565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546103b59186916103b0908661019e610663565b6104eb565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161035c9185906103b09086610679565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161035c9185906103b0908661019f610663565b600061035c33848461057b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6105026001600160a01b038416151561019c610692565b6105196001600160a01b038316151561019d610692565b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6105926001600160a01b0384161515610198610692565b6105a96001600160a01b0383161515610199610692565b6105b48383836106a4565b6001600160a01b0383166000908152602081905260409020546105da90826101a0610663565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106099082610679565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60006106728484111583610692565b5050900390565b600082820161068b8482101583610692565b9392505050565b816106a0576106a0816106a9565b5050565b505050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fdfea264697066735822122031d9b35c82d5ea27398e28152aa5e64d47e34925e5a13a26f48ee3e0b27e87f764736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xA9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x39509351 GT PUSH2 0x71 JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x1D9 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x205 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x22B JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x233 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x25F JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x28B JUMPI PUSH2 0xA9 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0xAE JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x12B JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x16B JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x185 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1BB JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xB6 PUSH2 0x2B9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xF0 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xD8 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x11D JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x141 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x34F JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x173 PUSH2 0x365 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x19B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x36B JUMP JUMPDEST PUSH2 0x1C3 PUSH2 0x3BF JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x1EF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x3C8 JUMP JUMPDEST PUSH2 0x173 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x21B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x3FE JUMP JUMPDEST PUSH2 0xB6 PUSH2 0x419 JUMP JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x249 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x47A JUMP JUMPDEST PUSH2 0x157 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x275 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x4B3 JUMP JUMPDEST PUSH2 0x173 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x2A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x4C0 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x345 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x31A JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x345 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x328 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x35C CALLER DUP5 DUP5 PUSH2 0x4EB JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x378 DUP5 DUP5 DUP5 PUSH2 0x57B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD PUSH2 0x3B5 SWAP2 DUP7 SWAP2 PUSH2 0x3B0 SWAP1 DUP7 PUSH2 0x19E PUSH2 0x663 JUMP JUMPDEST PUSH2 0x4EB JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x5 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x35C SWAP2 DUP6 SWAP1 PUSH2 0x3B0 SWAP1 DUP7 PUSH2 0x679 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x345 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x31A JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x345 JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x35C SWAP2 DUP6 SWAP1 PUSH2 0x3B0 SWAP1 DUP7 PUSH2 0x19F PUSH2 0x663 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x35C CALLER DUP5 DUP5 PUSH2 0x57B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH2 0x502 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x19C PUSH2 0x692 JUMP JUMPDEST PUSH2 0x519 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND ISZERO ISZERO PUSH2 0x19D PUSH2 0x692 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE DUP2 MLOAD DUP6 DUP2 MSTORE SWAP2 MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH2 0x592 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x198 PUSH2 0x692 JUMP JUMPDEST PUSH2 0x5A9 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0x692 JUMP JUMPDEST PUSH2 0x5B4 DUP4 DUP4 DUP4 PUSH2 0x6A4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x5DA SWAP1 DUP3 PUSH2 0x1A0 PUSH2 0x663 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP1 DUP5 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x609 SWAP1 DUP3 PUSH2 0x679 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP6 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP4 SWAP3 DUP8 AND SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP2 DUP3 SWAP1 SUB ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x672 DUP5 DUP5 GT ISZERO DUP4 PUSH2 0x692 JUMP JUMPDEST POP POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x68B DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x692 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP2 PUSH2 0x6A0 JUMPI PUSH2 0x6A0 DUP2 PUSH2 0x6A9 JUMP JUMPDEST POP POP JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BALANCE 0xD9 0xB3 0x5C DUP3 0xD5 0xEA 0x27 CODECOPY DUP15 0x28 ISZERO 0x2A 0xA5 0xE6 0x4D SELFBALANCE 0xE3 0x49 0x25 0xE5 LOG1 GASPRICE 0x26 DELEGATECALL DUP15 0xE3 0xE0 0xB2 PUSH31 0x87F764736F6C63430007010033000000000000000000000000000000000000 ",
              "sourceMap": "1311:9604:16:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2138:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4172:164;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4172:164:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;3181:98;;;:::i;:::-;;;;;;;;;;;;;;;;4803:386;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4803:386:16;;;;;;;;;;;;;;;;;:::i;3040:81::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5584:211;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5584:211:16;;;;;;;;:::i;3337:117::-;;;;;;;;;;;;;;;;-1:-1:-1;3337:117:16;-1:-1:-1;;;;;3337:117:16;;:::i;2332:85::-;;;:::i;6282:312::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6282:312:16;;;;;;;;:::i;3657:170::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3657:170:16;;;;;;;;:::i;3885:149::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3885:149:16;;;;;;;;;;:::i;2138:81::-;2207:5;2200:12;;;;;;;;-1:-1:-1;;2200:12:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2175:13;;2200:12;;2207:5;;2200:12;;2207:5;2200:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2138:81;:::o;4172:164::-;4255:4;4271:37;4280:10;4292:7;4301:6;4271:8;:37::i;:::-;-1:-1:-1;4325:4:16;4172:164;;;;:::o;3181:98::-;3260:12;;3181:98;:::o;4803:386::-;4939:4;4955:36;4965:6;4973:9;4984:6;4955:9;:36::i;:::-;-1:-1:-1;;;;;5067:19:16;;;;;;:11;:19;;;;;;;;5043:10;5067:31;;;;;;;;;5001:160;;5023:6;;5067:84;;5103:6;7200:3:3;5067:35:16;:84::i;:::-;5001:8;:160::i;:::-;-1:-1:-1;5178:4:16;4803:386;;;;;:::o;3040:81::-;3105:9;;;;3040:81;:::o;5584:211::-;5697:10;5672:4;5718:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;5718:32:16;;;;;;;;;;5672:4;;5688:79;;5709:7;;5718:48;;5755:10;5718:36;:48::i;3337:117::-;-1:-1:-1;;;;;3429:18:16;3403:7;3429:18;;;;;;;;;;;;3337:117::o;2332:85::-;2403:7;2396:14;;;;;;;;-1:-1:-1;;2396:14:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2371:13;;2396:14;;2403:7;;2396:14;;2403:7;2396:14;;;;;;;;;;;;;;;;;;;;;;;;6282:312;6413:10;6375:4;6458:23;;;:11;:23;;;;;;;;-1:-1:-1;;;;;6458:32:16;;;;;;;;;;6375:4;;6391:175;;6437:7;;6458:98;;6495:15;7274:3:3;6458:36:16;:98::i;3657:170::-;3743:4;3759:40;3769:10;3781:9;3792:6;3759:9;:40::i;3885:149::-;-1:-1:-1;;;;;4000:18:16;;;3974:7;4000:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3885:149::o;9422:372::-;9545:69;-1:-1:-1;;;;;9554:19:16;;;;7063:3:3;9545:8:16;:69::i;:::-;9624;-1:-1:-1;;;;;9633:21:16;;;;7130:3:3;9624:8:16;:69::i;:::-;-1:-1:-1;;;;;9704:18:16;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;9755:32;;;;;;;;;;;;;;;;;9422:372;;;:::o;7068:559::-;7195:71;-1:-1:-1;;;;;7204:20:16;;;;6796:3:3;7195:8:16;:71::i;:::-;7276:72;-1:-1:-1;;;;;7285:23:16;;;;6864:3:3;7276:8:16;:72::i;:::-;7359:47;7380:6;7388:9;7399:6;7359:20;:47::i;:::-;-1:-1:-1;;;;;7437:17:16;;:9;:17;;;;;;;;;;;:68;;7459:6;7342:3:3;7437:21:16;:68::i;:::-;-1:-1:-1;;;;;7417:17:16;;;:9;:17;;;;;;;;;;;:88;;;;7538:20;;;;;;;:32;;7563:6;7538:24;:32::i;:::-;-1:-1:-1;;;;;7515:20:16;;;:9;:20;;;;;;;;;;;;:55;;;;7585:35;;;;;;;7515:20;;7585:35;;;;;;;;;;;;;7068:559;;;:::o;1765:176:25:-;1842:7;1861:27;1875:1;1870;:6;;1878:9;1861:8;:27::i;:::-;-1:-1:-1;;1910:5:25;;;1765:176::o;915:167::-;973:7;1004:5;;;1019:37;1028:6;;;;973:7;1019:8;:37::i;:::-;1074:1;915:167;-1:-1:-1;;;915:167:25:o;866:101:3:-;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;10792:121:16:-;;;;:::o;1074:3172:3:-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2999:73;2210:2;2243:18;;;2288;;;2215:4;2284:29;;;3040:1;3036:14;2195:18;;;;3025:26;;;;2336:18;;;;2383;;;2379:29;;;3057:2;3053:17;3021:50;;;;2999:73;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "368400",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "allowance(address,address)": "1360",
                "approve(address,uint256)": "infinite",
                "balanceOf(address)": "1167",
                "decimals()": "1102",
                "decreaseAllowance(address,uint256)": "infinite",
                "increaseAllowance(address,uint256)": "infinite",
                "name()": "infinite",
                "symbol()": "infinite",
                "totalSupply()": "1043",
                "transfer(address,uint256)": "infinite",
                "transferFrom(address,address,uint256)": "infinite"
              },
              "internal": {
                "_approve(address,address,uint256)": "infinite",
                "_beforeTokenTransfer(address,address,uint256)": "15",
                "_burn(address,uint256)": "infinite",
                "_mint(address,uint256)": "infinite",
                "_setupDecimals(uint8)": "infinite",
                "_transfer(address,address,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "decimals()": "313ce567",
              "decreaseAllowance(address,uint256)": "a457c2d7",
              "increaseAllowance(address,uint256)": "39509351",
              "name()": "06fdde03",
              "symbol()": "95d89b41",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20PresetMinterPauser}. TIP: For a detailed writeup see our guide https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. We have followed general OpenZeppelin guidelines: functions revert instead of returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"constructor\":{\"details\":\"Sets the values for {name} and {symbol}, initializes {decimals} with a default value of 18. To select a different value for {decimals}, use {_setupDecimals}. All three of these values are immutable: they can only be set once during construction.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 3905,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20.sol:ERC20",
                "label": "_balances",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 3911,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20.sol:ERC20",
                "label": "_allowances",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
              },
              {
                "astId": 3913,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20.sol:ERC20",
                "label": "_totalSupply",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              },
              {
                "astId": 3915,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20.sol:ERC20",
                "label": "_name",
                "offset": 0,
                "slot": "3",
                "type": "t_string_storage"
              },
              {
                "astId": 3917,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20.sol:ERC20",
                "label": "_symbol",
                "offset": 0,
                "slot": "4",
                "type": "t_string_storage"
              },
              {
                "astId": 3919,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20.sol:ERC20",
                "label": "_decimals",
                "offset": 0,
                "slot": "5",
                "type": "t_uint8"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_string_storage": {
                "encoding": "bytes",
                "label": "string",
                "numberOfBytes": "32"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              },
              "t_uint8": {
                "encoding": "inplace",
                "label": "uint8",
                "numberOfBytes": "1"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol": {
        "ERC20Burnable": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "burn",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "burnFrom",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "decimals",
              "outputs": [
                {
                  "internalType": "uint8",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "subtractedValue",
                  "type": "uint256"
                }
              ],
              "name": "decreaseAllowance",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "addedValue",
                  "type": "uint256"
                }
              ],
              "name": "increaseAllowance",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "name",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "symbol",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Extension of {ERC20} that allows token holders to destroy both their own tokens and those that they have an allowance for, in a way that can be recognized off-chain (via event analysis).",
            "kind": "dev",
            "methods": {
              "allowance(address,address)": {
                "details": "See {IERC20-allowance}."
              },
              "approve(address,uint256)": {
                "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address."
              },
              "balanceOf(address)": {
                "details": "See {IERC20-balanceOf}."
              },
              "burn(uint256)": {
                "details": "Destroys `amount` tokens from the caller. See {ERC20-_burn}."
              },
              "burnFrom(address,uint256)": {
                "details": "Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`."
              },
              "decimals()": {
                "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."
              },
              "decreaseAllowance(address,uint256)": {
                "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."
              },
              "increaseAllowance(address,uint256)": {
                "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."
              },
              "name()": {
                "details": "Returns the name of the token."
              },
              "symbol()": {
                "details": "Returns the symbol of the token, usually a shorter version of the name."
              },
              "totalSupply()": {
                "details": "See {IERC20-totalSupply}."
              },
              "transfer(address,uint256)": {
                "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."
              },
              "transferFrom(address,address,uint256)": {
                "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "burn(uint256)": "42966c68",
              "burnFrom(address,uint256)": "79cc6790",
              "decimals()": "313ce567",
              "decreaseAllowance(address,uint256)": "a457c2d7",
              "increaseAllowance(address,uint256)": "39509351",
              "name()": "06fdde03",
              "symbol()": "95d89b41",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Extension of {ERC20} that allows token holders to destroy both their own tokens and those that they have an allowance for, in a way that can be recognized off-chain (via event analysis).\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Destroys `amount` tokens from the caller. See {ERC20-_burn}.\"},\"burnFrom(address,uint256)\":{\"details\":\"Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/ERC20Burnable.sol\":\"ERC20Burnable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./ERC20.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC20} that allows token holders to destroy both their own\\n * tokens and those that they have an allowance for, in a way that can be\\n * recognized off-chain (via event analysis).\\n */\\nabstract contract ERC20Burnable is ERC20 {\\n    using SafeMath for uint256;\\n\\n    /**\\n     * @dev Destroys `amount` tokens from the caller.\\n     *\\n     * See {ERC20-_burn}.\\n     */\\n    function burn(uint256 amount) public virtual {\\n        _burn(msg.sender, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, deducting from the caller's\\n     * allowance.\\n     *\\n     * See {ERC20-_burn} and {ERC20-allowance}.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have allowance for ``accounts``'s tokens of at least\\n     * `amount`.\\n     */\\n    function burnFrom(address account, uint256 amount) public virtual {\\n        uint256 decreasedAllowance = allowance(account, msg.sender).sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n\\n        _approve(account, msg.sender, decreasedAllowance);\\n        _burn(account, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x6df4b13f2ea83b6b7fd766ed4d2c9edbfed217825cb867ecf92ac11af44b9ae4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 3905,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol:ERC20Burnable",
                "label": "_balances",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 3911,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol:ERC20Burnable",
                "label": "_allowances",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
              },
              {
                "astId": 3913,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol:ERC20Burnable",
                "label": "_totalSupply",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              },
              {
                "astId": 3915,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol:ERC20Burnable",
                "label": "_name",
                "offset": 0,
                "slot": "3",
                "type": "t_string_storage"
              },
              {
                "astId": 3917,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol:ERC20Burnable",
                "label": "_symbol",
                "offset": 0,
                "slot": "4",
                "type": "t_string_storage"
              },
              {
                "astId": 3919,
                "contract": "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol:ERC20Burnable",
                "label": "_decimals",
                "offset": 0,
                "slot": "5",
                "type": "t_uint8"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_string_storage": {
                "encoding": "bytes",
                "label": "string",
                "numberOfBytes": "32"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              },
              "t_uint8": {
                "encoding": "inplace",
                "label": "uint8",
                "numberOfBytes": "1"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/EnumerableMap.sol": {
        "EnumerableMap": {
          "abi": [],
          "devdoc": {
            "details": "Library for managing an enumerable variant of Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] type. Maps have the following properties: - Entries are added, removed, and checked for existence in constant time (O(1)). - Entries are enumerated in O(n). No guarantees are made on the ordering. ``` contract Example {     // Add the library methods     using EnumerableMap for EnumerableMap.UintToAddressMap;     // Declare a set state variable     EnumerableMap.UintToAddressMap private myMap; } ```",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204ae391235dd064d48189b04ac4aba71724521d079103c8885512383fdc5857f664736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4A 0xE3 SWAP2 0x23 0x5D 0xD0 PUSH5 0xD48189B04A 0xC4 0xAB 0xA7 OR 0x24 MSTORE SAR SMOD SWAP2 SUB 0xC8 DUP9 SSTORE SLT CODESIZE EXTCODEHASH 0xDC PC JUMPI 0xF6 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "1542:6742:18:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204ae391235dd064d48189b04ac4aba71724521d079103c8885512383fdc5857f664736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4A 0xE3 SWAP2 0x23 0x5D 0xD0 PUSH5 0xD48189B04A 0xC4 0xAB 0xA7 OR 0x24 MSTORE SAR SMOD SWAP2 SUB 0xC8 DUP9 SSTORE SLT CODESIZE EXTCODEHASH 0xDC PC JUMPI 0xF6 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "1542:6742:18:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "at(struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256)": "infinite",
                "contains(struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20)": "infinite",
                "get(struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20,uint256)": "infinite",
                "length(struct EnumerableMap.IERC20ToBytes32Map storage pointer)": "infinite",
                "remove(struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20)": "infinite",
                "set(struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20,bytes32)": "infinite",
                "unchecked_at(struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256)": "infinite",
                "unchecked_indexOf(struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20)": "infinite",
                "unchecked_setAt(struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256,bytes32)": "infinite",
                "unchecked_valueAt(struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for managing an enumerable variant of Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] type. Maps have the following properties: - Entries are added, removed, and checked for existence in constant time (O(1)). - Entries are enumerated in O(n). No guarantees are made on the ordering. ``` contract Example {     // Add the library methods     using EnumerableMap for EnumerableMap.UintToAddressMap;     // Declare a set state variable     EnumerableMap.UintToAddressMap private myMap; } ```\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/EnumerableMap.sol\":\"EnumerableMap\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n// Based on the EnumerableMap library from OpenZeppelin contracts, altered to include the following:\\n//  * a map from IERC20 to bytes32\\n//  * entries are stored in mappings instead of arrays, reducing implicit storage reads for out-of-bounds checks\\n//  * unchecked_at and unchecked_valueAt, which allow for more gas efficient data reads in some scenarios\\n//  * unchecked_indexOf and unchecked_setAt, which allow for more gas efficient data writes in some scenarios\\n//\\n// Additionally, the base private functions that work on bytes32 were removed and replaced with a native implementation\\n// for IERC20 keys, to reduce bytecode size and runtime costs.\\n\\n// We're using non-standard casing for the unchecked functions to differentiate them, so we need to turn off that rule\\n// solhint-disable func-name-mixedcase\\n\\nimport \\\"./IERC20.sol\\\";\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n *     // Declare a set state variable\\n *     EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n */\\nlibrary EnumerableMap {\\n    // The original OpenZeppelin implementation uses a generic Map type with bytes32 keys: this was replaced with\\n    // IERC20ToBytes32Map, which uses IERC20 keys natively, resulting in more dense bytecode.\\n\\n    struct IERC20ToBytes32MapEntry {\\n        IERC20 _key;\\n        bytes32 _value;\\n    }\\n\\n    struct IERC20ToBytes32Map {\\n        // Number of entries in the map\\n        uint256 _length;\\n        // Storage of map keys and values\\n        mapping(uint256 => IERC20ToBytes32MapEntry) _entries;\\n        // Position of the entry defined by a key in the `entries` array, plus 1\\n        // because index 0 means a key is not in the map.\\n        mapping(IERC20 => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\\n     * key. O(1).\\n     *\\n     * Returns true if the key was added to the map, that is if it was not\\n     * already present.\\n     */\\n    function set(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        bytes32 value\\n    ) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to !contains(map, key)\\n        if (keyIndex == 0) {\\n            uint256 previousLength = map._length;\\n            map._entries[previousLength] = IERC20ToBytes32MapEntry({ _key: key, _value: value });\\n            map._length = previousLength + 1;\\n\\n            // The entry is stored at previousLength, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            map._indexes[key] = previousLength + 1;\\n            return true;\\n        } else {\\n            map._entries[keyIndex - 1]._value = value;\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\\n     * {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\\n     *\\n     * This function performs one less storage read than {set}, but it should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_setAt(\\n        IERC20ToBytes32Map storage map,\\n        uint256 index,\\n        bytes32 value\\n    ) internal {\\n        map._entries[index]._value = value;\\n    }\\n\\n    /**\\n     * @dev Removes a key-value pair from a map. O(1).\\n     *\\n     * Returns true if the key was removed from the map, that is if it was present.\\n     */\\n    function remove(IERC20ToBytes32Map storage map, IERC20 key) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to contains(map, key)\\n        if (keyIndex != 0) {\\n            // To delete a key-value pair from the _entries pseudo-array in O(1), we swap the entry to delete with the\\n            // one at the highest index, and then remove this last entry (sometimes called as 'swap and pop').\\n            // This modifies the order of the pseudo-array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = keyIndex - 1;\\n            uint256 lastIndex = map._length - 1;\\n\\n            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            IERC20ToBytes32MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n            // Move the last entry to the index where the entry to delete is\\n            map._entries[toDeleteIndex] = lastEntry;\\n            // Update the index for the moved entry\\n            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved entry was stored\\n            delete map._entries[lastIndex];\\n            map._length = lastIndex;\\n\\n            // Delete the index for the deleted slot\\n            delete map._indexes[key];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the key is in the map. O(1).\\n     */\\n    function contains(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (bool) {\\n        return map._indexes[key] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of key-value pairs in the map. O(1).\\n     */\\n    function length(IERC20ToBytes32Map storage map) internal view returns (uint256) {\\n        return map._length;\\n    }\\n\\n    /**\\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of entries inside the\\n     * array, and it may change when more entries are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        _require(map._length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(map, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        IERC20ToBytes32MapEntry storage entry = map._entries[index];\\n        return (entry._key, entry._value);\\n    }\\n\\n    /**\\n     * @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\\n     * read). O(1).\\n     */\\n    function unchecked_valueAt(IERC20ToBytes32Map storage map, uint256 index) internal view returns (bytes32) {\\n        return map._entries[index]._value;\\n    }\\n\\n    /**\\n     * @dev Returns the value associated with `key`. O(1).\\n     *\\n     * Requirements:\\n     *\\n     * - `key` must be in the map. Reverts with `errorCode` otherwise.\\n     */\\n    function get(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        uint256 errorCode\\n    ) internal view returns (bytes32) {\\n        uint256 index = map._indexes[key];\\n        _require(index > 0, errorCode);\\n        return unchecked_valueAt(map, index - 1);\\n    }\\n\\n    /**\\n     * @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\\n     * instead.\\n     */\\n    function unchecked_indexOf(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (uint256) {\\n        return map._indexes[key];\\n    }\\n}\\n\",\"keccak256\":\"0x0e7bb50a1095a2a000328ef2243fca7b556ebccfe594f4466d0853f56ed07755\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/EnumerableSet.sol": {
        "EnumerableSet": {
          "abi": [],
          "devdoc": {
            "details": "Library for managing https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive types. Sets have the following properties: - Elements are added, removed, and checked for existence in constant time (O(1)). - Elements are enumerated in O(n). No guarantees are made on the ordering. ``` contract Example {     // Add the library methods     using EnumerableSet for EnumerableSet.AddressSet;     // Declare a set state variable     EnumerableSet.AddressSet private mySet; } ``` As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) and `uint256` (`UintSet`) are supported.",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122030370b19405434fd5237316b4f71cdb3d4190829777ef8406ac954ce8691cb3a64736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 ADDRESS CALLDATACOPY SIGNEXTEND NOT BLOCKHASH SLOAD CALLVALUE REVERT MSTORE CALLDATACOPY BALANCE PUSH12 0x4F71CDB3D4190829777EF840 PUSH11 0xC954CE8691CB3A64736F6C PUSH4 0x43000701 STOP CALLER ",
              "sourceMap": "1147:4165:19:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122030370b19405434fd5237316b4f71cdb3d4190829777ef8406ac954ce8691cb3a64736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 ADDRESS CALLDATACOPY SIGNEXTEND NOT BLOCKHASH SLOAD CALLVALUE REVERT MSTORE CALLDATACOPY BALANCE PUSH12 0x4F71CDB3D4190829777EF840 PUSH11 0xC954CE8691CB3A64736F6C PUSH4 0x43000701 STOP CALLER ",
              "sourceMap": "1147:4165:19:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "add(struct EnumerableSet.AddressSet storage pointer,address)": "infinite",
                "at(struct EnumerableSet.AddressSet storage pointer,uint256)": "infinite",
                "contains(struct EnumerableSet.AddressSet storage pointer,address)": "infinite",
                "length(struct EnumerableSet.AddressSet storage pointer)": "infinite",
                "remove(struct EnumerableSet.AddressSet storage pointer,address)": "infinite",
                "unchecked_at(struct EnumerableSet.AddressSet storage pointer,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for managing https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive types. Sets have the following properties: - Elements are added, removed, and checked for existence in constant time (O(1)). - Elements are enumerated in O(n). No guarantees are made on the ordering. ``` contract Example {     // Add the library methods     using EnumerableSet for EnumerableSet.AddressSet;     // Declare a set state variable     EnumerableSet.AddressSet private mySet; } ``` As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) and `uint256` (`UintSet`) are supported.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":\"EnumerableSet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/IERC20.sol": {
        "IERC20": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Interface of the ERC20 standard as defined in the EIP.",
            "events": {
              "Approval(address,address,uint256)": {
                "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
              },
              "Transfer(address,address,uint256)": {
                "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."
              }
            },
            "kind": "dev",
            "methods": {
              "allowance(address,address)": {
                "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
              },
              "approve(address,uint256)": {
                "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
              },
              "balanceOf(address)": {
                "details": "Returns the amount of tokens owned by `account`."
              },
              "totalSupply()": {
                "details": "Returns the amount of tokens in existence."
              },
              "transfer(address,uint256)": {
                "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              },
              "transferFrom(address,address,uint256)": {
                "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/IERC20Permit.sol": {
        "IERC20Permit": {
          "abi": [
            {
              "inputs": [],
              "name": "DOMAIN_SEPARATOR",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "nonces",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                },
                {
                  "internalType": "uint8",
                  "name": "v",
                  "type": "uint8"
                },
                {
                  "internalType": "bytes32",
                  "name": "r",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "s",
                  "type": "bytes32"
                }
              ],
              "name": "permit",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all.",
            "kind": "dev",
            "methods": {
              "DOMAIN_SEPARATOR()": {
                "details": "Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}."
              },
              "nonces(address)": {
                "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times."
              },
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
                "details": "Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "DOMAIN_SEPARATOR()": "3644e515",
              "nonces(address)": "7ecebe00",
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all.\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":\"IERC20Permit\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol": {
        "ReentrancyGuard": {
          "abi": [],
          "devdoc": {
            "details": "Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol:ReentrancyGuard",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/SafeCast.sol": {
        "SafeCast": {
          "abi": [],
          "devdoc": {
            "details": "Wrappers over Solidity's uintXX/intXX casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always. Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing all math on `uint256` and `int256` and then downcasting.",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220abd1310eac79c41dcc19e84390d38198b02f3b8a9e02a9a66eae2b5e3aa512c364736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xAB 0xD1 BALANCE 0xE 0xAC PUSH26 0xC41DCC19E84390D38198B02F3B8A9E02A9A66EAE2B5E3AA512C3 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "809:370:23:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220abd1310eac79c41dcc19e84390d38198b02f3b8a9e02a9a66eae2b5e3aa512c364736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xAB 0xD1 BALANCE 0xE 0xAC PUSH26 0xC41DCC19E84390D38198B02F3B8A9E02A9A66EAE2B5E3AA512C3 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "809:370:23:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "toInt256(uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's uintXX/intXX casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always. Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing all math on `uint256` and `int256` and then downcasting.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/SafeCast.sol\":\"SafeCast\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n    /**\\n     * @dev Converts an unsigned uint256 into a signed int256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be less than or equal to maxInt256.\\n     */\\n    function toInt256(uint256 value) internal pure returns (int256) {\\n        _require(value < 2**255, Errors.SAFE_CAST_VALUE_CANT_FIT_INT256);\\n        return int256(value);\\n    }\\n}\\n\",\"keccak256\":\"0xfefa8c6b6aed0ac9df03ac0c4cce2a94da8d8815bb7f1459fef9f93ada8d316d\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/SafeERC20.sol": {
        "SafeERC20": {
          "abi": [],
          "devdoc": {
            "details": "Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.",
            "kind": "dev",
            "methods": {},
            "title": "SafeERC20",
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220060cff9f174b3c773fa640333d17f70cb9bb2221c308bfe260d6f4aead508a7764736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MOD 0xC SELFDESTRUCT SWAP16 OR 0x4B EXTCODECOPY PUSH24 0x3FA640333D17F70CB9BB2221C308BFE260D6F4AEAD508A77 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "581:1635:24:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220060cff9f174b3c773fa640333d17f70cb9bb2221c308bfe260d6f4aead508a7764736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MOD 0xC SELFDESTRUCT SWAP16 OR 0x4B EXTCODECOPY PUSH24 0x3FA640333D17F70CB9BB2221C308BFE260D6F4AEAD508A77 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "581:1635:24:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "_callOptionalReturn(address,bytes memory)": "infinite",
                "safeTransfer(contract IERC20,address,uint256)": "infinite",
                "safeTransferFrom(contract IERC20,address,address,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"kind\":\"dev\",\"methods\":{},\"title\":\"SafeERC20\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/lib/openzeppelin/SafeMath.sol": {
        "SafeMath": {
          "abi": [],
          "devdoc": {
            "details": "Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f3ff38280594415756675eede5de4ca2718b4036b30b01c6e1c5d131a955e94964736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 RETURN SELFDESTRUCT CODESIZE 0x28 SDIV SWAP5 COINBASE JUMPI JUMP PUSH8 0x5EEDE5DE4CA2718B BLOCKHASH CALLDATASIZE 0xB3 SIGNEXTEND ADD 0xC6 0xE1 0xC5 0xD1 BALANCE 0xA9 SSTORE 0xE9 0x49 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "663:1280:25:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f3ff38280594415756675eede5de4ca2718b4036b30b01c6e1c5d131a955e94964736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 RETURN SELFDESTRUCT CODESIZE 0x28 SDIV SWAP5 COINBASE JUMPI JUMP PUSH8 0x5EEDE5DE4CA2718B BLOCKHASH CALLDATASIZE 0xB3 SIGNEXTEND ADD 0xC6 0xE1 0xC5 0xD1 BALANCE 0xA9 SSTORE 0xE9 0x49 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "663:1280:25:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "add(uint256,uint256)": "infinite",
                "sub(uint256,uint256)": "infinite",
                "sub(uint256,uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's arithmetic operations with added overflow checks. Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages. `SafeMath` restores this intuition by reverting the transaction when an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/BalancerPoolToken.sol": {
        "BalancerPoolToken": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "string",
                  "name": "tokenName",
                  "type": "string"
                },
                {
                  "internalType": "string",
                  "name": "tokenSymbol",
                  "type": "string"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "DOMAIN_SEPARATOR",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "decimals",
              "outputs": [
                {
                  "internalType": "uint8",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "pure",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "decreaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "increaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "name",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "nonces",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                },
                {
                  "internalType": "uint8",
                  "name": "v",
                  "type": "uint8"
                },
                {
                  "internalType": "bytes32",
                  "name": "r",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "s",
                  "type": "bytes32"
                }
              ],
              "name": "permit",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "symbol",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "author": "Balancer Labs",
            "details": "- Includes functions to increase and decrease allowance as a workaround   for the well-known issue with `approve`:   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - Allows for 'infinite allowance', where an allowance of 0xff..ff is not   decreased by calls to transferFrom - Lets a token holder use `transferFrom` to send their own tokens,   without first setting allowance - Emits 'Approval' events whenever allowance is changed by `transferFrom`",
            "kind": "dev",
            "methods": {
              "DOMAIN_SEPARATOR()": {
                "details": "Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}."
              },
              "allowance(address,address)": {
                "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
              },
              "approve(address,uint256)": {
                "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
              },
              "balanceOf(address)": {
                "details": "Returns the amount of tokens owned by `account`."
              },
              "nonces(address)": {
                "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times."
              },
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
                "details": "Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]."
              },
              "totalSupply()": {
                "details": "Returns the amount of tokens in existence."
              },
              "transfer(address,uint256)": {
                "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              },
              "transferFrom(address,address,uint256)": {
                "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              }
            },
            "title": "Highly opinionated token implementation",
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "6101006040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c960e0523480156200003657600080fd5b5060405162000da738038062000da7833981810160405260408110156200005c57600080fd5b81019080805160405193929190846401000000008211156200007d57600080fd5b9083019060208201858111156200009357600080fd5b8251640100000000811182820188101715620000ae57600080fd5b82525081516020918201929091019080838360005b83811015620000dd578181015183820152602001620000c3565b50505050905090810190601f1680156200010b5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200012f57600080fd5b9083019060208201858111156200014557600080fd5b82516401000000008111828201881017156200016057600080fd5b82525081516020918201929091019080838360005b838110156200018f57818101518382015260200162000175565b50505050905090810190601f168015620001bd5780820380516001836020036101000a031916815260200191505b506040818101905260018152603160f81b602080830191825287519088019081206080529151902060a0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60c05285516200022194506003935090915062000240565b5080516200023790600490602084019062000240565b505050620002dc565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200028357805160ff1916838001178555620002b3565b82800160010185558215620002b3579182015b82811115620002b357825182559160200191906001019062000296565b50620002c1929150620002c5565b5090565b5b80821115620002c15760008155600101620002c6565b60805160a05160c05160e051610a9562000312600039806105ef5250806108d35250806109155250806108f45250610a956000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a9059cbb11610066578063a9059cbb146102a2578063d505accf146102ce578063d73dd62314610321578063dd62ed3e1461034d576100ea565b806370a082311461024e5780637ecebe001461027457806395d89b411461029a576100ea565b806323b872dd116100c857806323b872dd146101c6578063313ce567146101fc5780633644e5151461021a5780636618846314610222576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101ac575b600080fd5b6100f761037b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b038135169060200135610411565b604080519115158252519081900360200190f35b6101b4610427565b60408051918252519081900360200190f35b610198600480360360608110156101dc57600080fd5b506001600160a01b0381358116916020810135909116906040013561042d565b6102046104ae565b6040805160ff9092168252519081900360200190f35b6101b46104b3565b6101986004803603604081101561023857600080fd5b506001600160a01b0381351690602001356104c2565b6101b46004803603602081101561026457600080fd5b50356001600160a01b031661051c565b6101b46004803603602081101561028a57600080fd5b50356001600160a01b0316610537565b6100f7610552565b610198600480360360408110156102b857600080fd5b506001600160a01b0381351690602001356105b3565b61031f600480360360e08110156102e457600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356105c0565b005b6101986004803603604081101561033757600080fd5b506001600160a01b038135169060200135610730565b6101b46004803603604081101561036357600080fd5b506001600160a01b0381358116916020013516610766565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104075780601f106103dc57610100808354040283529160200191610407565b820191906000526020600020905b8154815290600101906020018083116103ea57829003601f168201915b5050505050905090565b600061041e338484610791565b50600192915050565b60025490565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261046b9114806104635750838210155b6101976107f3565b610476858585610805565b336001600160a01b0386161480159061049157506000198114155b156104a3576104a38533858403610791565b506001949350505050565b601290565b60006104bd6108cf565b905090565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106104fe576104f933856000610791565b610512565b610512338561050d848761098d565b610791565b5060019392505050565b6001600160a01b031660009081526020819052604090205490565b6001600160a01b031660009081526005602052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104075780601f106103dc57610100808354040283529160200191610407565b600061041e338484610805565b6105ce8442111560d16107f3565b6001600160a01b0380881660008181526005602090815260408083205481517f00000000000000000000000000000000000000000000000000000000000000008185015280830195909552948b166060850152608084018a905260a0840185905260c08085018a90528151808603909101815260e0909401905282519201919091209061065a826109a3565b9050600060018288888860405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156106b8573d6000803e3d6000fd5b5050604051601f19015191506106fa90506001600160a01b038216158015906106f257508b6001600160a01b0316826001600160a01b0316145b6101f86107f3565b6001600160a01b038b1660009081526005602052604090206001850190556107238b8b8b610791565b5050505050505050505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161041e91859061050d90866109ef565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b816108015761080181610a08565b5050565b6001600160a01b03831660009081526020819052604090205461082d828210156101966107f3565b6108446001600160a01b03841615156101996107f3565b6001600160a01b0380851660009081526020819052604080822085850390559185168152205461087490836109ef565b6001600160a01b038085166000818152602081815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061093c610a5b565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b031681526020019550505050505060405160208183030381529060405280519060200120905090565b600061099d8383111560016107f3565b50900390565b60006109ad6108cf565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000828201610a0184821015836107f3565b9392505050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b469056fea2646970667358221220be675151ecddcb167456c6c3dc1dd7a0a5cf4a919c7b4079dffb48661878580264736f6c63430007010033",
              "opcodes": "PUSH2 0x100 PUSH1 0x40 MSTORE PUSH32 0x6E71EDAE12B1B97F4D1F60370FEF10105FA2FAAE0126114A169C64845D6126C9 PUSH1 0xE0 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x36 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0xDA7 CODESIZE SUB DUP1 PUSH3 0xDA7 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE PUSH1 0x40 DUP2 LT ISZERO PUSH3 0x5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 DUP1 DUP1 MLOAD PUSH1 0x40 MLOAD SWAP4 SWAP3 SWAP2 SWAP1 DUP5 PUSH5 0x100000000 DUP3 GT ISZERO PUSH3 0x7D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP1 DUP4 ADD SWAP1 PUSH1 0x20 DUP3 ADD DUP6 DUP2 GT ISZERO PUSH3 0x93 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH5 0x100000000 DUP2 GT DUP3 DUP3 ADD DUP9 LT OR ISZERO PUSH3 0xAE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MSTORE POP DUP2 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP3 SWAP1 SWAP2 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH3 0xDD JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH3 0xC3 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH3 0x10B JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP PUSH1 0x40 MSTORE PUSH1 0x20 ADD DUP1 MLOAD PUSH1 0x40 MLOAD SWAP4 SWAP3 SWAP2 SWAP1 DUP5 PUSH5 0x100000000 DUP3 GT ISZERO PUSH3 0x12F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP1 DUP4 ADD SWAP1 PUSH1 0x20 DUP3 ADD DUP6 DUP2 GT ISZERO PUSH3 0x145 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH5 0x100000000 DUP2 GT DUP3 DUP3 ADD DUP9 LT OR ISZERO PUSH3 0x160 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MSTORE POP DUP2 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD SWAP3 SWAP1 SWAP2 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH3 0x18F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH3 0x175 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH3 0x1BD JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP PUSH1 0x40 DUP2 DUP2 ADD SWAP1 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 DUP3 MSTORE DUP8 MLOAD SWAP1 DUP9 ADD SWAP1 DUP2 KECCAK256 PUSH1 0x80 MSTORE SWAP2 MLOAD SWAP1 KECCAK256 PUSH1 0xA0 MSTORE PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH1 0xC0 MSTORE DUP6 MLOAD PUSH3 0x221 SWAP5 POP PUSH1 0x3 SWAP4 POP SWAP1 SWAP2 POP PUSH3 0x240 JUMP JUMPDEST POP DUP1 MLOAD PUSH3 0x237 SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0x240 JUMP JUMPDEST POP POP POP PUSH3 0x2DC JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0x283 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0x2B3 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0x2B3 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0x2B3 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0x296 JUMP JUMPDEST POP PUSH3 0x2C1 SWAP3 SWAP2 POP PUSH3 0x2C5 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0x2C1 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0x2C6 JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0xA95 PUSH3 0x312 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x5EF MSTORE POP DUP1 PUSH2 0x8D3 MSTORE POP DUP1 PUSH2 0x915 MSTORE POP DUP1 PUSH2 0x8F4 MSTORE POP PUSH2 0xA95 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xEA JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x70A08231 GT PUSH2 0x8C JUMPI DUP1 PUSH4 0xA9059CBB GT PUSH2 0x66 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2A2 JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x2CE JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x321 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x34D JUMPI PUSH2 0xEA JUMP JUMPDEST DUP1 PUSH4 0x70A08231 EQ PUSH2 0x24E JUMPI DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x274 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x29A JUMPI PUSH2 0xEA JUMP JUMPDEST DUP1 PUSH4 0x23B872DD GT PUSH2 0xC8 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1C6 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1FC JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x21A JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x222 JUMPI PUSH2 0xEA JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0xEF JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x16C JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x1AC JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xF7 PUSH2 0x37B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x131 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x119 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x15E JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x182 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x411 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1B4 PUSH2 0x427 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x1DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x42D JUMP JUMPDEST PUSH2 0x204 PUSH2 0x4AE JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1B4 PUSH2 0x4B3 JUMP JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x238 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x4C2 JUMP JUMPDEST PUSH2 0x1B4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x264 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x51C JUMP JUMPDEST PUSH2 0x1B4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x28A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x537 JUMP JUMPDEST PUSH2 0xF7 PUSH2 0x552 JUMP JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x2B8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x5B3 JUMP JUMPDEST PUSH2 0x31F PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xE0 DUP2 LT ISZERO PUSH2 0x2E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x60 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0xFF PUSH1 0x80 DUP3 ADD CALLDATALOAD AND SWAP1 PUSH1 0xA0 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0xC0 ADD CALLDATALOAD PUSH2 0x5C0 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x337 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x730 JUMP JUMPDEST PUSH2 0x1B4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x363 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x766 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x407 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x3DC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x407 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x3EA JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x41E CALLER DUP5 DUP5 PUSH2 0x791 JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x46B SWAP2 EQ DUP1 PUSH2 0x463 JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0x7F3 JUMP JUMPDEST PUSH2 0x476 DUP6 DUP6 DUP6 PUSH2 0x805 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x491 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x4A3 JUMPI PUSH2 0x4A3 DUP6 CALLER DUP6 DUP5 SUB PUSH2 0x791 JUMP JUMPDEST POP PUSH1 0x1 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4BD PUSH2 0x8CF JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x4FE JUMPI PUSH2 0x4F9 CALLER DUP6 PUSH1 0x0 PUSH2 0x791 JUMP JUMPDEST PUSH2 0x512 JUMP JUMPDEST PUSH2 0x512 CALLER DUP6 PUSH2 0x50D DUP5 DUP8 PUSH2 0x98D JUMP JUMPDEST PUSH2 0x791 JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x407 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x3DC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x407 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x41E CALLER DUP5 DUP5 PUSH2 0x805 JUMP JUMPDEST PUSH2 0x5CE DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0x7F3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP9 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD DUP2 MLOAD PUSH32 0x0 DUP2 DUP6 ADD MSTORE DUP1 DUP4 ADD SWAP6 SWAP1 SWAP6 MSTORE SWAP5 DUP12 AND PUSH1 0x60 DUP6 ADD MSTORE PUSH1 0x80 DUP5 ADD DUP11 SWAP1 MSTORE PUSH1 0xA0 DUP5 ADD DUP6 SWAP1 MSTORE PUSH1 0xC0 DUP1 DUP6 ADD DUP11 SWAP1 MSTORE DUP2 MLOAD DUP1 DUP7 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0xE0 SWAP1 SWAP5 ADD SWAP1 MSTORE DUP3 MLOAD SWAP3 ADD SWAP2 SWAP1 SWAP2 KECCAK256 SWAP1 PUSH2 0x65A DUP3 PUSH2 0x9A3 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD DUP1 DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x6B8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0x6FA SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0x6F2 JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0x7F3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0x723 DUP12 DUP12 DUP12 PUSH2 0x791 JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x41E SWAP2 DUP6 SWAP1 PUSH2 0x50D SWAP1 DUP7 PUSH2 0x9EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE DUP2 MLOAD DUP6 DUP2 MSTORE SWAP2 MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST DUP2 PUSH2 0x801 JUMPI PUSH2 0x801 DUP2 PUSH2 0xA08 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x82D DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x7F3 JUMP JUMPDEST PUSH2 0x844 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0x7F3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x874 SWAP1 DUP4 PUSH2 0x9EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP4 SWAP3 DUP9 AND SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP2 DUP3 SWAP1 SUB ADD SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x93C PUSH2 0xA5B JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP7 DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x99D DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x7F3 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x9AD PUSH2 0x8CF JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP1 PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE POP PUSH1 0x2 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0xA01 DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x7F3 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xBE PUSH8 0x5151ECDDCB167456 0xC6 0xC3 0xDC SAR 0xD7 LOG0 0xA5 0xCF 0x4A SWAP2 SWAP13 PUSH28 0x4079DFFB48661878580264736F6C6343000701003300000000000000 ",
              "sourceMap": "1457:5648:26:-:0;;;1979:109;1933:155;;2125:152;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2125:152:26;;;;;;;;;;-1:-1:-1;2125:152:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2125:152:26;;;;;;;;;;-1:-1:-1;2125:152:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2125:152:26;2020:280:15;;;;;;;;-1:-1:-1;;;2020:280:15;;;;;;;2100:22;;;;;;;;2085:37;;2150:25;;;;2132:43;;2198:95;2185:108;;2222:17:26;;::::1;::::0;-1:-1:-1;2222:5:26::1;::::0;-1:-1:-1;2100:22:15;;-1:-1:-1;2222:17:26::1;:::i;:::-;-1:-1:-1::0;2249:21:26;;::::1;::::0;:7:::1;::::0;:21:::1;::::0;::::1;::::0;::::1;:::i;:::-;;2125:152:::0;;1457:5648;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1457:5648:26;;;-1:-1:-1;1457:5648:26;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "3802": [
                  {
                    "length": 32,
                    "start": 2292
                  }
                ],
                "3804": [
                  {
                    "length": 32,
                    "start": 2325
                  }
                ],
                "3806": [
                  {
                    "length": 32,
                    "start": 2259
                  }
                ],
                "5433": [
                  {
                    "length": 32,
                    "start": 1519
                  }
                ]
              },
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a9059cbb11610066578063a9059cbb146102a2578063d505accf146102ce578063d73dd62314610321578063dd62ed3e1461034d576100ea565b806370a082311461024e5780637ecebe001461027457806395d89b411461029a576100ea565b806323b872dd116100c857806323b872dd146101c6578063313ce567146101fc5780633644e5151461021a5780636618846314610222576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101ac575b600080fd5b6100f761037b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b038135169060200135610411565b604080519115158252519081900360200190f35b6101b4610427565b60408051918252519081900360200190f35b610198600480360360608110156101dc57600080fd5b506001600160a01b0381358116916020810135909116906040013561042d565b6102046104ae565b6040805160ff9092168252519081900360200190f35b6101b46104b3565b6101986004803603604081101561023857600080fd5b506001600160a01b0381351690602001356104c2565b6101b46004803603602081101561026457600080fd5b50356001600160a01b031661051c565b6101b46004803603602081101561028a57600080fd5b50356001600160a01b0316610537565b6100f7610552565b610198600480360360408110156102b857600080fd5b506001600160a01b0381351690602001356105b3565b61031f600480360360e08110156102e457600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356105c0565b005b6101986004803603604081101561033757600080fd5b506001600160a01b038135169060200135610730565b6101b46004803603604081101561036357600080fd5b506001600160a01b0381358116916020013516610766565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104075780601f106103dc57610100808354040283529160200191610407565b820191906000526020600020905b8154815290600101906020018083116103ea57829003601f168201915b5050505050905090565b600061041e338484610791565b50600192915050565b60025490565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261046b9114806104635750838210155b6101976107f3565b610476858585610805565b336001600160a01b0386161480159061049157506000198114155b156104a3576104a38533858403610791565b506001949350505050565b601290565b60006104bd6108cf565b905090565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106104fe576104f933856000610791565b610512565b610512338561050d848761098d565b610791565b5060019392505050565b6001600160a01b031660009081526020819052604090205490565b6001600160a01b031660009081526005602052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104075780601f106103dc57610100808354040283529160200191610407565b600061041e338484610805565b6105ce8442111560d16107f3565b6001600160a01b0380881660008181526005602090815260408083205481517f00000000000000000000000000000000000000000000000000000000000000008185015280830195909552948b166060850152608084018a905260a0840185905260c08085018a90528151808603909101815260e0909401905282519201919091209061065a826109a3565b9050600060018288888860405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156106b8573d6000803e3d6000fd5b5050604051601f19015191506106fa90506001600160a01b038216158015906106f257508b6001600160a01b0316826001600160a01b0316145b6101f86107f3565b6001600160a01b038b1660009081526005602052604090206001850190556107238b8b8b610791565b5050505050505050505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161041e91859061050d90866109ef565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b816108015761080181610a08565b5050565b6001600160a01b03831660009081526020819052604090205461082d828210156101966107f3565b6108446001600160a01b03841615156101996107f3565b6001600160a01b0380851660009081526020819052604080822085850390559185168152205461087490836109ef565b6001600160a01b038085166000818152602081815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061093c610a5b565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b031681526020019550505050505060405160208183030381529060405280519060200120905090565b600061099d8383111560016107f3565b50900390565b60006109ad6108cf565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000828201610a0184821015836107f3565b9392505050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b469056fea2646970667358221220be675151ecddcb167456c6c3dc1dd7a0a5cf4a919c7b4079dffb48661878580264736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xEA JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x70A08231 GT PUSH2 0x8C JUMPI DUP1 PUSH4 0xA9059CBB GT PUSH2 0x66 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2A2 JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x2CE JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x321 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x34D JUMPI PUSH2 0xEA JUMP JUMPDEST DUP1 PUSH4 0x70A08231 EQ PUSH2 0x24E JUMPI DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x274 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x29A JUMPI PUSH2 0xEA JUMP JUMPDEST DUP1 PUSH4 0x23B872DD GT PUSH2 0xC8 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1C6 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1FC JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x21A JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x222 JUMPI PUSH2 0xEA JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0xEF JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x16C JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x1AC JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xF7 PUSH2 0x37B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x131 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x119 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x15E JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x182 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x411 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1B4 PUSH2 0x427 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x1DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x42D JUMP JUMPDEST PUSH2 0x204 PUSH2 0x4AE JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1B4 PUSH2 0x4B3 JUMP JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x238 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x4C2 JUMP JUMPDEST PUSH2 0x1B4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x264 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x51C JUMP JUMPDEST PUSH2 0x1B4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x28A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x537 JUMP JUMPDEST PUSH2 0xF7 PUSH2 0x552 JUMP JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x2B8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x5B3 JUMP JUMPDEST PUSH2 0x31F PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0xE0 DUP2 LT ISZERO PUSH2 0x2E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0x60 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0xFF PUSH1 0x80 DUP3 ADD CALLDATALOAD AND SWAP1 PUSH1 0xA0 DUP2 ADD CALLDATALOAD SWAP1 PUSH1 0xC0 ADD CALLDATALOAD PUSH2 0x5C0 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x198 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x337 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x730 JUMP JUMPDEST PUSH2 0x1B4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x363 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x766 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x407 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x3DC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x407 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x3EA JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x41E CALLER DUP5 DUP5 PUSH2 0x791 JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x46B SWAP2 EQ DUP1 PUSH2 0x463 JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0x7F3 JUMP JUMPDEST PUSH2 0x476 DUP6 DUP6 DUP6 PUSH2 0x805 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x491 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x4A3 JUMPI PUSH2 0x4A3 DUP6 CALLER DUP6 DUP5 SUB PUSH2 0x791 JUMP JUMPDEST POP PUSH1 0x1 SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4BD PUSH2 0x8CF JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x4FE JUMPI PUSH2 0x4F9 CALLER DUP6 PUSH1 0x0 PUSH2 0x791 JUMP JUMPDEST PUSH2 0x512 JUMP JUMPDEST PUSH2 0x512 CALLER DUP6 PUSH2 0x50D DUP5 DUP8 PUSH2 0x98D JUMP JUMPDEST PUSH2 0x791 JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x407 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x3DC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x407 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x41E CALLER DUP5 DUP5 PUSH2 0x805 JUMP JUMPDEST PUSH2 0x5CE DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0x7F3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP9 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD DUP2 MLOAD PUSH32 0x0 DUP2 DUP6 ADD MSTORE DUP1 DUP4 ADD SWAP6 SWAP1 SWAP6 MSTORE SWAP5 DUP12 AND PUSH1 0x60 DUP6 ADD MSTORE PUSH1 0x80 DUP5 ADD DUP11 SWAP1 MSTORE PUSH1 0xA0 DUP5 ADD DUP6 SWAP1 MSTORE PUSH1 0xC0 DUP1 DUP6 ADD DUP11 SWAP1 MSTORE DUP2 MLOAD DUP1 DUP7 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0xE0 SWAP1 SWAP5 ADD SWAP1 MSTORE DUP3 MLOAD SWAP3 ADD SWAP2 SWAP1 SWAP2 KECCAK256 SWAP1 PUSH2 0x65A DUP3 PUSH2 0x9A3 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD DUP1 DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP5 PUSH1 0xFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x6B8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0x6FA SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0x6F2 JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0x7F3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0x723 DUP12 DUP12 DUP12 PUSH2 0x791 JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x41E SWAP2 DUP6 SWAP1 PUSH2 0x50D SWAP1 DUP7 PUSH2 0x9EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE SWAP2 DUP3 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE DUP2 MLOAD DUP6 DUP2 MSTORE SWAP2 MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST DUP2 PUSH2 0x801 JUMPI PUSH2 0x801 DUP2 PUSH2 0xA08 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x82D DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x7F3 JUMP JUMPDEST PUSH2 0x844 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0x7F3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x874 SWAP1 DUP4 PUSH2 0x9EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP4 SWAP3 DUP9 AND SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP2 DUP3 SWAP1 SUB ADD SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x93C PUSH2 0xA5B JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP7 DUP2 MSTORE PUSH1 0x20 ADD DUP6 DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x99D DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x7F3 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x9AD PUSH2 0x8CF JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD DUP1 DUP1 PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE POP PUSH1 0x2 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0xA01 DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x7F3 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xBE PUSH8 0x5151ECDDCB167456 0xC6 0xC3 0xDC SAR 0xD7 LOG0 0xA5 0xCF 0x4A SWAP2 SWAP13 PUSH28 0x4079DFFB48661878580264736F6C6343000701003300000000000000 ",
              "sourceMap": "1457:5648:26:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4957:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2582:164;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2582:164:26;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;5222:98;;;:::i;:::-;;;;;;;;;;;;;;;;3511:649;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3511:649:26;;;;;;;;;;;;;;;;;:::i;5135:81::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5495:113;;;:::i;2959:379::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2959:379:26;;;;;;;;:::i;2458:118::-;;;;;;;;;;;;;;;;-1:-1:-1;2458:118:26;-1:-1:-1;;;;;2458:118:26;;:::i;5326:110::-;;;;;;;;;;;;;;;;-1:-1:-1;5326:110:26;-1:-1:-1;;;;;5326:110:26;;:::i;5044:85::-;;;:::i;3344:161::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3344:161:26;;;;;;;;:::i;4166:760::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4166:760:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2752:201;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2752:201:26;;;;;;;;:::i;2310:142::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2310:142:26;;;;;;;;;;:::i;4957:81::-;5026:5;5019:12;;;;;;;;-1:-1:-1;;5019:12:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4994:13;;5019:12;;5026:5;;5019:12;;5026:5;5019:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4957:81;:::o;2582:164::-;2659:4;2675:42;2689:10;2701:7;2710:6;2675:13;:42::i;:::-;-1:-1:-1;2735:4:26;2582:164;;;;:::o;5222:98::-;5301:12;;5222:98;:::o;3511:649::-;-1:-1:-1;;;;;3684:18:26;;3641:4;3684:18;;;:10;:18;;;;;;;;3703:10;3684:30;;;;;;;;3641:4;;3724:91;;3733:20;;:50;;;3777:6;3757:16;:26;;3733:50;6726:3:3;3724:8:26;:91::i;:::-;3826:32;3832:6;3840:9;3851:6;3826:5;:32::i;:::-;3873:10;-1:-1:-1;;;;;3873:20:26;;;;;;:55;;;-1:-1:-1;;3897:16:26;:31;;3873:55;3869:263;;;4061:60;4075:6;4083:10;4114:6;4095:16;:25;4061:13;:60::i;:::-;-1:-1:-1;4149:4:26;;3511:649;-1:-1:-1;;;;3511:649:26:o;5135:81::-;1610:2;5135:81;:::o;5495:113::-;5555:7;5581:20;:18;:20::i;:::-;5574:27;;5495:113;:::o;2959:379::-;3090:10;3036:4;3079:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3079:31:26;;;;;;;;;;3125:26;;;3121:189;;3167:37;3181:10;3193:7;3202:1;3167:13;:37::i;:::-;3121:189;;;3235:64;3249:10;3261:7;3270:28;:16;3291:6;3270:20;:28::i;:::-;3235:13;:64::i;:::-;-1:-1:-1;3327:4:26;;2959:379;-1:-1:-1;;;2959:379:26:o;2458:118::-;-1:-1:-1;;;;;2552:17:26;2526:7;2552:17;;;;;;;;;;;;2458:118::o;5326:110::-;-1:-1:-1;;;;;5415:14:26;5389:7;5415:14;;;:7;:14;;;;;;;5326:110::o;5044:85::-;5115:7;5108:14;;;;;;;;-1:-1:-1;;5108:14:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5083:13;;5108:14;;5115:7;;5108:14;;5115:7;5108:14;;;;;;;;;;;;;;;;;;;;;;;;3344:161;3424:4;3440:36;3446:10;3458:9;3469:6;3440:5;:36::i;4166:760::-;4428:60;4456:8;4437:15;:27;;5606:3:3;4428:8:26;:60::i;:::-;-1:-1:-1;;;;;4515:14:26;;;4499:13;4515:14;;;:7;:14;;;;;;;;;4571:69;;4582:17;4571:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4561:80;;;;;;;;;4667:28;4561:80;4667:16;:28::i;:::-;4652:43;;4706:14;4723:24;4733:4;4739:1;4742;4745;4723:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4723:24:26;;-1:-1:-1;;4723:24:26;;;-1:-1:-1;4757:79:26;;-1:-1:-1;;;;;;4767:20:26;;;;;;4766:43;;;4803:5;-1:-1:-1;;;;;4793:15:26;:6;-1:-1:-1;;;;;4793:15:26;;4766:43;8211:3:3;4757:8:26;:79::i;:::-;-1:-1:-1;;;;;4847:14:26;;;;;;:7;:14;;;;;4872:1;4864:9;;4847:26;;4883:36;4855:5;4904:7;4913:5;4883:13;:36::i;:::-;4166:760;;;;;;;;;;;:::o;2752:201::-;2859:10;2829:4;2880:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2880:31:26;;;;;;;;;;2829:4;;2845:79;;2871:7;;2880:43;;2916:6;2880:35;:43::i;2310:142::-;-1:-1:-1;;;;;2419:17:26;;;2393:7;2419:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;2310:142::o;6895:208::-;-1:-1:-1;;;;;7014:17:26;;;;;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;:35;;;7064:32;;;;;;;;;;;;;;;;;6895:208;;;:::o;866:101:3:-;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;6245:618:26:-;-1:-1:-1;;;;;6385:16:26;;6360:22;6385:16;;;;;;;;;;;6411:63;6420:24;;;;6666:3:3;6411:8:26;:63::i;:::-;6617:72;-1:-1:-1;;;;;6626:23:26;;;;6864:3:3;6617:8:26;:72::i;:::-;-1:-1:-1;;;;;6700:16:26;;;:8;:16;;;;;;;;;;;6719:23;;;6700:42;;6774:19;;;;;;;:31;;6736:6;6774:23;:31::i;:::-;-1:-1:-1;;;;;6752:19:26;;;:8;:19;;;;;;;;;;;;:53;;;;6821:35;;;;;;;6752:19;;6821:35;;;;;;;;;;;;;6245:618;;;;:::o;2386:188:15:-;2447:7;2494:10;2506:12;2520:15;2537:13;:11;:13::i;:::-;2560:4;2483:83;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2483:83:15;;;;;;;;;;;;;;;;;;;;;;;;2473:94;;;;;;2466:101;;2386:188;:::o;948:166:11:-;1006:7;1025:37;1039:1;1034;:6;;4370:1:3;1025:8:11;:37::i;:::-;-1:-1:-1;1084:5:11;;;948:166::o;3199:183:15:-;3276:7;3341:20;:18;:20::i;:::-;3363:10;3312:62;;;;;;-1:-1:-1;;;3312:62:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3302:73;;;;;;3295:80;;3199:183;;;:::o;367:166:11:-;425:7;456:5;;;471:37;480:6;;;;425:7;471:8;:37::i;:::-;525:1;367:166;-1:-1:-1;;;367:166:11:o;1074:3172:3:-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2999:73;2210:2;2243:18;;;2288;;;2215:4;2284:29;;;3040:1;3036:14;2195:18;;;;3025:26;;;;2336:18;;;;2383;;;2379:29;;;3057:2;3053:17;3021:50;;;;2999:73;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;3388:427:15;3790:9;;3765:44::o"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "541800",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "DOMAIN_SEPARATOR()": "infinite",
                "allowance(address,address)": "1338",
                "approve(address,uint256)": "22365",
                "balanceOf(address)": "1168",
                "decimals()": "252",
                "decreaseApproval(address,uint256)": "23492",
                "increaseApproval(address,uint256)": "23464",
                "name()": "infinite",
                "nonces(address)": "1187",
                "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "infinite",
                "symbol()": "infinite",
                "totalSupply()": "1066",
                "transfer(address,uint256)": "infinite",
                "transferFrom(address,address,uint256)": "infinite"
              },
              "internal": {
                "_burnPoolTokens(address,uint256)": "infinite",
                "_mintPoolTokens(address,uint256)": "infinite",
                "_move(address,address,uint256)": "infinite",
                "_setAllowance(address,address,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {
              "DOMAIN_SEPARATOR()": "3644e515",
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "decimals()": "313ce567",
              "decreaseApproval(address,uint256)": "66188463",
              "increaseApproval(address,uint256)": "d73dd623",
              "name()": "06fdde03",
              "nonces(address)": "7ecebe00",
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
              "symbol()": "95d89b41",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenSymbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Balancer Labs\",\"details\":\"- Includes functions to increase and decrease allowance as a workaround   for the well-known issue with `approve`:   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - Allows for 'infinite allowance', where an allowance of 0xff..ff is not   decreased by calls to transferFrom - Lets a token holder use `transferFrom` to send their own tokens,   without first setting allowance - Emits 'Approval' events whenever allowance is changed by `transferFrom`\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\"},\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"title\":\"Highly opinionated token implementation\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/BalancerPoolToken.sol\":\"BalancerPoolToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5412,
                "contract": "src.sol/amm/pools/BalancerPoolToken.sol:BalancerPoolToken",
                "label": "_balance",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 5418,
                "contract": "src.sol/amm/pools/BalancerPoolToken.sol:BalancerPoolToken",
                "label": "_allowance",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
              },
              {
                "astId": 5420,
                "contract": "src.sol/amm/pools/BalancerPoolToken.sol:BalancerPoolToken",
                "label": "_totalSupply",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              },
              {
                "astId": 5422,
                "contract": "src.sol/amm/pools/BalancerPoolToken.sol:BalancerPoolToken",
                "label": "_name",
                "offset": 0,
                "slot": "3",
                "type": "t_string_storage"
              },
              {
                "astId": 5424,
                "contract": "src.sol/amm/pools/BalancerPoolToken.sol:BalancerPoolToken",
                "label": "_symbol",
                "offset": 0,
                "slot": "4",
                "type": "t_string_storage"
              },
              {
                "astId": 5428,
                "contract": "src.sol/amm/pools/BalancerPoolToken.sol:BalancerPoolToken",
                "label": "_nonces",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_address,t_uint256)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_string_storage": {
                "encoding": "bytes",
                "label": "string",
                "numberOfBytes": "32"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/BaseGeneralPool.sol": {
        "BaseGeneralPool": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "SwapFeeChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "DOMAIN_SEPARATOR",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "decimals",
              "outputs": [
                {
                  "internalType": "uint8",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "pure",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "decreaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getOwner",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPoolId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getSwapFeePercentage",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getVault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "increaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "name",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "nonces",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onExitPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onJoinPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "lastChangeBlock",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "from",
                      "type": "address"
                    },
                    {
                      "internalType": "address",
                      "name": "to",
                      "type": "address"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IPoolSwapStructs.SwapRequest",
                  "name": "swapRequest",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "indexIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "indexOut",
                  "type": "uint256"
                }
              ],
              "name": "onSwap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                },
                {
                  "internalType": "uint8",
                  "name": "v",
                  "type": "uint8"
                },
                {
                  "internalType": "bytes32",
                  "name": "r",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "s",
                  "type": "bytes32"
                }
              ],
              "name": "permit",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryExit",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryJoin",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptOut",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "setSwapFeePercentage",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "symbol",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`. Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.",
            "kind": "dev",
            "methods": {
              "DOMAIN_SEPARATOR()": {
                "details": "Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}."
              },
              "allowance(address,address)": {
                "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
              },
              "approve(address,uint256)": {
                "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
              },
              "balanceOf(address)": {
                "details": "Returns the amount of tokens owned by `account`."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "nonces(address)": {
                "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times."
              },
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares."
              },
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares."
              },
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
                "details": "Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]."
              },
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "totalSupply()": {
                "details": "Returns the amount of tokens in existence."
              },
              "transfer(address,uint256)": {
                "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              },
              "transferFrom(address,address,uint256)": {
                "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "DOMAIN_SEPARATOR()": "3644e515",
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "decimals()": "313ce567",
              "decreaseApproval(address,uint256)": "66188463",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getOwner()": "893d20e8",
              "getPausedState()": "1c0de051",
              "getPoolId()": "38fff2d0",
              "getSwapFeePercentage()": "55c67628",
              "getVault()": "8d928af8",
              "increaseApproval(address,uint256)": "d73dd623",
              "name()": "06fdde03",
              "nonces(address)": "7ecebe00",
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "74f3b009",
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "d5c096c4",
              "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": "01ec954a",
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": "6028bfd4",
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": "87ec6817",
              "setPaused(bool)": "16c38b3c",
              "setSwapFeePercentage(uint256)": "38e9922e",
              "symbol()": "95d89b41",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"SwapFeeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapFeePercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onExitPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onJoinPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IPoolSwapStructs.SwapRequest\",\"name\":\"swapRequest\",\"type\":\"tuple\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"indexIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexOut\",\"type\":\"uint256\"}],\"name\":\"onSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryExit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryJoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"setSwapFeePercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`. Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\"},\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares.\"},\"onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].\"},\"queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/BaseGeneralPool.sol\":\"BaseGeneralPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IGeneralPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseGeneralPool is IGeneralPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            IVault.PoolSpecialization.GENERAL,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external view virtual override returns (uint256) {\\n        _validateIndexes(indexIn, indexOut, _getTotalTokens());\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        return\\n            swapRequest.kind == IVault.SwapKind.GIVEN_IN\\n                ? _swapGivenIn(swapRequest, balances, indexIn, indexOut, scalingFactors)\\n                : _swapGivenOut(swapRequest, balances, indexIn, indexOut, scalingFactors);\\n    }\\n\\n    function _swapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n        swapRequest.amount = _subtractSwapFeeAmount(swapRequest.amount);\\n\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexIn]);\\n\\n        uint256 amountOut = _onSwapGivenIn(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountOut tokens are exiting the Pool, so we round down.\\n        return _downscaleDown(amountOut, scalingFactors[indexOut]);\\n    }\\n\\n    function _swapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexOut]);\\n\\n        uint256 amountIn = _onSwapGivenOut(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountIn tokens are entering the Pool, so we round up.\\n        amountIn = _downscaleUp(amountIn, scalingFactors[indexIn]);\\n\\n        // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n        return _addSwapFeeAmount(amountIn);\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled. The swap fee has already been deducted from\\n     * `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    function _validateIndexes(\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256 limit\\n    ) private pure {\\n        _require(indexIn < limit && indexOut < limit, Errors.OUT_OF_BOUNDS);\\n    }\\n}\\n\",\"keccak256\":\"0x5d7c075a9885e120f7bb1844efe6d20b118840f04e359ce25ea1d9f14af647a8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev IPools with the General specialization setting should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\\n * grant to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IGeneralPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7f11733a5cd8f81c123c02f79d94ead7b65217021ebddafda10e796a25e1ef41\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5412,
                "contract": "src.sol/amm/pools/BaseGeneralPool.sol:BaseGeneralPool",
                "label": "_balance",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 5418,
                "contract": "src.sol/amm/pools/BaseGeneralPool.sol:BaseGeneralPool",
                "label": "_allowance",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
              },
              {
                "astId": 5420,
                "contract": "src.sol/amm/pools/BaseGeneralPool.sol:BaseGeneralPool",
                "label": "_totalSupply",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              },
              {
                "astId": 5422,
                "contract": "src.sol/amm/pools/BaseGeneralPool.sol:BaseGeneralPool",
                "label": "_name",
                "offset": 0,
                "slot": "3",
                "type": "t_string_storage"
              },
              {
                "astId": 5424,
                "contract": "src.sol/amm/pools/BaseGeneralPool.sol:BaseGeneralPool",
                "label": "_symbol",
                "offset": 0,
                "slot": "4",
                "type": "t_string_storage"
              },
              {
                "astId": 5428,
                "contract": "src.sol/amm/pools/BaseGeneralPool.sol:BaseGeneralPool",
                "label": "_nonces",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/pools/BaseGeneralPool.sol:BaseGeneralPool",
                "label": "_paused",
                "offset": 0,
                "slot": "6",
                "type": "t_bool"
              },
              {
                "astId": 6481,
                "contract": "src.sol/amm/pools/BaseGeneralPool.sol:BaseGeneralPool",
                "label": "_swapFeePercentage",
                "offset": 0,
                "slot": "7",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_string_storage": {
                "encoding": "bytes",
                "label": "string",
                "numberOfBytes": "32"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol": {
        "BaseMinimalSwapInfoPool": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "SwapFeeChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "DOMAIN_SEPARATOR",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "decimals",
              "outputs": [
                {
                  "internalType": "uint8",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "pure",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "decreaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getOwner",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPoolId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getSwapFeePercentage",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getVault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "increaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "name",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "nonces",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onExitPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onJoinPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "lastChangeBlock",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "from",
                      "type": "address"
                    },
                    {
                      "internalType": "address",
                      "name": "to",
                      "type": "address"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IPoolSwapStructs.SwapRequest",
                  "name": "request",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "balanceTokenIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "balanceTokenOut",
                  "type": "uint256"
                }
              ],
              "name": "onSwap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                },
                {
                  "internalType": "uint8",
                  "name": "v",
                  "type": "uint8"
                },
                {
                  "internalType": "bytes32",
                  "name": "r",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "s",
                  "type": "bytes32"
                }
              ],
              "name": "permit",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryExit",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryJoin",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptOut",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "setSwapFeePercentage",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "symbol",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Extension of `BasePool`, adding a handler for `IMinimalSwapInfoPool.onSwap`. Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.",
            "kind": "dev",
            "methods": {
              "DOMAIN_SEPARATOR()": {
                "details": "Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}."
              },
              "allowance(address,address)": {
                "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
              },
              "approve(address,uint256)": {
                "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
              },
              "balanceOf(address)": {
                "details": "Returns the amount of tokens owned by `account`."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "nonces(address)": {
                "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times."
              },
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares."
              },
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares."
              },
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
                "details": "Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]."
              },
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "totalSupply()": {
                "details": "Returns the amount of tokens in existence."
              },
              "transfer(address,uint256)": {
                "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              },
              "transferFrom(address,address,uint256)": {
                "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "DOMAIN_SEPARATOR()": "3644e515",
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "decimals()": "313ce567",
              "decreaseApproval(address,uint256)": "66188463",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getOwner()": "893d20e8",
              "getPausedState()": "1c0de051",
              "getPoolId()": "38fff2d0",
              "getSwapFeePercentage()": "55c67628",
              "getVault()": "8d928af8",
              "increaseApproval(address,uint256)": "d73dd623",
              "name()": "06fdde03",
              "nonces(address)": "7ecebe00",
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "74f3b009",
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "d5c096c4",
              "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": "9d2c110c",
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": "6028bfd4",
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": "87ec6817",
              "setPaused(bool)": "16c38b3c",
              "setSwapFeePercentage(uint256)": "38e9922e",
              "symbol()": "95d89b41",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"SwapFeeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapFeePercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onExitPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onJoinPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IPoolSwapStructs.SwapRequest\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"balanceTokenIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balanceTokenOut\",\"type\":\"uint256\"}],\"name\":\"onSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryExit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryJoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"setSwapFeePercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Extension of `BasePool`, adding a handler for `IMinimalSwapInfoPool.onSwap`. Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\"},\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares.\"},\"onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].\"},\"queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/BaseMinimalSwapInfoPool.sol\":\"BaseMinimalSwapInfoPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IMinimalSwapInfoPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IMinimalSwapInfoPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseMinimalSwapInfoPool is IMinimalSwapInfoPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            tokens.length == 2 ? IVault.PoolSpecialization.TWO_TOKEN : IVault.PoolSpecialization.MINIMAL_SWAP_INFO,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory request,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) external view virtual override returns (uint256) {\\n        uint256 scalingFactorTokenIn = _scalingFactor(request.tokenIn);\\n        uint256 scalingFactorTokenOut = _scalingFactor(request.tokenOut);\\n\\n        if (request.kind == IVault.SwapKind.GIVEN_IN) {\\n            // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n            request.amount = _subtractSwapFeeAmount(request.amount);\\n\\n            // All token amounts are upscaled.\\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\\n            request.amount = _upscale(request.amount, scalingFactorTokenIn);\\n\\n            uint256 amountOut = _onSwapGivenIn(request, balanceTokenIn, balanceTokenOut);\\n\\n            // amountOut tokens are exiting the Pool, so we round down.\\n            return _downscaleDown(amountOut, scalingFactorTokenOut);\\n        } else {\\n            // All token amounts are upscaled.\\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\\n            request.amount = _upscale(request.amount, scalingFactorTokenOut);\\n\\n            uint256 amountIn = _onSwapGivenOut(request, balanceTokenIn, balanceTokenOut);\\n\\n            // amountIn tokens are entering the Pool, so we round up.\\n            amountIn = _downscaleUp(amountIn, scalingFactorTokenIn);\\n\\n            // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n            return _addSwapFeeAmount(amountIn);\\n        }\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled. The swap fee has already\\n     * been deducted from `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x6a634f43159cd970522a2005d13934d1d56a85edaee4290ded729340761e19c3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\\n * to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IMinimalSwapInfoPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7469919e147c0db8b4f290d310ca3816dec5d3c6cc6b258cf6e0df820a20a179\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5412,
                "contract": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol:BaseMinimalSwapInfoPool",
                "label": "_balance",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 5418,
                "contract": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol:BaseMinimalSwapInfoPool",
                "label": "_allowance",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
              },
              {
                "astId": 5420,
                "contract": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol:BaseMinimalSwapInfoPool",
                "label": "_totalSupply",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              },
              {
                "astId": 5422,
                "contract": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol:BaseMinimalSwapInfoPool",
                "label": "_name",
                "offset": 0,
                "slot": "3",
                "type": "t_string_storage"
              },
              {
                "astId": 5424,
                "contract": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol:BaseMinimalSwapInfoPool",
                "label": "_symbol",
                "offset": 0,
                "slot": "4",
                "type": "t_string_storage"
              },
              {
                "astId": 5428,
                "contract": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol:BaseMinimalSwapInfoPool",
                "label": "_nonces",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol:BaseMinimalSwapInfoPool",
                "label": "_paused",
                "offset": 0,
                "slot": "6",
                "type": "t_bool"
              },
              {
                "astId": 6481,
                "contract": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol:BaseMinimalSwapInfoPool",
                "label": "_swapFeePercentage",
                "offset": 0,
                "slot": "7",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_string_storage": {
                "encoding": "bytes",
                "label": "string",
                "numberOfBytes": "32"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/BasePool.sol": {
        "BasePool": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "SwapFeeChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "DOMAIN_SEPARATOR",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "decimals",
              "outputs": [
                {
                  "internalType": "uint8",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "pure",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "decreaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getOwner",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPoolId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getSwapFeePercentage",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getVault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "increaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "name",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "nonces",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onExitPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onJoinPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                },
                {
                  "internalType": "uint8",
                  "name": "v",
                  "type": "uint8"
                },
                {
                  "internalType": "bytes32",
                  "name": "r",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "s",
                  "type": "bytes32"
                }
              ],
              "name": "permit",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryExit",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryJoin",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptOut",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "setSwapFeePercentage",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "symbol",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism. Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the `whenNotPaused` modifier. No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer. Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces and implement the swap callbacks themselves.",
            "kind": "dev",
            "methods": {
              "DOMAIN_SEPARATOR()": {
                "details": "Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}."
              },
              "allowance(address,address)": {
                "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
              },
              "approve(address,uint256)": {
                "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
              },
              "balanceOf(address)": {
                "details": "Returns the amount of tokens owned by `account`."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "nonces(address)": {
                "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times."
              },
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares."
              },
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares."
              },
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
                "details": "Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]."
              },
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "totalSupply()": {
                "details": "Returns the amount of tokens in existence."
              },
              "transfer(address,uint256)": {
                "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              },
              "transferFrom(address,address,uint256)": {
                "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "DOMAIN_SEPARATOR()": "3644e515",
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "decimals()": "313ce567",
              "decreaseApproval(address,uint256)": "66188463",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getOwner()": "893d20e8",
              "getPausedState()": "1c0de051",
              "getPoolId()": "38fff2d0",
              "getSwapFeePercentage()": "55c67628",
              "getVault()": "8d928af8",
              "increaseApproval(address,uint256)": "d73dd623",
              "name()": "06fdde03",
              "nonces(address)": "7ecebe00",
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "74f3b009",
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "d5c096c4",
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": "6028bfd4",
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": "87ec6817",
              "setPaused(bool)": "16c38b3c",
              "setSwapFeePercentage(uint256)": "38e9922e",
              "symbol()": "95d89b41",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"SwapFeeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapFeePercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onExitPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onJoinPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryExit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryJoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"setSwapFeePercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism. Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the `whenNotPaused` modifier. No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer. Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces and implement the swap callbacks themselves.\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\"},\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares.\"},\"onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].\"},\"queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/BasePool.sol\":\"BasePool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5412,
                "contract": "src.sol/amm/pools/BasePool.sol:BasePool",
                "label": "_balance",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 5418,
                "contract": "src.sol/amm/pools/BasePool.sol:BasePool",
                "label": "_allowance",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
              },
              {
                "astId": 5420,
                "contract": "src.sol/amm/pools/BasePool.sol:BasePool",
                "label": "_totalSupply",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              },
              {
                "astId": 5422,
                "contract": "src.sol/amm/pools/BasePool.sol:BasePool",
                "label": "_name",
                "offset": 0,
                "slot": "3",
                "type": "t_string_storage"
              },
              {
                "astId": 5424,
                "contract": "src.sol/amm/pools/BasePool.sol:BasePool",
                "label": "_symbol",
                "offset": 0,
                "slot": "4",
                "type": "t_string_storage"
              },
              {
                "astId": 5428,
                "contract": "src.sol/amm/pools/BasePool.sol:BasePool",
                "label": "_nonces",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/pools/BasePool.sol:BasePool",
                "label": "_paused",
                "offset": 0,
                "slot": "6",
                "type": "t_bool"
              },
              {
                "astId": 6481,
                "contract": "src.sol/amm/pools/BasePool.sol:BasePool",
                "label": "_swapFeePercentage",
                "offset": 0,
                "slot": "7",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_string_storage": {
                "encoding": "bytes",
                "label": "string",
                "numberOfBytes": "32"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/BasePoolAuthorization.sol": {
        "BasePoolAuthorization": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getOwner",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Base authorization layer implementation for Pools. The owner account can call some of the permissioned functions - access control of the rest is delegated to the Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership, granular roles, etc., could be built on top of this by making the owner a smart contract. Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.",
            "kind": "dev",
            "methods": {
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getOwner()": "893d20e8"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Base authorization layer implementation for Pools. The owner account can call some of the permissioned functions - access control of the rest is delegated to the Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership, granular roles, etc., could be built on top of this by making the owner a smart contract. Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\",\"kind\":\"dev\",\"methods\":{\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/BasePoolAuthorization.sol\":\"BasePoolAuthorization\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/factories/BasePoolFactory.sol": {
        "BasePoolFactory": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "pool",
                  "type": "address"
                }
              ],
              "name": "PoolCreated",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "getVault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "pool",
                  "type": "address"
                }
              ],
              "name": "isPoolFromFactory",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Base contract for Pool factories. Pools are deployed from factories to allow third parties to reason about them. Unknown Pools may have arbitrary logic: being able to assert that a Pool's behavior follows certain rules (those imposed by the contracts created by the factory) is very powerful.",
            "kind": "dev",
            "methods": {
              "getVault()": {
                "details": "Returns the Vault's address."
              },
              "isPoolFromFactory(address)": {
                "details": "Returns true if `pool` was created by this factory."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "getVault()": "8d928af8",
              "isPoolFromFactory(address)": "6634b753"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"PoolCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"isPoolFromFactory\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Base contract for Pool factories. Pools are deployed from factories to allow third parties to reason about them. Unknown Pools may have arbitrary logic: being able to assert that a Pool's behavior follows certain rules (those imposed by the contracts created by the factory) is very powerful.\",\"kind\":\"dev\",\"methods\":{\"getVault()\":{\"details\":\"Returns the Vault's address.\"},\"isPoolFromFactory(address)\":{\"details\":\"Returns true if `pool` was created by this factory.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/factories/BasePoolFactory.sol\":\"BasePoolFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/pools/factories/BasePoolFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../vault/interfaces/IVault.sol\\\";\\nimport \\\"../../vault/interfaces/IBasePool.sol\\\";\\n\\n/**\\n * @dev Base contract for Pool factories.\\n *\\n * Pools are deployed from factories to allow third parties to reason about them. Unknown Pools may have arbitrary\\n * logic: being able to assert that a Pool's behavior follows certain rules (those imposed by the contracts created by\\n * the factory) is very powerful.\\n */\\nabstract contract BasePoolFactory {\\n    IVault private immutable _vault;\\n    mapping(address => bool) private _isPoolFromFactory;\\n\\n    event PoolCreated(address indexed pool);\\n\\n    constructor(IVault vault) {\\n        _vault = vault;\\n    }\\n\\n    /**\\n     * @dev Returns the Vault's address.\\n     */\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    /**\\n     * @dev Returns true if `pool` was created by this factory.\\n     */\\n    function isPoolFromFactory(address pool) external view returns (bool) {\\n        return _isPoolFromFactory[pool];\\n    }\\n\\n    /**\\n     * @dev Registers a new created pool.\\n     *\\n     * Emits a `PoolCreated` event.\\n     */\\n    function _register(address pool) internal {\\n        _isPoolFromFactory[pool] = true;\\n        emit PoolCreated(pool);\\n    }\\n}\\n\",\"keccak256\":\"0xed4f6356224bb6c41649e51d8b6af0f826d487c1ff5380f6d51f128202a3a3cf\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 8042,
                "contract": "src.sol/amm/pools/factories/BasePoolFactory.sol:BasePoolFactory",
                "label": "_isPoolFromFactory",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_bool)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/factories/FactoryWidePauseWindow.sol": {
        "FactoryWidePauseWindow": {
          "abi": [
            {
              "inputs": [],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "inputs": [],
              "name": "getPauseConfiguration",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "pauseWindowDuration",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodDuration",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Utility to create Pool factories for Pools that use the `TemporarilyPausable` contract. By calling `TemporarilyPausable`'s constructor with the result of `getPauseConfiguration`, all Pools created by this factory will share the same Pause Window end time, after which both old and new Pools will not be pausable.",
            "kind": "dev",
            "methods": {
              "getPauseConfiguration()": {
                "details": "Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this factory. `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60a060405234801561001057600080fd5b50426276a7000160805260805160f461003560003980604e52806076525060f46000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80632da47c4014602d575b600080fd5b60336048565b604051603f92919060b0565b60405180910390f35b600080427f000000000000000000000000000000000000000000000000000000000000000081101560a257807f000000000000000000000000000000000000000000000000000000000000000003925062278d00915060ab565b60009250600091505b509091565b91825260208201526040019056fea26469706673582212203f8042b6ed4819c972544ec288fd7d719c5e205218b4d9510287c9129dd9e44f64736f6c63430007010033",
              "opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP TIMESTAMP PUSH3 0x76A700 ADD PUSH1 0x80 MSTORE PUSH1 0x80 MLOAD PUSH1 0xF4 PUSH2 0x35 PUSH1 0x0 CODECOPY DUP1 PUSH1 0x4E MSTORE DUP1 PUSH1 0x76 MSTORE POP PUSH1 0xF4 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2DA47C40 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x48 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3F SWAP3 SWAP2 SWAP1 PUSH1 0xB0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 TIMESTAMP PUSH32 0x0 DUP2 LT ISZERO PUSH1 0xA2 JUMPI DUP1 PUSH32 0x0 SUB SWAP3 POP PUSH3 0x278D00 SWAP2 POP PUSH1 0xAB JUMP JUMPDEST PUSH1 0x0 SWAP3 POP PUSH1 0x0 SWAP2 POP JUMPDEST POP SWAP1 SWAP2 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 EXTCODEHASH DUP1 TIMESTAMP 0xB6 0xED 0x48 NOT 0xC9 PUSH19 0x544EC288FD7D719C5E205218B4D9510287C912 SWAP14 0xD9 0xE4 0x4F PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "1085:1870:32:-:0;;;1601:106;;;;;;;;;-1:-1:-1;1652:15:32;1337:7;1652:48;1625:75;;1085:1870;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "8108": [
                  {
                    "length": 32,
                    "start": 78
                  },
                  {
                    "length": 32,
                    "start": 118
                  }
                ]
              },
              "linkReferences": {},
              "object": "6080604052348015600f57600080fd5b506004361060285760003560e01c80632da47c4014602d575b600080fd5b60336048565b604051603f92919060b0565b60405180910390f35b600080427f000000000000000000000000000000000000000000000000000000000000000081101560a257807f000000000000000000000000000000000000000000000000000000000000000003925062278d00915060ab565b60009250600091505b509091565b91825260208201526040019056fea26469706673582212203f8042b6ed4819c972544ec288fd7d719c5e205218b4d9510287c9129dd9e44f64736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2DA47C40 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x48 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3F SWAP3 SWAP2 SWAP1 PUSH1 0xB0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 TIMESTAMP PUSH32 0x0 DUP2 LT ISZERO PUSH1 0xA2 JUMPI DUP1 PUSH32 0x0 SUB SWAP3 POP PUSH3 0x278D00 SWAP2 POP PUSH1 0xAB JUMP JUMPDEST PUSH1 0x0 SWAP3 POP PUSH1 0x0 SWAP2 POP JUMPDEST POP SWAP1 SWAP2 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 EXTCODEHASH DUP1 TIMESTAMP 0xB6 0xED 0x48 NOT 0xC9 PUSH19 0x544EC288FD7D719C5E205218B4D9510287C912 SWAP14 0xD9 0xE4 0x4F PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "1085:1870:32:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2066:887;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;2120:27;;2211:15;2254:24;2240:38;;2236:711;;;2577:11;2550:24;:38;2528:60;;1401:7;2637:46;;2236:711;;;2897:1;2875:23;;2935:1;2912:24;;2236:711;2066:887;;;:::o;125:333:-1:-;76:37;;;444:2;429:18;;76:37;280:2;265:18;;251:207::o"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "48800",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "getPauseConfiguration()": "infinite"
              }
            },
            "methodIdentifiers": {
              "getPauseConfiguration()": "2da47c40"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"getPauseConfiguration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pauseWindowDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Utility to create Pool factories for Pools that use the `TemporarilyPausable` contract. By calling `TemporarilyPausable`'s constructor with the result of `getPauseConfiguration`, all Pools created by this factory will share the same Pause Window end time, after which both old and new Pools will not be pausable.\",\"kind\":\"dev\",\"methods\":{\"getPauseConfiguration()\":{\"details\":\"Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this factory. `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/factories/FactoryWidePauseWindow.sol\":\"FactoryWidePauseWindow\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/pools/factories/FactoryWidePauseWindow.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @dev Utility to create Pool factories for Pools that use the `TemporarilyPausable` contract.\\n *\\n * By calling `TemporarilyPausable`'s constructor with the result of `getPauseConfiguration`, all Pools created by this\\n * factory will share the same Pause Window end time, after which both old and new Pools will not be pausable.\\n */\\ncontract FactoryWidePauseWindow {\\n    // This contract relies on timestamps in a similar way as `TemporarilyPausable` does - the same caveats apply.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _INITIAL_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _BUFFER_PERIOD_DURATION = 30 days;\\n\\n    // Time when the pause window for all created Pools expires, and the pause window duration of new Pools becomes\\n    // zero.\\n    uint256 private immutable _poolsPauseWindowEndTime;\\n\\n    constructor() {\\n        _poolsPauseWindowEndTime = block.timestamp + _INITIAL_PAUSE_WINDOW_DURATION;\\n    }\\n\\n    /**\\n     * @dev Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this\\n     * factory.\\n     *\\n     * `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and\\n     * `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable.\\n     */\\n    function getPauseConfiguration() public view returns (uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        uint256 currentTime = block.timestamp;\\n        if (currentTime < _poolsPauseWindowEndTime) {\\n            // The buffer period is always the same since its duration is related to how much time is needed to respond\\n            // to a potential emergency. The Pause Window duration however decreases as the end time approaches.\\n\\n            pauseWindowDuration = _poolsPauseWindowEndTime - currentTime; // No need for checked arithmetic.\\n            bufferPeriodDuration = _BUFFER_PERIOD_DURATION;\\n        } else {\\n            // After the end time, newly created Pools have no Pause Window, nor Buffer Period (since they are not\\n            // pausable in the first place).\\n\\n            pauseWindowDuration = 0;\\n            bufferPeriodDuration = 0;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x7d764b70fdb9f4d2b07f2914ff5deec66f1bc193741017afef2fa14be57dc4ef\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/stable/StableMath.sol": {
        "StableMath": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220ffd8da7d4bc8455d88f1e37e083fa8551ef734ea2ff8447c2c130e573eac529564736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x3F DUP1 PUSH1 0x1D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SELFDESTRUCT 0xD8 0xDA PUSH30 0x4BC8455D88F1E37E083FA8551EF734EA2FF8447C2C130E573EAC52956473 PUSH16 0x6C634300070100330000000000000000 ",
              "sourceMap": "994:22764:33:-:0;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "6080604052600080fdfea2646970667358221220ffd8da7d4bc8455d88f1e37e083fa8551ef734ea2ff8447c2c130e573eac529564736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SELFDESTRUCT 0xD8 0xDA PUSH30 0x4BC8455D88F1E37E083FA8551EF734EA2FF8447C2C130E573EAC52956473 PUSH16 0x6C634300070100330000000000000000 ",
              "sourceMap": "994:22764:33:-:0;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "12600",
                "executionCost": "66",
                "totalCost": "12666"
              },
              "internal": {
                "_calcBptInGivenExactTokensOut(uint256,uint256[] memory,uint256[] memory,uint256,uint256)": "infinite",
                "_calcBptOutGivenExactTokensIn(uint256,uint256[] memory,uint256[] memory,uint256,uint256)": "infinite",
                "_calcDueTokenProtocolSwapFeeAmount(uint256,uint256[] memory,uint256,uint256,uint256)": "infinite",
                "_calcInGivenOut(uint256,uint256[] memory,uint256,uint256,uint256)": "infinite",
                "_calcOutGivenIn(uint256,uint256[] memory,uint256,uint256,uint256)": "infinite",
                "_calcTokenInGivenExactBptOut(uint256,uint256[] memory,uint256,uint256,uint256,uint256)": "infinite",
                "_calcTokenOutGivenExactBptIn(uint256,uint256[] memory,uint256,uint256,uint256,uint256)": "infinite",
                "_calcTokensOutGivenExactBptIn(uint256[] memory,uint256,uint256)": "infinite",
                "_calculateInvariant(uint256,uint256[] memory)": "infinite",
                "_getTokenBalanceGivenInvariantAndAllOtherBalances(uint256,uint256[] memory,uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/stable/StableMath.sol\":\"StableMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/pools/stable/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\n\\n// This is a contract to emulate file-level functions. Convert to a library\\n// after the migration to solc v0.7.1.\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable var-name-mixedcase\\n\\ncontract StableMath {\\n    using FixedPoint for uint256;\\n\\n    uint256 internal constant _MIN_AMP = 1e18;\\n    uint256 internal constant _MAX_AMP = 5000 * (1e18);\\n\\n    uint256 internal constant _MAX_STABLE_TOKENS = 5;\\n\\n    // Computes the invariant given the current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calculateInvariant(uint256 amplificationParameter, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256)\\n    {\\n        /**********************************************************************************************\\n        // invariant                                                                                 //\\n        // D = invariant                                                  D^(n+1)                    //\\n        // A = amplification coefficient      A  n^n S + D = A D n^n + -----------                   //\\n        // S = sum of balances                                             n^n P                     //\\n        // P = product of balances                                                                   //\\n        // n = number of tokens                                                                      //\\n        *********x************************************************************************************/\\n\\n        // We round up the invariant.\\n\\n        uint256 sum = 0;\\n        uint256 numTokens = balances.length;\\n        for (uint256 i = 0; i < numTokens; i++) {\\n            sum = sum.add(balances[i]);\\n        }\\n        if (sum == 0) {\\n            return 0;\\n        }\\n        uint256 prevInvariant = 0;\\n        uint256 invariant = sum;\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, numTokens);\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            uint256 P_D = Math.mul(numTokens, balances[0]);\\n            for (uint256 j = 1; j < numTokens; j++) {\\n                P_D = Math.divUp(Math.mul(Math.mul(P_D, balances[j]), numTokens), invariant);\\n            }\\n            prevInvariant = invariant;\\n            invariant = Math.divUp(\\n                Math.mul(Math.mul(numTokens, invariant), invariant).add(Math.mul(Math.mul(ampTimesTotal, sum), P_D)),\\n                Math.mul(numTokens.add(1), invariant).add(Math.mul(ampTimesTotal.sub(1), P_D))\\n            );\\n\\n            if (invariant > prevInvariant) {\\n                if (invariant.sub(prevInvariant) <= 1) {\\n                    break;\\n                }\\n            } else if (prevInvariant.sub(invariant) <= 1) {\\n                break;\\n            }\\n        }\\n        return invariant;\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `tokenAmountIn` are sent, given the current balances.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcOutGivenIn(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountIn\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // outGivenIn token x for y - polynomial equation to solve                                                   //\\n        // ay = amount out to calculate                                                                              //\\n        // by = balance token out                                                                                    //\\n        // y = by - ay (finalBalanceOut)                                                                             //\\n        // D = invariant                                               D                     D^(n+1)                 //\\n        // A = amplification coefficient               y^2 + ( S - ----------  - D) * y -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but y                                                                           //\\n        // P = product of final balances but y                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].add(tokenAmountIn);\\n\\n        uint256 finalBalanceOut = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexOut\\n        );\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].sub(tokenAmountIn);\\n\\n        return balances[tokenIndexOut].sub(finalBalanceOut).sub(1);\\n    }\\n\\n    // Computes how many tokens must be sent to a pool if `tokenAmountOut` are sent given the\\n    // current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcInGivenOut(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountOut\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // inGivenOut token x for y - polynomial equation to solve                                                   //\\n        // ax = amount in to calculate                                                                               //\\n        // bx = balance token in                                                                                     //\\n        // x = bx + ax (finalBalanceIn)                                                                              //\\n        // D = invariant                                                D                     D^(n+1)                //\\n        // A = amplification coefficient               x^2 + ( S - ----------  - D) * x -  ------------- = 0         //\\n        // n = number of tokens                                     (A * n^n)               A * n^2n * P             //\\n        // S = sum of final balances but x                                                                           //\\n        // P = product of final balances but x                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].sub(tokenAmountOut);\\n\\n        uint256 finalBalanceIn = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexIn\\n        );\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].add(tokenAmountOut);\\n\\n        return finalBalanceIn.sub(balances[tokenIndexIn]).add(1);\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountsTokenIn -> amountsInProportional ->\\n    amountsInPercentageExcess -> amountsInAfterFee -> newInvariant -> amountBPTOut\\n    TODO: remove equations below and save them to Notion documentation\\n    amountInPercentageExcess = 1 - amountInProportional/amountIn (if amountIn>amountInProportional)\\n    amountInAfterFee = amountIn * (1 - swapFeePercentage * amountInPercentageExcess)\\n    amountInAfterFee = amountIn - fee amount\\n    fee amount = (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn - (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn * (1 - (1 - amountInProportional/amountIn) * swapFeePercentage)\\n    amountInAfterFee = amountIn * (1 - amountInPercentageExcess * swapFeePercentage)\\n    */\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        // Get current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token, relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsIn.length);\\n        // The weighted sum of token balance ratios without fee\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divDown(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulDown(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Percentage of the amount supplied that will be implicitly swapped for other tokens in the pool\\n            uint256 tokenBalancePercentageExcess;\\n            // Some tokens might have amounts supplied in excess of a 'balanced' join: these are identified if\\n            // the token's balance ratio without fee is larger than the weighted balance ratio, and swap fees are\\n            // charged on the swap amount\\n            if (weightedBalanceRatio >= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = tokenBalanceRatiosWithoutFee[i].sub(weightedBalanceRatio).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].sub(FixedPoint.ONE)\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountInAfterFee = amountsIn[i].mulDown(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].add(amountInAfterFee);\\n        }\\n\\n        // get the new invariant, taking swap fees into account\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTOut\\n        return bptTotalSupply.mulDown(newInvariant.divDown(currentInvariant).sub(FixedPoint.ONE));\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTOut -> newInvariant -> (amountInProportional, amountInAfterFee) ->\\n    amountInPercentageExcess -> amountIn\\n    */\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Token in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // Calculate new invariant\\n        uint256 newInvariant = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountInAfterFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountInAfterFee = newBalanceTokenIndex.sub(balances[tokenIndex]);\\n\\n        // Get tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountInAfterFee.divUp(swapFeeExcess.complement());\\n    }\\n\\n    /*\\n    Flow of calculations:\\n    amountsTokenOut -> amountsOutProportional ->\\n    amountOutPercentageExcess -> amountOutBeforeFee -> newInvariant -> amountBPTIn\\n    */\\n    function _calcBptInGivenExactTokensOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divUp(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulUp(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 tokenBalancePercentageExcess;\\n            // Compare each tokenBalanceRatioWithoutFee to the total weighted ratio (weightedBalanceRatio), and\\n            // decrease the fee by the excess amount\\n            if (weightedBalanceRatio <= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = weightedBalanceRatio.sub(tokenBalanceRatiosWithoutFee[i]).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].complement()\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFee.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountOutBeforeFee = amountsOut[i].divUp(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].sub(amountOutBeforeFee);\\n        }\\n\\n        // get the new invariant, taking into account swap fees\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTIn\\n        return bptTotalSupply.mulUp(newInvariant.divUp(currentInvariant).complement());\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTin -> newInvariant -> (amountOutProportional, amountOutBeforeFee) ->\\n    amountOutPercentageExcess -> amountOut\\n    */\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n        // Calculate the new invariant\\n        uint256 newInvariant = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountOutBeforeFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountOutBeforeFee = balances[tokenIndex].sub(newBalanceTokenIndex);\\n\\n        // Calculate tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountOutBeforeFee.mulDown(swapFeeExcess.complement());\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = tokenAmountOut             /        bptIn         \\\\                                  //\\n        // b = tokenBalance      a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\     bptTotalSupply    /                                 //\\n        // bpt = bptTotalSupply                                                                      //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(bptTotalSupply);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 lastInvariant,\\n        uint256 tokenIndex,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // oneTokenSwapFee - polynomial equation to solve                                                            //\\n        // af = fee amount to calculate in one token                                                                 //\\n        // bf = balance of fee token                                                                                 //\\n        // f = bf - af (finalBalanceFeeToken)                                                                        //\\n        // D = old invariant                                            D                     D^(n+1)                //\\n        // A = amplification coefficient               f^2 + ( S - ----------  - D) * f -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but f                                                                           //\\n        // P = product of final balances but f                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Protocol swap fee amount, so we round down overall.\\n\\n        uint256 finalBalanceFeeToken = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            lastInvariant,\\n            tokenIndex\\n        );\\n\\n        // Result is rounded down\\n        uint256 accumulatedTokenSwapFees = balances[tokenIndex] > finalBalanceFeeToken\\n            ? balances[tokenIndex].sub(finalBalanceFeeToken)\\n            : 0;\\n        return accumulatedTokenSwapFees.mulDown(protocolSwapFeePercentage).divDown(FixedPoint.ONE);\\n    }\\n\\n    // Private functions\\n\\n    // This function calculates the balance of a given token (tokenIndex)\\n    // given all the other balances and the invariant\\n    function _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 invariant,\\n        uint256 tokenIndex\\n    ) private pure returns (uint256) {\\n        // Rounds result up overall\\n\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, balances.length);\\n        uint256 sum = balances[0];\\n        uint256 P_D = Math.mul(balances.length, balances[0]);\\n        for (uint256 j = 1; j < balances.length; j++) {\\n            P_D = Math.divDown(Math.mul(Math.mul(P_D, balances[j]), balances.length), invariant);\\n            sum = sum.add(balances[j]);\\n        }\\n        sum = sum.sub(balances[tokenIndex]);\\n\\n        uint256 c = Math.divUp(Math.mul(invariant, invariant), ampTimesTotal);\\n        // We remove the balance fromm c by multiplying it\\n        c = c.mulUp(balances[tokenIndex]).divUp(P_D);\\n\\n        uint256 b = sum.add(invariant.divDown(ampTimesTotal));\\n\\n        // We iterate to find the balance\\n        uint256 prevTokenBalance = 0;\\n        // We multiply the first iteration outside the loop with the invariant to set the value of the\\n        // initial approximation.\\n        uint256 tokenBalance = invariant.mulUp(invariant).add(c).divUp(invariant.add(b));\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            prevTokenBalance = tokenBalance;\\n\\n            tokenBalance = tokenBalance.mulUp(tokenBalance).add(c).divUp(\\n                Math.mul(tokenBalance, 2).add(b).sub(invariant)\\n            );\\n\\n            if (tokenBalance > prevTokenBalance) {\\n                if (tokenBalance.sub(prevTokenBalance) <= 1) {\\n                    break;\\n                }\\n            } else if (prevTokenBalance.sub(tokenBalance) <= 1) {\\n                break;\\n            }\\n        }\\n        return tokenBalance;\\n    }\\n}\\n\",\"keccak256\":\"0x74dc5f28798be90708c30ce59d65de8a99128e642c1ed554248807ac3aaecae8\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/stable/StablePool.sol": {
        "StablePool": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "contract IVault",
                  "name": "vault",
                  "type": "address"
                },
                {
                  "internalType": "string",
                  "name": "name",
                  "type": "string"
                },
                {
                  "internalType": "string",
                  "name": "symbol",
                  "type": "string"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256",
                  "name": "amplificationParameter",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowDuration",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodDuration",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "SwapFeeChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "DOMAIN_SEPARATOR",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "decimals",
              "outputs": [
                {
                  "internalType": "uint8",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "pure",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "decreaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAmplificationParameter",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getOwner",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPoolId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getRate",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getSwapFeePercentage",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getVault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "increaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "name",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "nonces",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onExitPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onJoinPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "lastChangeBlock",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "from",
                      "type": "address"
                    },
                    {
                      "internalType": "address",
                      "name": "to",
                      "type": "address"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IPoolSwapStructs.SwapRequest",
                  "name": "swapRequest",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "indexIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "indexOut",
                  "type": "uint256"
                }
              ],
              "name": "onSwap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                },
                {
                  "internalType": "uint8",
                  "name": "v",
                  "type": "uint8"
                },
                {
                  "internalType": "bytes32",
                  "name": "r",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "s",
                  "type": "bytes32"
                }
              ],
              "name": "permit",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryExit",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryJoin",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptOut",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "setSwapFeePercentage",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "symbol",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "DOMAIN_SEPARATOR()": {
                "details": "Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}."
              },
              "allowance(address,address)": {
                "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
              },
              "approve(address,uint256)": {
                "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
              },
              "balanceOf(address)": {
                "details": "Returns the amount of tokens owned by `account`."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getRate()": {
                "details": "This function returns the appreciation of one BPT relative to the underlying tokens. This starts at 1 when the pool is created and grows over time"
              },
              "nonces(address)": {
                "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times."
              },
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares."
              },
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares."
              },
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
                "details": "Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]."
              },
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "totalSupply()": {
                "details": "Returns the amount of tokens in existence."
              },
              "transfer(address,uint256)": {
                "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              },
              "transferFrom(address,address,uint256)": {
                "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "6104006040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b5060405162004751380380620047518339810160408190526200005a9162000a52565b6040805180820190915260018152603160f81b6020808301918252336080526001600160601b0319606085901b1660a0528a51908b0190812060c0529151902060e0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6101005288518a918a918a918a91899189918991899189916000918a918a918a918a918a918a918a91849184918a918a91620000fe916003919062000870565b5080516200011490600490602084019062000870565b506200012c9150506276a700831115610194620006b0565b6200014062278d00821115610195620006b0565b429091016101408190520161016052845162000162906002111560c8620006b0565b6200017a60088651111560c9620006b060201b60201c565b6200019085620006c560201b62000cf11760201c565b620001a564e8d4a5100085101560cb620006b0565b620001bd67016345785d8a000085111560ca620006b0565b6040516309b2760f60e01b81526000906001600160a01b038b16906309b2760f90620001ee908c9060040162000bf5565b602060405180830381600087803b1580156200020957600080fd5b505af11580156200021e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000244919062000a39565b9050896001600160a01b03166366a9c7d2828889516001600160401b03811180156200026f57600080fd5b506040519080825280602002602001820160405280156200029a578160200160208202803683370190505b506040518463ffffffff1660e01b8152600401620002bb9392919062000b59565b600060405180830381600087803b158015620002d657600080fd5b505af1158015620002eb573d6000803e3d6000fd5b5050506001600160601b031960608c901b1661018052506101a0819052600785905585516101c05285516200032257600062000339565b856000815181106200033057fe5b60200260200101515b60601b6001600160601b0319166101e05285516001106200035c57600062000373565b856001815181106200036a57fe5b60200260200101515b60601b6001600160601b03191661020052855160021062000396576000620003ad565b85600281518110620003a457fe5b60200260200101515b60601b6001600160601b031916610220528551600310620003d0576000620003e7565b85600381518110620003de57fe5b60200260200101515b60601b6001600160601b0319166102405285516004106200040a57600062000421565b856004815181106200041857fe5b60200260200101515b60601b6001600160601b031916610260528551600510620004445760006200045b565b856005815181106200045257fe5b60200260200101515b60601b6001600160601b0319166102805285516006106200047e57600062000495565b856006815181106200048c57fe5b60200260200101515b60601b6001600160601b0319166102a0528551600710620004b8576000620004cf565b85600781518110620004c657fe5b60200260200101515b60601b6001600160601b0319166102c0528551620004ef57600062000515565b62000515866000815181106200050157fe5b6020026020010151620006d160201b60201c565b6102e05285516001106200052b5760006200053d565b6200053d866001815181106200050157fe5b6103005285516002106200055357600062000565565b62000565866002815181106200050157fe5b6103205285516003106200057b5760006200058d565b6200058d866003815181106200050157fe5b610340528551600410620005a3576000620005b5565b620005b5866004815181106200050157fe5b610360528551600510620005cb576000620005dd565b620005dd866005815181106200050157fe5b610380528551600610620005f357600062000605565b62000605866006815181106200050157fe5b6103a05285516007106200061b5760006200062d565b6200062d866007815181106200050157fe5b6103c0818152505050505050505050505050505050505050505062000666670de0b6b3a764000086101561012c620006b060201b60201c565b6200068169010f0cf064dd5920000086111561012d620006b0565b6200069a60058751111561012f620006b060201b60201c565b5050506103e0919091525062000c539350505050565b81620006c157620006c18162000773565b5050565b80620006c181620007c6565b600080826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200070e57600080fd5b505afa15801562000723573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000749919062000b2f565b60ff1690506000620007686012836200085360201b62000cff1760201c565b600a0a949350505050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b600281511015620007d75762000850565b600081600081518110620007e757fe5b602002602001015190506000600190505b82518110156200084d5760008382815181106200081157fe5b6020026020010151905062000842816001600160a01b0316846001600160a01b0316106065620006b060201b60201c565b9150600101620007f8565b50505b50565b600062000865838311156001620006b0565b508082035b92915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620008b357805160ff1916838001178555620008e3565b82800160010185558215620008e3579182015b82811115620008e3578251825591602001919060010190620008c6565b50620008f1929150620008f5565b5090565b5b80821115620008f15760008155600101620008f6565b80516200086a8162000c3d565b600082601f8301126200092a578081fd5b81516001600160401b0381111562000940578182fd5b60208082026200095282820162000c0a565b838152935081840185830182870184018810156200096f57600080fd5b600092505b848310156200099f5780516200098a8162000c3d565b82526001929092019190830190830162000974565b505050505092915050565b600082601f830112620009bb578081fd5b81516001600160401b03811115620009d1578182fd5b6020620009e7601f8301601f1916820162000c0a565b92508183528481838601011115620009fe57600080fd5b60005b8281101562000a1e57848101820151848201830152810162000a01565b8281111562000a305760008284860101525b50505092915050565b60006020828403121562000a4b578081fd5b5051919050565b60008060008060008060008060006101208a8c03121562000a71578485fd5b62000a7d8b8b6200090c565b60208b01519099506001600160401b038082111562000a9a578687fd5b62000aa88d838e01620009aa565b995060408c015191508082111562000abe578687fd5b62000acc8d838e01620009aa565b985060608c015191508082111562000ae2578687fd5b5062000af18c828d0162000919565b96505060808a0151945060a08a0151935060c08a0151925060e08a0151915062000b208b6101008c016200090c565b90509295985092959850929598565b60006020828403121562000b41578081fd5b815160ff8116811462000b52578182fd5b9392505050565b60006060820185835260206060818501528186518084526080860191508288019350845b8181101562000ba55762000b92855162000c31565b8352938301939183019160010162000b7d565b505084810360408601528551808252908201925081860190845b8181101562000be75762000bd4835162000c31565b8552938301939183019160010162000bbf565b509298975050505050505050565b602081016003831062000c0457fe5b91905290565b6040518181016001600160401b038111828210171562000c2957600080fd5b604052919050565b6001600160a01b031690565b6001600160a01b03811681146200085057600080fd5b60805160a05160601c60c05160e051610100516101205161014051610160516101805160601c6101a0516101c0516101e05160601c6102005160601c6102205160601c6102405160601c6102605160601c6102805160601c6102a05160601c6102c05160601c6102e05161030051610320516103405161036051610380516103a0516103c0516103e0516139b062000da1600039806107c052806107f35280611aef5280611c665280611cea5280611f2852806120375280612497528061255d52806125e3528061263f525080610f94525080610f51525080610f0e525080610ecb525080610e88525080610e45525080610e02525080610db15250505050505050505080610d1752508061066152508061098b5250806111f75250806111d3525080610a5a5250806112fa52508061133c52508061131b5250806109675250806108f152506139b06000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80636daccffa116101045780638d928af8116100a2578063d505accf11610071578063d505accf146103b5578063d5c096c4146103c8578063d73dd623146103db578063dd62ed3e146103ee576101da565b80638d928af81461038a57806395d89b4114610392578063a9059cbb1461039a578063aaabadc5146103ad576101da565b80637ecebe00116100de5780637ecebe001461033c578063851c1bb31461034f57806387ec681714610362578063893d20e814610375576101da565b80636daccffa1461030057806370a082311461030857806374f3b0091461031b576101da565b8063313ce5671161017c57806355c676281161014b57806355c67628146102bc5780636028bfd4146102c457806366188463146102e5578063679aefce146102f8576101da565b8063313ce567146102845780633644e5151461029957806338e9922e146102a157806338fff2d0146102b4576101da565b806316c38b3c116101b857806316c38b3c1461023d57806318160ddd146102525780631c0de0511461025a57806323b872dd14610271576101da565b806301ec954a146101df57806306fdde0314610208578063095ea7b31461021d575b600080fd5b6101f26101ed3660046135c5565b610401565b6040516101ff91906137dd565b60405180910390f35b61021061045e565b6040516101ff9190613883565b61023061022b36600461329e565b6104f5565b6040516101ff91906137ba565b61025061024b366004613394565b61050c565b005b6101f2610520565b610262610526565b6040516101ff939291906137c5565b61023061027f3660046131e9565b61054f565b61028c6105d2565b6040516101ff91906138f7565b6101f26105d7565b6102506102af3660046136e3565b6105e6565b6101f261065f565b6101f2610683565b6102d76102d23660046133cc565b610689565b6040516101ff9291906138d6565b6102306102f336600461329e565b6106c0565b6101f261071a565b6101f26107f1565b6101f2610316366004613195565b610815565b61032e6103293660046133cc565b610830565b6040516101ff92919061378c565b6101f261034a366004613195565b6108d2565b6101f261035d36600461346e565b6108ed565b6102d76103703660046133cc565b61093f565b61037d610965565b6040516101ff9190613778565b61037d610989565b6102106109ad565b6102306103a836600461329e565b610a0e565b61037d610a1b565b6102506103c3366004613229565b610a25565b61032e6103d63660046133cc565b610b6e565b6102306103e936600461329e565b610c90565b6101f26103fc3660046131b1565b610cc6565b60006104158383610410610d15565b610d39565b606061041f610d56565b905060008651600181111561043057fe5b14610447576104428686868685610fd2565b610454565b6104548686868685611047565b9695505050505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ea5780601f106104bf576101008083540402835291602001916104ea565b820191906000526020600020905b8154815290600101906020018083116104cd57829003601f168201915b505050505090505b90565b60006105023384846110ab565b5060015b92915050565b610514611113565b61051d81611141565b50565b60025490565b60008060006105336111b4565b15925061053e6111d1565b91506105486111f5565b9050909192565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261058d9114806105855750838210155b610197611219565b610598858585611227565b336001600160a01b038616148015906105b357506000198114155b156105c5576105c585338584036110ab565b60019150505b9392505050565b601290565b60006105e16112f6565b905090565b6105ee611113565b6105f6611393565b61060964e8d4a5100082101560cb611219565b61061f67016345785d8a000082111560ca611219565b60078190556040517f9cabc14d438714dbcd9292df9b3f89c42f98acd93a675ad72cd6033777e9b8e7906106549083906137dd565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000090565b60075490565b6000606061069f865161069a610d15565b6113a8565b6106b4898989898989896113b56114ba61151b565b97509795505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106106fc576106f7338560006110ab565b610710565b610710338561070b8487610cff565b6110ab565b5060019392505050565b60006060610726610989565b6001600160a01b031663f94d466861073c61065f565b6040518263ffffffff1660e01b815260040161075891906137dd565b60006040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ac91908101906132c9565b509150506107eb6107bb610520565b6107e57f00000000000000000000000000000000000000000000000000000000000000008461163d565b906117b7565b91505090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b031660009081526020819052604090205490565b6060808861085a61083f610989565b6001600160a01b0316336001600160a01b03161460cd611219565b61086f61086561065f565b82146101f4611219565b6060610879610d56565b90506108858882611808565b60006060806108998e8e8e8e8e8e8e6113b5565b9250925092506108a98d8461185c565b6108b382856114ba565b6108bd81856114ba565b909550935050505b5097509795505050505050565b6001600160a01b031660009081526005602052604090205490565b60007f000000000000000000000000000000000000000000000000000000000000000082604051602001610922929190613735565b604051602081830303815290604052805190602001209050919050565b60006060610950865161069a610d15565b6106b4898989898989896118ef61199461151b565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ea5780601f106104bf576101008083540402835291602001916104ea565b6000610502338484611227565b60006105e16119f5565b610a338442111560d1611219565b6001600160a01b0387166000908152600560209081526040808320549051909291610a8a917f0000000000000000000000000000000000000000000000000000000000000000918c918c918c9188918d9101613805565b6040516020818303038152906040528051906020012090506000610aad82611a6f565b9050600060018288888860405160008152602001604052604051610ad49493929190613865565b6020604051602081039080840390855afa158015610af6573d6000803e3d6000fd5b5050604051601f1901519150610b3890506001600160a01b03821615801590610b3057508b6001600160a01b0316826001600160a01b0316145b6101f8611219565b6001600160a01b038b166000908152600560205260409020600185019055610b618b8b8b6110ab565b5050505050505050505050565b60608088610b7d61083f610989565b610b8861086561065f565b6060610b92610d56565b9050610b9c610520565b610c415760006060610bb08d8d8d8a611a8b565b91509150610bc5620f424083101560cc611219565b610bd36000620f4240611b28565b610be28b620f42408403611b28565b610bec8184611994565b80610bf5610d15565b6001600160401b0381118015610c0a57600080fd5b50604051908082528060200260200182016040528015610c34578160200160208202803683370190505b50955095505050506108c5565b610c4b8882611808565b6000606080610c5f8e8e8e8e8e8e8e6118ef565b925092509250610c6f8c84611b28565b610c798285611994565b610c8381856114ba565b90955093506108c5915050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161050291859061070b9086611bbe565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b80610cfb81611bd0565b5050565b6000610d0f838311156001611219565b50900390565b7f000000000000000000000000000000000000000000000000000000000000000090565b610d518184108015610d4a57508183105b6064611219565b505050565b60606000610d62610d15565b90506060816001600160401b0381118015610d7c57600080fd5b50604051908082528060200260200182016040528015610da6578160200160208202803683370190505b5090508115610dee577f000000000000000000000000000000000000000000000000000000000000000081600081518110610ddd57fe5b602002602001018181525050610df7565b91506104f29050565b6001821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600181518110610e2e57fe5b6020026020010181815250506002821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600281518110610e7157fe5b6020026020010181815250506003821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600381518110610eb457fe5b6020026020010181815250506004821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600481518110610ef757fe5b6020026020010181815250506005821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600581518110610f3a57fe5b6020026020010181815250506006821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600681518110610f7d57fe5b6020026020010181815250506007821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600781518110610fc057fe5b60200260200101818152505091505090565b6000610fde8583611808565b610fff8660600151838581518110610ff257fe5b6020026020010151611c49565b6060870152600061101287878787611c55565b90506110318184878151811061102457fe5b6020026020010151611c92565b905061103c81611c9e565b979650505050505050565b60006110568660600151611cb5565b60608701526110658583611808565b6110798660600151838681518110610ff257fe5b6060870152600061108c87878787611cd9565b905061103c8184868151811061109e57fe5b6020026020010151611d16565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906111069085906137dd565b60405180910390a3505050565b600061112a6000356001600160e01b0319166108ed565b905061051d6111398233611d22565b610191611219565b80156111615761115c6111526111d1565b4210610193611219565b611176565b61117661116c6111f5565b42106101a9611219565b6006805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64906106549083906137ba565b60006111be6111f5565b4211806105e157505060065460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b81610cfb57610cfb81611e12565b6001600160a01b03831660009081526020819052604090205461124f82821015610196611219565b6112666001600160a01b0384161515610199611219565b6001600160a01b038085166000908152602081905260408082208585039055918516815220546112969083611bbe565b6001600160a01b0380851660008181526020819052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112e89086906137dd565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611363611e65565b30604051602001611378959493929190613839565b60405160208183030381529060405280519060200120905090565b6113a661139e6111b4565b610192611219565b565b610cfb8183146067611219565b60006060806113c26111b4565b15611446576113d48760085487611e69565b905060005b6113e1610d15565b811015611440576114218282815181106113f757fe5b602002602001015189838151811061140b57fe5b6020026020010151610cff90919063ffffffff16565b88828151811061142d57fe5b60209081029190910101526001016113d9565b50611491565b61144e610d15565b6001600160401b038111801561146357600080fd5b5060405190808252806020026020018201604052801561148d578160200160208202803683370190505b5090505b61149b8785611f72565b90935091506114aa8783611fdc565b6008559750975097945050505050565b60005b6114c5610d15565b811015610d51576114fc8382815181106114db57fe5b60200260200101518383815181106114ef57fe5b602002602001015161205c565b83828151811061150857fe5b60209081029190910101526001016114bd565b3330146115d9576000306001600160a01b031660003660405161153f92919061374d565b6000604051808303816000865af19150503d806000811461157c576040519150601f19603f3d011682016040523d82523d6000602084013e611581565b606091505b50509050806000811461159057fe5b60046000803e6000516001600160e01b0319166343adbafb60e01b81146115bb573d6000803e3d6000fd5b506020600460003e604060205260243d03602460403e601c3d016000f35b60606115e3610d56565b90506115ef8782611808565b600060606116068c8c8c8c8c8c8c8c63ffffffff16565b509150915061161981848663ffffffff16565b8051601f1982018390526343adbafb603f1983015260200260231982016044820181fd5b80516000908190815b8181101561167e5761167485828151811061165d57fe5b602002602001015184611bbe90919063ffffffff16565b9250600101611646565b508161168f57600092505050610506565b6000828161169d888561207c565b905060005b60ff8110156117aa5760006116cb868a6000815181106116be57fe5b602002602001015161207c565b905060015b86811015611704576116fa6116f46116ee848d85815181106116be57fe5b8961207c565b866120a0565b91506001016116d0565b5083945061176461173a61172161171b868b61207c565b8461207c565b61173461172e8a8961207c565b8861207c565b90611bbe565b61175f61175161174b876001610cff565b8561207c565b6117346116ee8b6001611bbe565b6120a0565b93508484111561178a57600161177a8587610cff565b1161178557506117aa565b6117a1565b60016117968686610cff565b116117a157506117aa565b506001016116a2565b5090979650505050505050565b60006117c68215156004611219565b826117d357506000610506565b670de0b6b3a7640000838102906117f6908583816117ed57fe5b04146005611219565b8281816117ff57fe5b04915050610506565b60005b611813610d15565b811015610d515761183d83828151811061182957fe5b60200260200101518383815181106116be57fe5b83828151811061184957fe5b602090810291909101015260010161180b565b6001600160a01b03821660009081526020819052604090205461188482821015610196611219565b6001600160a01b038316600090815260208190526040902082820390556002546118ae9083610cff565b6002556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111069086906137dd565b60006060806118fc611393565b606061190b8860085488611e69565b905060005b611918610d15565b8110156119615761194282828151811061192e57fe5b60200260200101518a838151811061140b57fe5b89828151811061194e57fe5b6020908102919091010152600101611910565b50600060606119708a886120d3565b9150915061197e8a8261212b565b600855909c909b50909950975050505050505050565b60005b61199f610d15565b811015610d51576119d68382815181106119b557fe5b60200260200101518383815181106119c957fe5b60200260200101516120a0565b8382815181106119e257fe5b6020908102919091010152600101611997565b60006119ff610989565b6001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3757600080fd5b505afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e19190613496565b6000611a796112f6565b8260405160200161092292919061375d565b60006060611a97611393565b6000611aa284612196565b9050611abd6000826002811115611ab557fe5b1460ce611219565b6060611ac8856121ac565b9050611ad7815161069a610d15565b611ae881611ae3610d56565b611808565b6000611b147f00000000000000000000000000000000000000000000000000000000000000008361163d565b600881905599919850909650505050505050565b6001600160a01b038216600090815260208190526040902054611b4b9082611bbe565b6001600160a01b038316600090815260208190526040902055600254611b719082611bbe565b6002556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611bb29085906137dd565b60405180910390a35050565b60008282016105cb8482101583611219565b600281511015611bdf5761051d565b600081600081518110611bee57fe5b602002602001015190506000600190505b8251811015610d51576000838281518110611c1657fe5b60200260200101519050611c3f816001600160a01b0316846001600160a01b0316106065611219565b9150600101611bff565b60006105cb838361207c565b6000611c5f611393565b60006104547f00000000000000000000000000000000000000000000000000000000000000008686868a606001516121c2565b60006105cb83836120a0565b6000610506611cae600754612268565b839061228e565b600080611ccd600754846122dc90919063ffffffff16565b90506105cb8382610cff565b6000611ce3611393565b60006104547f00000000000000000000000000000000000000000000000000000000000000008686868a60600151612318565b60006105cb838361205c565b600073ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b611d41610965565b6001600160a01b031614158015611d5c5750611d5c836123a2565b15611d8457611d69610965565b6001600160a01b0316336001600160a01b0316149050610506565b611d8c6119f5565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b8152600401611dbb939291906137e6565b60206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0b91906133b0565b9050610506565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b4690565b606080611e74610d15565b6001600160401b0381118015611e8957600080fd5b50604051908082528060200260200182016040528015611eb3578160200160208202803683370190505b50905082611ec25790506105cb565b60008086600081518110611ed257fe5b602002602001015190506000600190505b611eeb610d15565b811015611f22576000888281518110611f0057fe5b6020026020010151905082811115611f19578193508092505b50600101611ee3565b50611f507f0000000000000000000000000000000000000000000000000000000000000000888885896123bc565b838381518110611f5c57fe5b6020908102919091010152509095945050505050565b600060606000611f8184612196565b90506000816002811115611f9157fe5b1415611fab57611fa18585612418565b9250925050611fd5565b6001816002811115611fb957fe5b1415611fc957611fa185856124ee565b611fa18585612520565b505b9250929050565b6000805b611fe8610d15565b81101561203157612012838281518110611ffe57fe5b602002602001015185838151811061140b57fe5b84828151811061201e57fe5b6020908102919091010152600101611fe0565b506105cb7f00000000000000000000000000000000000000000000000000000000000000008461163d565b600061206b8215156004611219565b81838161207457fe5b049392505050565b60008282026105cb84158061209957508385838161209657fe5b04145b6003611219565b60006120af8215156004611219565b826120bc57506000610506565b8160018403816120c857fe5b046001019050610506565b6000606060006120e284612196565b905060018160028111156120f257fe5b141561210257611fa185856125aa565b600281600281111561211057fe5b141561212057611fa18585612624565b611fd3610136611e12565b6000805b612137610d15565b8110156120315761217783828151811061214d57fe5b602002602001015185838151811061216157fe5b6020026020010151611bbe90919063ffffffff16565b84828151811061218357fe5b602090810291909101015260010161212f565b60008180602001905181019061050691906134b2565b6060818060200190518101906105cb9190613577565b6000806121cf878761163d565b90506121e18387868151811061140b57fe5b8685815181106121ed57fe5b6020026020010181815250506000612207888884896126e5565b90506122198488878151811061216157fe5b87868151811061222557fe5b60200260200101818152505061225c600161173489898151811061224557fe5b602002602001015184610cff90919063ffffffff16565b98975050505050505050565b6000670de0b6b3a76400008210612280576000610506565b50670de0b6b3a76400000390565b600061229d8215156004611219565b826122aa57506000610506565b670de0b6b3a7640000838102906122c4908583816117ed57fe5b8260018203816122d057fe5b04600101915050610506565b60008282026122f684158061209957508385838161209657fe5b80612305576000915050610506565b670de0b6b3a764000060001982016122d0565b600080612325878761163d565b90506123378387878151811061216157fe5b86868151811061234357fe5b602002602001018181525050600061235d888884886126e5565b905061236f8488888151811061140b57fe5b87878151811061237b57fe5b60200260200101818152505061225c600161239c838a898151811061140b57fe5b90610cff565b60006123b4631c74c91760e11b6108ed565b909114919050565b6000806123cb878787876126e5565b90506000818786815181106123dc57fe5b6020026020010151116123f0576000612400565b6124008288878151811061140b57fe5b905061225c670de0b6b3a76400006107e5838761289e565b60006060612424611393565b600061242e610d15565b905060008061243c866128ca565b9150915061244d8382106064611219565b6060836001600160401b038111801561246557600080fd5b5060405190808252806020026020018201604052801561248f578160200160208202803683370190505b5090506124c97f00000000000000000000000000000000000000000000000000000000000000008984866124c1610520565b6007546128ec565b8183815181106124d557fe5b6020908102919091010152919791965090945050505050565b6000606060006124fd846129e4565b90506060612513868361250e610520565b6129fa565b9196919550909350505050565b6000606061252c611393565b6060600061253985612aab565b9150915061254a825161069a610d15565b61255682611ae3610d56565b600061258e7f00000000000000000000000000000000000000000000000000000000000000008885612586610520565b600754612ac3565b905061259e8282111560cf611219565b96919550909350505050565b600060608060006125ba85612aab565b915091506125d06125c9610d15565b83516113a8565b6125dc82611ae3610d56565b60006126147f0000000000000000000000000000000000000000000000000000000000000000888561260c610520565b600754612d59565b905061259e8282101560d0611219565b60006060600080612634856128ca565b9150915060006126717f0000000000000000000000000000000000000000000000000000000000000000888486612669610520565b600754612f96565b9050606061267d610d15565b6001600160401b038111801561269257600080fd5b506040519080825280602002602001820160405280156126bc578160200160208202803683370190505b509050818184815181106126cc57fe5b6020908102919091010152929792965091945050505050565b6000806126f386865161207c565b905060008560008151811061270457fe5b6020026020010151905060006127228751886000815181106116be57fe5b905060015b875181101561276e5761275361274d612746848b85815181106116be57fe5b8a5161207c565b8861205c565b915061276488828151811061165d57fe5b9250600101612727565b5061279587868151811061277e57fe5b602002602001015183610cff90919063ffffffff16565b915060006127ac6127a6888961207c565b856120a0565b90506127de826127d88a89815181106127c157fe5b6020026020010151846122dc90919063ffffffff16565b9061228e565b905060006127f66127ef89876117b7565b8590611bbe565b90506000806128166128088b85611bbe565b6127d8866117348e806122dc565b905060005b60ff81101561288e5781925061284b61283d8c61239c8761173487600261207c565b6127d88761173486806122dc565b9150828211156128705760016128618385610cff565b1161286b5761288e565b612886565b600161287c8484610cff565b116128865761288e565b60010161281b565b509b9a5050505050505050505050565b60008282026128b884158061209957508385838161209657fe5b670de0b6b3a764000090049392505050565b600080828060200190518101906128e19190613541565b909590945092505050565b6000806128f9888861163d565b905060006129158261290f876127d8818b610cff565b906122dc565b90506000805b89518110156129545761294a8a828151811061293357fe5b602002602001015183611bbe90919063ffffffff16565b915060010161291b565b5060006129638b8b858c6126e5565b90506000612977828c8c8151811061140b57fe5b905060006129a1848d8d8151811061298b57fe5b60200260200101516117b790919063ffffffff16565b905060006129ae82612268565b905060006129bc8a836122dc565b90506129d16129ca82612268565b859061289e565b9f9e505050505050505050505050505050565b6000818060200190518101906105cb9190613514565b60606000612a0884846117b7565b9050606085516001600160401b0381118015612a2357600080fd5b50604051908082528060200260200182016040528015612a4d578160200160208202803683370190505b50905060005b8651811015612aa157612a8283888381518110612a6c57fe5b602002602001015161289e90919063ffffffff16565b828281518110612a8e57fe5b6020908102919091010152600101612a53565b5095945050505050565b60606000828060200190518101906128e191906134ce565b600080612ad0878761163d565b90506000805b8751811015612af857612aee88828151811061293357fe5b9150600101612ad6565b50606086516001600160401b0381118015612b1257600080fd5b50604051908082528060200260200182016040528015612b3c578160200160208202803683370190505b5090506000805b8951811015612c03576000612b74858c8481518110612b5e57fe5b602002602001015161228e90919063ffffffff16565b9050612bb08b8381518110612b8557fe5b60200260200101516127d88c8581518110612b9c57fe5b60200260200101518e868151811061140b57fe5b848381518110612bbc57fe5b602002602001018181525050612bf8612bf182868581518110612bdb57fe5b60200260200101516122dc90919063ffffffff16565b8490611bbe565b925050600101612b43565b50606089516001600160401b0381118015612c1d57600080fd5b50604051908082528060200260200182016040528015612c47578160200160208202803683370190505b50905060005b8a51811015612d1e576000848281518110612c6457fe5b60200260200101518411612c7a57506000612cc2565b612cbf612c99868481518110612c8c57fe5b6020026020010151612268565b6127d8878581518110612ca857fe5b602002602001015187610cff90919063ffffffff16565b90505b6000612cce8a836122dc565b90506000612cea612cde83612268565b8e8681518110612b5e57fe5b9050612cfc818f868151811061140b57fe5b858581518110612d0857fe5b6020908102919091010152505050600101612c4d565b506000612d2b8c8361163d565b9050612d49612d42612d3d838961228e565b612268565b8a906122dc565b9c9b505050505050505050505050565b600080612d66878761163d565b90506000805b8751811015612d8e57612d8488828151811061293357fe5b9150600101612d6c565b50606086516001600160401b0381118015612da857600080fd5b50604051908082528060200260200182016040528015612dd2578160200160208202803683370190505b5090506000805b8951811015612e66576000612df4858c848151811061298b57fe5b9050612e308b8381518110612e0557fe5b60200260200101516107e58c8581518110612e1c57fe5b60200260200101518e868151811061216157fe5b848381518110612e3c57fe5b602002602001018181525050612e5b612bf182868581518110612a6c57fe5b925050600101612dd9565b50606089516001600160401b0381118015612e8057600080fd5b50604051908082528060200260200182016040528015612eaa578160200160208202803683370190505b50905060005b8a51811015612f67576000848281518110612ec757fe5b60200260200101518410612edd57506000612f0b565b612f08612ef8670de0b6b3a764000087858151811061140b57fe5b6127d88688868151811061140b57fe5b90505b6000612f178a836122dc565b90506000612f33612f2783612268565b8e8681518110612a6c57fe5b9050612f45818f868151811061216157fe5b858581518110612f5157fe5b6020908102919091010152505050600101612eb0565b506000612f748c8361163d565b9050612d49612f8f670de0b6b3a764000061239c848a6117b7565b8a9061289e565b600080612fa3888861163d565b90506000612fb98261290f876127d8818b611bbe565b90506000805b8951811015612fe157612fd78a828151811061293357fe5b9150600101612fbf565b506000612ff08b8b858c6126e5565b905060006130038b8b8151811061277e57fe5b90506000613017848d8d8151811061298b57fe5b9050600061302482612268565b905060006130328a836122dc565b90506129d161304082612268565b859061228e565b80356105068161394a565b600082601f830112613062578081fd5b81356130756130708261392b565b613905565b81815291506020808301908481018184028601820187101561309657600080fd5b60005b848110156130b557813584529282019290820190600101613099565b505050505092915050565b600082601f8301126130d0578081fd5b81516130de6130708261392b565b8181529150602080830190848101818402860182018710156130ff57600080fd5b60005b848110156130b557815184529282019290820190600101613102565b600082601f83011261312e578081fd5b81356001600160401b03811115613143578182fd5b613156601f8201601f1916602001613905565b915080825283602082850101111561316d57600080fd5b8060208401602084013760009082016020015292915050565b80356002811061050657600080fd5b6000602082840312156131a6578081fd5b81356105cb8161394a565b600080604083850312156131c3578081fd5b82356131ce8161394a565b915060208301356131de8161394a565b809150509250929050565b6000806000606084860312156131fd578081fd5b83356132088161394a565b925060208401356132188161394a565b929592945050506040919091013590565b600080600080600080600060e0888a031215613243578283fd5b873561324e8161394a565b9650602088013561325e8161394a565b95506040880135945060608801359350608088013560ff81168114613281578384fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156132b0578182fd5b82356132bb8161394a565b946020939093013593505050565b6000806000606084860312156132dd578081fd5b83516001600160401b03808211156132f3578283fd5b818601915086601f830112613306578283fd5b81516133146130708261392b565b80828252602080830192508086018b828387028901011115613334578788fd5b8796505b8487101561335f57805161334b8161394a565b845260019690960195928101928101613338565b508901519097509350505080821115613376578283fd5b50613383868287016130c0565b925050604084015190509250925092565b6000602082840312156133a5578081fd5b81356105cb8161395f565b6000602082840312156133c1578081fd5b81516105cb8161395f565b600080600080600080600060e0888a0312156133e6578081fd5b8735965060208801356133f88161394a565b955060408801356134088161394a565b945060608801356001600160401b0380821115613423578283fd5b61342f8b838c01613052565b955060808a0135945060a08a0135935060c08a0135915080821115613452578283fd5b5061345f8a828b0161311e565b91505092959891949750929550565b60006020828403121561347f578081fd5b81356001600160e01b0319811681146105cb578182fd5b6000602082840312156134a7578081fd5b81516105cb8161394a565b6000602082840312156134c3578081fd5b81516105cb8161396d565b6000806000606084860312156134e2578081fd5b83516134ed8161396d565b60208501519093506001600160401b03811115613508578182fd5b613383868287016130c0565b60008060408385031215613526578182fd5b82516135318161396d565b6020939093015192949293505050565b600080600060608486031215613555578081fd5b83516135608161396d565b602085015160409095015190969495509392505050565b60008060408385031215613589578182fd5b82516135948161396d565b60208401519092506001600160401b038111156135af578182fd5b6135bb858286016130c0565b9150509250929050565b600080600080608085870312156135da578182fd5b84356001600160401b03808211156135f0578384fd5b818701915061012080838a031215613606578485fd5b61360f81613905565b905061361b8984613186565b815261362a8960208501613047565b602082015261363c8960408501613047565b6040820152606083013560608201526080830135608082015260a083013560a082015261366c8960c08501613047565b60c082015261367e8960e08501613047565b60e08201526101008084013583811115613696578687fd5b6136a28b82870161311e565b8284015250508096505060208701359150808211156136bf578384fd5b506136cc87828801613052565b949794965050505060408301359260600135919050565b6000602082840312156136f4578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561372a5781518752958201959082019060010161370e565b509495945050505050565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b60006040825261379f60408301856136fb565b82810360208401526137b181856136fb565b95945050505050565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b818110156138af57858101830151858201604001528201613893565b818111156138c05783604083870101525b50601f01601f1916929092016040019392505050565b6000838252604060208301526138ef60408301846136fb565b949350505050565b60ff91909116815260200190565b6040518181016001600160401b038111828210171561392357600080fd5b604052919050565b60006001600160401b03821115613940578081fd5b5060209081020190565b6001600160a01b038116811461051d57600080fd5b801515811461051d57600080fd5b6003811061051d57600080fdfea2646970667358221220e4c2dcbbbbaeef83efa3c36cf243c46f81c40dbaf947020d33a23b2250d100ad64736f6c63430007010033",
              "opcodes": "PUSH2 0x400 PUSH1 0x40 MSTORE PUSH32 0x6E71EDAE12B1B97F4D1F60370FEF10105FA2FAAE0126114A169C64845D6126C9 PUSH2 0x120 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x4751 CODESIZE SUB DUP1 PUSH3 0x4751 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x5A SWAP2 PUSH3 0xA52 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 DUP3 MSTORE CALLER PUSH1 0x80 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP6 SWAP1 SHL AND PUSH1 0xA0 MSTORE DUP11 MLOAD SWAP1 DUP12 ADD SWAP1 DUP2 KECCAK256 PUSH1 0xC0 MSTORE SWAP2 MLOAD SWAP1 KECCAK256 PUSH1 0xE0 MSTORE PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH2 0x100 MSTORE DUP9 MLOAD DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 PUSH1 0x0 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP5 SWAP2 DUP5 SWAP2 DUP11 SWAP2 DUP11 SWAP2 PUSH3 0xFE SWAP2 PUSH1 0x3 SWAP2 SWAP1 PUSH3 0x870 JUMP JUMPDEST POP DUP1 MLOAD PUSH3 0x114 SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0x870 JUMP JUMPDEST POP PUSH3 0x12C SWAP2 POP POP PUSH3 0x76A700 DUP4 GT ISZERO PUSH2 0x194 PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x140 PUSH3 0x278D00 DUP3 GT ISZERO PUSH2 0x195 PUSH3 0x6B0 JUMP JUMPDEST TIMESTAMP SWAP1 SWAP2 ADD PUSH2 0x140 DUP2 SWAP1 MSTORE ADD PUSH2 0x160 MSTORE DUP5 MLOAD PUSH3 0x162 SWAP1 PUSH1 0x2 GT ISZERO PUSH1 0xC8 PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x17A PUSH1 0x8 DUP7 MLOAD GT ISZERO PUSH1 0xC9 PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x190 DUP6 PUSH3 0x6C5 PUSH1 0x20 SHL PUSH3 0xCF1 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x1A5 PUSH5 0xE8D4A51000 DUP6 LT ISZERO PUSH1 0xCB PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x1BD PUSH8 0x16345785D8A0000 DUP6 GT ISZERO PUSH1 0xCA PUSH3 0x6B0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x9B2760F PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND SWAP1 PUSH4 0x9B2760F SWAP1 PUSH3 0x1EE SWAP1 DUP13 SWAP1 PUSH1 0x4 ADD PUSH3 0xBF5 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x209 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x21E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x244 SWAP2 SWAP1 PUSH3 0xA39 JUMP JUMPDEST SWAP1 POP DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x66A9C7D2 DUP3 DUP9 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH3 0x26F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH3 0x29A JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH3 0x2BB SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0xB59 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x2D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x2EB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP13 SWAP1 SHL AND PUSH2 0x180 MSTORE POP PUSH2 0x1A0 DUP2 SWAP1 MSTORE PUSH1 0x7 DUP6 SWAP1 SSTORE DUP6 MLOAD PUSH2 0x1C0 MSTORE DUP6 MLOAD PUSH3 0x322 JUMPI PUSH1 0x0 PUSH3 0x339 JUMP JUMPDEST DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x330 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x1E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x35C JUMPI PUSH1 0x0 PUSH3 0x373 JUMP JUMPDEST DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x36A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x200 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x396 JUMPI PUSH1 0x0 PUSH3 0x3AD JUMP JUMPDEST DUP6 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x3A4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x220 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x3D0 JUMPI PUSH1 0x0 PUSH3 0x3E7 JUMP JUMPDEST DUP6 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x3DE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x240 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x40A JUMPI PUSH1 0x0 PUSH3 0x421 JUMP JUMPDEST DUP6 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x418 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x260 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x444 JUMPI PUSH1 0x0 PUSH3 0x45B JUMP JUMPDEST DUP6 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x452 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x280 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x47E JUMPI PUSH1 0x0 PUSH3 0x495 JUMP JUMPDEST DUP6 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x48C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x4B8 JUMPI PUSH1 0x0 PUSH3 0x4CF JUMP JUMPDEST DUP6 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x4C6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2C0 MSTORE DUP6 MLOAD PUSH3 0x4EF JUMPI PUSH1 0x0 PUSH3 0x515 JUMP JUMPDEST PUSH3 0x515 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH3 0x6D1 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH2 0x2E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x52B JUMPI PUSH1 0x0 PUSH3 0x53D JUMP JUMPDEST PUSH3 0x53D DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x300 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x553 JUMPI PUSH1 0x0 PUSH3 0x565 JUMP JUMPDEST PUSH3 0x565 DUP7 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x320 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x57B JUMPI PUSH1 0x0 PUSH3 0x58D JUMP JUMPDEST PUSH3 0x58D DUP7 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x340 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x5A3 JUMPI PUSH1 0x0 PUSH3 0x5B5 JUMP JUMPDEST PUSH3 0x5B5 DUP7 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x360 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x5CB JUMPI PUSH1 0x0 PUSH3 0x5DD JUMP JUMPDEST PUSH3 0x5DD DUP7 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x380 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x5F3 JUMPI PUSH1 0x0 PUSH3 0x605 JUMP JUMPDEST PUSH3 0x605 DUP7 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x3A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x61B JUMPI PUSH1 0x0 PUSH3 0x62D JUMP JUMPDEST PUSH3 0x62D DUP7 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x3C0 DUP2 DUP2 MSTORE POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP PUSH3 0x666 PUSH8 0xDE0B6B3A7640000 DUP7 LT ISZERO PUSH2 0x12C PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x681 PUSH10 0x10F0CF064DD59200000 DUP7 GT ISZERO PUSH2 0x12D PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x69A PUSH1 0x5 DUP8 MLOAD GT ISZERO PUSH2 0x12F PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST POP POP POP PUSH2 0x3E0 SWAP2 SWAP1 SWAP2 MSTORE POP PUSH3 0xC53 SWAP4 POP POP POP POP JUMP JUMPDEST DUP2 PUSH3 0x6C1 JUMPI PUSH3 0x6C1 DUP2 PUSH3 0x773 JUMP JUMPDEST POP POP JUMP JUMPDEST DUP1 PUSH3 0x6C1 DUP2 PUSH3 0x7C6 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x313CE567 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x70E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH3 0x723 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x749 SWAP2 SWAP1 PUSH3 0xB2F JUMP JUMPDEST PUSH1 0xFF AND SWAP1 POP PUSH1 0x0 PUSH3 0x768 PUSH1 0x12 DUP4 PUSH3 0x853 PUSH1 0x20 SHL PUSH3 0xCFF OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0xA EXP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH3 0x7D7 JUMPI PUSH3 0x850 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x7E7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH3 0x84D JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH3 0x811 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0x842 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH3 0x7F8 JUMP JUMPDEST POP POP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x865 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH3 0x6B0 JUMP JUMPDEST POP DUP1 DUP3 SUB JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0x8B3 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0x8E3 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0x8E3 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0x8E3 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0x8C6 JUMP JUMPDEST POP PUSH3 0x8F1 SWAP3 SWAP2 POP PUSH3 0x8F5 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0x8F1 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0x8F6 JUMP JUMPDEST DUP1 MLOAD PUSH3 0x86A DUP2 PUSH3 0xC3D JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x92A JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0x940 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP1 DUP3 MUL PUSH3 0x952 DUP3 DUP3 ADD PUSH3 0xC0A JUMP JUMPDEST DUP4 DUP2 MSTORE SWAP4 POP DUP2 DUP5 ADD DUP6 DUP4 ADD DUP3 DUP8 ADD DUP5 ADD DUP9 LT ISZERO PUSH3 0x96F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST DUP5 DUP4 LT ISZERO PUSH3 0x99F JUMPI DUP1 MLOAD PUSH3 0x98A DUP2 PUSH3 0xC3D JUMP JUMPDEST DUP3 MSTORE PUSH1 0x1 SWAP3 SWAP1 SWAP3 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 DUP4 ADD PUSH3 0x974 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x9BB JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0x9D1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH3 0x9E7 PUSH1 0x1F DUP4 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH3 0xC0A JUMP JUMPDEST SWAP3 POP DUP2 DUP4 MSTORE DUP5 DUP2 DUP4 DUP7 ADD ADD GT ISZERO PUSH3 0x9FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH3 0xA1E JUMPI DUP5 DUP2 ADD DUP3 ADD MLOAD DUP5 DUP3 ADD DUP4 ADD MSTORE DUP2 ADD PUSH3 0xA01 JUMP JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xA30 JUMPI PUSH1 0x0 DUP3 DUP5 DUP7 ADD ADD MSTORE JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xA4B JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH3 0xA71 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH3 0xA7D DUP12 DUP12 PUSH3 0x90C JUMP JUMPDEST PUSH1 0x20 DUP12 ADD MLOAD SWAP1 SWAP10 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH3 0xA9A JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xAA8 DUP14 DUP4 DUP15 ADD PUSH3 0x9AA JUMP JUMPDEST SWAP10 POP PUSH1 0x40 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xABE JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xACC DUP14 DUP4 DUP15 ADD PUSH3 0x9AA JUMP JUMPDEST SWAP9 POP PUSH1 0x60 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xAE2 JUMPI DUP7 DUP8 REVERT JUMPDEST POP PUSH3 0xAF1 DUP13 DUP3 DUP14 ADD PUSH3 0x919 JUMP JUMPDEST SWAP7 POP POP PUSH1 0x80 DUP11 ADD MLOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD MLOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD MLOAD SWAP3 POP PUSH1 0xE0 DUP11 ADD MLOAD SWAP2 POP PUSH3 0xB20 DUP12 PUSH2 0x100 DUP13 ADD PUSH3 0x90C JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xB41 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH3 0xB52 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 ADD DUP6 DUP4 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP6 ADD MSTORE DUP2 DUP7 MLOAD DUP1 DUP5 MSTORE PUSH1 0x80 DUP7 ADD SWAP2 POP DUP3 DUP9 ADD SWAP4 POP DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xBA5 JUMPI PUSH3 0xB92 DUP6 MLOAD PUSH3 0xC31 JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xB7D JUMP JUMPDEST POP POP DUP5 DUP2 SUB PUSH1 0x40 DUP7 ADD MSTORE DUP6 MLOAD DUP1 DUP3 MSTORE SWAP1 DUP3 ADD SWAP3 POP DUP2 DUP7 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xBE7 JUMPI PUSH3 0xBD4 DUP4 MLOAD PUSH3 0xC31 JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xBBF JUMP JUMPDEST POP SWAP3 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP2 ADD PUSH1 0x3 DUP4 LT PUSH3 0xC04 JUMPI INVALID JUMPDEST SWAP2 SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0xC29 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x850 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x180 MLOAD PUSH1 0x60 SHR PUSH2 0x1A0 MLOAD PUSH2 0x1C0 MLOAD PUSH2 0x1E0 MLOAD PUSH1 0x60 SHR PUSH2 0x200 MLOAD PUSH1 0x60 SHR PUSH2 0x220 MLOAD PUSH1 0x60 SHR PUSH2 0x240 MLOAD PUSH1 0x60 SHR PUSH2 0x260 MLOAD PUSH1 0x60 SHR PUSH2 0x280 MLOAD PUSH1 0x60 SHR PUSH2 0x2A0 MLOAD PUSH1 0x60 SHR PUSH2 0x2C0 MLOAD PUSH1 0x60 SHR PUSH2 0x2E0 MLOAD PUSH2 0x300 MLOAD PUSH2 0x320 MLOAD PUSH2 0x340 MLOAD PUSH2 0x360 MLOAD PUSH2 0x380 MLOAD PUSH2 0x3A0 MLOAD PUSH2 0x3C0 MLOAD PUSH2 0x3E0 MLOAD PUSH2 0x39B0 PUSH3 0xDA1 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x7C0 MSTORE DUP1 PUSH2 0x7F3 MSTORE DUP1 PUSH2 0x1AEF MSTORE DUP1 PUSH2 0x1C66 MSTORE DUP1 PUSH2 0x1CEA MSTORE DUP1 PUSH2 0x1F28 MSTORE DUP1 PUSH2 0x2037 MSTORE DUP1 PUSH2 0x2497 MSTORE DUP1 PUSH2 0x255D MSTORE DUP1 PUSH2 0x25E3 MSTORE DUP1 PUSH2 0x263F MSTORE POP DUP1 PUSH2 0xF94 MSTORE POP DUP1 PUSH2 0xF51 MSTORE POP DUP1 PUSH2 0xF0E MSTORE POP DUP1 PUSH2 0xECB MSTORE POP DUP1 PUSH2 0xE88 MSTORE POP DUP1 PUSH2 0xE45 MSTORE POP DUP1 PUSH2 0xE02 MSTORE POP DUP1 PUSH2 0xDB1 MSTORE POP POP POP POP POP POP POP POP POP DUP1 PUSH2 0xD17 MSTORE POP DUP1 PUSH2 0x661 MSTORE POP DUP1 PUSH2 0x98B MSTORE POP DUP1 PUSH2 0x11F7 MSTORE POP DUP1 PUSH2 0x11D3 MSTORE POP DUP1 PUSH2 0xA5A MSTORE POP DUP1 PUSH2 0x12FA MSTORE POP DUP1 PUSH2 0x133C MSTORE POP DUP1 PUSH2 0x131B MSTORE POP DUP1 PUSH2 0x967 MSTORE POP DUP1 PUSH2 0x8F1 MSTORE POP PUSH2 0x39B0 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1DA JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6DACCFFA GT PUSH2 0x104 JUMPI DUP1 PUSH4 0x8D928AF8 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD505ACCF GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x3B5 JUMPI DUP1 PUSH4 0xD5C096C4 EQ PUSH2 0x3C8 JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x3DB JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x3EE JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x8D928AF8 EQ PUSH2 0x38A JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x392 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x39A JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x3AD JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x7ECEBE00 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x33C JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x34F JUMPI DUP1 PUSH4 0x87EC6817 EQ PUSH2 0x362 JUMPI DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x375 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x6DACCFFA EQ PUSH2 0x300 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x308 JUMPI DUP1 PUSH4 0x74F3B009 EQ PUSH2 0x31B JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x313CE567 GT PUSH2 0x17C JUMPI DUP1 PUSH4 0x55C67628 GT PUSH2 0x14B JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0x2BC JUMPI DUP1 PUSH4 0x6028BFD4 EQ PUSH2 0x2C4 JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x2E5 JUMPI DUP1 PUSH4 0x679AEFCE EQ PUSH2 0x2F8 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x313CE567 EQ PUSH2 0x284 JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x299 JUMPI DUP1 PUSH4 0x38E9922E EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x38FFF2D0 EQ PUSH2 0x2B4 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x16C38B3C GT PUSH2 0x1B8 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x23D JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x252 JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x25A JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x271 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x1EC954A EQ PUSH2 0x1DF JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x208 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x21D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F2 PUSH2 0x1ED CALLDATASIZE PUSH1 0x4 PUSH2 0x35C5 JUMP JUMPDEST PUSH2 0x401 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x210 PUSH2 0x45E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x3883 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x22B CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0x4F5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x37BA JUMP JUMPDEST PUSH2 0x250 PUSH2 0x24B CALLDATASIZE PUSH1 0x4 PUSH2 0x3394 JUMP JUMPDEST PUSH2 0x50C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1F2 PUSH2 0x520 JUMP JUMPDEST PUSH2 0x262 PUSH2 0x526 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x37C5 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x27F CALLDATASIZE PUSH1 0x4 PUSH2 0x31E9 JUMP JUMPDEST PUSH2 0x54F JUMP JUMPDEST PUSH2 0x28C PUSH2 0x5D2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x38F7 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x5D7 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x2AF CALLDATASIZE PUSH1 0x4 PUSH2 0x36E3 JUMP JUMPDEST PUSH2 0x5E6 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x65F JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x683 JUMP JUMPDEST PUSH2 0x2D7 PUSH2 0x2D2 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x689 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP3 SWAP2 SWAP1 PUSH2 0x38D6 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x2F3 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0x6C0 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x71A JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x7F1 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x316 CALLDATASIZE PUSH1 0x4 PUSH2 0x3195 JUMP JUMPDEST PUSH2 0x815 JUMP JUMPDEST PUSH2 0x32E PUSH2 0x329 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x830 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP3 SWAP2 SWAP1 PUSH2 0x378C JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x34A CALLDATASIZE PUSH1 0x4 PUSH2 0x3195 JUMP JUMPDEST PUSH2 0x8D2 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x35D CALLDATASIZE PUSH1 0x4 PUSH2 0x346E JUMP JUMPDEST PUSH2 0x8ED JUMP JUMPDEST PUSH2 0x2D7 PUSH2 0x370 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x93F JUMP JUMPDEST PUSH2 0x37D PUSH2 0x965 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x3778 JUMP JUMPDEST PUSH2 0x37D PUSH2 0x989 JUMP JUMPDEST PUSH2 0x210 PUSH2 0x9AD JUMP JUMPDEST PUSH2 0x230 PUSH2 0x3A8 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0xA0E JUMP JUMPDEST PUSH2 0x37D PUSH2 0xA1B JUMP JUMPDEST PUSH2 0x250 PUSH2 0x3C3 CALLDATASIZE PUSH1 0x4 PUSH2 0x3229 JUMP JUMPDEST PUSH2 0xA25 JUMP JUMPDEST PUSH2 0x32E PUSH2 0x3D6 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0xB6E JUMP JUMPDEST PUSH2 0x230 PUSH2 0x3E9 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0xC90 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x3FC CALLDATASIZE PUSH1 0x4 PUSH2 0x31B1 JUMP JUMPDEST PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x415 DUP4 DUP4 PUSH2 0x410 PUSH2 0xD15 JUMP JUMPDEST PUSH2 0xD39 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x41F PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x430 JUMPI INVALID JUMPDEST EQ PUSH2 0x447 JUMPI PUSH2 0x442 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0xFD2 JUMP JUMPDEST PUSH2 0x454 JUMP JUMPDEST PUSH2 0x454 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0x1047 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4EA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BF JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4EA JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4CD JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x502 CALLER DUP5 DUP5 PUSH2 0x10AB JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x514 PUSH2 0x1113 JUMP JUMPDEST PUSH2 0x51D DUP2 PUSH2 0x1141 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x533 PUSH2 0x11B4 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x53E PUSH2 0x11D1 JUMP JUMPDEST SWAP2 POP PUSH2 0x548 PUSH2 0x11F5 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x58D SWAP2 EQ DUP1 PUSH2 0x585 JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x598 DUP6 DUP6 DUP6 PUSH2 0x1227 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x5B3 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x5C5 JUMPI PUSH2 0x5C5 DUP6 CALLER DUP6 DUP5 SUB PUSH2 0x10AB JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E1 PUSH2 0x12F6 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x5EE PUSH2 0x1113 JUMP JUMPDEST PUSH2 0x5F6 PUSH2 0x1393 JUMP JUMPDEST PUSH2 0x609 PUSH5 0xE8D4A51000 DUP3 LT ISZERO PUSH1 0xCB PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x61F PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH1 0xCA PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x7 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9CABC14D438714DBCD9292DF9B3F89C42F98ACD93A675AD72CD6033777E9B8E7 SWAP1 PUSH2 0x654 SWAP1 DUP4 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x69F DUP7 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x13A8 JUMP JUMPDEST PUSH2 0x6B4 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x13B5 PUSH2 0x14BA PUSH2 0x151B JUMP JUMPDEST SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x6FC JUMPI PUSH2 0x6F7 CALLER DUP6 PUSH1 0x0 PUSH2 0x10AB JUMP JUMPDEST PUSH2 0x710 JUMP JUMPDEST PUSH2 0x710 CALLER DUP6 PUSH2 0x70B DUP5 DUP8 PUSH2 0xCFF JUMP JUMPDEST PUSH2 0x10AB JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x726 PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF94D4668 PUSH2 0x73C PUSH2 0x65F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x758 SWAP2 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x770 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x784 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x7AC SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x32C9 JUMP JUMPDEST POP SWAP2 POP POP PUSH2 0x7EB PUSH2 0x7BB PUSH2 0x520 JUMP JUMPDEST PUSH2 0x7E5 PUSH32 0x0 DUP5 PUSH2 0x163D JUMP JUMPDEST SWAP1 PUSH2 0x17B7 JUMP JUMPDEST SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0x85A PUSH2 0x83F PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH1 0xCD PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x86F PUSH2 0x865 PUSH2 0x65F JUMP JUMPDEST DUP3 EQ PUSH2 0x1F4 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x879 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0x885 DUP9 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x899 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x13B5 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x8A9 DUP14 DUP5 PUSH2 0x185C JUMP JUMPDEST PUSH2 0x8B3 DUP3 DUP6 PUSH2 0x14BA JUMP JUMPDEST PUSH2 0x8BD DUP2 DUP6 PUSH2 0x14BA JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP POP POP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x922 SWAP3 SWAP2 SWAP1 PUSH2 0x3735 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x950 DUP7 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x6B4 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x18EF PUSH2 0x1994 PUSH2 0x151B JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4EA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BF JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4EA JUMP JUMPDEST PUSH1 0x0 PUSH2 0x502 CALLER DUP5 DUP5 PUSH2 0x1227 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E1 PUSH2 0x19F5 JUMP JUMPDEST PUSH2 0xA33 DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD SWAP1 MLOAD SWAP1 SWAP3 SWAP2 PUSH2 0xA8A SWAP2 PUSH32 0x0 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP9 SWAP2 DUP14 SWAP2 ADD PUSH2 0x3805 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0xAAD DUP3 PUSH2 0x1A6F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xAD4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3865 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAF6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0xB38 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xB30 JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0xB61 DUP12 DUP12 DUP12 PUSH2 0x10AB JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0xB7D PUSH2 0x83F PUSH2 0x989 JUMP JUMPDEST PUSH2 0xB88 PUSH2 0x865 PUSH2 0x65F JUMP JUMPDEST PUSH1 0x60 PUSH2 0xB92 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0xB9C PUSH2 0x520 JUMP JUMPDEST PUSH2 0xC41 JUMPI PUSH1 0x0 PUSH1 0x60 PUSH2 0xBB0 DUP14 DUP14 DUP14 DUP11 PUSH2 0x1A8B JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xBC5 PUSH3 0xF4240 DUP4 LT ISZERO PUSH1 0xCC PUSH2 0x1219 JUMP JUMPDEST PUSH2 0xBD3 PUSH1 0x0 PUSH3 0xF4240 PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xBE2 DUP12 PUSH3 0xF4240 DUP5 SUB PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xBEC DUP2 DUP5 PUSH2 0x1994 JUMP JUMPDEST DUP1 PUSH2 0xBF5 PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xC0A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xC34 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0x8C5 JUMP JUMPDEST PUSH2 0xC4B DUP9 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0xC5F DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x18EF JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xC6F DUP13 DUP5 PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xC79 DUP3 DUP6 PUSH2 0x1994 JUMP JUMPDEST PUSH2 0xC83 DUP2 DUP6 PUSH2 0x14BA JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP PUSH2 0x8C5 SWAP2 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x502 SWAP2 DUP6 SWAP1 PUSH2 0x70B SWAP1 DUP7 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST DUP1 PUSH2 0xCFB DUP2 PUSH2 0x1BD0 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xD0F DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x1219 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0xD51 DUP2 DUP5 LT DUP1 ISZERO PUSH2 0xD4A JUMPI POP DUP2 DUP4 LT JUMPDEST PUSH1 0x64 PUSH2 0x1219 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0xD62 PUSH2 0xD15 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xD7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xDA6 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0xDDD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0xDF7 JUMP JUMPDEST SWAP2 POP PUSH2 0x4F2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0xE2E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0xE71 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0xEB4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0xEF7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0xF3A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0xF7D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0xFC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xFDE DUP6 DUP4 PUSH2 0x1808 JUMP JUMPDEST PUSH2 0xFFF DUP7 PUSH1 0x60 ADD MLOAD DUP4 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0xFF2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1C49 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x1012 DUP8 DUP8 DUP8 DUP8 PUSH2 0x1C55 JUMP JUMPDEST SWAP1 POP PUSH2 0x1031 DUP2 DUP5 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x1024 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1C92 JUMP JUMPDEST SWAP1 POP PUSH2 0x103C DUP2 PUSH2 0x1C9E JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1056 DUP7 PUSH1 0x60 ADD MLOAD PUSH2 0x1CB5 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x1065 DUP6 DUP4 PUSH2 0x1808 JUMP JUMPDEST PUSH2 0x1079 DUP7 PUSH1 0x60 ADD MLOAD DUP4 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0xFF2 JUMPI INVALID JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x108C DUP8 DUP8 DUP8 DUP8 PUSH2 0x1CD9 JUMP JUMPDEST SWAP1 POP PUSH2 0x103C DUP2 DUP5 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x109E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1D16 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP5 SWAP1 SSTORE MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0x1106 SWAP1 DUP6 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x112A PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x8ED JUMP JUMPDEST SWAP1 POP PUSH2 0x51D PUSH2 0x1139 DUP3 CALLER PUSH2 0x1D22 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x1219 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x1161 JUMPI PUSH2 0x115C PUSH2 0x1152 PUSH2 0x11D1 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x1176 JUMP JUMPDEST PUSH2 0x1176 PUSH2 0x116C PUSH2 0x11F5 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x654 SWAP1 DUP4 SWAP1 PUSH2 0x37BA JUMP JUMPDEST PUSH1 0x0 PUSH2 0x11BE PUSH2 0x11F5 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x5E1 JUMPI POP POP PUSH1 0x6 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST DUP2 PUSH2 0xCFB JUMPI PUSH2 0xCFB DUP2 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x124F DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x1266 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x1296 SWAP1 DUP4 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP7 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x12E8 SWAP1 DUP7 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x1363 PUSH2 0x1E65 JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1378 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3839 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x13A6 PUSH2 0x139E PUSH2 0x11B4 JUMP JUMPDEST PUSH2 0x192 PUSH2 0x1219 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0xCFB DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x13C2 PUSH2 0x11B4 JUMP JUMPDEST ISZERO PUSH2 0x1446 JUMPI PUSH2 0x13D4 DUP8 PUSH1 0x8 SLOAD DUP8 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH2 0x13E1 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1440 JUMPI PUSH2 0x1421 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x13F7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x142D JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x13D9 JUMP JUMPDEST POP PUSH2 0x1491 JUMP JUMPDEST PUSH2 0x144E PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1463 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x148D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP JUMPDEST PUSH2 0x149B DUP8 DUP6 PUSH2 0x1F72 JUMP JUMPDEST SWAP1 SWAP4 POP SWAP2 POP PUSH2 0x14AA DUP8 DUP4 PUSH2 0x1FDC JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x14C5 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x14FC DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x14DB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x14EF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x205C JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1508 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x14BD JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x15D9 JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x153F SWAP3 SWAP2 SWAP1 PUSH2 0x374D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x157C JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1581 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1590 JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x43ADBAFB PUSH1 0xE0 SHL DUP2 EQ PUSH2 0x15BB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x4 PUSH1 0x0 RETURNDATACOPY PUSH1 0x40 PUSH1 0x20 MSTORE PUSH1 0x24 RETURNDATASIZE SUB PUSH1 0x24 PUSH1 0x40 RETURNDATACOPY PUSH1 0x1C RETURNDATASIZE ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x15E3 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0x15EF DUP8 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1606 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x1619 DUP2 DUP5 DUP7 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP1 MLOAD PUSH1 0x1F NOT DUP3 ADD DUP4 SWAP1 MSTORE PUSH4 0x43ADBAFB PUSH1 0x3F NOT DUP4 ADD MSTORE PUSH1 0x20 MUL PUSH1 0x23 NOT DUP3 ADD PUSH1 0x44 DUP3 ADD DUP2 REVERT JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x167E JUMPI PUSH2 0x1674 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x165D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x1646 JUMP JUMPDEST POP DUP2 PUSH2 0x168F JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 PUSH2 0x169D DUP9 DUP6 PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x17AA JUMPI PUSH1 0x0 PUSH2 0x16CB DUP7 DUP11 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x1704 JUMPI PUSH2 0x16FA PUSH2 0x16F4 PUSH2 0x16EE DUP5 DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP10 PUSH2 0x207C JUMP JUMPDEST DUP7 PUSH2 0x20A0 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x16D0 JUMP JUMPDEST POP DUP4 SWAP5 POP PUSH2 0x1764 PUSH2 0x173A PUSH2 0x1721 PUSH2 0x171B DUP7 DUP12 PUSH2 0x207C JUMP JUMPDEST DUP5 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x1734 PUSH2 0x172E DUP11 DUP10 PUSH2 0x207C JUMP JUMPDEST DUP9 PUSH2 0x207C JUMP JUMPDEST SWAP1 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x175F PUSH2 0x1751 PUSH2 0x174B DUP8 PUSH1 0x1 PUSH2 0xCFF JUMP JUMPDEST DUP6 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x1734 PUSH2 0x16EE DUP12 PUSH1 0x1 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x20A0 JUMP JUMPDEST SWAP4 POP DUP5 DUP5 GT ISZERO PUSH2 0x178A JUMPI PUSH1 0x1 PUSH2 0x177A DUP6 DUP8 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x1785 JUMPI POP PUSH2 0x17AA JUMP JUMPDEST PUSH2 0x17A1 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x1796 DUP7 DUP7 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x17A1 JUMPI POP PUSH2 0x17AA JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x16A2 JUMP JUMPDEST POP SWAP1 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x17C6 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x17D3 JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x17F6 SWAP1 DUP6 DUP4 DUP2 PUSH2 0x17ED JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0x1219 JUMP JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x17FF JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x1813 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x183D DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1829 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1849 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x180B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x1884 DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP3 DUP3 SUB SWAP1 SSTORE PUSH1 0x2 SLOAD PUSH2 0x18AE SWAP1 DUP4 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1106 SWAP1 DUP7 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x18FC PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x190B DUP9 PUSH1 0x8 SLOAD DUP9 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH2 0x1918 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1961 JUMPI PUSH2 0x1942 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x192E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP11 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x194E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1910 JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 PUSH2 0x1970 DUP11 DUP9 PUSH2 0x20D3 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x197E DUP11 DUP3 PUSH2 0x212B JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP1 SWAP13 SWAP1 SWAP12 POP SWAP1 SWAP10 POP SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x199F PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x19D6 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x19B5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x19C9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x20A0 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x19E2 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1997 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19FF PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1A37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1A4B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x5E1 SWAP2 SWAP1 PUSH2 0x3496 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1A79 PUSH2 0x12F6 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x922 SWAP3 SWAP2 SWAP1 PUSH2 0x375D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1A97 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1AA2 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH2 0x1ABD PUSH1 0x0 DUP3 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1AB5 JUMPI INVALID JUMPDEST EQ PUSH1 0xCE PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1AC8 DUP6 PUSH2 0x21AC JUMP JUMPDEST SWAP1 POP PUSH2 0x1AD7 DUP2 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x1AE8 DUP2 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B14 PUSH32 0x0 DUP4 PUSH2 0x163D JUMP JUMPDEST PUSH1 0x8 DUP2 SWAP1 SSTORE SWAP10 SWAP2 SWAP9 POP SWAP1 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x1B4B SWAP1 DUP3 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x2 SLOAD PUSH2 0x1B71 SWAP1 DUP3 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1BB2 SWAP1 DUP6 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x5CB DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH2 0x1BDF JUMPI PUSH2 0x51D JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1BEE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1C16 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x1C3F DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH2 0x1219 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x1BFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x207C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C5F PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x454 PUSH32 0x0 DUP7 DUP7 DUP7 DUP11 PUSH1 0x60 ADD MLOAD PUSH2 0x21C2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x20A0 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x506 PUSH2 0x1CAE PUSH1 0x7 SLOAD PUSH2 0x2268 JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x228E JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1CCD PUSH1 0x7 SLOAD DUP5 PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x5CB DUP4 DUP3 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1CE3 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x454 PUSH32 0x0 DUP7 DUP7 DUP7 DUP11 PUSH1 0x60 ADD MLOAD PUSH2 0x2318 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x205C JUMP JUMPDEST PUSH1 0x0 PUSH20 0xBA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1B PUSH2 0x1D41 PUSH2 0x965 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x1D5C JUMPI POP PUSH2 0x1D5C DUP4 PUSH2 0x23A2 JUMP JUMPDEST ISZERO PUSH2 0x1D84 JUMPI PUSH2 0x1D69 PUSH2 0x965 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH2 0x1D8C PUSH2 0x19F5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1DBB SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x37E6 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1DD3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1DE7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1E0B SWAP2 SWAP1 PUSH2 0x33B0 JUMP JUMPDEST SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x1E74 PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1E89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1EB3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP3 PUSH2 0x1EC2 JUMPI SWAP1 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 DUP1 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1ED2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST PUSH2 0x1EEB PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1F22 JUMPI PUSH1 0x0 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1F00 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP DUP3 DUP2 GT ISZERO PUSH2 0x1F19 JUMPI DUP2 SWAP4 POP DUP1 SWAP3 POP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1EE3 JUMP JUMPDEST POP PUSH2 0x1F50 PUSH32 0x0 DUP9 DUP9 DUP6 DUP10 PUSH2 0x23BC JUMP JUMPDEST DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F5C JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP SWAP1 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x1F81 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1F91 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1FAB JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2418 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x1FD5 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1FB9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1FC9 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x24EE JUMP JUMPDEST PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2520 JUMP JUMPDEST POP JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH2 0x1FE8 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x2031 JUMPI PUSH2 0x2012 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1FFE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x201E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1FE0 JUMP JUMPDEST POP PUSH2 0x5CB PUSH32 0x0 DUP5 PUSH2 0x163D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x206B DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x2074 JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x5CB DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x20AF DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x20BC JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x20C8 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x20E2 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x20F2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2102 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x25AA JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2110 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2120 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2624 JUMP JUMPDEST PUSH2 0x1FD3 PUSH2 0x136 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH2 0x2137 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x2031 JUMPI PUSH2 0x2177 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x214D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2183 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x212F JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x506 SWAP2 SWAP1 PUSH2 0x34B2 JUMP JUMPDEST PUSH1 0x60 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5CB SWAP2 SWAP1 PUSH2 0x3577 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x21CF DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x21E1 DUP4 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x21ED JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x2207 DUP9 DUP9 DUP5 DUP10 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH2 0x2219 DUP5 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2225 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x225C PUSH1 0x1 PUSH2 0x1734 DUP10 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x2245 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 DUP3 LT PUSH2 0x2280 JUMPI PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x229D DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x22AA JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x22C4 SWAP1 DUP6 DUP4 DUP2 PUSH2 0x17ED JUMPI INVALID JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x22D0 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x22F6 DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST DUP1 PUSH2 0x2305 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD PUSH2 0x22D0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2325 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2337 DUP4 DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP7 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2343 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x235D DUP9 DUP9 DUP5 DUP9 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH2 0x236F DUP5 DUP9 DUP9 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x237B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x225C PUSH1 0x1 PUSH2 0x239C DUP4 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x23B4 PUSH4 0x1C74C917 PUSH1 0xE1 SHL PUSH2 0x8ED JUMP JUMPDEST SWAP1 SWAP2 EQ SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x23CB DUP8 DUP8 DUP8 DUP8 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x23DC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD GT PUSH2 0x23F0 JUMPI PUSH1 0x0 PUSH2 0x2400 JUMP JUMPDEST PUSH2 0x2400 DUP3 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x225C PUSH8 0xDE0B6B3A7640000 PUSH2 0x7E5 DUP4 DUP8 PUSH2 0x289E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2424 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x242E PUSH2 0xD15 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x243C DUP7 PUSH2 0x28CA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x244D DUP4 DUP3 LT PUSH1 0x64 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2465 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x248F JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x24C9 PUSH32 0x0 DUP10 DUP5 DUP7 PUSH2 0x24C1 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x28EC JUMP JUMPDEST DUP2 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x24D5 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP2 SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x24FD DUP5 PUSH2 0x29E4 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x2513 DUP7 DUP4 PUSH2 0x250E PUSH2 0x520 JUMP JUMPDEST PUSH2 0x29FA JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x252C PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2539 DUP6 PUSH2 0x2AAB JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x254A DUP3 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x2556 DUP3 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x258E PUSH32 0x0 DUP9 DUP6 PUSH2 0x2586 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2AC3 JUMP JUMPDEST SWAP1 POP PUSH2 0x259E DUP3 DUP3 GT ISZERO PUSH1 0xCF PUSH2 0x1219 JUMP JUMPDEST SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x25BA DUP6 PUSH2 0x2AAB JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x25D0 PUSH2 0x25C9 PUSH2 0xD15 JUMP JUMPDEST DUP4 MLOAD PUSH2 0x13A8 JUMP JUMPDEST PUSH2 0x25DC DUP3 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2614 PUSH32 0x0 DUP9 DUP6 PUSH2 0x260C PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2D59 JUMP JUMPDEST SWAP1 POP PUSH2 0x259E DUP3 DUP3 LT ISZERO PUSH1 0xD0 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0x2634 DUP6 PUSH2 0x28CA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH2 0x2671 PUSH32 0x0 DUP9 DUP5 DUP7 PUSH2 0x2669 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2F96 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x267D PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2692 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x26BC JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 DUP2 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x26CC JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP8 SWAP3 SWAP7 POP SWAP2 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x26F3 DUP7 DUP7 MLOAD PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x2704 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH2 0x2722 DUP8 MLOAD DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x276E JUMPI PUSH2 0x2753 PUSH2 0x274D PUSH2 0x2746 DUP5 DUP12 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP11 MLOAD PUSH2 0x207C JUMP JUMPDEST DUP9 PUSH2 0x205C JUMP JUMPDEST SWAP2 POP PUSH2 0x2764 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x165D JUMPI INVALID JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x2727 JUMP JUMPDEST POP PUSH2 0x2795 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x277E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x27AC PUSH2 0x27A6 DUP9 DUP10 PUSH2 0x207C JUMP JUMPDEST DUP6 PUSH2 0x20A0 JUMP JUMPDEST SWAP1 POP PUSH2 0x27DE DUP3 PUSH2 0x27D8 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x27C1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 PUSH2 0x228E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x27F6 PUSH2 0x27EF DUP10 DUP8 PUSH2 0x17B7 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x1BBE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x2816 PUSH2 0x2808 DUP12 DUP6 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x27D8 DUP7 PUSH2 0x1734 DUP15 DUP1 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x288E JUMPI DUP2 SWAP3 POP PUSH2 0x284B PUSH2 0x283D DUP13 PUSH2 0x239C DUP8 PUSH2 0x1734 DUP8 PUSH1 0x2 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x27D8 DUP8 PUSH2 0x1734 DUP7 DUP1 PUSH2 0x22DC JUMP JUMPDEST SWAP2 POP DUP3 DUP3 GT ISZERO PUSH2 0x2870 JUMPI PUSH1 0x1 PUSH2 0x2861 DUP4 DUP6 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x286B JUMPI PUSH2 0x288E JUMP JUMPDEST PUSH2 0x2886 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x287C DUP5 DUP5 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x2886 JUMPI PUSH2 0x288E JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x281B JUMP JUMPDEST POP SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x28B8 DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x28E1 SWAP2 SWAP1 PUSH2 0x3541 JUMP JUMPDEST SWAP1 SWAP6 SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x28F9 DUP9 DUP9 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2915 DUP3 PUSH2 0x290F DUP8 PUSH2 0x27D8 DUP2 DUP12 PUSH2 0xCFF JUMP JUMPDEST SWAP1 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2954 JUMPI PUSH2 0x294A DUP11 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x291B JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2963 DUP12 DUP12 DUP6 DUP13 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2977 DUP3 DUP13 DUP13 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29A1 DUP5 DUP14 DUP14 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x17B7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29AE DUP3 PUSH2 0x2268 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29BC DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH2 0x29D1 PUSH2 0x29CA DUP3 PUSH2 0x2268 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x289E JUMP JUMPDEST SWAP16 SWAP15 POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5CB SWAP2 SWAP1 PUSH2 0x3514 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2A08 DUP5 DUP5 PUSH2 0x17B7 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2A23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2A4D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0x2AA1 JUMPI PUSH2 0x2A82 DUP4 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x289E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2A8E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x2A53 JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x28E1 SWAP2 SWAP1 PUSH2 0x34CE JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2AD0 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x2AF8 JUMPI PUSH2 0x2AEE DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2AD6 JUMP JUMPDEST POP PUSH1 0x60 DUP7 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2B12 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2B3C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2C03 JUMPI PUSH1 0x0 PUSH2 0x2B74 DUP6 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2B5E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x228E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x2BB0 DUP12 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2B85 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x27D8 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2B9C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2BBC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2BF8 PUSH2 0x2BF1 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2BDB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x1BBE JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x2B43 JUMP JUMPDEST POP PUSH1 0x60 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2C1D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2C47 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP11 MLOAD DUP2 LT ISZERO PUSH2 0x2D1E JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2C64 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 GT PUSH2 0x2C7A JUMPI POP PUSH1 0x0 PUSH2 0x2CC2 JUMP JUMPDEST PUSH2 0x2CBF PUSH2 0x2C99 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2C8C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2268 JUMP JUMPDEST PUSH2 0x27D8 DUP8 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2CA8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x2CCE DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2CEA PUSH2 0x2CDE DUP4 PUSH2 0x2268 JUMP JUMPDEST DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2B5E JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2CFC DUP2 DUP16 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2D08 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP POP POP PUSH1 0x1 ADD PUSH2 0x2C4D JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2D2B DUP13 DUP4 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2D49 PUSH2 0x2D42 PUSH2 0x2D3D DUP4 DUP10 PUSH2 0x228E JUMP JUMPDEST PUSH2 0x2268 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x22DC JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2D66 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x2D8E JUMPI PUSH2 0x2D84 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2D6C JUMP JUMPDEST POP PUSH1 0x60 DUP7 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2DA8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2DD2 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2E66 JUMPI PUSH1 0x0 PUSH2 0x2DF4 DUP6 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2E30 DUP12 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2E05 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x7E5 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2E1C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2E3C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2E5B PUSH2 0x2BF1 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x2DD9 JUMP JUMPDEST POP PUSH1 0x60 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2E80 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2EAA JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP11 MLOAD DUP2 LT ISZERO PUSH2 0x2F67 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2EC7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 LT PUSH2 0x2EDD JUMPI POP PUSH1 0x0 PUSH2 0x2F0B JUMP JUMPDEST PUSH2 0x2F08 PUSH2 0x2EF8 PUSH8 0xDE0B6B3A7640000 DUP8 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST PUSH2 0x27D8 DUP7 DUP9 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x2F17 DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F33 PUSH2 0x2F27 DUP4 PUSH2 0x2268 JUMP JUMPDEST DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2F45 DUP2 DUP16 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2F51 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP POP POP PUSH1 0x1 ADD PUSH2 0x2EB0 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2F74 DUP13 DUP4 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2D49 PUSH2 0x2F8F PUSH8 0xDE0B6B3A7640000 PUSH2 0x239C DUP5 DUP11 PUSH2 0x17B7 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x289E JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2FA3 DUP9 DUP9 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2FB9 DUP3 PUSH2 0x290F DUP8 PUSH2 0x27D8 DUP2 DUP12 PUSH2 0x1BBE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2FE1 JUMPI PUSH2 0x2FD7 DUP11 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2FBF JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2FF0 DUP12 DUP12 DUP6 DUP13 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3003 DUP12 DUP12 DUP2 MLOAD DUP2 LT PUSH2 0x277E JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3017 DUP5 DUP14 DUP14 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3024 DUP3 PUSH2 0x2268 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3032 DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH2 0x29D1 PUSH2 0x3040 DUP3 PUSH2 0x2268 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x228E JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x506 DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3062 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x3075 PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST PUSH2 0x3905 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x3096 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x30B5 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3099 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x30D0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x30DE PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x30FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x30B5 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3102 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x312E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3143 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3156 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x3905 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x316D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x506 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x31A6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5CB DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x31C3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x31CE DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x31DE DUP2 PUSH2 0x394A JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x31FD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x3208 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x3218 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3243 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH2 0x324E DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x325E DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x3281 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP7 SWAP10 SWAP6 SWAP9 POP SWAP4 SWAP7 SWAP3 SWAP6 SWAP5 PUSH1 0xA0 DUP5 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 SWAP1 SWAP4 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x32B0 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x32BB DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x32DD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x32F3 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3306 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x3314 PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x3334 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x335F JUMPI DUP1 MLOAD PUSH2 0x334B DUP2 PUSH2 0x394A JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x3338 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x3376 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x3383 DUP7 DUP3 DUP8 ADD PUSH2 0x30C0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33A5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5CB DUP2 PUSH2 0x395F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33C1 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x395F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x33E6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP8 CALLDATALOAD SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x33F8 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD PUSH2 0x3408 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x3423 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x342F DUP12 DUP4 DUP13 ADD PUSH2 0x3052 JUMP JUMPDEST SWAP6 POP PUSH1 0x80 DUP11 ADD CALLDATALOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD CALLDATALOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3452 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x345F DUP11 DUP3 DUP12 ADD PUSH2 0x311E JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x347F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x5CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34A7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34C3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x34E2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x34ED DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3508 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3383 DUP7 DUP3 DUP8 ADD PUSH2 0x30C0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3526 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x3531 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x3555 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x3560 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD PUSH1 0x40 SWAP1 SWAP6 ADD MLOAD SWAP1 SWAP7 SWAP5 SWAP6 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3589 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x3594 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x35AF JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x35BB DUP6 DUP3 DUP7 ADD PUSH2 0x30C0 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x35DA JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x35F0 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP8 ADD SWAP2 POP PUSH2 0x120 DUP1 DUP4 DUP11 SUB SLT ISZERO PUSH2 0x3606 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x360F DUP2 PUSH2 0x3905 JUMP JUMPDEST SWAP1 POP PUSH2 0x361B DUP10 DUP5 PUSH2 0x3186 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x362A DUP10 PUSH1 0x20 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x363C DUP10 PUSH1 0x40 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x366C DUP10 PUSH1 0xC0 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x367E DUP10 PUSH1 0xE0 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 DUP1 DUP5 ADD CALLDATALOAD DUP4 DUP2 GT ISZERO PUSH2 0x3696 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH2 0x36A2 DUP12 DUP3 DUP8 ADD PUSH2 0x311E JUMP JUMPDEST DUP3 DUP5 ADD MSTORE POP POP DUP1 SWAP7 POP POP PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x36BF JUMPI DUP4 DUP5 REVERT JUMPDEST POP PUSH2 0x36CC DUP8 DUP3 DUP9 ADD PUSH2 0x3052 JUMP JUMPDEST SWAP5 SWAP8 SWAP5 SWAP7 POP POP POP POP PUSH1 0x40 DUP4 ADD CALLDATALOAD SWAP3 PUSH1 0x60 ADD CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x36F4 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x372A JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x370E JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x379F PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x36FB JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x37B1 DUP2 DUP6 PUSH2 0x36FB JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP6 DUP7 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x20 DUP8 ADD MSTORE SWAP3 SWAP1 SWAP4 AND PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0x80 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x38AF JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x3893 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x38C0 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x38EF PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x36FB JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x3923 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x3940 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE4 0xC2 0xDC 0xBB 0xBB 0xAE 0xEF DUP4 0xEF LOG3 0xC3 PUSH13 0xF243C46F81C40DBAF947020D33 LOG2 EXTCODESIZE 0x22 POP 0xD1 STOP 0xAD PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "937:14600:34:-:0;;;1979:109:26;1933:155;;1365:823:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2020:280:15;;;;;;;;;;;;-1:-1:-1;;;2020:280:15;;;;;;;4921:10:29;1929:46:2;;-1:-1:-1;1688:14:30;;;-1:-1:-1;;;;;;1688:14:30;;;2100:22:15;;;;;;;;2085:37;;2150:25;;;;2132:43;;2198:95;2185:108;;2222:17:26;;1705:5:34;;2100:22:15;;1742:6:34;;1762;;1782:17;;1813:19;;1846:20;;1688:14:30;;1705:5:34;;-1:-1:-1;;2100:22:15;;1742:6:34;;1762;;1782:17;;1813:19;;1846:20;;1688:14:30;;1813:19:34;;1846:20;;2100:22:15;;1742:6:34;;2222:17:26::1;::::0;:5:::1;::::0;2100:22:15;2222:17:26::1;:::i;:::-;-1:-1:-1::0;2249:21:26;;::::1;::::0;:7:::1;::::0;:21:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;2441:93:8;;-1:-1:-1;;2103:7:8;2450:49;;;6544:3:3;2441:8:8;:93::i;:::-;2544:96;2171:7;2553:51;;;6608:3:3;2544:8:8;:96::i;:::-;2680:15;:37;;;2728:40;;;;2801:41;2778:64;;5106:13:29;;5097:57:::4;::::0;2480:1:::4;-1:-1:-1::0;5106:28:29::4;5119:3:3;5097:8:29;:57::i;:::-;5164;2526:1;5173:6;:13;:28;;5167:3:3;5164:8:29;;;:57;;:::i;:::-;5769:40;5802:6;5769:32;;;;;:40;;:::i;:::-;5820:87;2632:4;5829:45:::0;::::4;;5289:3:3;5820:8:29;:87::i;:::-;5917;2705:4;5926:45:::0;::::4;;5228:3:3;5917:8:29;:87::i;:::-;6032:34;::::0;-1:-1:-1;;;6032:34:29;;6015:14:::4;::::0;-1:-1:-1;;;;;6032:18:29;::::4;::::0;-1:-1:-1;;6032:34:29::4;::::0;6051:14;;6032:34:::4;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6181:13:::0;;6015:51;;-1:-1:-1;;;;;;6130:20:29;::::4;::::0;::::4;::::0;6015:51;;6159:6;;-1:-1:-1;6167:28:29;::::4;::::0;::::4;;;;::::0;::::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;6167:28:29::4;;6130:66;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;::::0;::::4;;;;;-1:-1:-1::0;;;;;6297:14:29;;;-1:-1:-1;;;;;;6297:14:29;::::4;::::0;6321:16:::4;::::0;;;6347:18:::4;:38:::0;;;6410:13;;6395:28:::4;::::0;6560:13;;:41:::4;;6599:1;6560:41;;;6580:6;6587:1;6580:9;;;;;;;;;;;;;;6560:41;6550:51;::::0;-1:-1:-1;;;;;;6550:51:29;::::4;::::0;6621:13;;-1:-1:-1;;6621:41:29::4;;6660:1;6621:41;;;6641:6;6648:1;6641:9;;;;;;;;;;;;;;6621:41;6611:51;::::0;-1:-1:-1;;;;;;6611:51:29;::::4;::::0;6682:13;;6698:1:::4;-1:-1:-1::0;6682:41:29::4;;6721:1;6682:41;;;6702:6;6709:1;6702:9;;;;;;;;;;;;;;6682:41;6672:51;::::0;-1:-1:-1;;;;;;6672:51:29;::::4;::::0;6743:13;;6759:1:::4;-1:-1:-1::0;6743:41:29::4;;6782:1;6743:41;;;6763:6;6770:1;6763:9;;;;;;;;;;;;;;6743:41;6733:51;::::0;-1:-1:-1;;;;;;6733:51:29;::::4;::::0;6804:13;;6820:1:::4;-1:-1:-1::0;6804:41:29::4;;6843:1;6804:41;;;6824:6;6831:1;6824:9;;;;;;;;;;;;;;6804:41;6794:51;::::0;-1:-1:-1;;;;;;6794:51:29;::::4;::::0;6865:13;;6881:1:::4;-1:-1:-1::0;6865:41:29::4;;6904:1;6865:41;;;6885:6;6892:1;6885:9;;;;;;;;;;;;;;6865:41;6855:51;::::0;-1:-1:-1;;;;;;6855:51:29;::::4;::::0;6926:13;;6942:1:::4;-1:-1:-1::0;6926:41:29::4;;6965:1;6926:41;;;6946:6;6953:1;6946:9;;;;;;;;;;;;;;6926:41;6916:51;::::0;-1:-1:-1;;;;;;6916:51:29;::::4;::::0;6987:13;;7003:1:::4;-1:-1:-1::0;6987:41:29::4;;7026:1;6987:41;;;7007:6;7014:1;7007:9;;;;;;;;;;;;;;6987:41;6977:51;::::0;-1:-1:-1;;;;;;6977:51:29;::::4;::::0;7057:13;;:56:::4;;7112:1;7057:56;;;7077:32;7099:6;7106:1;7099:9;;;;;;;;;;;;;;7077:21;;;:32;;:::i;:::-;7039:74;::::0;7141:13;;7157:1:::4;-1:-1:-1::0;7141:56:29::4;;7196:1;7141:56;;;7161:32;7183:6;7190:1;7183:9;;;;;;;7161:32;7123:74;::::0;7225:13;;7241:1:::4;-1:-1:-1::0;7225:56:29::4;;7280:1;7225:56;;;7245:32;7267:6;7274:1;7267:9;;;;;;;7245:32;7207:74;::::0;7309:13;;7325:1:::4;-1:-1:-1::0;7309:56:29::4;;7364:1;7309:56;;;7329:32;7351:6;7358:1;7351:9;;;;;;;7329:32;7291:74;::::0;7393:13;;7409:1:::4;-1:-1:-1::0;7393:56:29::4;;7448:1;7393:56;;;7413:32;7435:6;7442:1;7435:9;;;;;;;7413:32;7375:74;::::0;7477:13;;7493:1:::4;-1:-1:-1::0;7477:56:29::4;;7532:1;7477:56;;;7497:32;7519:6;7526:1;7519:9;;;;;;;7497:32;7459:74;::::0;7561:13;;7577:1:::4;-1:-1:-1::0;7561:56:29::4;;7616:1;7561:56;;;7581:32;7603:6;7610:1;7603:9;;;;;;;7581:32;7543:74;::::0;7645:13;;7661:1:::4;-1:-1:-1::0;7645:56:29::4;;7700:1;7645:56;;;7665:32;7687:6;7694:1;7687:9;;;;;;;7665:32;7627:74;;;;::::0;::::4;4039:3669;::::0;;;;;;;;;1092:599:27;;;;;;;;1910:60:34::1;1092:4:33;1919:22:34;:34;;5665:3:3;1910:8:34;;;:60;;:::i;:::-;1980;1139:13:33;1989:34:34::0;::::1;;5710:3:3;1980:8:34;:60::i;:::-;2051:71;1206:1:33;2060:6:34;:13;:35;;5813:3:3;2051:8:34;;;:71;;:::i;:::-;-1:-1:-1::0;;;2133:48:34::1;::::0;;;;-1:-1:-1;937:14600:34;;-1:-1:-1;;;;937:14600:34;866:101:3;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;1460:274:6:-;1670:5;1694:33;1670:5;1694:19;:33::i;20273:399:29:-;20340:7;20439:21;20477:5;-1:-1:-1;;;;;20463:30:29;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;20439:56;;;;20570:26;20599:27;20608:2;20612:13;20599:8;;;;;:27;;:::i;:::-;20643:2;:22;;20273:399;-1:-1:-1;;;;20273:399:29:o;1074:3172:3:-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2210:2;2243:18;;;2336;;;2383;;;2215:4;2379:29;;;3057:2;3053:17;2195:18;;;;2288;;;;2284:29;;;;3040:1;3036:14;3025:26;;;;3021:50;;;;2999:73;;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;1740:374:6;1836:1;1821:5;:12;:16;1817:53;;;1853:7;;1817:53;1880:16;1899:5;1905:1;1899:8;;;;;;;;;;;;;;1880:27;;1922:9;1934:1;1922:13;;1917:191;1941:5;:12;1937:1;:16;1917:191;;;1974:15;1992:5;1998:1;1992:8;;;;;;;;;;;;;;;;;;;-1:-1:-1;2014:51:6;-1:-1:-1;;;;;2023:18:6;;;;;;;4890:3:3;2014:8:6;:51::i;:::-;2090:7;-1:-1:-1;1955:3:6;;1917:191;;;;1740:374;;;:::o;948:166:11:-;1006:7;1025:37;1034:6;;;;4370:1:3;1025:8:11;:37::i;:::-;-1:-1:-1;1084:5:11;;;948:166;;;;;:::o;937:14600:34:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;937:14600:34;;;-1:-1:-1;937:14600:34;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;5:134:-1;83:13;;101:33;83:13;101:33;:::i;172:767::-;;315:3;308:4;300:6;296:17;292:27;282:2;;-1:-1;;323:12;282:2;357:13;;-1:-1;8423:30;;8420:2;;;-1:-1;;8456:12;8420:2;8501:4;;8493:6;8489:17;385:95;8501:4;8489:17;8554:15;385:95;:::i;:::-;508:21;;;376:104;-1:-1;565:14;;;540:17;;;645:27;;;;;642:36;-1:-1;639:2;;;691:1;;681:12;639:2;716:1;707:10;;701:232;726:6;723:1;720:13;701:232;;;89:6;83:13;101:33;128:5;101:33;:::i;:::-;794:76;;748:1;741:9;;;;;884:14;;;;912;;701:232;;;705:14;;;;;275:664;;;;:::o;1433:444::-;;1546:3;1539:4;1531:6;1527:17;1523:27;1513:2;;-1:-1;;1554:12;1513:2;1588:13;;-1:-1;8719:30;;8716:2;;;-1:-1;;8752:12;8716:2;8893:4;1616:65;-1:-1;;8825:9;8806:17;;8802:33;8883:15;;1616:65;:::i;:::-;1607:74;;1701:6;1694:5;1687:21;1805:3;8893:4;1796:6;1729;1787:16;;1784:25;1781:2;;;1822:1;;1812:12;1781:2;11356:1;11363:101;11377:6;11374:1;11371:13;11363:101;;;11444:11;;;;;11438:18;11425:11;;;;;11418:39;11392:10;;11363:101;;;11479:6;11476:1;11473:13;11470:2;;;11356:1;8893:4;11535:6;1763:5;11526:16;;11519:27;11470:2;;;;1506:371;;;;:::o;2163:263::-;;2278:2;2266:9;2257:7;2253:23;2249:32;2246:2;;;-1:-1;;2284:12;2246:2;-1:-1;1025:13;;2240:186;-1:-1;2240:186::o;2433:1746::-;;;;;;;;;;2760:3;2748:9;2739:7;2735:23;2731:33;2728:2;;;-1:-1;;2767:12;2728:2;2829:80;2901:7;2877:22;2829:80;:::i;:::-;2967:2;2952:18;;2946:25;2819:90;;-1:-1;;2980:30;;;2977:2;;;-1:-1;;3013:12;2977:2;3043:74;3109:7;3100:6;3089:9;3085:22;3043:74;:::i;:::-;3033:84;;3175:2;3164:9;3160:18;3154:25;3140:39;;2991:18;3191:6;3188:30;3185:2;;;-1:-1;;3221:12;3185:2;3251:74;3317:7;3308:6;3297:9;3293:22;3251:74;:::i;:::-;3241:84;;3383:2;3372:9;3368:18;3362:25;3348:39;;2991:18;3399:6;3396:30;3393:2;;;-1:-1;;3429:12;3393:2;;3459:104;3555:7;3546:6;3535:9;3531:22;3459:104;:::i;:::-;3449:114;;;3600:3;3655:9;3651:22;1963:13;3609:74;;3720:3;3775:9;3771:22;1963:13;3729:74;;3840:3;3895:9;3891:22;1963:13;3849:74;;3960:3;4015:9;4011:22;1963:13;3969:74;;4099:64;4155:7;4080:3;4135:9;4131:22;4099:64;:::i;:::-;4089:74;;2722:1457;;;;;;;;;;;:::o;4186:259::-;;4299:2;4287:9;4278:7;4274:23;4270:32;4267:2;;;-1:-1;;4305:12;4267:2;2108:6;2102:13;10824:4;12454:5;10813:16;12431:5;12428:33;12418:2;;-1:-1;;12465:12;12418:2;4357:72;4261:184;-1:-1;;;4261:184::o;6947:770::-;;7245:2;7234:9;7230:18;6598:5;6575:3;6568:37;7363:2;7245;7363;7352:9;7348:18;7341:48;7403:123;5947:5;9349:12;9925:6;9920:3;9913:19;9953:14;7234:9;9953:14;5959:93;;7363:2;6138:5;9030:14;6150:21;;-1:-1;6177:290;6202:6;6199:1;6196:13;6177:290;;;10935:52;6269:6;6263:13;10935:52;:::i;:::-;6693:65;;9638:14;;;;4818;;;;6224:1;6217:9;6177:290;;;-1:-1;;7564:20;;;7559:2;7544:18;;7537:48;9349:12;;9913:19;;;9953:14;;;;-1:-1;9030:14;;;;-1:-1;5395:260;5420:6;5417:1;5414:13;5395:260;;;10043:24;5487:6;5481:13;10043:24;:::i;:::-;4907:37;;4606:14;;;;9638;;;;6224:1;5435:9;5395:260;;;-1:-1;7591:116;;7216:501;-1:-1;;;;;;;;7216:501::o;7724:266::-;7873:2;7858:18;;11660:1;11650:12;;11640:2;;11666:9;11640:2;6863:72;;;7844:146;:::o;7997:256::-;8059:2;8053:9;8085:17;;;8181:22;;;-1:-1;8145:34;;8142:62;8139:2;;;8217:1;;8207:12;8139:2;8059;8226:22;8037:216;;-1:-1;8037:216::o;9981:91::-;-1:-1;;;;;10608:54;;10026:46::o;11689:117::-;-1:-1;;;;;10608:54;;11748:35;;11738:2;;11797:1;;11787:12;11732:74;937:14600:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "275": [
                  {
                    "length": 32,
                    "start": 2289
                  }
                ],
                "1305": [
                  {
                    "length": 32,
                    "start": 4563
                  }
                ],
                "1307": [
                  {
                    "length": 32,
                    "start": 4599
                  }
                ],
                "3802": [
                  {
                    "length": 32,
                    "start": 4891
                  }
                ],
                "3804": [
                  {
                    "length": 32,
                    "start": 4924
                  }
                ],
                "3806": [
                  {
                    "length": 32,
                    "start": 4858
                  }
                ],
                "5433": [
                  {
                    "length": 32,
                    "start": 2650
                  }
                ],
                "6483": [
                  {
                    "length": 32,
                    "start": 2443
                  }
                ],
                "6485": [
                  {
                    "length": 32,
                    "start": 1633
                  }
                ],
                "6487": [
                  {
                    "length": 32,
                    "start": 3351
                  }
                ],
                "6505": [
                  {
                    "length": 32,
                    "start": 3505
                  }
                ],
                "6507": [
                  {
                    "length": 32,
                    "start": 3586
                  }
                ],
                "6509": [
                  {
                    "length": 32,
                    "start": 3653
                  }
                ],
                "6511": [
                  {
                    "length": 32,
                    "start": 3720
                  }
                ],
                "6513": [
                  {
                    "length": 32,
                    "start": 3787
                  }
                ],
                "6515": [
                  {
                    "length": 32,
                    "start": 3854
                  }
                ],
                "6517": [
                  {
                    "length": 32,
                    "start": 3921
                  }
                ],
                "6519": [
                  {
                    "length": 32,
                    "start": 3988
                  }
                ],
                "7938": [
                  {
                    "length": 32,
                    "start": 2407
                  }
                ],
                "9506": [
                  {
                    "length": 32,
                    "start": 1984
                  },
                  {
                    "length": 32,
                    "start": 2035
                  },
                  {
                    "length": 32,
                    "start": 6895
                  },
                  {
                    "length": 32,
                    "start": 7270
                  },
                  {
                    "length": 32,
                    "start": 7402
                  },
                  {
                    "length": 32,
                    "start": 7976
                  },
                  {
                    "length": 32,
                    "start": 8247
                  },
                  {
                    "length": 32,
                    "start": 9367
                  },
                  {
                    "length": 32,
                    "start": 9565
                  },
                  {
                    "length": 32,
                    "start": 9699
                  },
                  {
                    "length": 32,
                    "start": 9791
                  }
                ]
              },
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50600436106101da5760003560e01c80636daccffa116101045780638d928af8116100a2578063d505accf11610071578063d505accf146103b5578063d5c096c4146103c8578063d73dd623146103db578063dd62ed3e146103ee576101da565b80638d928af81461038a57806395d89b4114610392578063a9059cbb1461039a578063aaabadc5146103ad576101da565b80637ecebe00116100de5780637ecebe001461033c578063851c1bb31461034f57806387ec681714610362578063893d20e814610375576101da565b80636daccffa1461030057806370a082311461030857806374f3b0091461031b576101da565b8063313ce5671161017c57806355c676281161014b57806355c67628146102bc5780636028bfd4146102c457806366188463146102e5578063679aefce146102f8576101da565b8063313ce567146102845780633644e5151461029957806338e9922e146102a157806338fff2d0146102b4576101da565b806316c38b3c116101b857806316c38b3c1461023d57806318160ddd146102525780631c0de0511461025a57806323b872dd14610271576101da565b806301ec954a146101df57806306fdde0314610208578063095ea7b31461021d575b600080fd5b6101f26101ed3660046135c5565b610401565b6040516101ff91906137dd565b60405180910390f35b61021061045e565b6040516101ff9190613883565b61023061022b36600461329e565b6104f5565b6040516101ff91906137ba565b61025061024b366004613394565b61050c565b005b6101f2610520565b610262610526565b6040516101ff939291906137c5565b61023061027f3660046131e9565b61054f565b61028c6105d2565b6040516101ff91906138f7565b6101f26105d7565b6102506102af3660046136e3565b6105e6565b6101f261065f565b6101f2610683565b6102d76102d23660046133cc565b610689565b6040516101ff9291906138d6565b6102306102f336600461329e565b6106c0565b6101f261071a565b6101f26107f1565b6101f2610316366004613195565b610815565b61032e6103293660046133cc565b610830565b6040516101ff92919061378c565b6101f261034a366004613195565b6108d2565b6101f261035d36600461346e565b6108ed565b6102d76103703660046133cc565b61093f565b61037d610965565b6040516101ff9190613778565b61037d610989565b6102106109ad565b6102306103a836600461329e565b610a0e565b61037d610a1b565b6102506103c3366004613229565b610a25565b61032e6103d63660046133cc565b610b6e565b6102306103e936600461329e565b610c90565b6101f26103fc3660046131b1565b610cc6565b60006104158383610410610d15565b610d39565b606061041f610d56565b905060008651600181111561043057fe5b14610447576104428686868685610fd2565b610454565b6104548686868685611047565b9695505050505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ea5780601f106104bf576101008083540402835291602001916104ea565b820191906000526020600020905b8154815290600101906020018083116104cd57829003601f168201915b505050505090505b90565b60006105023384846110ab565b5060015b92915050565b610514611113565b61051d81611141565b50565b60025490565b60008060006105336111b4565b15925061053e6111d1565b91506105486111f5565b9050909192565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261058d9114806105855750838210155b610197611219565b610598858585611227565b336001600160a01b038616148015906105b357506000198114155b156105c5576105c585338584036110ab565b60019150505b9392505050565b601290565b60006105e16112f6565b905090565b6105ee611113565b6105f6611393565b61060964e8d4a5100082101560cb611219565b61061f67016345785d8a000082111560ca611219565b60078190556040517f9cabc14d438714dbcd9292df9b3f89c42f98acd93a675ad72cd6033777e9b8e7906106549083906137dd565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000090565b60075490565b6000606061069f865161069a610d15565b6113a8565b6106b4898989898989896113b56114ba61151b565b97509795505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106106fc576106f7338560006110ab565b610710565b610710338561070b8487610cff565b6110ab565b5060019392505050565b60006060610726610989565b6001600160a01b031663f94d466861073c61065f565b6040518263ffffffff1660e01b815260040161075891906137dd565b60006040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ac91908101906132c9565b509150506107eb6107bb610520565b6107e57f00000000000000000000000000000000000000000000000000000000000000008461163d565b906117b7565b91505090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b031660009081526020819052604090205490565b6060808861085a61083f610989565b6001600160a01b0316336001600160a01b03161460cd611219565b61086f61086561065f565b82146101f4611219565b6060610879610d56565b90506108858882611808565b60006060806108998e8e8e8e8e8e8e6113b5565b9250925092506108a98d8461185c565b6108b382856114ba565b6108bd81856114ba565b909550935050505b5097509795505050505050565b6001600160a01b031660009081526005602052604090205490565b60007f000000000000000000000000000000000000000000000000000000000000000082604051602001610922929190613735565b604051602081830303815290604052805190602001209050919050565b60006060610950865161069a610d15565b6106b4898989898989896118ef61199461151b565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ea5780601f106104bf576101008083540402835291602001916104ea565b6000610502338484611227565b60006105e16119f5565b610a338442111560d1611219565b6001600160a01b0387166000908152600560209081526040808320549051909291610a8a917f0000000000000000000000000000000000000000000000000000000000000000918c918c918c9188918d9101613805565b6040516020818303038152906040528051906020012090506000610aad82611a6f565b9050600060018288888860405160008152602001604052604051610ad49493929190613865565b6020604051602081039080840390855afa158015610af6573d6000803e3d6000fd5b5050604051601f1901519150610b3890506001600160a01b03821615801590610b3057508b6001600160a01b0316826001600160a01b0316145b6101f8611219565b6001600160a01b038b166000908152600560205260409020600185019055610b618b8b8b6110ab565b5050505050505050505050565b60608088610b7d61083f610989565b610b8861086561065f565b6060610b92610d56565b9050610b9c610520565b610c415760006060610bb08d8d8d8a611a8b565b91509150610bc5620f424083101560cc611219565b610bd36000620f4240611b28565b610be28b620f42408403611b28565b610bec8184611994565b80610bf5610d15565b6001600160401b0381118015610c0a57600080fd5b50604051908082528060200260200182016040528015610c34578160200160208202803683370190505b50955095505050506108c5565b610c4b8882611808565b6000606080610c5f8e8e8e8e8e8e8e6118ef565b925092509250610c6f8c84611b28565b610c798285611994565b610c8381856114ba565b90955093506108c5915050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161050291859061070b9086611bbe565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b80610cfb81611bd0565b5050565b6000610d0f838311156001611219565b50900390565b7f000000000000000000000000000000000000000000000000000000000000000090565b610d518184108015610d4a57508183105b6064611219565b505050565b60606000610d62610d15565b90506060816001600160401b0381118015610d7c57600080fd5b50604051908082528060200260200182016040528015610da6578160200160208202803683370190505b5090508115610dee577f000000000000000000000000000000000000000000000000000000000000000081600081518110610ddd57fe5b602002602001018181525050610df7565b91506104f29050565b6001821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600181518110610e2e57fe5b6020026020010181815250506002821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600281518110610e7157fe5b6020026020010181815250506003821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600381518110610eb457fe5b6020026020010181815250506004821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600481518110610ef757fe5b6020026020010181815250506005821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600581518110610f3a57fe5b6020026020010181815250506006821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600681518110610f7d57fe5b6020026020010181815250506007821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600781518110610fc057fe5b60200260200101818152505091505090565b6000610fde8583611808565b610fff8660600151838581518110610ff257fe5b6020026020010151611c49565b6060870152600061101287878787611c55565b90506110318184878151811061102457fe5b6020026020010151611c92565b905061103c81611c9e565b979650505050505050565b60006110568660600151611cb5565b60608701526110658583611808565b6110798660600151838681518110610ff257fe5b6060870152600061108c87878787611cd9565b905061103c8184868151811061109e57fe5b6020026020010151611d16565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906111069085906137dd565b60405180910390a3505050565b600061112a6000356001600160e01b0319166108ed565b905061051d6111398233611d22565b610191611219565b80156111615761115c6111526111d1565b4210610193611219565b611176565b61117661116c6111f5565b42106101a9611219565b6006805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64906106549083906137ba565b60006111be6111f5565b4211806105e157505060065460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b81610cfb57610cfb81611e12565b6001600160a01b03831660009081526020819052604090205461124f82821015610196611219565b6112666001600160a01b0384161515610199611219565b6001600160a01b038085166000908152602081905260408082208585039055918516815220546112969083611bbe565b6001600160a01b0380851660008181526020819052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112e89086906137dd565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611363611e65565b30604051602001611378959493929190613839565b60405160208183030381529060405280519060200120905090565b6113a661139e6111b4565b610192611219565b565b610cfb8183146067611219565b60006060806113c26111b4565b15611446576113d48760085487611e69565b905060005b6113e1610d15565b811015611440576114218282815181106113f757fe5b602002602001015189838151811061140b57fe5b6020026020010151610cff90919063ffffffff16565b88828151811061142d57fe5b60209081029190910101526001016113d9565b50611491565b61144e610d15565b6001600160401b038111801561146357600080fd5b5060405190808252806020026020018201604052801561148d578160200160208202803683370190505b5090505b61149b8785611f72565b90935091506114aa8783611fdc565b6008559750975097945050505050565b60005b6114c5610d15565b811015610d51576114fc8382815181106114db57fe5b60200260200101518383815181106114ef57fe5b602002602001015161205c565b83828151811061150857fe5b60209081029190910101526001016114bd565b3330146115d9576000306001600160a01b031660003660405161153f92919061374d565b6000604051808303816000865af19150503d806000811461157c576040519150601f19603f3d011682016040523d82523d6000602084013e611581565b606091505b50509050806000811461159057fe5b60046000803e6000516001600160e01b0319166343adbafb60e01b81146115bb573d6000803e3d6000fd5b506020600460003e604060205260243d03602460403e601c3d016000f35b60606115e3610d56565b90506115ef8782611808565b600060606116068c8c8c8c8c8c8c8c63ffffffff16565b509150915061161981848663ffffffff16565b8051601f1982018390526343adbafb603f1983015260200260231982016044820181fd5b80516000908190815b8181101561167e5761167485828151811061165d57fe5b602002602001015184611bbe90919063ffffffff16565b9250600101611646565b508161168f57600092505050610506565b6000828161169d888561207c565b905060005b60ff8110156117aa5760006116cb868a6000815181106116be57fe5b602002602001015161207c565b905060015b86811015611704576116fa6116f46116ee848d85815181106116be57fe5b8961207c565b866120a0565b91506001016116d0565b5083945061176461173a61172161171b868b61207c565b8461207c565b61173461172e8a8961207c565b8861207c565b90611bbe565b61175f61175161174b876001610cff565b8561207c565b6117346116ee8b6001611bbe565b6120a0565b93508484111561178a57600161177a8587610cff565b1161178557506117aa565b6117a1565b60016117968686610cff565b116117a157506117aa565b506001016116a2565b5090979650505050505050565b60006117c68215156004611219565b826117d357506000610506565b670de0b6b3a7640000838102906117f6908583816117ed57fe5b04146005611219565b8281816117ff57fe5b04915050610506565b60005b611813610d15565b811015610d515761183d83828151811061182957fe5b60200260200101518383815181106116be57fe5b83828151811061184957fe5b602090810291909101015260010161180b565b6001600160a01b03821660009081526020819052604090205461188482821015610196611219565b6001600160a01b038316600090815260208190526040902082820390556002546118ae9083610cff565b6002556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111069086906137dd565b60006060806118fc611393565b606061190b8860085488611e69565b905060005b611918610d15565b8110156119615761194282828151811061192e57fe5b60200260200101518a838151811061140b57fe5b89828151811061194e57fe5b6020908102919091010152600101611910565b50600060606119708a886120d3565b9150915061197e8a8261212b565b600855909c909b50909950975050505050505050565b60005b61199f610d15565b811015610d51576119d68382815181106119b557fe5b60200260200101518383815181106119c957fe5b60200260200101516120a0565b8382815181106119e257fe5b6020908102919091010152600101611997565b60006119ff610989565b6001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3757600080fd5b505afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e19190613496565b6000611a796112f6565b8260405160200161092292919061375d565b60006060611a97611393565b6000611aa284612196565b9050611abd6000826002811115611ab557fe5b1460ce611219565b6060611ac8856121ac565b9050611ad7815161069a610d15565b611ae881611ae3610d56565b611808565b6000611b147f00000000000000000000000000000000000000000000000000000000000000008361163d565b600881905599919850909650505050505050565b6001600160a01b038216600090815260208190526040902054611b4b9082611bbe565b6001600160a01b038316600090815260208190526040902055600254611b719082611bbe565b6002556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611bb29085906137dd565b60405180910390a35050565b60008282016105cb8482101583611219565b600281511015611bdf5761051d565b600081600081518110611bee57fe5b602002602001015190506000600190505b8251811015610d51576000838281518110611c1657fe5b60200260200101519050611c3f816001600160a01b0316846001600160a01b0316106065611219565b9150600101611bff565b60006105cb838361207c565b6000611c5f611393565b60006104547f00000000000000000000000000000000000000000000000000000000000000008686868a606001516121c2565b60006105cb83836120a0565b6000610506611cae600754612268565b839061228e565b600080611ccd600754846122dc90919063ffffffff16565b90506105cb8382610cff565b6000611ce3611393565b60006104547f00000000000000000000000000000000000000000000000000000000000000008686868a60600151612318565b60006105cb838361205c565b600073ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b611d41610965565b6001600160a01b031614158015611d5c5750611d5c836123a2565b15611d8457611d69610965565b6001600160a01b0316336001600160a01b0316149050610506565b611d8c6119f5565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b8152600401611dbb939291906137e6565b60206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0b91906133b0565b9050610506565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b4690565b606080611e74610d15565b6001600160401b0381118015611e8957600080fd5b50604051908082528060200260200182016040528015611eb3578160200160208202803683370190505b50905082611ec25790506105cb565b60008086600081518110611ed257fe5b602002602001015190506000600190505b611eeb610d15565b811015611f22576000888281518110611f0057fe5b6020026020010151905082811115611f19578193508092505b50600101611ee3565b50611f507f0000000000000000000000000000000000000000000000000000000000000000888885896123bc565b838381518110611f5c57fe5b6020908102919091010152509095945050505050565b600060606000611f8184612196565b90506000816002811115611f9157fe5b1415611fab57611fa18585612418565b9250925050611fd5565b6001816002811115611fb957fe5b1415611fc957611fa185856124ee565b611fa18585612520565b505b9250929050565b6000805b611fe8610d15565b81101561203157612012838281518110611ffe57fe5b602002602001015185838151811061140b57fe5b84828151811061201e57fe5b6020908102919091010152600101611fe0565b506105cb7f00000000000000000000000000000000000000000000000000000000000000008461163d565b600061206b8215156004611219565b81838161207457fe5b049392505050565b60008282026105cb84158061209957508385838161209657fe5b04145b6003611219565b60006120af8215156004611219565b826120bc57506000610506565b8160018403816120c857fe5b046001019050610506565b6000606060006120e284612196565b905060018160028111156120f257fe5b141561210257611fa185856125aa565b600281600281111561211057fe5b141561212057611fa18585612624565b611fd3610136611e12565b6000805b612137610d15565b8110156120315761217783828151811061214d57fe5b602002602001015185838151811061216157fe5b6020026020010151611bbe90919063ffffffff16565b84828151811061218357fe5b602090810291909101015260010161212f565b60008180602001905181019061050691906134b2565b6060818060200190518101906105cb9190613577565b6000806121cf878761163d565b90506121e18387868151811061140b57fe5b8685815181106121ed57fe5b6020026020010181815250506000612207888884896126e5565b90506122198488878151811061216157fe5b87868151811061222557fe5b60200260200101818152505061225c600161173489898151811061224557fe5b602002602001015184610cff90919063ffffffff16565b98975050505050505050565b6000670de0b6b3a76400008210612280576000610506565b50670de0b6b3a76400000390565b600061229d8215156004611219565b826122aa57506000610506565b670de0b6b3a7640000838102906122c4908583816117ed57fe5b8260018203816122d057fe5b04600101915050610506565b60008282026122f684158061209957508385838161209657fe5b80612305576000915050610506565b670de0b6b3a764000060001982016122d0565b600080612325878761163d565b90506123378387878151811061216157fe5b86868151811061234357fe5b602002602001018181525050600061235d888884886126e5565b905061236f8488888151811061140b57fe5b87878151811061237b57fe5b60200260200101818152505061225c600161239c838a898151811061140b57fe5b90610cff565b60006123b4631c74c91760e11b6108ed565b909114919050565b6000806123cb878787876126e5565b90506000818786815181106123dc57fe5b6020026020010151116123f0576000612400565b6124008288878151811061140b57fe5b905061225c670de0b6b3a76400006107e5838761289e565b60006060612424611393565b600061242e610d15565b905060008061243c866128ca565b9150915061244d8382106064611219565b6060836001600160401b038111801561246557600080fd5b5060405190808252806020026020018201604052801561248f578160200160208202803683370190505b5090506124c97f00000000000000000000000000000000000000000000000000000000000000008984866124c1610520565b6007546128ec565b8183815181106124d557fe5b6020908102919091010152919791965090945050505050565b6000606060006124fd846129e4565b90506060612513868361250e610520565b6129fa565b9196919550909350505050565b6000606061252c611393565b6060600061253985612aab565b9150915061254a825161069a610d15565b61255682611ae3610d56565b600061258e7f00000000000000000000000000000000000000000000000000000000000000008885612586610520565b600754612ac3565b905061259e8282111560cf611219565b96919550909350505050565b600060608060006125ba85612aab565b915091506125d06125c9610d15565b83516113a8565b6125dc82611ae3610d56565b60006126147f0000000000000000000000000000000000000000000000000000000000000000888561260c610520565b600754612d59565b905061259e8282101560d0611219565b60006060600080612634856128ca565b9150915060006126717f0000000000000000000000000000000000000000000000000000000000000000888486612669610520565b600754612f96565b9050606061267d610d15565b6001600160401b038111801561269257600080fd5b506040519080825280602002602001820160405280156126bc578160200160208202803683370190505b509050818184815181106126cc57fe5b6020908102919091010152929792965091945050505050565b6000806126f386865161207c565b905060008560008151811061270457fe5b6020026020010151905060006127228751886000815181106116be57fe5b905060015b875181101561276e5761275361274d612746848b85815181106116be57fe5b8a5161207c565b8861205c565b915061276488828151811061165d57fe5b9250600101612727565b5061279587868151811061277e57fe5b602002602001015183610cff90919063ffffffff16565b915060006127ac6127a6888961207c565b856120a0565b90506127de826127d88a89815181106127c157fe5b6020026020010151846122dc90919063ffffffff16565b9061228e565b905060006127f66127ef89876117b7565b8590611bbe565b90506000806128166128088b85611bbe565b6127d8866117348e806122dc565b905060005b60ff81101561288e5781925061284b61283d8c61239c8761173487600261207c565b6127d88761173486806122dc565b9150828211156128705760016128618385610cff565b1161286b5761288e565b612886565b600161287c8484610cff565b116128865761288e565b60010161281b565b509b9a5050505050505050505050565b60008282026128b884158061209957508385838161209657fe5b670de0b6b3a764000090049392505050565b600080828060200190518101906128e19190613541565b909590945092505050565b6000806128f9888861163d565b905060006129158261290f876127d8818b610cff565b906122dc565b90506000805b89518110156129545761294a8a828151811061293357fe5b602002602001015183611bbe90919063ffffffff16565b915060010161291b565b5060006129638b8b858c6126e5565b90506000612977828c8c8151811061140b57fe5b905060006129a1848d8d8151811061298b57fe5b60200260200101516117b790919063ffffffff16565b905060006129ae82612268565b905060006129bc8a836122dc565b90506129d16129ca82612268565b859061289e565b9f9e505050505050505050505050505050565b6000818060200190518101906105cb9190613514565b60606000612a0884846117b7565b9050606085516001600160401b0381118015612a2357600080fd5b50604051908082528060200260200182016040528015612a4d578160200160208202803683370190505b50905060005b8651811015612aa157612a8283888381518110612a6c57fe5b602002602001015161289e90919063ffffffff16565b828281518110612a8e57fe5b6020908102919091010152600101612a53565b5095945050505050565b60606000828060200190518101906128e191906134ce565b600080612ad0878761163d565b90506000805b8751811015612af857612aee88828151811061293357fe5b9150600101612ad6565b50606086516001600160401b0381118015612b1257600080fd5b50604051908082528060200260200182016040528015612b3c578160200160208202803683370190505b5090506000805b8951811015612c03576000612b74858c8481518110612b5e57fe5b602002602001015161228e90919063ffffffff16565b9050612bb08b8381518110612b8557fe5b60200260200101516127d88c8581518110612b9c57fe5b60200260200101518e868151811061140b57fe5b848381518110612bbc57fe5b602002602001018181525050612bf8612bf182868581518110612bdb57fe5b60200260200101516122dc90919063ffffffff16565b8490611bbe565b925050600101612b43565b50606089516001600160401b0381118015612c1d57600080fd5b50604051908082528060200260200182016040528015612c47578160200160208202803683370190505b50905060005b8a51811015612d1e576000848281518110612c6457fe5b60200260200101518411612c7a57506000612cc2565b612cbf612c99868481518110612c8c57fe5b6020026020010151612268565b6127d8878581518110612ca857fe5b602002602001015187610cff90919063ffffffff16565b90505b6000612cce8a836122dc565b90506000612cea612cde83612268565b8e8681518110612b5e57fe5b9050612cfc818f868151811061140b57fe5b858581518110612d0857fe5b6020908102919091010152505050600101612c4d565b506000612d2b8c8361163d565b9050612d49612d42612d3d838961228e565b612268565b8a906122dc565b9c9b505050505050505050505050565b600080612d66878761163d565b90506000805b8751811015612d8e57612d8488828151811061293357fe5b9150600101612d6c565b50606086516001600160401b0381118015612da857600080fd5b50604051908082528060200260200182016040528015612dd2578160200160208202803683370190505b5090506000805b8951811015612e66576000612df4858c848151811061298b57fe5b9050612e308b8381518110612e0557fe5b60200260200101516107e58c8581518110612e1c57fe5b60200260200101518e868151811061216157fe5b848381518110612e3c57fe5b602002602001018181525050612e5b612bf182868581518110612a6c57fe5b925050600101612dd9565b50606089516001600160401b0381118015612e8057600080fd5b50604051908082528060200260200182016040528015612eaa578160200160208202803683370190505b50905060005b8a51811015612f67576000848281518110612ec757fe5b60200260200101518410612edd57506000612f0b565b612f08612ef8670de0b6b3a764000087858151811061140b57fe5b6127d88688868151811061140b57fe5b90505b6000612f178a836122dc565b90506000612f33612f2783612268565b8e8681518110612a6c57fe5b9050612f45818f868151811061216157fe5b858581518110612f5157fe5b6020908102919091010152505050600101612eb0565b506000612f748c8361163d565b9050612d49612f8f670de0b6b3a764000061239c848a6117b7565b8a9061289e565b600080612fa3888861163d565b90506000612fb98261290f876127d8818b611bbe565b90506000805b8951811015612fe157612fd78a828151811061293357fe5b9150600101612fbf565b506000612ff08b8b858c6126e5565b905060006130038b8b8151811061277e57fe5b90506000613017848d8d8151811061298b57fe5b9050600061302482612268565b905060006130328a836122dc565b90506129d161304082612268565b859061228e565b80356105068161394a565b600082601f830112613062578081fd5b81356130756130708261392b565b613905565b81815291506020808301908481018184028601820187101561309657600080fd5b60005b848110156130b557813584529282019290820190600101613099565b505050505092915050565b600082601f8301126130d0578081fd5b81516130de6130708261392b565b8181529150602080830190848101818402860182018710156130ff57600080fd5b60005b848110156130b557815184529282019290820190600101613102565b600082601f83011261312e578081fd5b81356001600160401b03811115613143578182fd5b613156601f8201601f1916602001613905565b915080825283602082850101111561316d57600080fd5b8060208401602084013760009082016020015292915050565b80356002811061050657600080fd5b6000602082840312156131a6578081fd5b81356105cb8161394a565b600080604083850312156131c3578081fd5b82356131ce8161394a565b915060208301356131de8161394a565b809150509250929050565b6000806000606084860312156131fd578081fd5b83356132088161394a565b925060208401356132188161394a565b929592945050506040919091013590565b600080600080600080600060e0888a031215613243578283fd5b873561324e8161394a565b9650602088013561325e8161394a565b95506040880135945060608801359350608088013560ff81168114613281578384fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156132b0578182fd5b82356132bb8161394a565b946020939093013593505050565b6000806000606084860312156132dd578081fd5b83516001600160401b03808211156132f3578283fd5b818601915086601f830112613306578283fd5b81516133146130708261392b565b80828252602080830192508086018b828387028901011115613334578788fd5b8796505b8487101561335f57805161334b8161394a565b845260019690960195928101928101613338565b508901519097509350505080821115613376578283fd5b50613383868287016130c0565b925050604084015190509250925092565b6000602082840312156133a5578081fd5b81356105cb8161395f565b6000602082840312156133c1578081fd5b81516105cb8161395f565b600080600080600080600060e0888a0312156133e6578081fd5b8735965060208801356133f88161394a565b955060408801356134088161394a565b945060608801356001600160401b0380821115613423578283fd5b61342f8b838c01613052565b955060808a0135945060a08a0135935060c08a0135915080821115613452578283fd5b5061345f8a828b0161311e565b91505092959891949750929550565b60006020828403121561347f578081fd5b81356001600160e01b0319811681146105cb578182fd5b6000602082840312156134a7578081fd5b81516105cb8161394a565b6000602082840312156134c3578081fd5b81516105cb8161396d565b6000806000606084860312156134e2578081fd5b83516134ed8161396d565b60208501519093506001600160401b03811115613508578182fd5b613383868287016130c0565b60008060408385031215613526578182fd5b82516135318161396d565b6020939093015192949293505050565b600080600060608486031215613555578081fd5b83516135608161396d565b602085015160409095015190969495509392505050565b60008060408385031215613589578182fd5b82516135948161396d565b60208401519092506001600160401b038111156135af578182fd5b6135bb858286016130c0565b9150509250929050565b600080600080608085870312156135da578182fd5b84356001600160401b03808211156135f0578384fd5b818701915061012080838a031215613606578485fd5b61360f81613905565b905061361b8984613186565b815261362a8960208501613047565b602082015261363c8960408501613047565b6040820152606083013560608201526080830135608082015260a083013560a082015261366c8960c08501613047565b60c082015261367e8960e08501613047565b60e08201526101008084013583811115613696578687fd5b6136a28b82870161311e565b8284015250508096505060208701359150808211156136bf578384fd5b506136cc87828801613052565b949794965050505060408301359260600135919050565b6000602082840312156136f4578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561372a5781518752958201959082019060010161370e565b509495945050505050565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b60006040825261379f60408301856136fb565b82810360208401526137b181856136fb565b95945050505050565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b818110156138af57858101830151858201604001528201613893565b818111156138c05783604083870101525b50601f01601f1916929092016040019392505050565b6000838252604060208301526138ef60408301846136fb565b949350505050565b60ff91909116815260200190565b6040518181016001600160401b038111828210171561392357600080fd5b604052919050565b60006001600160401b03821115613940578081fd5b5060209081020190565b6001600160a01b038116811461051d57600080fd5b801515811461051d57600080fd5b6003811061051d57600080fdfea2646970667358221220e4c2dcbbbbaeef83efa3c36cf243c46f81c40dbaf947020d33a23b2250d100ad64736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1DA JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6DACCFFA GT PUSH2 0x104 JUMPI DUP1 PUSH4 0x8D928AF8 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD505ACCF GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x3B5 JUMPI DUP1 PUSH4 0xD5C096C4 EQ PUSH2 0x3C8 JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x3DB JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x3EE JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x8D928AF8 EQ PUSH2 0x38A JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x392 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x39A JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x3AD JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x7ECEBE00 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x33C JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x34F JUMPI DUP1 PUSH4 0x87EC6817 EQ PUSH2 0x362 JUMPI DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x375 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x6DACCFFA EQ PUSH2 0x300 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x308 JUMPI DUP1 PUSH4 0x74F3B009 EQ PUSH2 0x31B JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x313CE567 GT PUSH2 0x17C JUMPI DUP1 PUSH4 0x55C67628 GT PUSH2 0x14B JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0x2BC JUMPI DUP1 PUSH4 0x6028BFD4 EQ PUSH2 0x2C4 JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x2E5 JUMPI DUP1 PUSH4 0x679AEFCE EQ PUSH2 0x2F8 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x313CE567 EQ PUSH2 0x284 JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x299 JUMPI DUP1 PUSH4 0x38E9922E EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x38FFF2D0 EQ PUSH2 0x2B4 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x16C38B3C GT PUSH2 0x1B8 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x23D JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x252 JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x25A JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x271 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x1EC954A EQ PUSH2 0x1DF JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x208 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x21D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F2 PUSH2 0x1ED CALLDATASIZE PUSH1 0x4 PUSH2 0x35C5 JUMP JUMPDEST PUSH2 0x401 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x210 PUSH2 0x45E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x3883 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x22B CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0x4F5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x37BA JUMP JUMPDEST PUSH2 0x250 PUSH2 0x24B CALLDATASIZE PUSH1 0x4 PUSH2 0x3394 JUMP JUMPDEST PUSH2 0x50C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1F2 PUSH2 0x520 JUMP JUMPDEST PUSH2 0x262 PUSH2 0x526 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x37C5 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x27F CALLDATASIZE PUSH1 0x4 PUSH2 0x31E9 JUMP JUMPDEST PUSH2 0x54F JUMP JUMPDEST PUSH2 0x28C PUSH2 0x5D2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x38F7 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x5D7 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x2AF CALLDATASIZE PUSH1 0x4 PUSH2 0x36E3 JUMP JUMPDEST PUSH2 0x5E6 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x65F JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x683 JUMP JUMPDEST PUSH2 0x2D7 PUSH2 0x2D2 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x689 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP3 SWAP2 SWAP1 PUSH2 0x38D6 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x2F3 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0x6C0 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x71A JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x7F1 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x316 CALLDATASIZE PUSH1 0x4 PUSH2 0x3195 JUMP JUMPDEST PUSH2 0x815 JUMP JUMPDEST PUSH2 0x32E PUSH2 0x329 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x830 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP3 SWAP2 SWAP1 PUSH2 0x378C JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x34A CALLDATASIZE PUSH1 0x4 PUSH2 0x3195 JUMP JUMPDEST PUSH2 0x8D2 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x35D CALLDATASIZE PUSH1 0x4 PUSH2 0x346E JUMP JUMPDEST PUSH2 0x8ED JUMP JUMPDEST PUSH2 0x2D7 PUSH2 0x370 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x93F JUMP JUMPDEST PUSH2 0x37D PUSH2 0x965 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x3778 JUMP JUMPDEST PUSH2 0x37D PUSH2 0x989 JUMP JUMPDEST PUSH2 0x210 PUSH2 0x9AD JUMP JUMPDEST PUSH2 0x230 PUSH2 0x3A8 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0xA0E JUMP JUMPDEST PUSH2 0x37D PUSH2 0xA1B JUMP JUMPDEST PUSH2 0x250 PUSH2 0x3C3 CALLDATASIZE PUSH1 0x4 PUSH2 0x3229 JUMP JUMPDEST PUSH2 0xA25 JUMP JUMPDEST PUSH2 0x32E PUSH2 0x3D6 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0xB6E JUMP JUMPDEST PUSH2 0x230 PUSH2 0x3E9 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0xC90 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x3FC CALLDATASIZE PUSH1 0x4 PUSH2 0x31B1 JUMP JUMPDEST PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x415 DUP4 DUP4 PUSH2 0x410 PUSH2 0xD15 JUMP JUMPDEST PUSH2 0xD39 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x41F PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x430 JUMPI INVALID JUMPDEST EQ PUSH2 0x447 JUMPI PUSH2 0x442 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0xFD2 JUMP JUMPDEST PUSH2 0x454 JUMP JUMPDEST PUSH2 0x454 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0x1047 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4EA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BF JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4EA JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4CD JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x502 CALLER DUP5 DUP5 PUSH2 0x10AB JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x514 PUSH2 0x1113 JUMP JUMPDEST PUSH2 0x51D DUP2 PUSH2 0x1141 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x533 PUSH2 0x11B4 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x53E PUSH2 0x11D1 JUMP JUMPDEST SWAP2 POP PUSH2 0x548 PUSH2 0x11F5 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x58D SWAP2 EQ DUP1 PUSH2 0x585 JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x598 DUP6 DUP6 DUP6 PUSH2 0x1227 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x5B3 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x5C5 JUMPI PUSH2 0x5C5 DUP6 CALLER DUP6 DUP5 SUB PUSH2 0x10AB JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E1 PUSH2 0x12F6 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x5EE PUSH2 0x1113 JUMP JUMPDEST PUSH2 0x5F6 PUSH2 0x1393 JUMP JUMPDEST PUSH2 0x609 PUSH5 0xE8D4A51000 DUP3 LT ISZERO PUSH1 0xCB PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x61F PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH1 0xCA PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x7 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9CABC14D438714DBCD9292DF9B3F89C42F98ACD93A675AD72CD6033777E9B8E7 SWAP1 PUSH2 0x654 SWAP1 DUP4 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x69F DUP7 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x13A8 JUMP JUMPDEST PUSH2 0x6B4 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x13B5 PUSH2 0x14BA PUSH2 0x151B JUMP JUMPDEST SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x6FC JUMPI PUSH2 0x6F7 CALLER DUP6 PUSH1 0x0 PUSH2 0x10AB JUMP JUMPDEST PUSH2 0x710 JUMP JUMPDEST PUSH2 0x710 CALLER DUP6 PUSH2 0x70B DUP5 DUP8 PUSH2 0xCFF JUMP JUMPDEST PUSH2 0x10AB JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x726 PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF94D4668 PUSH2 0x73C PUSH2 0x65F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x758 SWAP2 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x770 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x784 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x7AC SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x32C9 JUMP JUMPDEST POP SWAP2 POP POP PUSH2 0x7EB PUSH2 0x7BB PUSH2 0x520 JUMP JUMPDEST PUSH2 0x7E5 PUSH32 0x0 DUP5 PUSH2 0x163D JUMP JUMPDEST SWAP1 PUSH2 0x17B7 JUMP JUMPDEST SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0x85A PUSH2 0x83F PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH1 0xCD PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x86F PUSH2 0x865 PUSH2 0x65F JUMP JUMPDEST DUP3 EQ PUSH2 0x1F4 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x879 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0x885 DUP9 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x899 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x13B5 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x8A9 DUP14 DUP5 PUSH2 0x185C JUMP JUMPDEST PUSH2 0x8B3 DUP3 DUP6 PUSH2 0x14BA JUMP JUMPDEST PUSH2 0x8BD DUP2 DUP6 PUSH2 0x14BA JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP POP POP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x922 SWAP3 SWAP2 SWAP1 PUSH2 0x3735 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x950 DUP7 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x6B4 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x18EF PUSH2 0x1994 PUSH2 0x151B JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4EA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BF JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4EA JUMP JUMPDEST PUSH1 0x0 PUSH2 0x502 CALLER DUP5 DUP5 PUSH2 0x1227 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E1 PUSH2 0x19F5 JUMP JUMPDEST PUSH2 0xA33 DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD SWAP1 MLOAD SWAP1 SWAP3 SWAP2 PUSH2 0xA8A SWAP2 PUSH32 0x0 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP9 SWAP2 DUP14 SWAP2 ADD PUSH2 0x3805 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0xAAD DUP3 PUSH2 0x1A6F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xAD4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3865 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAF6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0xB38 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xB30 JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0xB61 DUP12 DUP12 DUP12 PUSH2 0x10AB JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0xB7D PUSH2 0x83F PUSH2 0x989 JUMP JUMPDEST PUSH2 0xB88 PUSH2 0x865 PUSH2 0x65F JUMP JUMPDEST PUSH1 0x60 PUSH2 0xB92 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0xB9C PUSH2 0x520 JUMP JUMPDEST PUSH2 0xC41 JUMPI PUSH1 0x0 PUSH1 0x60 PUSH2 0xBB0 DUP14 DUP14 DUP14 DUP11 PUSH2 0x1A8B JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xBC5 PUSH3 0xF4240 DUP4 LT ISZERO PUSH1 0xCC PUSH2 0x1219 JUMP JUMPDEST PUSH2 0xBD3 PUSH1 0x0 PUSH3 0xF4240 PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xBE2 DUP12 PUSH3 0xF4240 DUP5 SUB PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xBEC DUP2 DUP5 PUSH2 0x1994 JUMP JUMPDEST DUP1 PUSH2 0xBF5 PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xC0A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xC34 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0x8C5 JUMP JUMPDEST PUSH2 0xC4B DUP9 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0xC5F DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x18EF JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xC6F DUP13 DUP5 PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xC79 DUP3 DUP6 PUSH2 0x1994 JUMP JUMPDEST PUSH2 0xC83 DUP2 DUP6 PUSH2 0x14BA JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP PUSH2 0x8C5 SWAP2 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x502 SWAP2 DUP6 SWAP1 PUSH2 0x70B SWAP1 DUP7 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST DUP1 PUSH2 0xCFB DUP2 PUSH2 0x1BD0 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xD0F DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x1219 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0xD51 DUP2 DUP5 LT DUP1 ISZERO PUSH2 0xD4A JUMPI POP DUP2 DUP4 LT JUMPDEST PUSH1 0x64 PUSH2 0x1219 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0xD62 PUSH2 0xD15 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xD7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xDA6 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0xDDD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0xDF7 JUMP JUMPDEST SWAP2 POP PUSH2 0x4F2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0xE2E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0xE71 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0xEB4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0xEF7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0xF3A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0xF7D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0xFC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xFDE DUP6 DUP4 PUSH2 0x1808 JUMP JUMPDEST PUSH2 0xFFF DUP7 PUSH1 0x60 ADD MLOAD DUP4 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0xFF2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1C49 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x1012 DUP8 DUP8 DUP8 DUP8 PUSH2 0x1C55 JUMP JUMPDEST SWAP1 POP PUSH2 0x1031 DUP2 DUP5 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x1024 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1C92 JUMP JUMPDEST SWAP1 POP PUSH2 0x103C DUP2 PUSH2 0x1C9E JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1056 DUP7 PUSH1 0x60 ADD MLOAD PUSH2 0x1CB5 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x1065 DUP6 DUP4 PUSH2 0x1808 JUMP JUMPDEST PUSH2 0x1079 DUP7 PUSH1 0x60 ADD MLOAD DUP4 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0xFF2 JUMPI INVALID JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x108C DUP8 DUP8 DUP8 DUP8 PUSH2 0x1CD9 JUMP JUMPDEST SWAP1 POP PUSH2 0x103C DUP2 DUP5 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x109E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1D16 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP5 SWAP1 SSTORE MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0x1106 SWAP1 DUP6 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x112A PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x8ED JUMP JUMPDEST SWAP1 POP PUSH2 0x51D PUSH2 0x1139 DUP3 CALLER PUSH2 0x1D22 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x1219 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x1161 JUMPI PUSH2 0x115C PUSH2 0x1152 PUSH2 0x11D1 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x1176 JUMP JUMPDEST PUSH2 0x1176 PUSH2 0x116C PUSH2 0x11F5 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x654 SWAP1 DUP4 SWAP1 PUSH2 0x37BA JUMP JUMPDEST PUSH1 0x0 PUSH2 0x11BE PUSH2 0x11F5 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x5E1 JUMPI POP POP PUSH1 0x6 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST DUP2 PUSH2 0xCFB JUMPI PUSH2 0xCFB DUP2 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x124F DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x1266 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x1296 SWAP1 DUP4 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP7 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x12E8 SWAP1 DUP7 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x1363 PUSH2 0x1E65 JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1378 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3839 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x13A6 PUSH2 0x139E PUSH2 0x11B4 JUMP JUMPDEST PUSH2 0x192 PUSH2 0x1219 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0xCFB DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x13C2 PUSH2 0x11B4 JUMP JUMPDEST ISZERO PUSH2 0x1446 JUMPI PUSH2 0x13D4 DUP8 PUSH1 0x8 SLOAD DUP8 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH2 0x13E1 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1440 JUMPI PUSH2 0x1421 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x13F7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x142D JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x13D9 JUMP JUMPDEST POP PUSH2 0x1491 JUMP JUMPDEST PUSH2 0x144E PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1463 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x148D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP JUMPDEST PUSH2 0x149B DUP8 DUP6 PUSH2 0x1F72 JUMP JUMPDEST SWAP1 SWAP4 POP SWAP2 POP PUSH2 0x14AA DUP8 DUP4 PUSH2 0x1FDC JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x14C5 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x14FC DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x14DB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x14EF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x205C JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1508 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x14BD JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x15D9 JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x153F SWAP3 SWAP2 SWAP1 PUSH2 0x374D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x157C JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1581 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1590 JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x43ADBAFB PUSH1 0xE0 SHL DUP2 EQ PUSH2 0x15BB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x4 PUSH1 0x0 RETURNDATACOPY PUSH1 0x40 PUSH1 0x20 MSTORE PUSH1 0x24 RETURNDATASIZE SUB PUSH1 0x24 PUSH1 0x40 RETURNDATACOPY PUSH1 0x1C RETURNDATASIZE ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x15E3 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0x15EF DUP8 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1606 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x1619 DUP2 DUP5 DUP7 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP1 MLOAD PUSH1 0x1F NOT DUP3 ADD DUP4 SWAP1 MSTORE PUSH4 0x43ADBAFB PUSH1 0x3F NOT DUP4 ADD MSTORE PUSH1 0x20 MUL PUSH1 0x23 NOT DUP3 ADD PUSH1 0x44 DUP3 ADD DUP2 REVERT JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x167E JUMPI PUSH2 0x1674 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x165D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x1646 JUMP JUMPDEST POP DUP2 PUSH2 0x168F JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 PUSH2 0x169D DUP9 DUP6 PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x17AA JUMPI PUSH1 0x0 PUSH2 0x16CB DUP7 DUP11 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x1704 JUMPI PUSH2 0x16FA PUSH2 0x16F4 PUSH2 0x16EE DUP5 DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP10 PUSH2 0x207C JUMP JUMPDEST DUP7 PUSH2 0x20A0 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x16D0 JUMP JUMPDEST POP DUP4 SWAP5 POP PUSH2 0x1764 PUSH2 0x173A PUSH2 0x1721 PUSH2 0x171B DUP7 DUP12 PUSH2 0x207C JUMP JUMPDEST DUP5 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x1734 PUSH2 0x172E DUP11 DUP10 PUSH2 0x207C JUMP JUMPDEST DUP9 PUSH2 0x207C JUMP JUMPDEST SWAP1 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x175F PUSH2 0x1751 PUSH2 0x174B DUP8 PUSH1 0x1 PUSH2 0xCFF JUMP JUMPDEST DUP6 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x1734 PUSH2 0x16EE DUP12 PUSH1 0x1 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x20A0 JUMP JUMPDEST SWAP4 POP DUP5 DUP5 GT ISZERO PUSH2 0x178A JUMPI PUSH1 0x1 PUSH2 0x177A DUP6 DUP8 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x1785 JUMPI POP PUSH2 0x17AA JUMP JUMPDEST PUSH2 0x17A1 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x1796 DUP7 DUP7 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x17A1 JUMPI POP PUSH2 0x17AA JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x16A2 JUMP JUMPDEST POP SWAP1 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x17C6 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x17D3 JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x17F6 SWAP1 DUP6 DUP4 DUP2 PUSH2 0x17ED JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0x1219 JUMP JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x17FF JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x1813 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x183D DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1829 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1849 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x180B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x1884 DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP3 DUP3 SUB SWAP1 SSTORE PUSH1 0x2 SLOAD PUSH2 0x18AE SWAP1 DUP4 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1106 SWAP1 DUP7 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x18FC PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x190B DUP9 PUSH1 0x8 SLOAD DUP9 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH2 0x1918 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1961 JUMPI PUSH2 0x1942 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x192E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP11 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x194E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1910 JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 PUSH2 0x1970 DUP11 DUP9 PUSH2 0x20D3 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x197E DUP11 DUP3 PUSH2 0x212B JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP1 SWAP13 SWAP1 SWAP12 POP SWAP1 SWAP10 POP SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x199F PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x19D6 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x19B5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x19C9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x20A0 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x19E2 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1997 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19FF PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1A37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1A4B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x5E1 SWAP2 SWAP1 PUSH2 0x3496 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1A79 PUSH2 0x12F6 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x922 SWAP3 SWAP2 SWAP1 PUSH2 0x375D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1A97 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1AA2 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH2 0x1ABD PUSH1 0x0 DUP3 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1AB5 JUMPI INVALID JUMPDEST EQ PUSH1 0xCE PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1AC8 DUP6 PUSH2 0x21AC JUMP JUMPDEST SWAP1 POP PUSH2 0x1AD7 DUP2 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x1AE8 DUP2 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B14 PUSH32 0x0 DUP4 PUSH2 0x163D JUMP JUMPDEST PUSH1 0x8 DUP2 SWAP1 SSTORE SWAP10 SWAP2 SWAP9 POP SWAP1 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x1B4B SWAP1 DUP3 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x2 SLOAD PUSH2 0x1B71 SWAP1 DUP3 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1BB2 SWAP1 DUP6 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x5CB DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH2 0x1BDF JUMPI PUSH2 0x51D JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1BEE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1C16 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x1C3F DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH2 0x1219 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x1BFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x207C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C5F PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x454 PUSH32 0x0 DUP7 DUP7 DUP7 DUP11 PUSH1 0x60 ADD MLOAD PUSH2 0x21C2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x20A0 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x506 PUSH2 0x1CAE PUSH1 0x7 SLOAD PUSH2 0x2268 JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x228E JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1CCD PUSH1 0x7 SLOAD DUP5 PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x5CB DUP4 DUP3 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1CE3 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x454 PUSH32 0x0 DUP7 DUP7 DUP7 DUP11 PUSH1 0x60 ADD MLOAD PUSH2 0x2318 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x205C JUMP JUMPDEST PUSH1 0x0 PUSH20 0xBA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1B PUSH2 0x1D41 PUSH2 0x965 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x1D5C JUMPI POP PUSH2 0x1D5C DUP4 PUSH2 0x23A2 JUMP JUMPDEST ISZERO PUSH2 0x1D84 JUMPI PUSH2 0x1D69 PUSH2 0x965 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH2 0x1D8C PUSH2 0x19F5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1DBB SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x37E6 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1DD3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1DE7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1E0B SWAP2 SWAP1 PUSH2 0x33B0 JUMP JUMPDEST SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x1E74 PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1E89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1EB3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP3 PUSH2 0x1EC2 JUMPI SWAP1 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 DUP1 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1ED2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST PUSH2 0x1EEB PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1F22 JUMPI PUSH1 0x0 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1F00 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP DUP3 DUP2 GT ISZERO PUSH2 0x1F19 JUMPI DUP2 SWAP4 POP DUP1 SWAP3 POP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1EE3 JUMP JUMPDEST POP PUSH2 0x1F50 PUSH32 0x0 DUP9 DUP9 DUP6 DUP10 PUSH2 0x23BC JUMP JUMPDEST DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F5C JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP SWAP1 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x1F81 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1F91 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1FAB JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2418 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x1FD5 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1FB9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1FC9 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x24EE JUMP JUMPDEST PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2520 JUMP JUMPDEST POP JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH2 0x1FE8 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x2031 JUMPI PUSH2 0x2012 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1FFE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x201E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1FE0 JUMP JUMPDEST POP PUSH2 0x5CB PUSH32 0x0 DUP5 PUSH2 0x163D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x206B DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x2074 JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x5CB DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x20AF DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x20BC JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x20C8 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x20E2 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x20F2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2102 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x25AA JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2110 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2120 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2624 JUMP JUMPDEST PUSH2 0x1FD3 PUSH2 0x136 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH2 0x2137 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x2031 JUMPI PUSH2 0x2177 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x214D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2183 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x212F JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x506 SWAP2 SWAP1 PUSH2 0x34B2 JUMP JUMPDEST PUSH1 0x60 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5CB SWAP2 SWAP1 PUSH2 0x3577 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x21CF DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x21E1 DUP4 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x21ED JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x2207 DUP9 DUP9 DUP5 DUP10 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH2 0x2219 DUP5 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2225 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x225C PUSH1 0x1 PUSH2 0x1734 DUP10 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x2245 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 DUP3 LT PUSH2 0x2280 JUMPI PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x229D DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x22AA JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x22C4 SWAP1 DUP6 DUP4 DUP2 PUSH2 0x17ED JUMPI INVALID JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x22D0 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x22F6 DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST DUP1 PUSH2 0x2305 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD PUSH2 0x22D0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2325 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2337 DUP4 DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP7 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2343 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x235D DUP9 DUP9 DUP5 DUP9 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH2 0x236F DUP5 DUP9 DUP9 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x237B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x225C PUSH1 0x1 PUSH2 0x239C DUP4 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x23B4 PUSH4 0x1C74C917 PUSH1 0xE1 SHL PUSH2 0x8ED JUMP JUMPDEST SWAP1 SWAP2 EQ SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x23CB DUP8 DUP8 DUP8 DUP8 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x23DC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD GT PUSH2 0x23F0 JUMPI PUSH1 0x0 PUSH2 0x2400 JUMP JUMPDEST PUSH2 0x2400 DUP3 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x225C PUSH8 0xDE0B6B3A7640000 PUSH2 0x7E5 DUP4 DUP8 PUSH2 0x289E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2424 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x242E PUSH2 0xD15 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x243C DUP7 PUSH2 0x28CA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x244D DUP4 DUP3 LT PUSH1 0x64 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2465 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x248F JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x24C9 PUSH32 0x0 DUP10 DUP5 DUP7 PUSH2 0x24C1 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x28EC JUMP JUMPDEST DUP2 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x24D5 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP2 SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x24FD DUP5 PUSH2 0x29E4 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x2513 DUP7 DUP4 PUSH2 0x250E PUSH2 0x520 JUMP JUMPDEST PUSH2 0x29FA JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x252C PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2539 DUP6 PUSH2 0x2AAB JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x254A DUP3 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x2556 DUP3 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x258E PUSH32 0x0 DUP9 DUP6 PUSH2 0x2586 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2AC3 JUMP JUMPDEST SWAP1 POP PUSH2 0x259E DUP3 DUP3 GT ISZERO PUSH1 0xCF PUSH2 0x1219 JUMP JUMPDEST SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x25BA DUP6 PUSH2 0x2AAB JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x25D0 PUSH2 0x25C9 PUSH2 0xD15 JUMP JUMPDEST DUP4 MLOAD PUSH2 0x13A8 JUMP JUMPDEST PUSH2 0x25DC DUP3 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2614 PUSH32 0x0 DUP9 DUP6 PUSH2 0x260C PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2D59 JUMP JUMPDEST SWAP1 POP PUSH2 0x259E DUP3 DUP3 LT ISZERO PUSH1 0xD0 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0x2634 DUP6 PUSH2 0x28CA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH2 0x2671 PUSH32 0x0 DUP9 DUP5 DUP7 PUSH2 0x2669 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2F96 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x267D PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2692 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x26BC JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 DUP2 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x26CC JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP8 SWAP3 SWAP7 POP SWAP2 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x26F3 DUP7 DUP7 MLOAD PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x2704 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH2 0x2722 DUP8 MLOAD DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x276E JUMPI PUSH2 0x2753 PUSH2 0x274D PUSH2 0x2746 DUP5 DUP12 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP11 MLOAD PUSH2 0x207C JUMP JUMPDEST DUP9 PUSH2 0x205C JUMP JUMPDEST SWAP2 POP PUSH2 0x2764 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x165D JUMPI INVALID JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x2727 JUMP JUMPDEST POP PUSH2 0x2795 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x277E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x27AC PUSH2 0x27A6 DUP9 DUP10 PUSH2 0x207C JUMP JUMPDEST DUP6 PUSH2 0x20A0 JUMP JUMPDEST SWAP1 POP PUSH2 0x27DE DUP3 PUSH2 0x27D8 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x27C1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 PUSH2 0x228E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x27F6 PUSH2 0x27EF DUP10 DUP8 PUSH2 0x17B7 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x1BBE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x2816 PUSH2 0x2808 DUP12 DUP6 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x27D8 DUP7 PUSH2 0x1734 DUP15 DUP1 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x288E JUMPI DUP2 SWAP3 POP PUSH2 0x284B PUSH2 0x283D DUP13 PUSH2 0x239C DUP8 PUSH2 0x1734 DUP8 PUSH1 0x2 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x27D8 DUP8 PUSH2 0x1734 DUP7 DUP1 PUSH2 0x22DC JUMP JUMPDEST SWAP2 POP DUP3 DUP3 GT ISZERO PUSH2 0x2870 JUMPI PUSH1 0x1 PUSH2 0x2861 DUP4 DUP6 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x286B JUMPI PUSH2 0x288E JUMP JUMPDEST PUSH2 0x2886 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x287C DUP5 DUP5 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x2886 JUMPI PUSH2 0x288E JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x281B JUMP JUMPDEST POP SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x28B8 DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x28E1 SWAP2 SWAP1 PUSH2 0x3541 JUMP JUMPDEST SWAP1 SWAP6 SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x28F9 DUP9 DUP9 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2915 DUP3 PUSH2 0x290F DUP8 PUSH2 0x27D8 DUP2 DUP12 PUSH2 0xCFF JUMP JUMPDEST SWAP1 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2954 JUMPI PUSH2 0x294A DUP11 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x291B JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2963 DUP12 DUP12 DUP6 DUP13 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2977 DUP3 DUP13 DUP13 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29A1 DUP5 DUP14 DUP14 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x17B7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29AE DUP3 PUSH2 0x2268 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29BC DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH2 0x29D1 PUSH2 0x29CA DUP3 PUSH2 0x2268 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x289E JUMP JUMPDEST SWAP16 SWAP15 POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5CB SWAP2 SWAP1 PUSH2 0x3514 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2A08 DUP5 DUP5 PUSH2 0x17B7 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2A23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2A4D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0x2AA1 JUMPI PUSH2 0x2A82 DUP4 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x289E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2A8E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x2A53 JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x28E1 SWAP2 SWAP1 PUSH2 0x34CE JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2AD0 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x2AF8 JUMPI PUSH2 0x2AEE DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2AD6 JUMP JUMPDEST POP PUSH1 0x60 DUP7 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2B12 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2B3C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2C03 JUMPI PUSH1 0x0 PUSH2 0x2B74 DUP6 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2B5E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x228E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x2BB0 DUP12 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2B85 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x27D8 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2B9C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2BBC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2BF8 PUSH2 0x2BF1 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2BDB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x1BBE JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x2B43 JUMP JUMPDEST POP PUSH1 0x60 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2C1D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2C47 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP11 MLOAD DUP2 LT ISZERO PUSH2 0x2D1E JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2C64 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 GT PUSH2 0x2C7A JUMPI POP PUSH1 0x0 PUSH2 0x2CC2 JUMP JUMPDEST PUSH2 0x2CBF PUSH2 0x2C99 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2C8C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2268 JUMP JUMPDEST PUSH2 0x27D8 DUP8 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2CA8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x2CCE DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2CEA PUSH2 0x2CDE DUP4 PUSH2 0x2268 JUMP JUMPDEST DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2B5E JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2CFC DUP2 DUP16 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2D08 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP POP POP PUSH1 0x1 ADD PUSH2 0x2C4D JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2D2B DUP13 DUP4 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2D49 PUSH2 0x2D42 PUSH2 0x2D3D DUP4 DUP10 PUSH2 0x228E JUMP JUMPDEST PUSH2 0x2268 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x22DC JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2D66 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x2D8E JUMPI PUSH2 0x2D84 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2D6C JUMP JUMPDEST POP PUSH1 0x60 DUP7 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2DA8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2DD2 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2E66 JUMPI PUSH1 0x0 PUSH2 0x2DF4 DUP6 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2E30 DUP12 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2E05 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x7E5 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2E1C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2E3C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2E5B PUSH2 0x2BF1 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x2DD9 JUMP JUMPDEST POP PUSH1 0x60 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2E80 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2EAA JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP11 MLOAD DUP2 LT ISZERO PUSH2 0x2F67 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2EC7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 LT PUSH2 0x2EDD JUMPI POP PUSH1 0x0 PUSH2 0x2F0B JUMP JUMPDEST PUSH2 0x2F08 PUSH2 0x2EF8 PUSH8 0xDE0B6B3A7640000 DUP8 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST PUSH2 0x27D8 DUP7 DUP9 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x2F17 DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F33 PUSH2 0x2F27 DUP4 PUSH2 0x2268 JUMP JUMPDEST DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2F45 DUP2 DUP16 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2F51 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP POP POP PUSH1 0x1 ADD PUSH2 0x2EB0 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2F74 DUP13 DUP4 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2D49 PUSH2 0x2F8F PUSH8 0xDE0B6B3A7640000 PUSH2 0x239C DUP5 DUP11 PUSH2 0x17B7 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x289E JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2FA3 DUP9 DUP9 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2FB9 DUP3 PUSH2 0x290F DUP8 PUSH2 0x27D8 DUP2 DUP12 PUSH2 0x1BBE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2FE1 JUMPI PUSH2 0x2FD7 DUP11 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2FBF JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2FF0 DUP12 DUP12 DUP6 DUP13 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3003 DUP12 DUP12 DUP2 MLOAD DUP2 LT PUSH2 0x277E JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3017 DUP5 DUP14 DUP14 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3024 DUP3 PUSH2 0x2268 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3032 DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH2 0x29D1 PUSH2 0x3040 DUP3 PUSH2 0x2268 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x228E JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x506 DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3062 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x3075 PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST PUSH2 0x3905 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x3096 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x30B5 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3099 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x30D0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x30DE PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x30FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x30B5 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3102 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x312E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3143 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3156 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x3905 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x316D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x506 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x31A6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5CB DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x31C3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x31CE DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x31DE DUP2 PUSH2 0x394A JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x31FD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x3208 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x3218 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3243 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH2 0x324E DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x325E DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x3281 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP7 SWAP10 SWAP6 SWAP9 POP SWAP4 SWAP7 SWAP3 SWAP6 SWAP5 PUSH1 0xA0 DUP5 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 SWAP1 SWAP4 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x32B0 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x32BB DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x32DD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x32F3 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3306 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x3314 PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x3334 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x335F JUMPI DUP1 MLOAD PUSH2 0x334B DUP2 PUSH2 0x394A JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x3338 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x3376 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x3383 DUP7 DUP3 DUP8 ADD PUSH2 0x30C0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33A5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5CB DUP2 PUSH2 0x395F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33C1 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x395F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x33E6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP8 CALLDATALOAD SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x33F8 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD PUSH2 0x3408 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x3423 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x342F DUP12 DUP4 DUP13 ADD PUSH2 0x3052 JUMP JUMPDEST SWAP6 POP PUSH1 0x80 DUP11 ADD CALLDATALOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD CALLDATALOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3452 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x345F DUP11 DUP3 DUP12 ADD PUSH2 0x311E JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x347F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x5CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34A7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34C3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x34E2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x34ED DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3508 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3383 DUP7 DUP3 DUP8 ADD PUSH2 0x30C0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3526 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x3531 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x3555 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x3560 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD PUSH1 0x40 SWAP1 SWAP6 ADD MLOAD SWAP1 SWAP7 SWAP5 SWAP6 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3589 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x3594 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x35AF JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x35BB DUP6 DUP3 DUP7 ADD PUSH2 0x30C0 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x35DA JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x35F0 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP8 ADD SWAP2 POP PUSH2 0x120 DUP1 DUP4 DUP11 SUB SLT ISZERO PUSH2 0x3606 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x360F DUP2 PUSH2 0x3905 JUMP JUMPDEST SWAP1 POP PUSH2 0x361B DUP10 DUP5 PUSH2 0x3186 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x362A DUP10 PUSH1 0x20 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x363C DUP10 PUSH1 0x40 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x366C DUP10 PUSH1 0xC0 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x367E DUP10 PUSH1 0xE0 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 DUP1 DUP5 ADD CALLDATALOAD DUP4 DUP2 GT ISZERO PUSH2 0x3696 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH2 0x36A2 DUP12 DUP3 DUP8 ADD PUSH2 0x311E JUMP JUMPDEST DUP3 DUP5 ADD MSTORE POP POP DUP1 SWAP7 POP POP PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x36BF JUMPI DUP4 DUP5 REVERT JUMPDEST POP PUSH2 0x36CC DUP8 DUP3 DUP9 ADD PUSH2 0x3052 JUMP JUMPDEST SWAP5 SWAP8 SWAP5 SWAP7 POP POP POP POP PUSH1 0x40 DUP4 ADD CALLDATALOAD SWAP3 PUSH1 0x60 ADD CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x36F4 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x372A JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x370E JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x379F PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x36FB JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x37B1 DUP2 DUP6 PUSH2 0x36FB JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP6 DUP7 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x20 DUP8 ADD MSTORE SWAP3 SWAP1 SWAP4 AND PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0x80 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x38AF JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x3893 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x38C0 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x38EF PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x36FB JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x3923 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x3940 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE4 0xC2 0xDC 0xBB 0xBB 0xAE 0xEF DUP4 0xEF LOG3 0xC3 PUSH13 0xF243C46F81C40DBAF947020D33 LOG2 EXTCODESIZE 0x22 POP 0xD1 STOP 0xAD PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "937:14600:34:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1716:582:27;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4957:81:26;;;:::i;:::-;;;;;;;:::i;2582:164::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;8645:89:29:-;;;;;;:::i;:::-;;:::i;:::-;;5222:98:26;;;:::i;3137:346:8:-;;;:::i;:::-;;;;;;;;;:::i;3511:649:26:-;;;;;;:::i;:::-;;:::i;5135:81::-;;;:::i;:::-;;;;;;;:::i;5495:113::-;;;:::i;8183:399:29:-;;;;;;:::i;:::-;;:::i;7825:82::-;;;:::i;8014:106::-;;;:::i;14467:904::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;2959:379:26:-;;;;;;:::i;:::-;;:::i;15293:242:34:-;;;:::i;2194:116::-;;;:::i;2458:118:26:-;;;;;;:::i;:::-;;:::i;11118:1171:29:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;5326:110:26:-;;;;;;:::i;:::-;;:::i;2487:430:2:-;;;;;;:::i;:::-;;:::i;12942:902:29:-;;;;;;:::i;:::-;;:::i;1715:80:30:-;;;:::i;:::-;;;;;;;:::i;7740:79:29:-;;;:::i;5044:85:26:-;;;:::i;3344:161::-;;;;;;:::i;:::-;;:::i;1801:101:30:-;;;:::i;4166:760:26:-;;;;;;:::i;:::-;;:::i;8968:2144:29:-;;;;;;:::i;:::-;;:::i;2752:201:26:-;;;;;;:::i;:::-;;:::i;2310:142::-;;;;;;:::i;:::-;;:::i;1716:582:27:-;1904:7;1923:54;1940:7;1949:8;1959:17;:15;:17::i;:::-;1923:16;:54::i;:::-;1987:31;2021:17;:15;:17::i;:::-;1987:51;-1:-1:-1;2088:24:27;2068:16;;:44;;;;;;;;;:223;;2220:71;2234:11;2247:8;2257:7;2266:8;2276:14;2220:13;:71::i;:::-;2068:223;;;2131:70;2144:11;2157:8;2167:7;2176:8;2186:14;2131:12;:70::i;:::-;2049:242;1716:582;-1:-1:-1;;;;;;1716:582:27:o;4957:81:26:-;5026:5;5019:12;;;;;;;;;;;;;-1:-1:-1;;5019:12:26;;;;;;;;;;;;;;;;;;;;;;;;;;4994:13;;5019:12;;5026:5;;5019:12;;;5026:5;5019:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4957:81;;:::o;2582:164::-;2659:4;2675:42;2689:10;2701:7;2710:6;2675:13;:42::i;:::-;-1:-1:-1;2735:4:26;2582:164;;;;;:::o;8645:89:29:-;2156:21:2;:19;:21::i;:::-;8709:18:29::1;8720:6;8709:10;:18::i;:::-;8645:89:::0;:::o;5222:98:26:-;5301:12;;5222:98;:::o;3137:346:8:-;3223:11;3248:26;3288:27;3350:14;:12;:14::i;:::-;3349:15;3340:24;;3395;:22;:24::i;:::-;3374:45;;3451:25;:23;:25::i;:::-;3429:47;;3137:346;;;:::o;3511:649:26:-;-1:-1:-1;;;;;3684:18:26;;3641:4;3684:18;;;-1:-1:-1;3684:18:26;;;;;;;;3703:10;3684:30;;;;;;;;3641:4;;3724:91;;3733:20;;:50;;;3777:6;3757:16;:26;;3733:50;6726:3:3;3724:8:26;:91::i;:::-;3826:32;3832:6;3840:9;3851:6;3826:5;:32::i;:::-;-1:-1:-1;;;;;3873:20:26;;:10;:20;;;;:55;;-1:-1:-1;;;3897:31:26;;;3873:55;3869:263;;;4061:60;4075:6;4083:10;4114:6;4095:16;:25;4061:13;:60::i;:::-;4149:4;4142:11;;;3511:649;;;;;;:::o;5135:81::-;1610:2;5135:81;:::o;5495:113::-;5555:7;5581:20;:18;:20::i;:::-;5574:27;;5495:113;:::o;8183:399:29:-;2156:21:2;:19;:21::i;:::-;2953:18:8::1;:16;:18::i;:::-;8294:87:29::2;2632:4;8303:17;:45;;5289:3:3;8294:8:29;:87::i;:::-;8391;2705:4;8400:17;:45;;5228:3:3;8391:8:29;:87::i;:::-;8489:18;:38:::0;;;8542:33:::2;::::0;::::2;::::0;::::2;::::0;8510:17;;8542:33:::2;:::i;:::-;;;;;;;;8183:399:::0;:::o;7825:82::-;7893:7;7825:82;:::o;8014:106::-;8095:18;;8014:106;:::o;14467:904::-;14727:13;14742:27;14781:71;14817:8;:15;14834:17;:15;:17::i;:::-;14781:35;:71::i;:::-;14863:255;14889:6;14909;14929:9;14952:8;14974:15;15003:25;15042:8;15064:11;15089:19;14863:12;:255::i;:::-;14467:904;;;;;;;;;;:::o;2959:379:26:-;3090:10;3036:4;3079:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3079:31:26;;;;;;;;;;3125:26;;;3121:189;;3167:37;3181:10;3193:7;3202:1;3167:13;:37::i;:::-;3121:189;;;3235:64;3249:10;3261:7;3270:28;:16;3291:6;3270:20;:28::i;:::-;3235:13;:64::i;:::-;-1:-1:-1;3327:4:26;;2959:379;-1:-1:-1;;;2959:379:26:o;15293:242:34:-;15333:7;15355:25;15386:10;:8;:10::i;:::-;-1:-1:-1;;;;;15386:24:34;;15411:11;:9;:11::i;:::-;15386:37;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;15386:37:34;;;;;;;;;;;;:::i;:::-;15352:71;;;;15440:88;15514:13;:11;:13::i;:::-;15440:65;15471:23;15496:8;15440:30;:65::i;:::-;:73;;:88::i;:::-;15433:95;;;15293:242;:::o;2194:116::-;2280:23;2194:116;:::o;2458:118:26:-;-1:-1:-1;;;;;2552:17:26;2526:7;2552:17;;;;;;;;;;;;2458:118::o;11118:1171:29:-;11414:16;11432;11397:6;8811:68;8842:10;:8;:10::i;:::-;-1:-1:-1;;;;;8820:33:29;:10;:33;5392:3:3;8811:8:29;:68::i;:::-;8889:55;8908:11;:9;:11::i;:::-;8898:6;:21;7978:3:3;8889:8:29;:55::i;:::-;11460:31:::1;11494:17;:15;:17::i;:::-;11460:51;;11521:39;11535:8;11545:14;11521:13;:39::i;:::-;11572:19;11593:27;11622:38:::0;11664:196:::1;11689:6;11709;11729:9;11752:8;11774:15;11803:25;11842:8;11664:11;:196::i;:::-;11571:289;;;;;;11966:36;11982:6;11990:11;11966:15;:36::i;:::-;12114:47;12134:10;12146:14;12114:19;:47::i;:::-;12171:58;12191:21;12214:14;12171:19;:58::i;:::-;12248:10:::0;;-1:-1:-1;12260:21:29;-1:-1:-1;;;8954:1:29::1;11118:1171:::0;;;;;;;;;;;:::o;5326:110:26:-;-1:-1:-1;;;;;5415:14:26;5389:7;5415:14;;;:7;:14;;;;;;;5326:110::o;2487:430:2:-;2555:7;2876:22;2900:8;2859:50;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2849:61;;;;;;2842:68;;2487:430;;;:::o;12942:902:29:-;13202:14;13218:26;13256:71;13292:8;:15;13309:17;:15;:17::i;13256:71::-;13338:253;13364:6;13384;13404:9;13427:8;13449:15;13478:25;13517:8;13539:11;13564:17;13338:12;:253::i;1715:80:30:-;1782:6;1715:80;:::o;7740:79:29:-;7806:6;7740:79;:::o;5044:85:26:-;5115:7;5108:14;;;;;;;;;;;;;-1:-1:-1;;5108:14:26;;;;;;;;;;;;;;;;;;;;;;;;;;5083:13;;5108:14;;5115:7;;5108:14;;;5115:7;5108:14;;;;;;;;;;;;;;;;;;;;;;;;3344:161;3424:4;3440:36;3446:10;3458:9;3469:6;3440:5;:36::i;1801:101:30:-;1849:11;1879:16;:14;:16::i;4166:760:26:-;4428:60;4456:8;4437:15;:27;;5606:3:3;4428:8:26;:60::i;:::-;-1:-1:-1;;;;;4515:14:26;;4499:13;4515:14;;;:7;:14;;;;;;;;;4571:69;;4515:14;;4499:13;4571:69;;4582:17;;4515:14;;4608:7;;4617:5;;4515:14;;4631:8;;4571:69;;:::i;:::-;;;;;;;;;;;;;4561:80;;;;;;4540:101;;4652:12;4667:28;4684:10;4667:16;:28::i;:::-;4652:43;;4706:14;4723:24;4733:4;4739:1;4742;4745;4723:24;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4723:24:26;;-1:-1:-1;;4723:24:26;;;-1:-1:-1;4757:79:26;;-1:-1:-1;;;;;;4767:20:26;;;;;;4766:43;;-1:-1:-1;;;;;;4793:15:26;;;;;;;4766:43;8211:3:3;4757:8:26;:79::i;:::-;-1:-1:-1;;;;;4847:14:26;;;;;;:7;:14;;;;;-1:-1:-1;4864:9:26;;4847:26;;4883:36;4847:14;4904:7;4913:5;4883:13;:36::i;:::-;4166:760;;;;;;;;;;;:::o;8968:2144:29:-;9264:16;9282;9247:6;8811:68;8842:10;:8;:10::i;8811:68::-;8889:55;8908:11;:9;:11::i;8889:55::-;9310:31:::1;9344:17;:15;:17::i;:::-;9310:51;;9376:13;:11;:13::i;:::-;9372:1734;;9411:20;9433:26;9463:54;9481:6;9489;9497:9;9508:8;9463:17;:54::i;:::-;9410:107;;;;9812:58;2763:3;9821:12;:28;;5338:3:3;9812:8:29;:58::i;:::-;9884:41;9908:1;2763:3;9884:15;:41::i;:::-;9939:55;9955:9;2763:3;9966:12;:27;9939:15;:55::i;:::-;10081:44;10099:9;10110:14;10081:17;:44::i;:::-;10148:9;10173:17;:15;:17::i;:::-;-1:-1:-1::0;;;;;10159:32:29;::::1;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;10159:32:29::1;;10140:52;;;;;;;;;9372:1734;10223:39;10237:8;10247:14;10223:13;:39::i;:::-;10277:20;10299:26;10327:38:::0;10369:228:::1;10398:6;10422;10446:9;10473:8;10499:15;10532:25;10575:8;10369:11;:228::i;:::-;10276:321;;;;;;10711:40;10727:9;10738:12;10711:15;:40::i;:::-;10838:44;10856:9;10867:14;10838:17;:44::i;:::-;10981:58;11001:21;11024:14;10981:19;:58::i;:::-;11062:9:::0;;-1:-1:-1;11073:21:29;-1:-1:-1;11054:41:29::1;::::0;-1:-1:-1;;11054:41:29::1;2752:201:26::0;2859:10;2829:4;2880:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2880:31:26;;;;;;;;;;2829:4;;2845:79;;2880:31;;:43;;2916:6;2880:35;:43::i;2310:142::-;-1:-1:-1;;;;;2419:17:26;;;2393:7;2419:17;;;-1:-1:-1;2419:17:26;;;;;;;;:26;;;;;;;;;;;;;2310:142::o;1460:274:6:-;1670:5;1694:33;1670:5;1694:19;:33::i;:::-;1460:274;;:::o;948:166:11:-;1006:7;1025:37;1039:1;1034;:6;;4370:1:3;1025:8:11;:37::i;:::-;-1:-1:-1;1084:5:11;;;948:166::o;7913:95:29:-;7989:12;7913:95;:::o;5188:203:27:-;5317:67;5336:5;5326:7;:15;:35;;;;;5356:5;5345:8;:16;5326:35;4838:3:3;5317:8:27;:67::i;:::-;5188:203;;;:::o;21701:1122:29:-;21751:16;21779:19;21801:17;:15;:17::i;:::-;21779:39;-1:-1:-1;21828:31:29;21779:39;-1:-1:-1;;;;;21862:26:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21862:26:29;-1:-1:-1;21828:60:29;-1:-1:-1;21944:15:29;;21940:93;;21983:15;21963:14;21978:1;21963:17;;;;;;;;;;;;;:35;;;;;21940:93;;;22016:14;-1:-1:-1;22009:21:29;;-1:-1:-1;22009:21:29;21940:93;22064:1;22050:11;:15;22046:93;;;22089:15;22069:14;22084:1;22069:17;;;;;;;;;;;;;:35;;;;;22170:1;22156:11;:15;22152:93;;;22195:15;22175:14;22190:1;22175:17;;;;;;;;;;;;;:35;;;;;22276:1;22262:11;:15;22258:93;;;22301:15;22281:14;22296:1;22281:17;;;;;;;;;;;;;:35;;;;;22382:1;22368:11;:15;22364:93;;;22407:15;22387:14;22402:1;22387:17;;;;;;;;;;;;;:35;;;;;22488:1;22474:11;:15;22470:93;;;22513:15;22493:14;22508:1;22493:17;;;;;;;;;;;;;:35;;;;;22594:1;22580:11;:15;22576:93;;;22619:15;22599:14;22614:1;22599:17;;;;;;;;;;;;;:35;;;;;22700:1;22686:11;:15;22682:93;;;22725:15;22705:14;22720:1;22705:17;;;;;;;;;;;;;:35;;;;;22802:14;-1:-1:-1;;21701:1122:29;:::o;3083:746:27:-;3302:7;3321:39;3335:8;3345:14;3321:13;:39::i;:::-;3391:54;3400:11;:18;;;3420:14;3435:8;3420:24;;;;;;;;;;;;;;3391:8;:54::i;:::-;3370:18;;;:75;3456:16;3475:57;3370:11;3504:8;3514:7;3523:8;3475:15;:57::i;:::-;3456:76;;3620:47;3633:8;3643:14;3658:7;3643:23;;;;;;;;;;;;;;3620:12;:47::i;:::-;3609:58;;3795:27;3813:8;3795:17;:27::i;:::-;3788:34;3083:746;-1:-1:-1;;;;;;;3083:746:27:o;2304:773::-;2522:7;2670:42;2693:11;:18;;;2670:22;:42::i;:::-;2649:18;;;:63;2723:39;2737:8;2747:14;2723:13;:39::i;:::-;2793:53;2802:11;:18;;;2822:14;2837:7;2822:23;;;;;;;2793:53;2772:18;;;:74;2857:17;2877:56;2772:11;2905:8;2915:7;2924:8;2877:14;:56::i;:::-;2857:76;;3019:51;3034:9;3045:14;3060:8;3045:24;;;;;;;;;;;;;;3019:14;:51::i;6895:208:26:-;-1:-1:-1;;;;;7014:17:26;;;;;;;-1:-1:-1;7014:17:26;;;;;;;;:26;;;;;;;;;;;;;;:35;;;7064:32;;;;;7014:35;;7064:32;:::i;:::-;;;;;;;;6895:208;;;:::o;2300:181:2:-;2355:16;2374:20;-1:-1:-1;;;;;;2386:7:2;;;2374:11;:20::i;:::-;2355:39;;2404:70;2413:33;2425:8;2435:10;2413:11;:33::i;:::-;6379:3:3;2404:8:2;:70::i;3759:358:8:-;3815:6;3811:232;;;3837:81;3864:24;:22;:24::i;:::-;3846:15;:42;6481:3:3;3837:8:8;:81::i;:::-;3811:232;;;3949:83;3976:25;:23;:25::i;:::-;3958:15;:43;7911:3:3;3949:8:8;:83::i;:::-;4053:7;:16;;-1:-1:-1;;4053:16:8;;;;;;;4084:26;;;;;;4053:16;;4084:26;:::i;4510:237::-;4557:4;4703:25;:23;:25::i;:::-;4685:15;:43;:55;;;-1:-1:-1;;4733:7:8;;;;4732:8;;4510:237::o;4860:108::-;4942:19;4860:108;:::o;4974:110::-;5057:20;4974:110;:::o;866:101:3:-;935:9;930:34;;946:18;954:9;946:7;:18::i;6245:618:26:-;-1:-1:-1;;;;;6385:16:26;;6360:22;6385:16;;;;;;;;;;;6411:63;6420:24;;;;6666:3:3;6411:8:26;:63::i;:::-;6617:72;-1:-1:-1;;;;;6626:23:26;;;;6864:3:3;6617:8:26;:72::i;:::-;-1:-1:-1;;;;;6700:16:26;;;:8;:16;;;;;;;;;;;6719:23;;;6700:42;;6774:19;;;;;;;:31;;6719:23;6774;:31::i;:::-;-1:-1:-1;;;;;6752:19:26;;;:8;:19;;;;;;;;;;;;:53;;;;6821:35;;;;;;;;;;6849:6;;6821:35;:::i;:::-;;;;;;;;6245:618;;;;:::o;2386:188:15:-;2447:7;2494:10;2506:12;2520:15;2537:13;:11;:13::i;:::-;2560:4;2483:83;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2473:94;;;;;;2466:101;;2386:188;:::o;4186:98:8:-;4238:39;4247:14;:12;:14::i;:::-;6423:3:3;4238:8:8;:39::i;:::-;4186:98::o;855:131:6:-;933:46;947:1;942;:6;5002:3:3;933:8:6;:46::i;7810:1768:34:-;8094:19;8127:27;8168:38;8235:14;:12;:14::i;:::-;8231:963;;;8601:78;8627:8;8637:14;;8653:25;8601;:78::i;:::-;8577:102;;8851:9;8846:136;8870:17;:15;:17::i;:::-;8866:1;:21;8846:136;;;8926:41;8942:21;8964:1;8942:24;;;;;;;;;;;;;;8926:8;8935:1;8926:11;;;;;;;;;;;;;;:15;;:41;;;;:::i;:::-;8912:8;8921:1;8912:11;;;;;;;;;;;;;;;;;:55;8889:3;;8846:136;;;;8231:963;;;9165:17;:15;:17::i;:::-;-1:-1:-1;;;;;9151:32:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9151:32:34;;9127:56;;8231:963;9232:27;9240:8;9250;9232:7;:27::i;:::-;9204:55;;-1:-1:-1;9204:55:34;-1:-1:-1;9464:41:34;9484:8;9204:55;9464:19;:41::i;:::-;9447:14;:58;7810:1768;;;;;;;;;;;:::o;24068:247:29:-;24185:9;24180:129;24204:17;:15;:17::i;:::-;24200:1;:21;24180:129;;;24255:43;24268:7;24276:1;24268:10;;;;;;;;;;;;;;24280:14;24295:1;24280:17;;;;;;;;;;;;;;24255:12;:43::i;:::-;24242:7;24250:1;24242:10;;;;;;;;;;;;;;;;;:56;24223:3;;24180:129;;25583:6835;26264:10;26286:4;26264:27;26260:6152;;26578:28;;26560:12;;26586:4;;26578:28;;26560:12;;26597:8;;26578:28;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26559:47;;;26824:7;26857:1;26852:3336;;;;30348:9;26852:3336;27328:4;27325:1;27322;27307:26;27381:1;27375:8;-1:-1:-1;;;;;;27371:81:29;-1:-1:-1;;;27603:77:29;;27597:2;;27736:16;27733:1;27730;27715:38;27792:16;27789:1;27782:27;27597:2;;29203;29197:4;29194:1;29179:27;29400:2;29394:4;29387:16;29824:2;29806:16;29802:25;29796:4;29790;29775:53;30162:2;30144:16;30140:25;30137:1;30130:36;26690:3703;30423:31;30457:17;:15;:17::i;:::-;30423:51;;30488:39;30502:8;30512:14;30488:13;:39::i;:::-;30543:17;30562:29;30597:224;30622:6;30646;30670:9;30697:8;30723:15;30756:25;30799:8;30597:7;:224;;:::i;:::-;30542:279;;;;;30836:45;30852:12;30866:14;30836:15;:45;;:::i;:::-;31362:19;;-1:-1:-1;;31749:23:29;;31789:24;;;32035:66;-1:-1:-1;;32017:16:29;;32010:92;-1:-1:-1;31358:28:29;-1:-1:-1;;32128:16:29;;32384:2;32374:13;;32128:16;32360:28;1365:2249:33;2440:15;;1500:7;;;;;2465:91;2489:9;2485:1;:13;2465:91;;;2525:20;2533:8;2542:1;2533:11;;;;;;;;;;;;;;2525:3;:7;;:20;;;;:::i;:::-;2519:26;-1:-1:-1;2500:3:33;;2465:91;;;-1:-1:-1;2569:8:33;2565:47;;2600:1;2593:8;;;;;;2565:47;2621:21;2676:3;2621:21;2713:43;2722:22;2746:9;2713:8;:43::i;:::-;2689:67;;2772:9;2767:815;2791:3;2787:1;:7;2767:815;;;2815:11;2829:32;2838:9;2849:8;2858:1;2849:11;;;;;;;;;;;;;;2829:8;:32::i;:::-;2815:46;-1:-1:-1;2892:1:33;2875:149;2899:9;2895:1;:13;2875:149;;;2939:70;2950:47;2959:26;2968:3;2973:8;2982:1;2973:11;;;;;;;2959:26;2987:9;2950:8;:47::i;:::-;2999:9;2939:10;:70::i;:::-;2933:76;-1:-1:-1;2910:3:33;;2875:149;;;;3053:9;3037:25;;3088:238;3116:100;3172:43;3181:28;3190:13;3205:3;3181:8;:28::i;:::-;3211:3;3172:8;:43::i;:::-;3116:51;3125:30;3134:9;3145;3125:8;:30::i;:::-;3157:9;3116:8;:51::i;:::-;:55;;:100::i;:::-;3234:78;3276:35;3285:20;:13;3303:1;3285:17;:20::i;:::-;3307:3;3276:8;:35::i;:::-;3234:37;3243:16;:9;3257:1;3243:13;:16::i;3234:78::-;3088:10;:238::i;:::-;3076:250;;3357:13;3345:9;:25;3341:231;;;3426:1;3394:28;:9;3408:13;3394;:28::i;:::-;:33;3390:85;;3451:5;;;3390:85;3341:231;;;3531:1;3499:28;:13;3517:9;3499:17;:28::i;:::-;:33;3495:77;;3552:5;;;3495:77;-1:-1:-1;2796:3:33;;2767:815;;;-1:-1:-1;3598:9:33;;1365:2249;-1:-1:-1;;;;;;;1365:2249:33:o;2485:355:9:-;2547:7;2566:38;2575:6;;;4516:1:3;2566:8:9;:38::i;:::-;2619:6;2615:219;;-1:-1:-1;2648:1:9;2641:8;;2615:219;893:4;2700:7;;;;2721:51;;2700:1;:7;:1;2730:13;;;;;:20;4564:1:3;2721:8:9;:51::i;:::-;2822:1;2810:9;:13;;;;;;2803:20;;;;;23298:237:29;23409:9;23404:125;23428:17;:15;:17::i;:::-;23424:1;:21;23404:125;;;23479:39;23488:7;23496:1;23488:10;;;;;;;;;;;;;;23500:14;23515:1;23500:17;;;;;;;23479:39;23466:7;23474:1;23466:10;;;;;;;;;;;;;;;;;:52;23447:3;;23404:125;;5889:350:26;-1:-1:-1;;;;;5990:16:26;;5965:22;5990:16;;;;;;;;;;;6016:63;6025:24;;;;6666:3:3;6016:8:26;:63::i;:::-;-1:-1:-1;;;;;6090:16:26;;:8;:16;;;;;;;;;;6109:23;;;6090:42;;6157:12;;:24;;6109:23;6157:16;:24::i;:::-;6142:12;:39;6196:36;;6221:1;;-1:-1:-1;;;;;6196:36:26;;;;;;;6225:6;;6196:36;:::i;4087:1560:34:-;4393:7;4414:16;4444;2953:18:8;:16;:18::i;:::-;4791:38:34::1;4832:124;4871:8;4893:14;;4921:25;4832;:124::i;:::-;4791:165;;5116:9;5111:128;5135:17;:15;:17::i;:::-;5131:1;:21;5111:128;;;5187:41;5203:21;5225:1;5203:24;;;;;;;;;;;;;;5187:8;5196:1;5187:11;;;;;;;:41;5173:8;5182:1;5173:11;;;;;;;;;::::0;;::::1;::::0;;;;;:55;5154:3:::1;;5111:128;;;;5250:20;5272:26;5302:27;5310:8;5320;5302:7;:27::i;:::-;5249:80;;;;5534:40;5554:8;5564:9;5534:19;:40::i;:::-;5517:14;:57:::0;5593:12;;;;-1:-1:-1;5618:21:34;;-1:-1:-1;4087:1560:34;-1:-1:-1;;;;;;;;4087:1560:34:o;24840:243:29:-;24955:9;24950:127;24974:17;:15;:17::i;:::-;24970:1;:21;24950:127;;;25025:41;25036:7;25044:1;25036:10;;;;;;;;;;;;;;25048:14;25063:1;25048:17;;;;;;;;;;;;;;25025:10;:41::i;:::-;25012:7;25020:1;25012:10;;;;;;;;;;;;;;;;;:54;24993:3;;24950:127;;25089:488;25147:11;25544:10;:8;:10::i;:::-;-1:-1:-1;;;;;25544:24:29;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;3199:183:15:-;3276:7;3341:20;:18;:20::i;:::-;3363:10;3312:62;;;;;;;;;:::i;3292:776:34:-;3456:7;3465:16;2953:18:8;:16;:18::i;:::-;3493:24:34::1;3520:19;:8;:17;:19::i;:::-;3493:46:::0;-1:-1:-1;3549:64:34::1;3566:24;3558:4;:32;;;;;;;;;5443:3:3;3549:8:34;:64::i;:::-;3624:26;3653:27;:8;:25;:27::i;:::-;3624:56;;3690:72;3726:9;:16;3744:17;:15;:17::i;3690:72::-;3772:43;3786:9;3797:17;:15;:17::i;:::-;3772:13;:43::i;:::-;3826:26;3855:66;3886:23;3911:9;3855:30;:66::i;:::-;3983:14;:35:::0;;;;4051:9;;-1:-1:-1;3292:776:34;;-1:-1:-1;;;;;;;3292:776:34:o;5641:242:26:-;-1:-1:-1;;;;;5742:19:26;;:8;:19;;;;;;;;;;;:31;;5766:6;5742:23;:31::i;:::-;-1:-1:-1;;;;;5720:19:26;;:8;:19;;;;;;;;;;:53;5798:12;;:24;;5815:6;5798:16;:24::i;:::-;5783:12;:39;5837;;-1:-1:-1;;;;;5837:39:26;;;5854:1;;5837:39;;;;5869:6;;5837:39;:::i;:::-;;;;;;;;5641:242;;:::o;367:166:11:-;425:7;456:5;;;471:37;480:6;;;;425:7;471:8;:37::i;1740:374:6:-;1836:1;1821:5;:12;:16;1817:53;;;1853:7;;1817:53;1880:16;1899:5;1905:1;1899:8;;;;;;;;;;;;;;1880:27;;1922:9;1934:1;1922:13;;1917:191;1941:5;:12;1937:1;:16;1917:191;;;1974:15;1992:5;1998:1;1992:8;;;;;;;;;;;;;;;;;;;-1:-1:-1;2014:51:6;-1:-1:-1;;;;;2023:18:6;;;;;;;4890:3:3;2014:8:6;:51::i;:::-;2090:7;-1:-1:-1;1955:3:6;;1917:191;;22985:144:29;23065:7;23091:31;23100:6;23108:13;23091:8;:31::i;2815:452:34:-;3026:7;2953:18:8;:16;:18::i;:::-;3045:16:34::1;3064:170;3104:23;3141:8;3163:7;3184:8;3206:11;:18;;;3064:26;:170::i;24517:150:29:-:0;24601:7;24627:33;24638:6;24646:13;24627:10;:33::i;19474:236::-;19540:7;19658:45;19671:31;:18;;:29;:31::i;:::-;19658:6;;:12;:45::i;19810:279::-;19881:7;19992:17;20012:32;20025:18;;20012:6;:12;;:32;;;;:::i;:::-;19992:52;-1:-1:-1;20061:21:29;:6;19992:52;20061:10;:21::i;2356:453:34:-;2566:7;2953:18:8;:16;:18::i;:::-;2585:17:34::1;2605:170;2645:23;2682:8;2704:7;2725:8;2747:11;:18;;;2605:26;:170::i;23739:154:29:-:0;23825:7;23851:35;23864:6;23872:13;23851:12;:35::i;1908:544:30:-;1996:4;1602:42;2017:10;:8;:10::i;:::-;-1:-1:-1;;;;;2017:29:30;;;;;2016:63;;;2051:28;2070:8;2051:18;:28::i;:::-;2012:434;;;2211:10;:8;:10::i;:::-;-1:-1:-1;;;;;2197:24:30;:10;:24;;-1:-1:-1;2190:31:30;;2012:434;2374:16;:14;:16::i;:::-;:61;;-1:-1:-1;;;2374:61:30;;-1:-1:-1;;;;;2374:27:30;;;;;;;:61;;2402:8;;2412:7;;2429:4;;2374:61;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2367:68;;;;1074:3172:3;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2210:2;2243:18;;;2336;;;2383;;;2215:4;2379:29;;;3057:2;3053:17;2195:18;;;;2288;;;;2284:29;;;;3040:1;3036:14;3025:26;;;;3021:50;;;;2999:73;;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;3388:427:15;3790:9;;3765:44::o;12819:1584:34:-;12995:16;13056:38;13111:17;:15;:17::i;:::-;-1:-1:-1;;;;;13097:32:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13097:32:34;-1:-1:-1;13056:73:34;-1:-1:-1;13199:30:34;13195:89;;13252:21;-1:-1:-1;13245:28:34;;13195:89;13699:24;13737:18;13758:8;13767:1;13758:11;;;;;;;;;;;;;;13737:32;;13784:9;13796:1;13784:13;;13779:253;13803:17;:15;:17::i;:::-;13799:1;:21;13779:253;;;13841:22;13866:8;13875:1;13866:11;;;;;;;;;;;;;;13841:36;;13912:10;13895:14;:27;13891:131;;;13961:1;13942:20;;13993:14;13980:27;;13891:131;-1:-1:-1;13822:3:34;;13779:253;;;;14143:214;14202:23;14239:8;14261:17;14292:16;14322:25;14143:45;:214::i;:::-;14101:21;14123:16;14101:39;;;;;;;;;;;;;;;;;:256;-1:-1:-1;14375:21:34;;12819:1584;-1:-1:-1;;;;;12819:1584:34:o;9584:609::-;9697:7;9706:16;9738:13;9754:19;:8;:17;:19::i;:::-;9738:35;-1:-1:-1;9796:39:34;9788:4;:47;;;;;;;;;9784:403;;;9858:46;9885:8;9895;9858:26;:46::i;:::-;9851:53;;;;;;;9784:403;9933:36;9925:4;:44;;;;;;;;;9921:266;;;9992:47;10020:8;10030;9992:27;:47::i;9921:266::-;10129:47;10157:8;10167;10129:27;:47::i;9921:266::-;9584:609;;;;;;;:::o;14745:360::-;14876:7;;14899:117;14923:17;:15;:17::i;:::-;14919:1;:21;14899:117;;;14975:30;14991:10;15002:1;14991:13;;;;;;;;;;;;;;14975:8;14984:1;14975:11;;;;;;;:30;14961:8;14970:1;14961:11;;;;;;;;;;;;;;;;;:44;14942:3;;14899:117;;;;15033:65;15064:23;15089:8;15033:30;:65::i;1979:148:11:-;2041:7;2060:38;2069:6;;;4516:1:3;2060:8:11;:38::i;:::-;2119:1;2115;:5;;;;;;;1979:148;-1:-1:-1;;;1979:148:11:o;1793:180::-;1851:7;1882:5;;;1897:51;1906:6;;;:20;;;1925:1;1920;1916;:5;;;;;;:10;1906:20;4467:1:3;1897:8:11;:51::i;2133:232::-;2193:7;2212:38;2221:6;;;4516:1:3;2212:8:11;:38::i;:::-;2265:6;2261:98;;-1:-1:-1;2294:1:11;2287:8;;2261:98;2347:1;2342;2338;:5;2337:11;;;;;;2333:1;:15;2326:22;;;;5653:534:34;5766:7;5775:16;5807:13;5823:19;:8;:17;:19::i;:::-;5807:35;-1:-1:-1;5865:36:34;5857:4;:44;;;;;;;;;5853:328;;;5924:47;5952:8;5962;5924:27;:47::i;5853:328::-;6000:35;5992:4;:43;;;;;;;;;5988:193;;;6058:46;6085:8;6095;6058:26;:46::i;5988:193::-;6135:35;6211:3:3;6135:7:34;:35::i;14409:330::-;14515:7;;14534:116;14558:17;:15;:17::i;:::-;14554:1;:21;14534:116;;;14610:29;14626:9;14636:1;14626:12;;;;;;;;;;;;;;14610:8;14619:1;14610:11;;;;;;;;;;;;;;:15;;:29;;;;:::i;:::-;14596:8;14605:1;14596:11;;;;;;;;;;;;;;;;;:43;14577:3;;14534:116;;826:144:36;886:19;935:4;924:39;;;;;;;;;;;;:::i;1126:179::-;1194:26;1259:4;1248:50;;;;;;;;;;;;:::i;6125:2118:33:-;6347:7;7734:17;7754:53;7774:22;7798:8;7754:19;:53::i;:::-;7734:73;;7844:43;7872:14;7844:8;7853:13;7844:23;;;;;;;:43;7818:8;7827:13;7818:23;;;;;;;;;;;;;:69;;;;;7898:22;7923:166;7986:22;8022:8;8044:9;8067:12;7923:49;:166::i;:::-;7898:191;;8126:43;8154:14;8126:8;8135:13;8126:23;;;;;;;:43;8100:8;8109:13;8100:23;;;;;;;;;;;;;:69;;;;;8187:49;8234:1;8187:42;8206:8;8215:12;8206:22;;;;;;;;;;;;;;8187:14;:18;;:42;;;;:::i;:49::-;8180:56;6125:2118;-1:-1:-1;;;;;;;;6125:2118:33:o;4812:112:9:-;4866:7;893:4;4893:1;:7;4892:25;;4916:1;4892:25;;;-1:-1:-1;893:4:9;4905:7;;4812:112::o;2846:682::-;2906:7;2925:38;2934:6;;;4516:1:3;2925:8:9;:38::i;:::-;2978:6;2974:548;;-1:-1:-1;3007:1:9;3000:8;;2974:548;893:4;3059:7;;;;3080:51;;3059:1;:7;:1;3089:13;;;3080:51;3505:1;3500;3488:9;:13;3487:19;;;;;;3510:1;3486:25;3479:32;;;;;1862:617;1922:7;1959:5;;;1974:57;1983:6;;;:26;;;2008:1;2003;1993:7;:11;;;;1974:57;2046:12;2042:431;;2081:1;2074:8;;;;;2042:431;893:4;-1:-1:-1;;2439:11:9;;2438:19;;3789:2118:33;4010:7;5400:17;5420:53;5440:22;5464:8;5420:19;:53::i;:::-;5400:73;;5509:41;5536:13;5509:8;5518:12;5509:22;;;;;;;:41;5484:8;5493:12;5484:22;;;;;;;;;;;;;:66;;;;;5561:23;5587:167;5650:22;5686:8;5708:9;5731:13;5587:49;:167::i;:::-;5561:193;;5790:41;5817:13;5790:8;5799:12;5790:22;;;;;;;:41;5765:8;5774:12;5765:22;;;;;;;;;;;;;:66;;;;;5849:51;5898:1;5849:44;5877:15;5849:8;5858:13;5849:23;;;;;;;:44;:48;;:51::i;2458:246:30:-;2526:4;2646:51;-1:-1:-1;;;2646:11:30;:51::i;:::-;2634:63;;;;2458:246;-1:-1:-1;2458:246:30:o;19626:2160:33:-;19876:7;21280:28;21311:168;21374:22;21410:8;21432:13;21459:10;21311:49;:168::i;:::-;21280:199;;21524:32;21582:20;21559:8;21568:10;21559:20;;;;;;;;;;;;;;:43;:120;;21678:1;21559:120;;;21617:46;21642:20;21617:8;21626:10;21617:20;;;;;;;:46;21524:155;-1:-1:-1;21696:83:33;893:4:9;21696:59:33;21524:155;21729:25;21696:32;:59::i;10199:934:34:-;10353:7;10362:16;2953:18:8;:16;:18::i;:::-;10463:19:34::1;10485:17;:15;:17::i;:::-;10463:39;;10513:19;10534:18:::0;10556:32:::1;:8;:30;:32::i;:::-;10512:76;;;;10598:56;10620:11;10607:10;:24;4838:3:3;10598:8:34;:56::i;:::-;10775:27;10819:11:::0;-1:-1:-1;;;;;10805:26:34;::::1;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;10805:26:34::1;;10775:56;;10867:216;10920:23;10957:8;10979:10;11003:11;11028:13;:11;:13::i;:::-;11055:18;;10867:39;:216::i;:::-;10842:10;10853;10842:22;;;;;;;;;::::0;;::::1;::::0;;;;;:241;11102:11;;;;-1:-1:-1;10199:934:34;;-1:-1:-1;;;;;10199:934:34:o;11139:808::-;11272:7;11281:16;11723:19;11745:33;:8;:31;:33::i;:::-;11723:55;;11789:27;11819:78;11860:8;11870:11;11883:13;:11;:13::i;:::-;11819:40;:78::i;:::-;11916:11;;;;-1:-1:-1;11139:808:34;;-1:-1:-1;;;;11139:808:34:o;11953:844::-;12108:7;12117:16;2953:18:8;:16;:18::i;:::-;12220:27:34::1;12249:22;12275:33;:8;:31;:33::i;:::-;12219:89;;;;12318:73;12354:10;:17;12373;:15;:17::i;12318:73::-;12402:44;12416:10;12428:17;:15;:17::i;12402:44::-;12457:19;12479:192;12533:23;12570:8;12592:10;12616:13;:11;:13::i;:::-;12643:18;;12479:40;:192::i;:::-;12457:214;;12682:65;12706:14;12691:11;:29;;5498:3:3;12682:8:34;:65::i;:::-;12766:11:::0;12779:10;;-1:-1:-1;11953:844:34;;-1:-1:-1;;;;11953:844:34:o;6193:752::-;6326:7;6335:16;6368:26;6396:23;6423:33;:8;:31;:33::i;:::-;6367:89;;;;6466:72;6502:17;:15;:17::i;:::-;6521:9;:16;6466:35;:72::i;:::-;6548:43;6562:9;6573:17;:15;:17::i;6548:43::-;6602:20;6625:191;6679:23;6716:8;6738:9;6761:13;:11;:13::i;:::-;6788:18;;6625:40;:191::i;:::-;6602:214;;6827:68;6852:15;6836:12;:31;;5554:3:3;6827:8:34;:68::i;6951:840::-;7083:7;7092:16;7125:20;7147:18;7169:32;:8;:30;:32::i;:::-;7124:77;;;;7212:16;7231:217;7284:23;7321:8;7343:10;7367:12;7393:13;:11;:13::i;:::-;7420:18;;7231:39;:217::i;:::-;7212:236;;7608:36;7661:17;:15;:17::i;:::-;-1:-1:-1;;;;;7647:32:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7647:32:34;;7608:71;;7723:8;7689:19;7709:10;7689:31;;;;;;;;;;;;;;;;;:42;7750:12;;;;-1:-1:-1;6951:840:34;;-1:-1:-1;;;;;6951:840:34:o;21946:1810:33:-;22163:7;22219:21;22243:49;22252:22;22276:8;:15;22243:8;:49::i;:::-;22219:73;;22302:11;22316:8;22325:1;22316:11;;;;;;;;;;;;;;22302:25;;22337:11;22351:38;22360:8;:15;22377:8;22386:1;22377:11;;;;;;;22351:38;22337:52;-1:-1:-1;22416:1:33;22399:195;22423:8;:15;22419:1;:19;22399:195;;;22465:78;22478:53;22487:26;22496:3;22501:8;22510:1;22501:11;;;;;;;22487:26;22515:8;:15;22478:8;:53::i;:::-;22533:9;22465:12;:78::i;:::-;22459:84;;22563:20;22571:8;22580:1;22571:11;;;;;;;22563:20;22557:26;-1:-1:-1;22440:3:33;;22399:195;;;;22609:29;22617:8;22626:10;22617:20;;;;;;;;;;;;;;22609:3;:7;;:29;;;;:::i;:::-;22603:35;;22649:9;22661:57;22672:30;22681:9;22692;22672:8;:30::i;:::-;22704:13;22661:10;:57::i;:::-;22649:69;;22791:40;22827:3;22791:29;22799:8;22808:10;22799:20;;;;;;;;;;;;;;22791:1;:7;;:29;;;;:::i;:::-;:35;;:40::i;:::-;22787:44;-1:-1:-1;22842:9:33;22854:41;22862:32;:9;22880:13;22862:17;:32::i;:::-;22854:3;;:7;:41::i;:::-;22842:53;-1:-1:-1;22948:24:33;;23146:57;23186:16;:9;22842:53;23186:13;:16::i;:::-;23146:33;23177:1;23146:26;23162:9;;23146:15;:26::i;:57::-;23123:80;;23219:9;23214:507;23238:3;23234:1;:7;23214:507;;;23281:12;23262:31;;23323:124;23386:47;23423:9;23386:32;23416:1;23386:25;23395:12;23409:1;23386:8;:25::i;:47::-;23323:39;23360:1;23323:32;23342:12;;23323:18;:32::i;:124::-;23308:139;;23481:16;23466:12;:31;23462:249;;;23559:1;23521:34;:12;23538:16;23521;:34::i;:::-;:39;23517:91;;23584:5;;23517:91;23462:249;;;23670:1;23632:34;:16;23653:12;23632:20;:34::i;:::-;:39;23628:83;;23691:5;;23628:83;23243:3;;23214:507;;;-1:-1:-1;23737:12:33;21946:1810;-1:-1:-1;;;;;;;;;;;21946:1810:33:o;1647:209:9:-;1709:7;1746:5;;;1761:57;1770:6;;;:26;;;1795:1;1790;1780:7;:11;;;;1761:57;893:4;1836:13;;;;-1:-1:-1;;;1647:209:9:o;1805:218:36:-;1878:19;1899:18;1970:4;1959:57;;;;;;;;;;;;:::i;:::-;1929:87;;;;-1:-1:-1;1805:218:36;-1:-1:-1;;;1805:218:36:o;16622:1480:33:-;16869:7;16925:24;16952:34;16972:3;16977:8;16952:19;:34::i;:::-;16925:61;-1:-1:-1;17035:20:33;17058:77;16925:61;17058:53;17096:14;17058:31;17096:14;17077:11;17058:18;:31::i;:53::-;:59;;:77::i;:::-;17035:100;;17280:19;17318:9;17313:113;17337:8;:15;17333:1;:19;17313:113;;;17387:28;17403:8;17412:1;17403:11;;;;;;;;;;;;;;17387;:15;;:28;;;;:::i;:::-;17373:42;-1:-1:-1;17354:3:33;;17313:113;;;;17470:28;17501:148;17564:3;17581:8;17603:12;17629:10;17501:49;:148::i;:::-;17470:179;;17659:26;17688:46;17713:20;17688:8;17697:10;17688:20;;;;;;;:46;17659:75;;17795:21;17819:41;17848:11;17819:8;17828:10;17819:20;;;;;;;;;;;;;;:28;;:41;;;;:::i;:::-;17795:65;;17870:36;17909:26;:13;:24;:26::i;:::-;17870:65;-1:-1:-1;17946:21:33;17970:53;:17;17870:65;17970:23;:53::i;:::-;17946:77;;18041:54;18068:26;:13;:24;:26::i;:::-;18041:18;;:26;:54::i;:::-;18034:61;16622:1480;-1:-1:-1;;;;;;;;;;;;;;;16622:1480:33:o;2029:178:36:-;2103:19;2163:4;2152:48;;;;;;;;;;;;:::i;18108:1459:33:-;18272:16;19282;19301:35;:11;19321:14;19301:19;:35::i;:::-;19391:15;;19282:54;;-1:-1:-1;19347:27:33;;-1:-1:-1;;;;;19377:30:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19377:30:33;;19347:60;;19422:9;19417:116;19441:8;:15;19437:1;:19;19417:116;;;19493:29;19513:8;19493;19502:1;19493:11;;;;;;;;;;;;;;:19;;:29;;;;:::i;:::-;19477:10;19488:1;19477:13;;;;;;;;;;;;;;;;;:45;19458:3;;19417:116;;;-1:-1:-1;19550:10:33;18108:1459;-1:-1:-1;;;;;18108:1459:33:o;2213:264:36:-;2311:27;2340:22;2422:4;2411:59;;;;;;;;;;;;:::i;13857:2562:33:-;14075:7;14175:24;14202:34;14222:3;14227:8;14202:19;:34::i;:::-;14175:61;;14409:19;14447:9;14442:113;14466:8;:15;14462:1;:19;14442:113;;;14516:28;14532:8;14541:1;14532:11;;;;;;;14516:28;14502:42;-1:-1:-1;14483:3:33;;14442:113;;;-1:-1:-1;14700:17:33;;14638:45;;-1:-1:-1;;;;;14686:32:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14686:32:33;;14638:80;;14728:28;14775:9;14770:337;14794:8;:15;14790:1;:19;14770:337;;;14830:21;14854:30;14872:11;14854:8;14863:1;14854:11;;;;;;;;;;;;;;:17;;:30;;;;:::i;:::-;14830:54;;14932:49;14969:8;14978:1;14969:11;;;;;;;;;;;;;;14932:30;14948:10;14959:1;14948:13;;;;;;;;;;;;;;14932:8;14941:1;14932:11;;;;;;;:49;14898:28;14927:1;14898:31;;;;;;;;;;;;;:83;;;;;15018:78;15043:52;15081:13;15043:28;15072:1;15043:31;;;;;;;;;;;;;;:37;;:52;;;;:::i;:::-;15018:20;;:24;:78::i;:::-;14995:101;-1:-1:-1;;14811:3:33;;14770:337;;;-1:-1:-1;15265:15:33;;15220:28;;-1:-1:-1;;;;;15251:30:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15251:30:33;;15220:61;;15296:9;15291:868;15315:8;:15;15311:1;:19;15291:868;;;15351:36;15594:28;15623:1;15594:31;;;;;;;;;;;;;;15570:20;:55;15566:343;;-1:-1:-1;15676:1:33;15566:343;;;15747:147;15832:44;:28;15861:1;15832:31;;;;;;;;;;;;;;:42;:44::i;:::-;15747:57;15772:28;15801:1;15772:31;;;;;;;;;;;;;;15747:20;:24;;:57;;;;:::i;:147::-;15716:178;;15566:343;15923:21;15947:43;:7;15961:28;15947:13;:43::i;:::-;15923:67;;16005:26;16034:47;16054:26;:13;:24;:26::i;:::-;16034:10;16045:1;16034:13;;;;;;;:47;16005:76;;16113:35;16129:18;16113:8;16122:1;16113:11;;;;;;;:35;16096:11;16108:1;16096:14;;;;;;;;;;;;;;;;;:52;-1:-1:-1;;;15332:3:33;;15291:868;;;;16233:20;16256:37;16276:3;16281:11;16256:19;:37::i;:::-;16233:60;-1:-1:-1;16341:71:33;16362:49;:36;16233:60;16381:16;16362:18;:36::i;:::-;:47;:49::i;:::-;16341:14;;:20;:71::i;:::-;16334:78;13857:2562;-1:-1:-1;;;;;;;;;;;;13857:2562:33:o;9092:2877::-;9319:7;9418:24;9445:34;9465:3;9470:8;9445:19;:34::i;:::-;9418:61;;9653:19;9691:9;9686:113;9710:8;:15;9706:1;:19;9686:113;;;9760:28;9776:8;9785:1;9776:11;;;;;;;9760:28;9746:42;-1:-1:-1;9727:3:33;;9686:113;;;-1:-1:-1;9944:16:33;;9882:45;;-1:-1:-1;;;;;9930:31:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9930:31:33;;9882:79;;10035:28;10082:9;10077:342;10101:8;:15;10097:1;:19;10077:342;;;10137:21;10161:32;10181:11;10161:8;10170:1;10161:11;;;;;;;:32;10137:56;;10241:50;10279:8;10288:1;10279:11;;;;;;;;;;;;;;10241:29;10257:9;10267:1;10257:12;;;;;;;;;;;;;;10241:8;10250:1;10241:11;;;;;;;:50;10207:28;10236:1;10207:31;;;;;;;;;;;;;:84;;;;;10328:80;10353:54;10393:13;10353:28;10382:1;10353:31;;;;;;;10328:80;10305:103;-1:-1:-1;;10118:3:33;;10077:342;;;-1:-1:-1;10577:15:33;;10532:28;;-1:-1:-1;;;;;10563:30:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10563:30:33;;10532:61;;10608:9;10603:1094;10627:8;:15;10623:1;:19;10603:1094;;;10773:36;11118:28;11147:1;11118:31;;;;;;;;;;;;;;11094:20;:55;11090:350;;-1:-1:-1;11200:1:33;11090:350;;;11271:154;11356:51;893:4:9;11356:28:33;11385:1;11356:31;;;;;;;:51;11271:57;11307:20;11271:28;11300:1;11271:31;;;;;;;:154;11240:185;;11090:350;11454:21;11478:53;:17;11502:28;11478:23;:53::i;:::-;11454:77;;11546:24;11573:48;11594:26;:13;:24;:26::i;:::-;11573:9;11583:1;11573:12;;;;;;;:48;11546:75;;11653:33;11669:16;11653:8;11662:1;11653:11;;;;;;;:33;11636:11;11648:1;11636:14;;;;;;;;;;;;;;;;;:50;-1:-1:-1;;;10644:3:33;;10603:1094;;;;11771:20;11794:37;11814:3;11819:11;11794:19;:37::i;:::-;11771:60;-1:-1:-1;11880:82:33;11903:58;893:4:9;11903:38:33;11771:60;11924:16;11903:20;:38::i;:58::-;11880:14;;:22;:82::i;12168:1511::-;12416:7;12518:24;12545:34;12565:3;12570:8;12545:19;:34::i;:::-;12518:61;-1:-1:-1;12625:20:33;12648:78;12518:61;12648:54;12687:14;12648:32;12687:14;12667:12;12648:18;:32::i;:78::-;12625:101;;12871:19;12909:9;12904:113;12928:8;:15;12924:1;:19;12904:113;;;12978:28;12994:8;13003:1;12994:11;;;;;;;12978:28;12964:42;-1:-1:-1;12945:3:33;;12904:113;;;;13059:28;13090:148;13153:3;13170:8;13192:12;13218:10;13090:49;:148::i;:::-;13059:179;;13248:24;13275:46;13300:8;13309:10;13300:20;;;;;;;13275:46;13248:73;;13376:21;13400:41;13429:11;13400:8;13409:10;13400:20;;;;;;;:41;13376:65;;13451:36;13490:26;:13;:24;:26::i;:::-;13451:65;-1:-1:-1;13527:21:33;13551:53;:17;13451:65;13551:23;:53::i;:::-;13527:77;;13622:50;13645:26;:13;:24;:26::i;:::-;13622:16;;:22;:50::i;5:130:-1:-;72:20;;97:33;72:20;97:33;:::i;961:707::-;;1078:3;1071:4;1063:6;1059:17;1055:27;1045:2;;-1:-1;;1086:12;1045:2;1133:6;1120:20;1155:80;1170:64;1227:6;1170:64;:::i;:::-;1155:80;:::i;:::-;1263:21;;;1146:89;-1:-1;1307:4;1320:14;;;;1295:17;;;1409;;;1400:27;;;;1397:36;-1:-1;1394:2;;;1446:1;;1436:12;1394:2;1471:1;1456:206;1481:6;1478:1;1475:13;1456:206;;;6201:20;;1549:50;;1613:14;;;;1641;;;;1503:1;1496:9;1456:206;;;1460:14;;;;;1038:630;;;;:::o;1694:722::-;;1822:3;1815:4;1807:6;1803:17;1799:27;1789:2;;-1:-1;;1830:12;1789:2;1870:6;1864:13;1892:80;1907:64;1964:6;1907:64;:::i;1892:80::-;2000:21;;;1883:89;-1:-1;2044:4;2057:14;;;;2032:17;;;2146;;;2137:27;;;;2134:36;-1:-1;2131:2;;;2183:1;;2173:12;2131:2;2208:1;2193:217;2218:6;2215:1;2212:13;2193:217;;;6349:13;;2286:61;;2361:14;;;;2389;;;;2240:1;2233:9;2193:217;;2963:440;;3064:3;3057:4;3049:6;3045:17;3041:27;3031:2;;-1:-1;;3072:12;3031:2;3106:20;;-1:-1;;;;;29197:30;;29194:2;;;-1:-1;;29230:12;29194:2;3141:64;29371:4;-1:-1;;29303:9;29284:17;;29280:33;29361:15;3141:64;:::i;:::-;3132:73;;3225:6;3218:5;3211:21;3329:3;29371:4;3320:6;3253;3311:16;;3308:25;3305:2;;;3346:1;;3336:12;3305:2;32231:6;29371:4;3253:6;3249:17;29371:4;3287:5;3283:16;32208:30;32287:1;32269:16;;;29371:4;32269:16;32262:27;3287:5;3024:379;-1:-1;;3024:379::o;4266:158::-;4347:20;;33965:1;33955:12;;33945:2;;33981:1;;33971:12;6545:241;;6649:2;6637:9;6628:7;6624:23;6620:32;6617:2;;;-1:-1;;6655:12;6617:2;85:6;72:20;97:33;124:5;97:33;:::i;6793:366::-;;;6914:2;6902:9;6893:7;6889:23;6885:32;6882:2;;;-1:-1;;6920:12;6882:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;6972:63;-1:-1;7072:2;7111:22;;72:20;97:33;72:20;97:33;:::i;:::-;7080:63;;;;6876:283;;;;;:::o;7166:491::-;;;;7304:2;7292:9;7283:7;7279:23;7275:32;7272:2;;;-1:-1;;7310:12;7272:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;7362:63;-1:-1;7462:2;7501:22;;72:20;97:33;72:20;97:33;:::i;:::-;7266:391;;7470:63;;-1:-1;;;7570:2;7609:22;;;;6201:20;;7266:391::o;7664:991::-;;;;;;;;7868:3;7856:9;7847:7;7843:23;7839:33;7836:2;;;-1:-1;;7875:12;7836:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;7927:63;-1:-1;8027:2;8066:22;;72:20;97:33;72:20;97:33;:::i;:::-;8035:63;-1:-1;8135:2;8174:22;;6201:20;;-1:-1;8243:2;8282:22;;6201:20;;-1:-1;8351:3;8389:22;;6477:20;31535:4;31524:16;;34178:33;;34168:2;;-1:-1;;34215:12;34168:2;7830:825;;;;-1:-1;7830:825;;;;8360:61;8458:3;8498:22;;2757:20;;-1:-1;8567:3;8607:22;;;2757:20;;7830:825;-1:-1;;7830:825::o;8662:366::-;;;8783:2;8771:9;8762:7;8758:23;8754:32;8751:2;;;-1:-1;;8789:12;8751:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;8841:63;8941:2;8980:22;;;;6201:20;;-1:-1;;;8745:283::o;9035:823::-;;;;9249:2;9237:9;9228:7;9224:23;9220:32;9217:2;;;-1:-1;;9255:12;9217:2;9300:24;;-1:-1;;;;;9333:30;;;9330:2;;;-1:-1;;9366:12;9330:2;9483:6;9472:9;9468:22;;;311:3;304:4;296:6;292:17;288:27;278:2;;-1:-1;;319:12;278:2;359:6;353:13;381:95;396:79;468:6;396:79;:::i;381:95::-;482:16;518:6;511:5;504:21;548:4;;565:3;561:14;554:21;;548:4;540:6;536:17;670:3;548:4;;654:6;650:17;540:6;641:27;;638:36;635:2;;;-1:-1;;677:12;635:2;-1:-1;703:10;;697:232;722:6;719:1;716:13;697:232;;;3860:6;3854:13;3872:48;3914:5;3872:48;:::i;:::-;790:76;;744:1;737:9;;;;;880:14;;;;908;;697:232;;;-1:-1;9543:18;;9537:25;9386:114;;-1:-1;9537:25;-1:-1;;;9571:30;;;9568:2;;;-1:-1;;9604:12;9568:2;;9634:89;9715:7;9706:6;9695:9;9691:22;9634:89;:::i;:::-;9624:99;;;9760:2;9814:9;9810:22;6349:13;9768:74;;9211:647;;;;;:::o;9865:235::-;;9966:2;9954:9;9945:7;9941:23;9937:32;9934:2;;;-1:-1;;9972:12;9934:2;2501:6;2488:20;2513:30;2537:5;2513:30;:::i;10107:257::-;;10219:2;10207:9;10198:7;10194:23;10190:32;10187:2;;;-1:-1;;10225:12;10187:2;2636:6;2630:13;2648:30;2672:5;2648:30;:::i;10371:1235::-;;;;;;;;10611:3;10599:9;10590:7;10586:23;10582:33;10579:2;;;-1:-1;;10618:12;10579:2;2770:6;2757:20;10670:63;;10770:2;10813:9;10809:22;72:20;97:33;124:5;97:33;:::i;:::-;10778:63;-1:-1;10878:2;10917:22;;72:20;97:33;72:20;97:33;:::i;:::-;10886:63;-1:-1;11014:2;10999:18;;10986:32;-1:-1;;;;;11027:30;;;11024:2;;;-1:-1;;11060:12;11024:2;11090:78;11160:7;11151:6;11140:9;11136:22;11090:78;:::i;:::-;11080:88;;11205:3;11249:9;11245:22;6201:20;11214:63;;11314:3;11358:9;11354:22;6201:20;11323:63;;11451:3;11440:9;11436:19;11423:33;11409:47;;11038:18;11468:6;11465:30;11462:2;;;-1:-1;;11498:12;11462:2;;11528:62;11582:7;11573:6;11562:9;11558:22;11528:62;:::i;:::-;11518:72;;;10573:1033;;;;;;;;;;:::o;11613:239::-;;11716:2;11704:9;11695:7;11691:23;11687:32;11684:2;;;-1:-1;;11722:12;11684:2;2893:20;;-1:-1;;;;;;30935:78;;33270:34;;33260:2;;-1:-1;;33308:12;11859:305;;11995:2;11983:9;11974:7;11970:23;11966:32;11963:2;;;-1:-1;;12001:12;11963:2;3516:6;3510:13;3528:54;3576:5;3528:54;:::i;12171:289::-;;12299:2;12287:9;12278:7;12274:23;12270:32;12267:2;;;-1:-1;;12305:12;12267:2;4029:6;4023:13;4041:46;4081:5;4041:46;:::i;12467:690::-;;;;12654:2;12642:9;12633:7;12629:23;12625:32;12622:2;;;-1:-1;;12660:12;12622:2;4029:6;4023:13;4041:46;4081:5;4041:46;:::i;:::-;12857:2;12842:18;;12836:25;12712:87;;-1:-1;;;;;;12870:30;;12867:2;;;-1:-1;;12903:12;12867:2;12933:89;13014:7;13005:6;12994:9;12990:22;12933:89;:::i;13164:425::-;;;13309:2;13297:9;13288:7;13284:23;13280:32;13277:2;;;-1:-1;;13315:12;13277:2;4029:6;4023:13;4041:46;4081:5;4041:46;:::i;:::-;13491:2;13541:22;;;;6349:13;13367:87;;6349:13;;-1:-1;;;13271:318::o;13596:561::-;;;;13758:2;13746:9;13737:7;13733:23;13729:32;13726:2;;;-1:-1;;13764:12;13726:2;4029:6;4023:13;4041:46;4081:5;4041:46;:::i;:::-;13940:2;13990:22;;6349:13;14059:2;14109:22;;;6349:13;13816:87;;6349:13;;-1:-1;6349:13;13720:437;-1:-1;;;13720:437::o;14460:554::-;;;14630:2;14618:9;14609:7;14605:23;14601:32;14598:2;;;-1:-1;;14636:12;14598:2;4029:6;4023:13;4041:46;4081:5;4041:46;:::i;:::-;14833:2;14818:18;;14812:25;14688:87;;-1:-1;;;;;;14846:30;;14843:2;;;-1:-1;;14879:12;14843:2;14909:89;14990:7;14981:6;14970:9;14966:22;14909:89;:::i;:::-;14899:99;;;14592:422;;;;;:::o;16286:899::-;;;;;16496:3;16484:9;16475:7;16471:23;16467:33;16464:2;;;-1:-1;;16503:12;16464:2;16548:31;;-1:-1;;;;;16588:30;;;16585:2;;;-1:-1;;16621:12;16585:2;16717:6;16706:9;16702:22;;;4592:6;;4580:9;4575:3;4571:19;4567:32;4564:2;;;-1:-1;;4602:12;4564:2;4630:22;4592:6;4630:22;:::i;:::-;4621:31;;4734:63;4793:3;4769:22;4734:63;:::i;:::-;4716:16;4709:89;4895:64;4955:3;4862:2;4935:9;4931:22;4895:64;:::i;:::-;4862:2;4881:5;4877:16;4870:90;5058:64;5118:3;5025:2;5098:9;5094:22;5058:64;:::i;:::-;5025:2;5044:5;5040:16;5033:90;5186:2;5244:9;5240:22;6201:20;5186:2;5205:5;5201:16;5194:75;16496:3;5391:9;5387:22;2757:20;16496:3;5352:5;5348:16;5341:75;5488:3;5547:9;5543:22;6201:20;5488:3;5508:5;5504:16;5497:75;5667:49;5712:3;5633;5692:9;5688:22;5667:49;:::i;:::-;5633:3;5653:5;5649:16;5642:75;5810:49;5855:3;5776;5835:9;5831:22;5810:49;:::i;:::-;5776:3;5796:5;5792:16;5785:75;5953:3;;5942:9;5938:19;5925:33;16599:18;5970:6;5967:30;5964:2;;;-1:-1;;6000:12;5964:2;6047:58;6101:3;6092:6;6081:9;6077:22;6047:58;:::i;:::-;5953:3;6031:5;6027:18;6020:86;;;16641:93;;;;4862:2;16788:9;16784:18;16771:32;16757:46;;16599:18;16815:6;16812:30;16809:2;;;-1:-1;;16845:12;16809:2;;16875:78;16945:7;16936:6;16925:9;16921:22;16875:78;:::i;:::-;16458:727;;16865:88;;-1:-1;;;;5025:2;17029:22;;6201:20;;5186:2;17137:22;6201:20;;16458:727;-1:-1;16458:727::o;17192:241::-;;17296:2;17284:9;17275:7;17271:23;17267:32;17264:2;;;-1:-1;;17302:12;17264:2;-1:-1;6201:20;;17258:175;-1:-1;17258:175::o;17773:690::-;;17966:5;29654:12;30070:6;30065:3;30058:19;30107:4;;30102:3;30098:14;17978:93;;30107:4;18142:5;29508:14;-1:-1;18181:260;18206:6;18203:1;18200:13;18181:260;;;18267:13;;18653:37;;17594:14;;;;29913;;;;18228:1;18221:9;18181:260;;;-1:-1;18447:10;;17897:566;-1:-1;;;;;17897:566::o;20802:387::-;18653:37;;;-1:-1;;;;;;30935:78;21053:2;21044:12;;18948:56;21153:11;;;20944:245::o;21196:291::-;;32231:6;32226:3;32221;32208:30;32269:16;;32262:27;;;32269:16;21340:147;-1:-1;21340:147::o;21494:659::-;-1:-1;;;20327:87;;20312:1;20433:11;;18653:37;;;;22005:12;;;18653:37;22116:12;;;21739:414::o;22160:222::-;-1:-1;;;;;31319:54;;;;17693:37;;22287:2;22272:18;;22258:124::o;22389:629::-;;22644:2;22665:17;22658:47;22719:108;22644:2;22633:9;22629:18;22813:6;22719:108;:::i;:::-;22875:9;22869:4;22865:20;22860:2;22849:9;22845:18;22838:48;22900:108;23003:4;22994:6;22900:108;:::i;:::-;22892:116;22615:403;-1:-1;;;;;22615:403::o;23025:210::-;30769:13;;30762:21;18536:34;;23146:2;23131:18;;23117:118::o;23242:432::-;30769:13;;30762:21;18536:34;;23577:2;23562:18;;18653:37;;;;23660:2;23645:18;;18653:37;23419:2;23404:18;;23390:284::o;23681:222::-;18653:37;;;23808:2;23793:18;;23779:124::o;23910:444::-;18653:37;;;-1:-1;;;;;31319:54;;;24257:2;24242:18;;17693:37;31319:54;24340:2;24325:18;;17693:37;24093:2;24078:18;;24064:290::o;24361:780::-;18653:37;;;-1:-1;;;;;31319:54;;;24793:2;24778:18;;17693:37;31319:54;;;;24876:2;24861:18;;17693:37;24959:2;24944:18;;18653:37;25042:3;25027:19;;18653:37;;;;-1:-1;25111:19;;18653:37;24628:3;24613:19;;24599:542::o;25148:668::-;18653:37;;;25552:2;25537:18;;18653:37;;;;25635:2;25620:18;;18653:37;;;;25718:2;25703:18;;18653:37;-1:-1;;;;;31319:54;25801:3;25786:19;;17693:37;-1:-1;25372:19;;25358:458::o;25823:548::-;18653:37;;;31535:4;31524:16;;;;26191:2;26176:18;;20755:35;26274:2;26259:18;;18653:37;26357:2;26342:18;;18653:37;26030:3;26015:19;;26001:370::o;26910:310::-;;27057:2;;27078:17;27071:47;19842:5;29654:12;30070:6;27057:2;27046:9;27042:18;30058:19;-1:-1;32376:101;32390:6;32387:1;32384:13;32376:101;;;32457:11;;;;;32451:18;32438:11;;;30098:14;32438:11;32431:39;32405:10;;32376:101;;;32492:6;32489:1;32486:13;32483:2;;;-1:-1;30098:14;32548:6;27046:9;32539:16;;32532:27;32483:2;-1:-1;29303:9;32809:14;-1:-1;;32805:28;20000:39;;;;30098:14;20000:39;;27028:192;-1:-1;;;27028:192::o;27456:481::-;;18683:5;18660:3;18653:37;27661:2;27779;27768:9;27764:18;27757:48;27819:108;27661:2;27650:9;27646:18;27913:6;27819:108;:::i;:::-;27811:116;27632:305;-1:-1;;;;27632:305::o;27944:214::-;31535:4;31524:16;;;;20755:35;;28067:2;28052:18;;28038:120::o;28165:256::-;28227:2;28221:9;28253:17;;;28349:22;;;-1:-1;;;;;28313:34;;28310:62;28307:2;;;28385:1;;28375:12;28307:2;28227;28394:22;28205:216;;-1:-1;28205:216::o;28428:319::-;;-1:-1;;;;;28591:30;;28588:2;;;-1:-1;;28624:12;28588:2;-1:-1;28669:4;28657:17;;;28722:15;;28525:222::o;32846:117::-;-1:-1;;;;;31319:54;;32905:35;;32895:2;;32954:1;;32944:12;32970:111;33051:5;30769:13;30762:21;33029:5;33026:32;33016:2;;33072:1;;33062:12;33654:107;33736:1;33729:5;33726:12;33716:2;;33752:1;;33742:12"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "2953600",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "DOMAIN_SEPARATOR()": "infinite",
                "allowance(address,address)": "infinite",
                "approve(address,uint256)": "22572",
                "balanceOf(address)": "1335",
                "decimals()": "286",
                "decreaseApproval(address,uint256)": "23653",
                "getActionId(bytes4)": "infinite",
                "getAmplificationParameter()": "infinite",
                "getAuthorizer()": "infinite",
                "getOwner()": "infinite",
                "getPausedState()": "infinite",
                "getPoolId()": "infinite",
                "getRate()": "infinite",
                "getSwapFeePercentage()": "1073",
                "getVault()": "infinite",
                "increaseApproval(address,uint256)": "23648",
                "name()": "infinite",
                "nonces(address)": "1309",
                "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "infinite",
                "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "infinite",
                "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": "infinite",
                "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "infinite",
                "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": "infinite",
                "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": "infinite",
                "setPaused(bool)": "infinite",
                "setSwapFeePercentage(uint256)": "infinite",
                "symbol()": "infinite",
                "totalSupply()": "1096",
                "transfer(address,uint256)": "infinite",
                "transferFrom(address,address,uint256)": "infinite"
              },
              "internal": {
                "_doExit(uint256[] memory,bytes memory)": "infinite",
                "_doJoin(uint256[] memory,bytes memory)": "infinite",
                "_exitBPTInForExactTokensOut(uint256[] memory,bytes memory)": "infinite",
                "_exitExactBPTInForTokenOut(uint256[] memory,bytes memory)": "infinite",
                "_exitExactBPTInForTokensOut(uint256[] memory,bytes memory)": "infinite",
                "_getDueProtocolFeeAmounts(uint256[] memory,uint256,uint256)": "infinite",
                "_invariantAfterExit(uint256[] memory,uint256[] memory)": "infinite",
                "_invariantAfterJoin(uint256[] memory,uint256[] memory)": "infinite",
                "_joinExactTokensInForBPTOut(uint256[] memory,bytes memory)": "infinite",
                "_joinTokenInForExactBPTOut(uint256[] memory,bytes memory)": "infinite",
                "_onExitPool(bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory)": "infinite",
                "_onInitializePool(bytes32,address,address,bytes memory)": "infinite",
                "_onJoinPool(bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory)": "infinite",
                "_onSwapGivenIn(struct IPoolSwapStructs.SwapRequest memory,uint256[] memory,uint256,uint256)": "infinite",
                "_onSwapGivenOut(struct IPoolSwapStructs.SwapRequest memory,uint256[] memory,uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {
              "DOMAIN_SEPARATOR()": "3644e515",
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "decimals()": "313ce567",
              "decreaseApproval(address,uint256)": "66188463",
              "getActionId(bytes4)": "851c1bb3",
              "getAmplificationParameter()": "6daccffa",
              "getAuthorizer()": "aaabadc5",
              "getOwner()": "893d20e8",
              "getPausedState()": "1c0de051",
              "getPoolId()": "38fff2d0",
              "getRate()": "679aefce",
              "getSwapFeePercentage()": "55c67628",
              "getVault()": "8d928af8",
              "increaseApproval(address,uint256)": "d73dd623",
              "name()": "06fdde03",
              "nonces(address)": "7ecebe00",
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "74f3b009",
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "d5c096c4",
              "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": "01ec954a",
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": "6028bfd4",
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": "87ec6817",
              "setPaused(bool)": "16c38b3c",
              "setSwapFeePercentage(uint256)": "38e9922e",
              "symbol()": "95d89b41",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVault\",\"name\":\"vault\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"amplificationParameter\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodDuration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"SwapFeeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAmplificationParameter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapFeePercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onExitPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onJoinPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IPoolSwapStructs.SwapRequest\",\"name\":\"swapRequest\",\"type\":\"tuple\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"indexIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexOut\",\"type\":\"uint256\"}],\"name\":\"onSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryExit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryJoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"setSwapFeePercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\"},\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getRate()\":{\"details\":\"This function returns the appreciation of one BPT relative to the underlying tokens. This starts at 1 when the pool is created and grows over time\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares.\"},\"onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].\"},\"queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/stable/StablePool.sol\":\"StablePool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IGeneralPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseGeneralPool is IGeneralPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            IVault.PoolSpecialization.GENERAL,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external view virtual override returns (uint256) {\\n        _validateIndexes(indexIn, indexOut, _getTotalTokens());\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        return\\n            swapRequest.kind == IVault.SwapKind.GIVEN_IN\\n                ? _swapGivenIn(swapRequest, balances, indexIn, indexOut, scalingFactors)\\n                : _swapGivenOut(swapRequest, balances, indexIn, indexOut, scalingFactors);\\n    }\\n\\n    function _swapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n        swapRequest.amount = _subtractSwapFeeAmount(swapRequest.amount);\\n\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexIn]);\\n\\n        uint256 amountOut = _onSwapGivenIn(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountOut tokens are exiting the Pool, so we round down.\\n        return _downscaleDown(amountOut, scalingFactors[indexOut]);\\n    }\\n\\n    function _swapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexOut]);\\n\\n        uint256 amountIn = _onSwapGivenOut(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountIn tokens are entering the Pool, so we round up.\\n        amountIn = _downscaleUp(amountIn, scalingFactors[indexIn]);\\n\\n        // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n        return _addSwapFeeAmount(amountIn);\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled. The swap fee has already been deducted from\\n     * `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    function _validateIndexes(\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256 limit\\n    ) private pure {\\n        _require(indexIn < limit && indexOut < limit, Errors.OUT_OF_BOUNDS);\\n    }\\n}\\n\",\"keccak256\":\"0x5d7c075a9885e120f7bb1844efe6d20b118840f04e359ce25ea1d9f14af647a8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\n\\n// This is a contract to emulate file-level functions. Convert to a library\\n// after the migration to solc v0.7.1.\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable var-name-mixedcase\\n\\ncontract StableMath {\\n    using FixedPoint for uint256;\\n\\n    uint256 internal constant _MIN_AMP = 1e18;\\n    uint256 internal constant _MAX_AMP = 5000 * (1e18);\\n\\n    uint256 internal constant _MAX_STABLE_TOKENS = 5;\\n\\n    // Computes the invariant given the current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calculateInvariant(uint256 amplificationParameter, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256)\\n    {\\n        /**********************************************************************************************\\n        // invariant                                                                                 //\\n        // D = invariant                                                  D^(n+1)                    //\\n        // A = amplification coefficient      A  n^n S + D = A D n^n + -----------                   //\\n        // S = sum of balances                                             n^n P                     //\\n        // P = product of balances                                                                   //\\n        // n = number of tokens                                                                      //\\n        *********x************************************************************************************/\\n\\n        // We round up the invariant.\\n\\n        uint256 sum = 0;\\n        uint256 numTokens = balances.length;\\n        for (uint256 i = 0; i < numTokens; i++) {\\n            sum = sum.add(balances[i]);\\n        }\\n        if (sum == 0) {\\n            return 0;\\n        }\\n        uint256 prevInvariant = 0;\\n        uint256 invariant = sum;\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, numTokens);\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            uint256 P_D = Math.mul(numTokens, balances[0]);\\n            for (uint256 j = 1; j < numTokens; j++) {\\n                P_D = Math.divUp(Math.mul(Math.mul(P_D, balances[j]), numTokens), invariant);\\n            }\\n            prevInvariant = invariant;\\n            invariant = Math.divUp(\\n                Math.mul(Math.mul(numTokens, invariant), invariant).add(Math.mul(Math.mul(ampTimesTotal, sum), P_D)),\\n                Math.mul(numTokens.add(1), invariant).add(Math.mul(ampTimesTotal.sub(1), P_D))\\n            );\\n\\n            if (invariant > prevInvariant) {\\n                if (invariant.sub(prevInvariant) <= 1) {\\n                    break;\\n                }\\n            } else if (prevInvariant.sub(invariant) <= 1) {\\n                break;\\n            }\\n        }\\n        return invariant;\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `tokenAmountIn` are sent, given the current balances.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcOutGivenIn(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountIn\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // outGivenIn token x for y - polynomial equation to solve                                                   //\\n        // ay = amount out to calculate                                                                              //\\n        // by = balance token out                                                                                    //\\n        // y = by - ay (finalBalanceOut)                                                                             //\\n        // D = invariant                                               D                     D^(n+1)                 //\\n        // A = amplification coefficient               y^2 + ( S - ----------  - D) * y -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but y                                                                           //\\n        // P = product of final balances but y                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].add(tokenAmountIn);\\n\\n        uint256 finalBalanceOut = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexOut\\n        );\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].sub(tokenAmountIn);\\n\\n        return balances[tokenIndexOut].sub(finalBalanceOut).sub(1);\\n    }\\n\\n    // Computes how many tokens must be sent to a pool if `tokenAmountOut` are sent given the\\n    // current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcInGivenOut(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountOut\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // inGivenOut token x for y - polynomial equation to solve                                                   //\\n        // ax = amount in to calculate                                                                               //\\n        // bx = balance token in                                                                                     //\\n        // x = bx + ax (finalBalanceIn)                                                                              //\\n        // D = invariant                                                D                     D^(n+1)                //\\n        // A = amplification coefficient               x^2 + ( S - ----------  - D) * x -  ------------- = 0         //\\n        // n = number of tokens                                     (A * n^n)               A * n^2n * P             //\\n        // S = sum of final balances but x                                                                           //\\n        // P = product of final balances but x                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].sub(tokenAmountOut);\\n\\n        uint256 finalBalanceIn = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexIn\\n        );\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].add(tokenAmountOut);\\n\\n        return finalBalanceIn.sub(balances[tokenIndexIn]).add(1);\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountsTokenIn -> amountsInProportional ->\\n    amountsInPercentageExcess -> amountsInAfterFee -> newInvariant -> amountBPTOut\\n    TODO: remove equations below and save them to Notion documentation\\n    amountInPercentageExcess = 1 - amountInProportional/amountIn (if amountIn>amountInProportional)\\n    amountInAfterFee = amountIn * (1 - swapFeePercentage * amountInPercentageExcess)\\n    amountInAfterFee = amountIn - fee amount\\n    fee amount = (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn - (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn * (1 - (1 - amountInProportional/amountIn) * swapFeePercentage)\\n    amountInAfterFee = amountIn * (1 - amountInPercentageExcess * swapFeePercentage)\\n    */\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        // Get current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token, relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsIn.length);\\n        // The weighted sum of token balance ratios without fee\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divDown(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulDown(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Percentage of the amount supplied that will be implicitly swapped for other tokens in the pool\\n            uint256 tokenBalancePercentageExcess;\\n            // Some tokens might have amounts supplied in excess of a 'balanced' join: these are identified if\\n            // the token's balance ratio without fee is larger than the weighted balance ratio, and swap fees are\\n            // charged on the swap amount\\n            if (weightedBalanceRatio >= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = tokenBalanceRatiosWithoutFee[i].sub(weightedBalanceRatio).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].sub(FixedPoint.ONE)\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountInAfterFee = amountsIn[i].mulDown(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].add(amountInAfterFee);\\n        }\\n\\n        // get the new invariant, taking swap fees into account\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTOut\\n        return bptTotalSupply.mulDown(newInvariant.divDown(currentInvariant).sub(FixedPoint.ONE));\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTOut -> newInvariant -> (amountInProportional, amountInAfterFee) ->\\n    amountInPercentageExcess -> amountIn\\n    */\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Token in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // Calculate new invariant\\n        uint256 newInvariant = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountInAfterFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountInAfterFee = newBalanceTokenIndex.sub(balances[tokenIndex]);\\n\\n        // Get tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountInAfterFee.divUp(swapFeeExcess.complement());\\n    }\\n\\n    /*\\n    Flow of calculations:\\n    amountsTokenOut -> amountsOutProportional ->\\n    amountOutPercentageExcess -> amountOutBeforeFee -> newInvariant -> amountBPTIn\\n    */\\n    function _calcBptInGivenExactTokensOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divUp(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulUp(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 tokenBalancePercentageExcess;\\n            // Compare each tokenBalanceRatioWithoutFee to the total weighted ratio (weightedBalanceRatio), and\\n            // decrease the fee by the excess amount\\n            if (weightedBalanceRatio <= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = weightedBalanceRatio.sub(tokenBalanceRatiosWithoutFee[i]).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].complement()\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFee.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountOutBeforeFee = amountsOut[i].divUp(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].sub(amountOutBeforeFee);\\n        }\\n\\n        // get the new invariant, taking into account swap fees\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTIn\\n        return bptTotalSupply.mulUp(newInvariant.divUp(currentInvariant).complement());\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTin -> newInvariant -> (amountOutProportional, amountOutBeforeFee) ->\\n    amountOutPercentageExcess -> amountOut\\n    */\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n        // Calculate the new invariant\\n        uint256 newInvariant = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountOutBeforeFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountOutBeforeFee = balances[tokenIndex].sub(newBalanceTokenIndex);\\n\\n        // Calculate tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountOutBeforeFee.mulDown(swapFeeExcess.complement());\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = tokenAmountOut             /        bptIn         \\\\                                  //\\n        // b = tokenBalance      a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\     bptTotalSupply    /                                 //\\n        // bpt = bptTotalSupply                                                                      //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(bptTotalSupply);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 lastInvariant,\\n        uint256 tokenIndex,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // oneTokenSwapFee - polynomial equation to solve                                                            //\\n        // af = fee amount to calculate in one token                                                                 //\\n        // bf = balance of fee token                                                                                 //\\n        // f = bf - af (finalBalanceFeeToken)                                                                        //\\n        // D = old invariant                                            D                     D^(n+1)                //\\n        // A = amplification coefficient               f^2 + ( S - ----------  - D) * f -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but f                                                                           //\\n        // P = product of final balances but f                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Protocol swap fee amount, so we round down overall.\\n\\n        uint256 finalBalanceFeeToken = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            lastInvariant,\\n            tokenIndex\\n        );\\n\\n        // Result is rounded down\\n        uint256 accumulatedTokenSwapFees = balances[tokenIndex] > finalBalanceFeeToken\\n            ? balances[tokenIndex].sub(finalBalanceFeeToken)\\n            : 0;\\n        return accumulatedTokenSwapFees.mulDown(protocolSwapFeePercentage).divDown(FixedPoint.ONE);\\n    }\\n\\n    // Private functions\\n\\n    // This function calculates the balance of a given token (tokenIndex)\\n    // given all the other balances and the invariant\\n    function _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 invariant,\\n        uint256 tokenIndex\\n    ) private pure returns (uint256) {\\n        // Rounds result up overall\\n\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, balances.length);\\n        uint256 sum = balances[0];\\n        uint256 P_D = Math.mul(balances.length, balances[0]);\\n        for (uint256 j = 1; j < balances.length; j++) {\\n            P_D = Math.divDown(Math.mul(Math.mul(P_D, balances[j]), balances.length), invariant);\\n            sum = sum.add(balances[j]);\\n        }\\n        sum = sum.sub(balances[tokenIndex]);\\n\\n        uint256 c = Math.divUp(Math.mul(invariant, invariant), ampTimesTotal);\\n        // We remove the balance fromm c by multiplying it\\n        c = c.mulUp(balances[tokenIndex]).divUp(P_D);\\n\\n        uint256 b = sum.add(invariant.divDown(ampTimesTotal));\\n\\n        // We iterate to find the balance\\n        uint256 prevTokenBalance = 0;\\n        // We multiply the first iteration outside the loop with the invariant to set the value of the\\n        // initial approximation.\\n        uint256 tokenBalance = invariant.mulUp(invariant).add(c).divUp(invariant.add(b));\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            prevTokenBalance = tokenBalance;\\n\\n            tokenBalance = tokenBalance.mulUp(tokenBalance).add(c).divUp(\\n                Math.mul(tokenBalance, 2).add(b).sub(invariant)\\n            );\\n\\n            if (tokenBalance > prevTokenBalance) {\\n                if (tokenBalance.sub(prevTokenBalance) <= 1) {\\n                    break;\\n                }\\n            } else if (prevTokenBalance.sub(tokenBalance) <= 1) {\\n                break;\\n            }\\n        }\\n        return tokenBalance;\\n    }\\n}\\n\",\"keccak256\":\"0x74dc5f28798be90708c30ce59d65de8a99128e642c1ed554248807ac3aaecae8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\nimport \\\"../BaseGeneralPool.sol\\\";\\n\\nimport \\\"./StableMath.sol\\\";\\nimport \\\"./StablePoolUserDataHelpers.sol\\\";\\n\\ncontract StablePool is BaseGeneralPool, StableMath {\\n    using FixedPoint for uint256;\\n    using StablePoolUserDataHelpers for bytes;\\n\\n    uint256 private immutable _amplificationParameter;\\n\\n    uint256 private _lastInvariant;\\n\\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\\n\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 amplificationParameter,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BaseGeneralPool(\\n            vault,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        _require(amplificationParameter >= _MIN_AMP, Errors.MIN_AMP);\\n        _require(amplificationParameter <= _MAX_AMP, Errors.MAX_AMP);\\n\\n        _require(tokens.length <= _MAX_STABLE_TOKENS, Errors.MAX_STABLE_TOKENS);\\n\\n        _amplificationParameter = amplificationParameter;\\n    }\\n\\n    function getAmplificationParameter() external view returns (uint256) {\\n        return _amplificationParameter;\\n    }\\n\\n    // Base Pool handlers\\n\\n    // Swap\\n\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        uint256 amountOut = StableMath._calcOutGivenIn(\\n            _amplificationParameter,\\n            balances,\\n            indexIn,\\n            indexOut,\\n            swapRequest.amount\\n        );\\n\\n        return amountOut;\\n    }\\n\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        uint256 amountIn = StableMath._calcInGivenOut(\\n            _amplificationParameter,\\n            balances,\\n            indexIn,\\n            indexOut,\\n            swapRequest.amount\\n        );\\n\\n        return amountIn;\\n    }\\n\\n    // Initialize\\n\\n    function _onInitializePool(\\n        bytes32,\\n        address,\\n        address,\\n        bytes memory userData\\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\\n        StablePool.JoinKind kind = userData.joinKind();\\n        _require(kind == StablePool.JoinKind.INIT, Errors.UNINITIALIZED);\\n\\n        uint256[] memory amountsIn = userData.initialAmountsIn();\\n        InputHelpers.ensureInputLengthMatch(amountsIn.length, _getTotalTokens());\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 invariantAfterJoin = StableMath._calculateInvariant(_amplificationParameter, amountsIn);\\n        uint256 bptAmountOut = invariantAfterJoin;\\n\\n        _lastInvariant = invariantAfterJoin;\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Join\\n\\n    function _onJoinPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        whenNotPaused\\n        returns (\\n            uint256,\\n            uint256[] memory,\\n            uint256[] memory\\n        )\\n    {\\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas to\\n        // calculate the fee amounts during each individual swap.\\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n            balances,\\n            _lastInvariant,\\n            protocolSwapFeePercentage\\n        );\\n\\n        // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\\n        // function returns.\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\\n        }\\n\\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn);\\n\\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doJoin(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        JoinKind kind = userData.joinKind();\\n\\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\\n            return _joinExactTokensInForBPTOut(balances, userData);\\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\\n            return _joinTokenInForExactBPTOut(balances, userData);\\n        } else {\\n            _revert(Errors.UNHANDLED_JOIN_KIND);\\n        }\\n    }\\n\\n    function _joinExactTokensInForBPTOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 bptAmountOut = StableMath._calcBptOutGivenExactTokensIn(\\n            _amplificationParameter,\\n            balances,\\n            amountsIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    function _joinTokenInForExactBPTOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\\n\\n        uint256 amountIn = StableMath._calcTokenInGivenExactBptOut(\\n            _amplificationParameter,\\n            balances,\\n            tokenIndex,\\n            bptAmountOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        // We are joining with a single token, so initialize downscaledAmountsIn with zeros, and\\n        // only set downscaledAmountsIn[tokenIndex]\\n        uint256[] memory downscaledAmountsIn = new uint256[](_getTotalTokens());\\n        downscaledAmountsIn[tokenIndex] = amountIn;\\n\\n        return (bptAmountOut, downscaledAmountsIn);\\n    }\\n\\n    // Exit\\n\\n    function _onExitPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        if (_isNotPaused()) {\\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\\n            // spending gas calculating fee amounts during each individual swap\\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(balances, _lastInvariant, protocolSwapFeePercentage);\\n\\n            // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\\n            // function returns.\\n            for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n                balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\\n            }\\n        } else {\\n            // To avoid extra calculations, swap protocol fee amounts are not charged when the contract is paused.\\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n        }\\n\\n        (bptAmountIn, amountsOut) = _doExit(balances, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterExit(balances, amountsOut);\\n\\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doExit(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        ExitKind kind = userData.exitKind();\\n\\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\\n            return _exitExactBPTInForTokenOut(balances, userData);\\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\\n            return _exitExactBPTInForTokensOut(balances, userData);\\n        } else {\\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\\n            return _exitBPTInForExactTokensOut(balances, userData);\\n        }\\n    }\\n\\n    function _exitExactBPTInForTokenOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        whenNotPaused\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is disabled if the contract is paused.\\n        uint256 totalTokens = _getTotalTokens();\\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\\n        _require(tokenIndex < totalTokens, Errors.OUT_OF_BOUNDS);\\n\\n        // We exit in a single token, so initialize amountsOut with zeros and only set amountsOut[tokenIndex]\\n        uint256[] memory amountsOut = new uint256[](totalTokens);\\n\\n        amountsOut[tokenIndex] = StableMath._calcTokenOutGivenExactBptIn(\\n            _amplificationParameter,\\n            balances,\\n            tokenIndex,\\n            bptAmountIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\\n        // This particular exit function is the only one that remains available because it is the simplest one, and\\n        // therefore the one with the lowest likelihood of errors.\\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\\n\\n        uint256[] memory amountsOut = StableMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitBPTInForExactTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        whenNotPaused\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\\n\\n        _upscaleArray(amountsOut, _scalingFactors());\\n\\n        uint256 bptAmountIn = StableMath._calcBptInGivenExactTokensOut(\\n            _amplificationParameter,\\n            balances,\\n            amountsOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    // Helpers\\n\\n    function _getDueProtocolFeeAmounts(\\n        uint256[] memory balances,\\n        uint256 previousInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) private view returns (uint256[] memory) {\\n        // Initialize with zeros\\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n\\n        // Early exit if there is no protocol swap fee\\n        if (protocolSwapFeePercentage == 0) {\\n            return dueProtocolFeeAmounts;\\n        }\\n\\n        // Instead of paying the protocol swap fee in all tokens proportionally, we will pay it in a single one. This\\n        // will reduce gas costs for single asset joins and exits, as at most only two Pool balances will change (the\\n        // token joined/exited, and the token in which fees will be paid).\\n\\n        // The protocol fee is charged using the token with the highest balance in the pool.\\n        uint256 chosenTokenIndex = 0;\\n        uint256 maxBalance = balances[0];\\n        for (uint256 i = 1; i < _getTotalTokens(); ++i) {\\n            uint256 currentBalance = balances[i];\\n            if (currentBalance > maxBalance) {\\n                chosenTokenIndex = i;\\n                maxBalance = currentBalance;\\n            }\\n        }\\n\\n        // Set the fee amount to pay in the selected token\\n        dueProtocolFeeAmounts[chosenTokenIndex] = StableMath._calcDueTokenProtocolSwapFeeAmount(\\n            _amplificationParameter,\\n            balances,\\n            previousInvariant,\\n            chosenTokenIndex,\\n            protocolSwapFeePercentage\\n        );\\n\\n        return dueProtocolFeeAmounts;\\n    }\\n\\n    function _invariantAfterJoin(uint256[] memory balances, uint256[] memory amountsIn) private view returns (uint256) {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].add(amountsIn[i]);\\n        }\\n\\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\\n    }\\n\\n    function _invariantAfterExit(uint256[] memory balances, uint256[] memory amountsOut)\\n        private\\n        view\\n        returns (uint256)\\n    {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].sub(amountsOut[i]);\\n        }\\n\\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\\n    }\\n\\n    /**\\n     * @dev This function returns the appreciation of one BPT relative to the\\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\\n     */\\n    function getRate() public view returns (uint256) {\\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\\n        return StableMath._calculateInvariant(_amplificationParameter, balances).divDown(totalSupply());\\n    }\\n}\\n\",\"keccak256\":\"0x30dc67f7ae8053481e9a8ee13c1caef632eb88667393374ce961e4ba870055db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./StablePool.sol\\\";\\n\\nlibrary StablePoolUserDataHelpers {\\n    function joinKind(bytes memory self) internal pure returns (StablePool.JoinKind) {\\n        return abi.decode(self, (StablePool.JoinKind));\\n    }\\n\\n    function exitKind(bytes memory self) internal pure returns (StablePool.ExitKind) {\\n        return abi.decode(self, (StablePool.ExitKind));\\n    }\\n\\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\\n        (, amountsIn) = abi.decode(self, (StablePool.JoinKind, uint256[]));\\n    }\\n\\n    function exactTokensInForBptOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountIn)\\n    {\\n        (, amountsIn, minBPTAmountIn) = abi.decode(self, (StablePool.JoinKind, uint256[], uint256));\\n    }\\n\\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (StablePool.JoinKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (StablePool.ExitKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\\n        (, bptAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256));\\n    }\\n\\n    function bptInForExactTokensOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\\n    {\\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256[], uint256));\\n    }\\n}\\n\",\"keccak256\":\"0xc098d1ec4fc41f10ec46a12dbf0bd5e1ffca9cafcbf4f8fa3b3815fd837d4f8d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev IPools with the General specialization setting should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\\n * grant to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IGeneralPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7f11733a5cd8f81c123c02f79d94ead7b65217021ebddafda10e796a25e1ef41\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5412,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_balance",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 5418,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_allowance",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
              },
              {
                "astId": 5420,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_totalSupply",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              },
              {
                "astId": 5422,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_name",
                "offset": 0,
                "slot": "3",
                "type": "t_string_storage"
              },
              {
                "astId": 5424,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_symbol",
                "offset": 0,
                "slot": "4",
                "type": "t_string_storage"
              },
              {
                "astId": 5428,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_nonces",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_paused",
                "offset": 0,
                "slot": "6",
                "type": "t_bool"
              },
              {
                "astId": 6481,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_swapFeePercentage",
                "offset": 0,
                "slot": "7",
                "type": "t_uint256"
              },
              {
                "astId": 9508,
                "contract": "src.sol/amm/pools/stable/StablePool.sol:StablePool",
                "label": "_lastInvariant",
                "offset": 0,
                "slot": "8",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_string_storage": {
                "encoding": "bytes",
                "label": "string",
                "numberOfBytes": "32"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/stable/StablePoolFactory.sol": {
        "StablePoolFactory": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "contract IVault",
                  "name": "vault",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "pool",
                  "type": "address"
                }
              ],
              "name": "PoolCreated",
              "type": "event"
            },
            {
              "inputs": [
                {
                  "internalType": "string",
                  "name": "name",
                  "type": "string"
                },
                {
                  "internalType": "string",
                  "name": "symbol",
                  "type": "string"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256",
                  "name": "amplificationParameter",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "create",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPauseConfiguration",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "pauseWindowDuration",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodDuration",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getVault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "pool",
                  "type": "address"
                }
              ],
              "name": "isPoolFromFactory",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "create(string,string,address[],uint256,uint256,address)": {
                "details": "Deploys a new `StablePool`."
              },
              "getPauseConfiguration()": {
                "details": "Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this factory. `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable."
              },
              "getVault()": {
                "details": "Returns the Vault's address."
              },
              "isPoolFromFactory(address)": {
                "details": "Returns true if `pool` was created by this factory."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60c060405234801561001057600080fd5b50604051614de3380380614de383398101604081905261002f9161004d565b60601b6001600160601b0319166080526276a700420160a05261007b565b60006020828403121561005e578081fd5b81516001600160a01b0381168114610074578182fd5b9392505050565b60805160601c60a051614d3e6100a56000398060d652806101005250806101dd5250614d3e6000f3fe60806040523480156200001157600080fd5b5060043610620000525760003560e01c80632da47c4014620000575780636634b753146200007a5780637932c7f314620000a05780638d928af814620000c6575b600080fd5b62000061620000d0565b604051620000719291906200055c565b60405180910390f35b620000916200008b366004620002da565b6200013c565b60405162000071919062000494565b620000b7620000b136600462000300565b6200015a565b60405162000071919062000480565b620000b7620001db565b600080427f00000000000000000000000000000000000000000000000000000000000000008110156200012e57807f000000000000000000000000000000000000000000000000000000000000000003925062278d00915062000137565b60009250600091505b509091565b6001600160a01b031660009081526020819052604090205460ff1690565b600080600062000169620000d0565b91509150600062000179620001db565b8a8a8a8a8a88888c6040516200018f906200024b565b620001a3999897969594939291906200049f565b604051809103906000f080158015620001c0573d6000803e3d6000fd5b509050620001ce81620001ff565b9998505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc9190a250565b61475180620005b883390190565b803562000266816200059e565b92915050565b600082601f8301126200027d578081fd5b813567ffffffffffffffff81111562000294578182fd5b620002a9601f8201601f19166020016200056a565b9150808252836020828501011115620002c157600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215620002ec578081fd5b8135620002f9816200059e565b9392505050565b60008060008060008060c0878903121562000319578182fd5b863567ffffffffffffffff8082111562000331578384fd5b6200033f8a838b016200026c565b975060209150818901358181111562000356578485fd5b620003648b828c016200026c565b97505060408901358181111562000379578485fd5b8901601f81018b136200038a578485fd5b80358281111562000399578586fd5b8381029250620003ab8484016200056a565b8181528481019083860185850187018f1015620003c6578889fd5b8895505b83861015620003f457620003df8f8262000259565b835260019590950194918601918601620003ca565b50985050505060608901359450505060808701359150620004198860a0890162000259565b90509295509295509295565b6001600160a01b03169052565b60008151808452815b8181101562000459576020818501810151868301820152016200043b565b818111156200046b5782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b901515815260200190565b6001600160a01b038a168152610120602080830182905260009190620004c88483018d62000432565b91508382036040850152620004de828c62000432565b84810360608601528a51808252828c01935090820190845b818110156200051e576200050b855162000592565b83529383019391830191600101620004f6565b50508093505050508660808301528560a08301528460c08301528360e08301526200054e61010083018462000425565b9a9950505050505050505050565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156200058a57600080fd5b604052919050565b6001600160a01b031690565b6001600160a01b0381168114620005b457600080fd5b5056fe6104006040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b5060405162004751380380620047518339810160408190526200005a9162000a52565b6040805180820190915260018152603160f81b6020808301918252336080526001600160601b0319606085901b1660a0528a51908b0190812060c0529151902060e0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6101005288518a918a918a918a91899189918991899189916000918a918a918a918a918a918a918a91849184918a918a91620000fe916003919062000870565b5080516200011490600490602084019062000870565b506200012c9150506276a700831115610194620006b0565b6200014062278d00821115610195620006b0565b429091016101408190520161016052845162000162906002111560c8620006b0565b6200017a60088651111560c9620006b060201b60201c565b6200019085620006c560201b62000cf11760201c565b620001a564e8d4a5100085101560cb620006b0565b620001bd67016345785d8a000085111560ca620006b0565b6040516309b2760f60e01b81526000906001600160a01b038b16906309b2760f90620001ee908c9060040162000bf5565b602060405180830381600087803b1580156200020957600080fd5b505af11580156200021e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000244919062000a39565b9050896001600160a01b03166366a9c7d2828889516001600160401b03811180156200026f57600080fd5b506040519080825280602002602001820160405280156200029a578160200160208202803683370190505b506040518463ffffffff1660e01b8152600401620002bb9392919062000b59565b600060405180830381600087803b158015620002d657600080fd5b505af1158015620002eb573d6000803e3d6000fd5b5050506001600160601b031960608c901b1661018052506101a0819052600785905585516101c05285516200032257600062000339565b856000815181106200033057fe5b60200260200101515b60601b6001600160601b0319166101e05285516001106200035c57600062000373565b856001815181106200036a57fe5b60200260200101515b60601b6001600160601b03191661020052855160021062000396576000620003ad565b85600281518110620003a457fe5b60200260200101515b60601b6001600160601b031916610220528551600310620003d0576000620003e7565b85600381518110620003de57fe5b60200260200101515b60601b6001600160601b0319166102405285516004106200040a57600062000421565b856004815181106200041857fe5b60200260200101515b60601b6001600160601b031916610260528551600510620004445760006200045b565b856005815181106200045257fe5b60200260200101515b60601b6001600160601b0319166102805285516006106200047e57600062000495565b856006815181106200048c57fe5b60200260200101515b60601b6001600160601b0319166102a0528551600710620004b8576000620004cf565b85600781518110620004c657fe5b60200260200101515b60601b6001600160601b0319166102c0528551620004ef57600062000515565b62000515866000815181106200050157fe5b6020026020010151620006d160201b60201c565b6102e05285516001106200052b5760006200053d565b6200053d866001815181106200050157fe5b6103005285516002106200055357600062000565565b62000565866002815181106200050157fe5b6103205285516003106200057b5760006200058d565b6200058d866003815181106200050157fe5b610340528551600410620005a3576000620005b5565b620005b5866004815181106200050157fe5b610360528551600510620005cb576000620005dd565b620005dd866005815181106200050157fe5b610380528551600610620005f357600062000605565b62000605866006815181106200050157fe5b6103a05285516007106200061b5760006200062d565b6200062d866007815181106200050157fe5b6103c0818152505050505050505050505050505050505050505062000666670de0b6b3a764000086101561012c620006b060201b60201c565b6200068169010f0cf064dd5920000086111561012d620006b0565b6200069a60058751111561012f620006b060201b60201c565b5050506103e0919091525062000c539350505050565b81620006c157620006c18162000773565b5050565b80620006c181620007c6565b600080826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200070e57600080fd5b505afa15801562000723573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000749919062000b2f565b60ff1690506000620007686012836200085360201b62000cff1760201c565b600a0a949350505050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b600281511015620007d75762000850565b600081600081518110620007e757fe5b602002602001015190506000600190505b82518110156200084d5760008382815181106200081157fe5b6020026020010151905062000842816001600160a01b0316846001600160a01b0316106065620006b060201b60201c565b9150600101620007f8565b50505b50565b600062000865838311156001620006b0565b508082035b92915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620008b357805160ff1916838001178555620008e3565b82800160010185558215620008e3579182015b82811115620008e3578251825591602001919060010190620008c6565b50620008f1929150620008f5565b5090565b5b80821115620008f15760008155600101620008f6565b80516200086a8162000c3d565b600082601f8301126200092a578081fd5b81516001600160401b0381111562000940578182fd5b60208082026200095282820162000c0a565b838152935081840185830182870184018810156200096f57600080fd5b600092505b848310156200099f5780516200098a8162000c3d565b82526001929092019190830190830162000974565b505050505092915050565b600082601f830112620009bb578081fd5b81516001600160401b03811115620009d1578182fd5b6020620009e7601f8301601f1916820162000c0a565b92508183528481838601011115620009fe57600080fd5b60005b8281101562000a1e57848101820151848201830152810162000a01565b8281111562000a305760008284860101525b50505092915050565b60006020828403121562000a4b578081fd5b5051919050565b60008060008060008060008060006101208a8c03121562000a71578485fd5b62000a7d8b8b6200090c565b60208b01519099506001600160401b038082111562000a9a578687fd5b62000aa88d838e01620009aa565b995060408c015191508082111562000abe578687fd5b62000acc8d838e01620009aa565b985060608c015191508082111562000ae2578687fd5b5062000af18c828d0162000919565b96505060808a0151945060a08a0151935060c08a0151925060e08a0151915062000b208b6101008c016200090c565b90509295985092959850929598565b60006020828403121562000b41578081fd5b815160ff8116811462000b52578182fd5b9392505050565b60006060820185835260206060818501528186518084526080860191508288019350845b8181101562000ba55762000b92855162000c31565b8352938301939183019160010162000b7d565b505084810360408601528551808252908201925081860190845b8181101562000be75762000bd4835162000c31565b8552938301939183019160010162000bbf565b509298975050505050505050565b602081016003831062000c0457fe5b91905290565b6040518181016001600160401b038111828210171562000c2957600080fd5b604052919050565b6001600160a01b031690565b6001600160a01b03811681146200085057600080fd5b60805160a05160601c60c05160e051610100516101205161014051610160516101805160601c6101a0516101c0516101e05160601c6102005160601c6102205160601c6102405160601c6102605160601c6102805160601c6102a05160601c6102c05160601c6102e05161030051610320516103405161036051610380516103a0516103c0516103e0516139b062000da1600039806107c052806107f35280611aef5280611c665280611cea5280611f2852806120375280612497528061255d52806125e3528061263f525080610f94525080610f51525080610f0e525080610ecb525080610e88525080610e45525080610e02525080610db15250505050505050505080610d1752508061066152508061098b5250806111f75250806111d3525080610a5a5250806112fa52508061133c52508061131b5250806109675250806108f152506139b06000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80636daccffa116101045780638d928af8116100a2578063d505accf11610071578063d505accf146103b5578063d5c096c4146103c8578063d73dd623146103db578063dd62ed3e146103ee576101da565b80638d928af81461038a57806395d89b4114610392578063a9059cbb1461039a578063aaabadc5146103ad576101da565b80637ecebe00116100de5780637ecebe001461033c578063851c1bb31461034f57806387ec681714610362578063893d20e814610375576101da565b80636daccffa1461030057806370a082311461030857806374f3b0091461031b576101da565b8063313ce5671161017c57806355c676281161014b57806355c67628146102bc5780636028bfd4146102c457806366188463146102e5578063679aefce146102f8576101da565b8063313ce567146102845780633644e5151461029957806338e9922e146102a157806338fff2d0146102b4576101da565b806316c38b3c116101b857806316c38b3c1461023d57806318160ddd146102525780631c0de0511461025a57806323b872dd14610271576101da565b806301ec954a146101df57806306fdde0314610208578063095ea7b31461021d575b600080fd5b6101f26101ed3660046135c5565b610401565b6040516101ff91906137dd565b60405180910390f35b61021061045e565b6040516101ff9190613883565b61023061022b36600461329e565b6104f5565b6040516101ff91906137ba565b61025061024b366004613394565b61050c565b005b6101f2610520565b610262610526565b6040516101ff939291906137c5565b61023061027f3660046131e9565b61054f565b61028c6105d2565b6040516101ff91906138f7565b6101f26105d7565b6102506102af3660046136e3565b6105e6565b6101f261065f565b6101f2610683565b6102d76102d23660046133cc565b610689565b6040516101ff9291906138d6565b6102306102f336600461329e565b6106c0565b6101f261071a565b6101f26107f1565b6101f2610316366004613195565b610815565b61032e6103293660046133cc565b610830565b6040516101ff92919061378c565b6101f261034a366004613195565b6108d2565b6101f261035d36600461346e565b6108ed565b6102d76103703660046133cc565b61093f565b61037d610965565b6040516101ff9190613778565b61037d610989565b6102106109ad565b6102306103a836600461329e565b610a0e565b61037d610a1b565b6102506103c3366004613229565b610a25565b61032e6103d63660046133cc565b610b6e565b6102306103e936600461329e565b610c90565b6101f26103fc3660046131b1565b610cc6565b60006104158383610410610d15565b610d39565b606061041f610d56565b905060008651600181111561043057fe5b14610447576104428686868685610fd2565b610454565b6104548686868685611047565b9695505050505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ea5780601f106104bf576101008083540402835291602001916104ea565b820191906000526020600020905b8154815290600101906020018083116104cd57829003601f168201915b505050505090505b90565b60006105023384846110ab565b5060015b92915050565b610514611113565b61051d81611141565b50565b60025490565b60008060006105336111b4565b15925061053e6111d1565b91506105486111f5565b9050909192565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261058d9114806105855750838210155b610197611219565b610598858585611227565b336001600160a01b038616148015906105b357506000198114155b156105c5576105c585338584036110ab565b60019150505b9392505050565b601290565b60006105e16112f6565b905090565b6105ee611113565b6105f6611393565b61060964e8d4a5100082101560cb611219565b61061f67016345785d8a000082111560ca611219565b60078190556040517f9cabc14d438714dbcd9292df9b3f89c42f98acd93a675ad72cd6033777e9b8e7906106549083906137dd565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000090565b60075490565b6000606061069f865161069a610d15565b6113a8565b6106b4898989898989896113b56114ba61151b565b97509795505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106106fc576106f7338560006110ab565b610710565b610710338561070b8487610cff565b6110ab565b5060019392505050565b60006060610726610989565b6001600160a01b031663f94d466861073c61065f565b6040518263ffffffff1660e01b815260040161075891906137dd565b60006040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ac91908101906132c9565b509150506107eb6107bb610520565b6107e57f00000000000000000000000000000000000000000000000000000000000000008461163d565b906117b7565b91505090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b031660009081526020819052604090205490565b6060808861085a61083f610989565b6001600160a01b0316336001600160a01b03161460cd611219565b61086f61086561065f565b82146101f4611219565b6060610879610d56565b90506108858882611808565b60006060806108998e8e8e8e8e8e8e6113b5565b9250925092506108a98d8461185c565b6108b382856114ba565b6108bd81856114ba565b909550935050505b5097509795505050505050565b6001600160a01b031660009081526005602052604090205490565b60007f000000000000000000000000000000000000000000000000000000000000000082604051602001610922929190613735565b604051602081830303815290604052805190602001209050919050565b60006060610950865161069a610d15565b6106b4898989898989896118ef61199461151b565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ea5780601f106104bf576101008083540402835291602001916104ea565b6000610502338484611227565b60006105e16119f5565b610a338442111560d1611219565b6001600160a01b0387166000908152600560209081526040808320549051909291610a8a917f0000000000000000000000000000000000000000000000000000000000000000918c918c918c9188918d9101613805565b6040516020818303038152906040528051906020012090506000610aad82611a6f565b9050600060018288888860405160008152602001604052604051610ad49493929190613865565b6020604051602081039080840390855afa158015610af6573d6000803e3d6000fd5b5050604051601f1901519150610b3890506001600160a01b03821615801590610b3057508b6001600160a01b0316826001600160a01b0316145b6101f8611219565b6001600160a01b038b166000908152600560205260409020600185019055610b618b8b8b6110ab565b5050505050505050505050565b60608088610b7d61083f610989565b610b8861086561065f565b6060610b92610d56565b9050610b9c610520565b610c415760006060610bb08d8d8d8a611a8b565b91509150610bc5620f424083101560cc611219565b610bd36000620f4240611b28565b610be28b620f42408403611b28565b610bec8184611994565b80610bf5610d15565b6001600160401b0381118015610c0a57600080fd5b50604051908082528060200260200182016040528015610c34578160200160208202803683370190505b50955095505050506108c5565b610c4b8882611808565b6000606080610c5f8e8e8e8e8e8e8e6118ef565b925092509250610c6f8c84611b28565b610c798285611994565b610c8381856114ba565b90955093506108c5915050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161050291859061070b9086611bbe565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b80610cfb81611bd0565b5050565b6000610d0f838311156001611219565b50900390565b7f000000000000000000000000000000000000000000000000000000000000000090565b610d518184108015610d4a57508183105b6064611219565b505050565b60606000610d62610d15565b90506060816001600160401b0381118015610d7c57600080fd5b50604051908082528060200260200182016040528015610da6578160200160208202803683370190505b5090508115610dee577f000000000000000000000000000000000000000000000000000000000000000081600081518110610ddd57fe5b602002602001018181525050610df7565b91506104f29050565b6001821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600181518110610e2e57fe5b6020026020010181815250506002821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600281518110610e7157fe5b6020026020010181815250506003821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600381518110610eb457fe5b6020026020010181815250506004821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600481518110610ef757fe5b6020026020010181815250506005821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600581518110610f3a57fe5b6020026020010181815250506006821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600681518110610f7d57fe5b6020026020010181815250506007821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600781518110610fc057fe5b60200260200101818152505091505090565b6000610fde8583611808565b610fff8660600151838581518110610ff257fe5b6020026020010151611c49565b6060870152600061101287878787611c55565b90506110318184878151811061102457fe5b6020026020010151611c92565b905061103c81611c9e565b979650505050505050565b60006110568660600151611cb5565b60608701526110658583611808565b6110798660600151838681518110610ff257fe5b6060870152600061108c87878787611cd9565b905061103c8184868151811061109e57fe5b6020026020010151611d16565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906111069085906137dd565b60405180910390a3505050565b600061112a6000356001600160e01b0319166108ed565b905061051d6111398233611d22565b610191611219565b80156111615761115c6111526111d1565b4210610193611219565b611176565b61117661116c6111f5565b42106101a9611219565b6006805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64906106549083906137ba565b60006111be6111f5565b4211806105e157505060065460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b81610cfb57610cfb81611e12565b6001600160a01b03831660009081526020819052604090205461124f82821015610196611219565b6112666001600160a01b0384161515610199611219565b6001600160a01b038085166000908152602081905260408082208585039055918516815220546112969083611bbe565b6001600160a01b0380851660008181526020819052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112e89086906137dd565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611363611e65565b30604051602001611378959493929190613839565b60405160208183030381529060405280519060200120905090565b6113a661139e6111b4565b610192611219565b565b610cfb8183146067611219565b60006060806113c26111b4565b15611446576113d48760085487611e69565b905060005b6113e1610d15565b811015611440576114218282815181106113f757fe5b602002602001015189838151811061140b57fe5b6020026020010151610cff90919063ffffffff16565b88828151811061142d57fe5b60209081029190910101526001016113d9565b50611491565b61144e610d15565b6001600160401b038111801561146357600080fd5b5060405190808252806020026020018201604052801561148d578160200160208202803683370190505b5090505b61149b8785611f72565b90935091506114aa8783611fdc565b6008559750975097945050505050565b60005b6114c5610d15565b811015610d51576114fc8382815181106114db57fe5b60200260200101518383815181106114ef57fe5b602002602001015161205c565b83828151811061150857fe5b60209081029190910101526001016114bd565b3330146115d9576000306001600160a01b031660003660405161153f92919061374d565b6000604051808303816000865af19150503d806000811461157c576040519150601f19603f3d011682016040523d82523d6000602084013e611581565b606091505b50509050806000811461159057fe5b60046000803e6000516001600160e01b0319166343adbafb60e01b81146115bb573d6000803e3d6000fd5b506020600460003e604060205260243d03602460403e601c3d016000f35b60606115e3610d56565b90506115ef8782611808565b600060606116068c8c8c8c8c8c8c8c63ffffffff16565b509150915061161981848663ffffffff16565b8051601f1982018390526343adbafb603f1983015260200260231982016044820181fd5b80516000908190815b8181101561167e5761167485828151811061165d57fe5b602002602001015184611bbe90919063ffffffff16565b9250600101611646565b508161168f57600092505050610506565b6000828161169d888561207c565b905060005b60ff8110156117aa5760006116cb868a6000815181106116be57fe5b602002602001015161207c565b905060015b86811015611704576116fa6116f46116ee848d85815181106116be57fe5b8961207c565b866120a0565b91506001016116d0565b5083945061176461173a61172161171b868b61207c565b8461207c565b61173461172e8a8961207c565b8861207c565b90611bbe565b61175f61175161174b876001610cff565b8561207c565b6117346116ee8b6001611bbe565b6120a0565b93508484111561178a57600161177a8587610cff565b1161178557506117aa565b6117a1565b60016117968686610cff565b116117a157506117aa565b506001016116a2565b5090979650505050505050565b60006117c68215156004611219565b826117d357506000610506565b670de0b6b3a7640000838102906117f6908583816117ed57fe5b04146005611219565b8281816117ff57fe5b04915050610506565b60005b611813610d15565b811015610d515761183d83828151811061182957fe5b60200260200101518383815181106116be57fe5b83828151811061184957fe5b602090810291909101015260010161180b565b6001600160a01b03821660009081526020819052604090205461188482821015610196611219565b6001600160a01b038316600090815260208190526040902082820390556002546118ae9083610cff565b6002556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111069086906137dd565b60006060806118fc611393565b606061190b8860085488611e69565b905060005b611918610d15565b8110156119615761194282828151811061192e57fe5b60200260200101518a838151811061140b57fe5b89828151811061194e57fe5b6020908102919091010152600101611910565b50600060606119708a886120d3565b9150915061197e8a8261212b565b600855909c909b50909950975050505050505050565b60005b61199f610d15565b811015610d51576119d68382815181106119b557fe5b60200260200101518383815181106119c957fe5b60200260200101516120a0565b8382815181106119e257fe5b6020908102919091010152600101611997565b60006119ff610989565b6001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3757600080fd5b505afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e19190613496565b6000611a796112f6565b8260405160200161092292919061375d565b60006060611a97611393565b6000611aa284612196565b9050611abd6000826002811115611ab557fe5b1460ce611219565b6060611ac8856121ac565b9050611ad7815161069a610d15565b611ae881611ae3610d56565b611808565b6000611b147f00000000000000000000000000000000000000000000000000000000000000008361163d565b600881905599919850909650505050505050565b6001600160a01b038216600090815260208190526040902054611b4b9082611bbe565b6001600160a01b038316600090815260208190526040902055600254611b719082611bbe565b6002556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611bb29085906137dd565b60405180910390a35050565b60008282016105cb8482101583611219565b600281511015611bdf5761051d565b600081600081518110611bee57fe5b602002602001015190506000600190505b8251811015610d51576000838281518110611c1657fe5b60200260200101519050611c3f816001600160a01b0316846001600160a01b0316106065611219565b9150600101611bff565b60006105cb838361207c565b6000611c5f611393565b60006104547f00000000000000000000000000000000000000000000000000000000000000008686868a606001516121c2565b60006105cb83836120a0565b6000610506611cae600754612268565b839061228e565b600080611ccd600754846122dc90919063ffffffff16565b90506105cb8382610cff565b6000611ce3611393565b60006104547f00000000000000000000000000000000000000000000000000000000000000008686868a60600151612318565b60006105cb838361205c565b600073ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b611d41610965565b6001600160a01b031614158015611d5c5750611d5c836123a2565b15611d8457611d69610965565b6001600160a01b0316336001600160a01b0316149050610506565b611d8c6119f5565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b8152600401611dbb939291906137e6565b60206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0b91906133b0565b9050610506565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b4690565b606080611e74610d15565b6001600160401b0381118015611e8957600080fd5b50604051908082528060200260200182016040528015611eb3578160200160208202803683370190505b50905082611ec25790506105cb565b60008086600081518110611ed257fe5b602002602001015190506000600190505b611eeb610d15565b811015611f22576000888281518110611f0057fe5b6020026020010151905082811115611f19578193508092505b50600101611ee3565b50611f507f0000000000000000000000000000000000000000000000000000000000000000888885896123bc565b838381518110611f5c57fe5b6020908102919091010152509095945050505050565b600060606000611f8184612196565b90506000816002811115611f9157fe5b1415611fab57611fa18585612418565b9250925050611fd5565b6001816002811115611fb957fe5b1415611fc957611fa185856124ee565b611fa18585612520565b505b9250929050565b6000805b611fe8610d15565b81101561203157612012838281518110611ffe57fe5b602002602001015185838151811061140b57fe5b84828151811061201e57fe5b6020908102919091010152600101611fe0565b506105cb7f00000000000000000000000000000000000000000000000000000000000000008461163d565b600061206b8215156004611219565b81838161207457fe5b049392505050565b60008282026105cb84158061209957508385838161209657fe5b04145b6003611219565b60006120af8215156004611219565b826120bc57506000610506565b8160018403816120c857fe5b046001019050610506565b6000606060006120e284612196565b905060018160028111156120f257fe5b141561210257611fa185856125aa565b600281600281111561211057fe5b141561212057611fa18585612624565b611fd3610136611e12565b6000805b612137610d15565b8110156120315761217783828151811061214d57fe5b602002602001015185838151811061216157fe5b6020026020010151611bbe90919063ffffffff16565b84828151811061218357fe5b602090810291909101015260010161212f565b60008180602001905181019061050691906134b2565b6060818060200190518101906105cb9190613577565b6000806121cf878761163d565b90506121e18387868151811061140b57fe5b8685815181106121ed57fe5b6020026020010181815250506000612207888884896126e5565b90506122198488878151811061216157fe5b87868151811061222557fe5b60200260200101818152505061225c600161173489898151811061224557fe5b602002602001015184610cff90919063ffffffff16565b98975050505050505050565b6000670de0b6b3a76400008210612280576000610506565b50670de0b6b3a76400000390565b600061229d8215156004611219565b826122aa57506000610506565b670de0b6b3a7640000838102906122c4908583816117ed57fe5b8260018203816122d057fe5b04600101915050610506565b60008282026122f684158061209957508385838161209657fe5b80612305576000915050610506565b670de0b6b3a764000060001982016122d0565b600080612325878761163d565b90506123378387878151811061216157fe5b86868151811061234357fe5b602002602001018181525050600061235d888884886126e5565b905061236f8488888151811061140b57fe5b87878151811061237b57fe5b60200260200101818152505061225c600161239c838a898151811061140b57fe5b90610cff565b60006123b4631c74c91760e11b6108ed565b909114919050565b6000806123cb878787876126e5565b90506000818786815181106123dc57fe5b6020026020010151116123f0576000612400565b6124008288878151811061140b57fe5b905061225c670de0b6b3a76400006107e5838761289e565b60006060612424611393565b600061242e610d15565b905060008061243c866128ca565b9150915061244d8382106064611219565b6060836001600160401b038111801561246557600080fd5b5060405190808252806020026020018201604052801561248f578160200160208202803683370190505b5090506124c97f00000000000000000000000000000000000000000000000000000000000000008984866124c1610520565b6007546128ec565b8183815181106124d557fe5b6020908102919091010152919791965090945050505050565b6000606060006124fd846129e4565b90506060612513868361250e610520565b6129fa565b9196919550909350505050565b6000606061252c611393565b6060600061253985612aab565b9150915061254a825161069a610d15565b61255682611ae3610d56565b600061258e7f00000000000000000000000000000000000000000000000000000000000000008885612586610520565b600754612ac3565b905061259e8282111560cf611219565b96919550909350505050565b600060608060006125ba85612aab565b915091506125d06125c9610d15565b83516113a8565b6125dc82611ae3610d56565b60006126147f0000000000000000000000000000000000000000000000000000000000000000888561260c610520565b600754612d59565b905061259e8282101560d0611219565b60006060600080612634856128ca565b9150915060006126717f0000000000000000000000000000000000000000000000000000000000000000888486612669610520565b600754612f96565b9050606061267d610d15565b6001600160401b038111801561269257600080fd5b506040519080825280602002602001820160405280156126bc578160200160208202803683370190505b509050818184815181106126cc57fe5b6020908102919091010152929792965091945050505050565b6000806126f386865161207c565b905060008560008151811061270457fe5b6020026020010151905060006127228751886000815181106116be57fe5b905060015b875181101561276e5761275361274d612746848b85815181106116be57fe5b8a5161207c565b8861205c565b915061276488828151811061165d57fe5b9250600101612727565b5061279587868151811061277e57fe5b602002602001015183610cff90919063ffffffff16565b915060006127ac6127a6888961207c565b856120a0565b90506127de826127d88a89815181106127c157fe5b6020026020010151846122dc90919063ffffffff16565b9061228e565b905060006127f66127ef89876117b7565b8590611bbe565b90506000806128166128088b85611bbe565b6127d8866117348e806122dc565b905060005b60ff81101561288e5781925061284b61283d8c61239c8761173487600261207c565b6127d88761173486806122dc565b9150828211156128705760016128618385610cff565b1161286b5761288e565b612886565b600161287c8484610cff565b116128865761288e565b60010161281b565b509b9a5050505050505050505050565b60008282026128b884158061209957508385838161209657fe5b670de0b6b3a764000090049392505050565b600080828060200190518101906128e19190613541565b909590945092505050565b6000806128f9888861163d565b905060006129158261290f876127d8818b610cff565b906122dc565b90506000805b89518110156129545761294a8a828151811061293357fe5b602002602001015183611bbe90919063ffffffff16565b915060010161291b565b5060006129638b8b858c6126e5565b90506000612977828c8c8151811061140b57fe5b905060006129a1848d8d8151811061298b57fe5b60200260200101516117b790919063ffffffff16565b905060006129ae82612268565b905060006129bc8a836122dc565b90506129d16129ca82612268565b859061289e565b9f9e505050505050505050505050505050565b6000818060200190518101906105cb9190613514565b60606000612a0884846117b7565b9050606085516001600160401b0381118015612a2357600080fd5b50604051908082528060200260200182016040528015612a4d578160200160208202803683370190505b50905060005b8651811015612aa157612a8283888381518110612a6c57fe5b602002602001015161289e90919063ffffffff16565b828281518110612a8e57fe5b6020908102919091010152600101612a53565b5095945050505050565b60606000828060200190518101906128e191906134ce565b600080612ad0878761163d565b90506000805b8751811015612af857612aee88828151811061293357fe5b9150600101612ad6565b50606086516001600160401b0381118015612b1257600080fd5b50604051908082528060200260200182016040528015612b3c578160200160208202803683370190505b5090506000805b8951811015612c03576000612b74858c8481518110612b5e57fe5b602002602001015161228e90919063ffffffff16565b9050612bb08b8381518110612b8557fe5b60200260200101516127d88c8581518110612b9c57fe5b60200260200101518e868151811061140b57fe5b848381518110612bbc57fe5b602002602001018181525050612bf8612bf182868581518110612bdb57fe5b60200260200101516122dc90919063ffffffff16565b8490611bbe565b925050600101612b43565b50606089516001600160401b0381118015612c1d57600080fd5b50604051908082528060200260200182016040528015612c47578160200160208202803683370190505b50905060005b8a51811015612d1e576000848281518110612c6457fe5b60200260200101518411612c7a57506000612cc2565b612cbf612c99868481518110612c8c57fe5b6020026020010151612268565b6127d8878581518110612ca857fe5b602002602001015187610cff90919063ffffffff16565b90505b6000612cce8a836122dc565b90506000612cea612cde83612268565b8e8681518110612b5e57fe5b9050612cfc818f868151811061140b57fe5b858581518110612d0857fe5b6020908102919091010152505050600101612c4d565b506000612d2b8c8361163d565b9050612d49612d42612d3d838961228e565b612268565b8a906122dc565b9c9b505050505050505050505050565b600080612d66878761163d565b90506000805b8751811015612d8e57612d8488828151811061293357fe5b9150600101612d6c565b50606086516001600160401b0381118015612da857600080fd5b50604051908082528060200260200182016040528015612dd2578160200160208202803683370190505b5090506000805b8951811015612e66576000612df4858c848151811061298b57fe5b9050612e308b8381518110612e0557fe5b60200260200101516107e58c8581518110612e1c57fe5b60200260200101518e868151811061216157fe5b848381518110612e3c57fe5b602002602001018181525050612e5b612bf182868581518110612a6c57fe5b925050600101612dd9565b50606089516001600160401b0381118015612e8057600080fd5b50604051908082528060200260200182016040528015612eaa578160200160208202803683370190505b50905060005b8a51811015612f67576000848281518110612ec757fe5b60200260200101518410612edd57506000612f0b565b612f08612ef8670de0b6b3a764000087858151811061140b57fe5b6127d88688868151811061140b57fe5b90505b6000612f178a836122dc565b90506000612f33612f2783612268565b8e8681518110612a6c57fe5b9050612f45818f868151811061216157fe5b858581518110612f5157fe5b6020908102919091010152505050600101612eb0565b506000612f748c8361163d565b9050612d49612f8f670de0b6b3a764000061239c848a6117b7565b8a9061289e565b600080612fa3888861163d565b90506000612fb98261290f876127d8818b611bbe565b90506000805b8951811015612fe157612fd78a828151811061293357fe5b9150600101612fbf565b506000612ff08b8b858c6126e5565b905060006130038b8b8151811061277e57fe5b90506000613017848d8d8151811061298b57fe5b9050600061302482612268565b905060006130328a836122dc565b90506129d161304082612268565b859061228e565b80356105068161394a565b600082601f830112613062578081fd5b81356130756130708261392b565b613905565b81815291506020808301908481018184028601820187101561309657600080fd5b60005b848110156130b557813584529282019290820190600101613099565b505050505092915050565b600082601f8301126130d0578081fd5b81516130de6130708261392b565b8181529150602080830190848101818402860182018710156130ff57600080fd5b60005b848110156130b557815184529282019290820190600101613102565b600082601f83011261312e578081fd5b81356001600160401b03811115613143578182fd5b613156601f8201601f1916602001613905565b915080825283602082850101111561316d57600080fd5b8060208401602084013760009082016020015292915050565b80356002811061050657600080fd5b6000602082840312156131a6578081fd5b81356105cb8161394a565b600080604083850312156131c3578081fd5b82356131ce8161394a565b915060208301356131de8161394a565b809150509250929050565b6000806000606084860312156131fd578081fd5b83356132088161394a565b925060208401356132188161394a565b929592945050506040919091013590565b600080600080600080600060e0888a031215613243578283fd5b873561324e8161394a565b9650602088013561325e8161394a565b95506040880135945060608801359350608088013560ff81168114613281578384fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156132b0578182fd5b82356132bb8161394a565b946020939093013593505050565b6000806000606084860312156132dd578081fd5b83516001600160401b03808211156132f3578283fd5b818601915086601f830112613306578283fd5b81516133146130708261392b565b80828252602080830192508086018b828387028901011115613334578788fd5b8796505b8487101561335f57805161334b8161394a565b845260019690960195928101928101613338565b508901519097509350505080821115613376578283fd5b50613383868287016130c0565b925050604084015190509250925092565b6000602082840312156133a5578081fd5b81356105cb8161395f565b6000602082840312156133c1578081fd5b81516105cb8161395f565b600080600080600080600060e0888a0312156133e6578081fd5b8735965060208801356133f88161394a565b955060408801356134088161394a565b945060608801356001600160401b0380821115613423578283fd5b61342f8b838c01613052565b955060808a0135945060a08a0135935060c08a0135915080821115613452578283fd5b5061345f8a828b0161311e565b91505092959891949750929550565b60006020828403121561347f578081fd5b81356001600160e01b0319811681146105cb578182fd5b6000602082840312156134a7578081fd5b81516105cb8161394a565b6000602082840312156134c3578081fd5b81516105cb8161396d565b6000806000606084860312156134e2578081fd5b83516134ed8161396d565b60208501519093506001600160401b03811115613508578182fd5b613383868287016130c0565b60008060408385031215613526578182fd5b82516135318161396d565b6020939093015192949293505050565b600080600060608486031215613555578081fd5b83516135608161396d565b602085015160409095015190969495509392505050565b60008060408385031215613589578182fd5b82516135948161396d565b60208401519092506001600160401b038111156135af578182fd5b6135bb858286016130c0565b9150509250929050565b600080600080608085870312156135da578182fd5b84356001600160401b03808211156135f0578384fd5b818701915061012080838a031215613606578485fd5b61360f81613905565b905061361b8984613186565b815261362a8960208501613047565b602082015261363c8960408501613047565b6040820152606083013560608201526080830135608082015260a083013560a082015261366c8960c08501613047565b60c082015261367e8960e08501613047565b60e08201526101008084013583811115613696578687fd5b6136a28b82870161311e565b8284015250508096505060208701359150808211156136bf578384fd5b506136cc87828801613052565b949794965050505060408301359260600135919050565b6000602082840312156136f4578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561372a5781518752958201959082019060010161370e565b509495945050505050565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b60006040825261379f60408301856136fb565b82810360208401526137b181856136fb565b95945050505050565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b818110156138af57858101830151858201604001528201613893565b818111156138c05783604083870101525b50601f01601f1916929092016040019392505050565b6000838252604060208301526138ef60408301846136fb565b949350505050565b60ff91909116815260200190565b6040518181016001600160401b038111828210171561392357600080fd5b604052919050565b60006001600160401b03821115613940578081fd5b5060209081020190565b6001600160a01b038116811461051d57600080fd5b801515811461051d57600080fd5b6003811061051d57600080fdfea2646970667358221220e4c2dcbbbbaeef83efa3c36cf243c46f81c40dbaf947020d33a23b2250d100ad64736f6c63430007010033a264697066735822122050080a29e9bf1fc9f72a4dd0c15b5604218fe7410cce9d436231fc04b34769ef64736f6c63430007010033",
              "opcodes": "PUSH1 0xC0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x4DE3 CODESIZE SUB DUP1 PUSH2 0x4DE3 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x4D JUMP JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x80 MSTORE PUSH3 0x76A700 TIMESTAMP ADD PUSH1 0xA0 MSTORE PUSH2 0x7B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x74 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH1 0xA0 MLOAD PUSH2 0x4D3E PUSH2 0xA5 PUSH1 0x0 CODECOPY DUP1 PUSH1 0xD6 MSTORE DUP1 PUSH2 0x100 MSTORE POP DUP1 PUSH2 0x1DD MSTORE POP PUSH2 0x4D3E PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH3 0x52 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2DA47C40 EQ PUSH3 0x57 JUMPI DUP1 PUSH4 0x6634B753 EQ PUSH3 0x7A JUMPI DUP1 PUSH4 0x7932C7F3 EQ PUSH3 0xA0 JUMPI DUP1 PUSH4 0x8D928AF8 EQ PUSH3 0xC6 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH3 0x61 PUSH3 0xD0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP3 SWAP2 SWAP1 PUSH3 0x55C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH3 0x91 PUSH3 0x8B CALLDATASIZE PUSH1 0x4 PUSH3 0x2DA JUMP JUMPDEST PUSH3 0x13C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP2 SWAP1 PUSH3 0x494 JUMP JUMPDEST PUSH3 0xB7 PUSH3 0xB1 CALLDATASIZE PUSH1 0x4 PUSH3 0x300 JUMP JUMPDEST PUSH3 0x15A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP2 SWAP1 PUSH3 0x480 JUMP JUMPDEST PUSH3 0xB7 PUSH3 0x1DB JUMP JUMPDEST PUSH1 0x0 DUP1 TIMESTAMP PUSH32 0x0 DUP2 LT ISZERO PUSH3 0x12E JUMPI DUP1 PUSH32 0x0 SUB SWAP3 POP PUSH3 0x278D00 SWAP2 POP PUSH3 0x137 JUMP JUMPDEST PUSH1 0x0 SWAP3 POP PUSH1 0x0 SWAP2 POP JUMPDEST POP SWAP1 SWAP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH3 0x169 PUSH3 0xD0 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH3 0x179 PUSH3 0x1DB JUMP JUMPDEST DUP11 DUP11 DUP11 DUP11 DUP11 DUP9 DUP9 DUP13 PUSH1 0x40 MLOAD PUSH3 0x18F SWAP1 PUSH3 0x24B JUMP JUMPDEST PUSH3 0x1A3 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0x49F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH3 0x1C0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP1 POP PUSH3 0x1CE DUP2 PUSH3 0x1FF JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE MLOAD PUSH32 0x83A48FBCFC991335314E74D0496AAB6A1987E992DDC85DDDBCC4D6DD6EF2E9FC SWAP2 SWAP1 LOG2 POP JUMP JUMPDEST PUSH2 0x4751 DUP1 PUSH3 0x5B8 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH3 0x266 DUP2 PUSH3 0x59E JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x27D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH3 0x294 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH3 0x2A9 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH3 0x56A JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH3 0x2C1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0x2EC JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH3 0x2F9 DUP2 PUSH3 0x59E JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH3 0x319 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP7 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH3 0x331 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH3 0x33F DUP11 DUP4 DUP12 ADD PUSH3 0x26C JUMP JUMPDEST SWAP8 POP PUSH1 0x20 SWAP2 POP DUP2 DUP10 ADD CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH3 0x356 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH3 0x364 DUP12 DUP3 DUP13 ADD PUSH3 0x26C JUMP JUMPDEST SWAP8 POP POP PUSH1 0x40 DUP10 ADD CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH3 0x379 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP10 ADD PUSH1 0x1F DUP2 ADD DUP12 SGT PUSH3 0x38A JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH3 0x399 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP4 DUP2 MUL SWAP3 POP PUSH3 0x3AB DUP5 DUP5 ADD PUSH3 0x56A JUMP JUMPDEST DUP2 DUP2 MSTORE DUP5 DUP2 ADD SWAP1 DUP4 DUP7 ADD DUP6 DUP6 ADD DUP8 ADD DUP16 LT ISZERO PUSH3 0x3C6 JUMPI DUP9 DUP10 REVERT JUMPDEST DUP9 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH3 0x3F4 JUMPI PUSH3 0x3DF DUP16 DUP3 PUSH3 0x259 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH3 0x3CA JUMP JUMPDEST POP SWAP9 POP POP POP POP PUSH1 0x60 DUP10 ADD CALLDATALOAD SWAP5 POP POP POP PUSH1 0x80 DUP8 ADD CALLDATALOAD SWAP2 POP PUSH3 0x419 DUP9 PUSH1 0xA0 DUP10 ADD PUSH3 0x259 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x459 JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH3 0x43B JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH3 0x46B JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP11 AND DUP2 MSTORE PUSH2 0x120 PUSH1 0x20 DUP1 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 PUSH3 0x4C8 DUP5 DUP4 ADD DUP14 PUSH3 0x432 JUMP JUMPDEST SWAP2 POP DUP4 DUP3 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH3 0x4DE DUP3 DUP13 PUSH3 0x432 JUMP JUMPDEST DUP5 DUP2 SUB PUSH1 0x60 DUP7 ADD MSTORE DUP11 MLOAD DUP1 DUP3 MSTORE DUP3 DUP13 ADD SWAP4 POP SWAP1 DUP3 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x51E JUMPI PUSH3 0x50B DUP6 MLOAD PUSH3 0x592 JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0x4F6 JUMP JUMPDEST POP POP DUP1 SWAP4 POP POP POP POP DUP7 PUSH1 0x80 DUP4 ADD MSTORE DUP6 PUSH1 0xA0 DUP4 ADD MSTORE DUP5 PUSH1 0xC0 DUP4 ADD MSTORE DUP4 PUSH1 0xE0 DUP4 ADD MSTORE PUSH3 0x54E PUSH2 0x100 DUP4 ADD DUP5 PUSH3 0x425 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0x58A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x5B4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID PUSH2 0x400 PUSH1 0x40 MSTORE PUSH32 0x6E71EDAE12B1B97F4D1F60370FEF10105FA2FAAE0126114A169C64845D6126C9 PUSH2 0x120 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x4751 CODESIZE SUB DUP1 PUSH3 0x4751 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x5A SWAP2 PUSH3 0xA52 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 DUP3 MSTORE CALLER PUSH1 0x80 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP6 SWAP1 SHL AND PUSH1 0xA0 MSTORE DUP11 MLOAD SWAP1 DUP12 ADD SWAP1 DUP2 KECCAK256 PUSH1 0xC0 MSTORE SWAP2 MLOAD SWAP1 KECCAK256 PUSH1 0xE0 MSTORE PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH2 0x100 MSTORE DUP9 MLOAD DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 PUSH1 0x0 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP5 SWAP2 DUP5 SWAP2 DUP11 SWAP2 DUP11 SWAP2 PUSH3 0xFE SWAP2 PUSH1 0x3 SWAP2 SWAP1 PUSH3 0x870 JUMP JUMPDEST POP DUP1 MLOAD PUSH3 0x114 SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0x870 JUMP JUMPDEST POP PUSH3 0x12C SWAP2 POP POP PUSH3 0x76A700 DUP4 GT ISZERO PUSH2 0x194 PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x140 PUSH3 0x278D00 DUP3 GT ISZERO PUSH2 0x195 PUSH3 0x6B0 JUMP JUMPDEST TIMESTAMP SWAP1 SWAP2 ADD PUSH2 0x140 DUP2 SWAP1 MSTORE ADD PUSH2 0x160 MSTORE DUP5 MLOAD PUSH3 0x162 SWAP1 PUSH1 0x2 GT ISZERO PUSH1 0xC8 PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x17A PUSH1 0x8 DUP7 MLOAD GT ISZERO PUSH1 0xC9 PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x190 DUP6 PUSH3 0x6C5 PUSH1 0x20 SHL PUSH3 0xCF1 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x1A5 PUSH5 0xE8D4A51000 DUP6 LT ISZERO PUSH1 0xCB PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x1BD PUSH8 0x16345785D8A0000 DUP6 GT ISZERO PUSH1 0xCA PUSH3 0x6B0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x9B2760F PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND SWAP1 PUSH4 0x9B2760F SWAP1 PUSH3 0x1EE SWAP1 DUP13 SWAP1 PUSH1 0x4 ADD PUSH3 0xBF5 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x209 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x21E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x244 SWAP2 SWAP1 PUSH3 0xA39 JUMP JUMPDEST SWAP1 POP DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x66A9C7D2 DUP3 DUP9 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH3 0x26F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH3 0x29A JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH3 0x2BB SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0xB59 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x2D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x2EB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP13 SWAP1 SHL AND PUSH2 0x180 MSTORE POP PUSH2 0x1A0 DUP2 SWAP1 MSTORE PUSH1 0x7 DUP6 SWAP1 SSTORE DUP6 MLOAD PUSH2 0x1C0 MSTORE DUP6 MLOAD PUSH3 0x322 JUMPI PUSH1 0x0 PUSH3 0x339 JUMP JUMPDEST DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x330 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x1E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x35C JUMPI PUSH1 0x0 PUSH3 0x373 JUMP JUMPDEST DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x36A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x200 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x396 JUMPI PUSH1 0x0 PUSH3 0x3AD JUMP JUMPDEST DUP6 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x3A4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x220 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x3D0 JUMPI PUSH1 0x0 PUSH3 0x3E7 JUMP JUMPDEST DUP6 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x3DE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x240 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x40A JUMPI PUSH1 0x0 PUSH3 0x421 JUMP JUMPDEST DUP6 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x418 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x260 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x444 JUMPI PUSH1 0x0 PUSH3 0x45B JUMP JUMPDEST DUP6 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x452 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x280 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x47E JUMPI PUSH1 0x0 PUSH3 0x495 JUMP JUMPDEST DUP6 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x48C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x4B8 JUMPI PUSH1 0x0 PUSH3 0x4CF JUMP JUMPDEST DUP6 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x4C6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2C0 MSTORE DUP6 MLOAD PUSH3 0x4EF JUMPI PUSH1 0x0 PUSH3 0x515 JUMP JUMPDEST PUSH3 0x515 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH3 0x6D1 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH2 0x2E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x52B JUMPI PUSH1 0x0 PUSH3 0x53D JUMP JUMPDEST PUSH3 0x53D DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x300 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x553 JUMPI PUSH1 0x0 PUSH3 0x565 JUMP JUMPDEST PUSH3 0x565 DUP7 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x320 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x57B JUMPI PUSH1 0x0 PUSH3 0x58D JUMP JUMPDEST PUSH3 0x58D DUP7 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x340 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x5A3 JUMPI PUSH1 0x0 PUSH3 0x5B5 JUMP JUMPDEST PUSH3 0x5B5 DUP7 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x360 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x5CB JUMPI PUSH1 0x0 PUSH3 0x5DD JUMP JUMPDEST PUSH3 0x5DD DUP7 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x380 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x5F3 JUMPI PUSH1 0x0 PUSH3 0x605 JUMP JUMPDEST PUSH3 0x605 DUP7 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x3A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x61B JUMPI PUSH1 0x0 PUSH3 0x62D JUMP JUMPDEST PUSH3 0x62D DUP7 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x3C0 DUP2 DUP2 MSTORE POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP PUSH3 0x666 PUSH8 0xDE0B6B3A7640000 DUP7 LT ISZERO PUSH2 0x12C PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x681 PUSH10 0x10F0CF064DD59200000 DUP7 GT ISZERO PUSH2 0x12D PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x69A PUSH1 0x5 DUP8 MLOAD GT ISZERO PUSH2 0x12F PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST POP POP POP PUSH2 0x3E0 SWAP2 SWAP1 SWAP2 MSTORE POP PUSH3 0xC53 SWAP4 POP POP POP POP JUMP JUMPDEST DUP2 PUSH3 0x6C1 JUMPI PUSH3 0x6C1 DUP2 PUSH3 0x773 JUMP JUMPDEST POP POP JUMP JUMPDEST DUP1 PUSH3 0x6C1 DUP2 PUSH3 0x7C6 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x313CE567 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x70E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH3 0x723 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x749 SWAP2 SWAP1 PUSH3 0xB2F JUMP JUMPDEST PUSH1 0xFF AND SWAP1 POP PUSH1 0x0 PUSH3 0x768 PUSH1 0x12 DUP4 PUSH3 0x853 PUSH1 0x20 SHL PUSH3 0xCFF OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0xA EXP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH3 0x7D7 JUMPI PUSH3 0x850 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x7E7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH3 0x84D JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH3 0x811 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0x842 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH3 0x7F8 JUMP JUMPDEST POP POP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x865 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH3 0x6B0 JUMP JUMPDEST POP DUP1 DUP3 SUB JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0x8B3 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0x8E3 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0x8E3 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0x8E3 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0x8C6 JUMP JUMPDEST POP PUSH3 0x8F1 SWAP3 SWAP2 POP PUSH3 0x8F5 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0x8F1 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0x8F6 JUMP JUMPDEST DUP1 MLOAD PUSH3 0x86A DUP2 PUSH3 0xC3D JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x92A JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0x940 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP1 DUP3 MUL PUSH3 0x952 DUP3 DUP3 ADD PUSH3 0xC0A JUMP JUMPDEST DUP4 DUP2 MSTORE SWAP4 POP DUP2 DUP5 ADD DUP6 DUP4 ADD DUP3 DUP8 ADD DUP5 ADD DUP9 LT ISZERO PUSH3 0x96F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST DUP5 DUP4 LT ISZERO PUSH3 0x99F JUMPI DUP1 MLOAD PUSH3 0x98A DUP2 PUSH3 0xC3D JUMP JUMPDEST DUP3 MSTORE PUSH1 0x1 SWAP3 SWAP1 SWAP3 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 DUP4 ADD PUSH3 0x974 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x9BB JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0x9D1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH3 0x9E7 PUSH1 0x1F DUP4 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH3 0xC0A JUMP JUMPDEST SWAP3 POP DUP2 DUP4 MSTORE DUP5 DUP2 DUP4 DUP7 ADD ADD GT ISZERO PUSH3 0x9FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH3 0xA1E JUMPI DUP5 DUP2 ADD DUP3 ADD MLOAD DUP5 DUP3 ADD DUP4 ADD MSTORE DUP2 ADD PUSH3 0xA01 JUMP JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xA30 JUMPI PUSH1 0x0 DUP3 DUP5 DUP7 ADD ADD MSTORE JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xA4B JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH3 0xA71 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH3 0xA7D DUP12 DUP12 PUSH3 0x90C JUMP JUMPDEST PUSH1 0x20 DUP12 ADD MLOAD SWAP1 SWAP10 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH3 0xA9A JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xAA8 DUP14 DUP4 DUP15 ADD PUSH3 0x9AA JUMP JUMPDEST SWAP10 POP PUSH1 0x40 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xABE JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xACC DUP14 DUP4 DUP15 ADD PUSH3 0x9AA JUMP JUMPDEST SWAP9 POP PUSH1 0x60 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xAE2 JUMPI DUP7 DUP8 REVERT JUMPDEST POP PUSH3 0xAF1 DUP13 DUP3 DUP14 ADD PUSH3 0x919 JUMP JUMPDEST SWAP7 POP POP PUSH1 0x80 DUP11 ADD MLOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD MLOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD MLOAD SWAP3 POP PUSH1 0xE0 DUP11 ADD MLOAD SWAP2 POP PUSH3 0xB20 DUP12 PUSH2 0x100 DUP13 ADD PUSH3 0x90C JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xB41 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH3 0xB52 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 ADD DUP6 DUP4 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP6 ADD MSTORE DUP2 DUP7 MLOAD DUP1 DUP5 MSTORE PUSH1 0x80 DUP7 ADD SWAP2 POP DUP3 DUP9 ADD SWAP4 POP DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xBA5 JUMPI PUSH3 0xB92 DUP6 MLOAD PUSH3 0xC31 JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xB7D JUMP JUMPDEST POP POP DUP5 DUP2 SUB PUSH1 0x40 DUP7 ADD MSTORE DUP6 MLOAD DUP1 DUP3 MSTORE SWAP1 DUP3 ADD SWAP3 POP DUP2 DUP7 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xBE7 JUMPI PUSH3 0xBD4 DUP4 MLOAD PUSH3 0xC31 JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xBBF JUMP JUMPDEST POP SWAP3 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP2 ADD PUSH1 0x3 DUP4 LT PUSH3 0xC04 JUMPI INVALID JUMPDEST SWAP2 SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0xC29 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x850 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x180 MLOAD PUSH1 0x60 SHR PUSH2 0x1A0 MLOAD PUSH2 0x1C0 MLOAD PUSH2 0x1E0 MLOAD PUSH1 0x60 SHR PUSH2 0x200 MLOAD PUSH1 0x60 SHR PUSH2 0x220 MLOAD PUSH1 0x60 SHR PUSH2 0x240 MLOAD PUSH1 0x60 SHR PUSH2 0x260 MLOAD PUSH1 0x60 SHR PUSH2 0x280 MLOAD PUSH1 0x60 SHR PUSH2 0x2A0 MLOAD PUSH1 0x60 SHR PUSH2 0x2C0 MLOAD PUSH1 0x60 SHR PUSH2 0x2E0 MLOAD PUSH2 0x300 MLOAD PUSH2 0x320 MLOAD PUSH2 0x340 MLOAD PUSH2 0x360 MLOAD PUSH2 0x380 MLOAD PUSH2 0x3A0 MLOAD PUSH2 0x3C0 MLOAD PUSH2 0x3E0 MLOAD PUSH2 0x39B0 PUSH3 0xDA1 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x7C0 MSTORE DUP1 PUSH2 0x7F3 MSTORE DUP1 PUSH2 0x1AEF MSTORE DUP1 PUSH2 0x1C66 MSTORE DUP1 PUSH2 0x1CEA MSTORE DUP1 PUSH2 0x1F28 MSTORE DUP1 PUSH2 0x2037 MSTORE DUP1 PUSH2 0x2497 MSTORE DUP1 PUSH2 0x255D MSTORE DUP1 PUSH2 0x25E3 MSTORE DUP1 PUSH2 0x263F MSTORE POP DUP1 PUSH2 0xF94 MSTORE POP DUP1 PUSH2 0xF51 MSTORE POP DUP1 PUSH2 0xF0E MSTORE POP DUP1 PUSH2 0xECB MSTORE POP DUP1 PUSH2 0xE88 MSTORE POP DUP1 PUSH2 0xE45 MSTORE POP DUP1 PUSH2 0xE02 MSTORE POP DUP1 PUSH2 0xDB1 MSTORE POP POP POP POP POP POP POP POP POP DUP1 PUSH2 0xD17 MSTORE POP DUP1 PUSH2 0x661 MSTORE POP DUP1 PUSH2 0x98B MSTORE POP DUP1 PUSH2 0x11F7 MSTORE POP DUP1 PUSH2 0x11D3 MSTORE POP DUP1 PUSH2 0xA5A MSTORE POP DUP1 PUSH2 0x12FA MSTORE POP DUP1 PUSH2 0x133C MSTORE POP DUP1 PUSH2 0x131B MSTORE POP DUP1 PUSH2 0x967 MSTORE POP DUP1 PUSH2 0x8F1 MSTORE POP PUSH2 0x39B0 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1DA JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6DACCFFA GT PUSH2 0x104 JUMPI DUP1 PUSH4 0x8D928AF8 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD505ACCF GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x3B5 JUMPI DUP1 PUSH4 0xD5C096C4 EQ PUSH2 0x3C8 JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x3DB JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x3EE JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x8D928AF8 EQ PUSH2 0x38A JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x392 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x39A JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x3AD JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x7ECEBE00 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x33C JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x34F JUMPI DUP1 PUSH4 0x87EC6817 EQ PUSH2 0x362 JUMPI DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x375 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x6DACCFFA EQ PUSH2 0x300 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x308 JUMPI DUP1 PUSH4 0x74F3B009 EQ PUSH2 0x31B JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x313CE567 GT PUSH2 0x17C JUMPI DUP1 PUSH4 0x55C67628 GT PUSH2 0x14B JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0x2BC JUMPI DUP1 PUSH4 0x6028BFD4 EQ PUSH2 0x2C4 JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x2E5 JUMPI DUP1 PUSH4 0x679AEFCE EQ PUSH2 0x2F8 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x313CE567 EQ PUSH2 0x284 JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x299 JUMPI DUP1 PUSH4 0x38E9922E EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x38FFF2D0 EQ PUSH2 0x2B4 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x16C38B3C GT PUSH2 0x1B8 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x23D JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x252 JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x25A JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x271 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x1EC954A EQ PUSH2 0x1DF JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x208 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x21D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F2 PUSH2 0x1ED CALLDATASIZE PUSH1 0x4 PUSH2 0x35C5 JUMP JUMPDEST PUSH2 0x401 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x210 PUSH2 0x45E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x3883 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x22B CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0x4F5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x37BA JUMP JUMPDEST PUSH2 0x250 PUSH2 0x24B CALLDATASIZE PUSH1 0x4 PUSH2 0x3394 JUMP JUMPDEST PUSH2 0x50C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1F2 PUSH2 0x520 JUMP JUMPDEST PUSH2 0x262 PUSH2 0x526 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x37C5 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x27F CALLDATASIZE PUSH1 0x4 PUSH2 0x31E9 JUMP JUMPDEST PUSH2 0x54F JUMP JUMPDEST PUSH2 0x28C PUSH2 0x5D2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x38F7 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x5D7 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x2AF CALLDATASIZE PUSH1 0x4 PUSH2 0x36E3 JUMP JUMPDEST PUSH2 0x5E6 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x65F JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x683 JUMP JUMPDEST PUSH2 0x2D7 PUSH2 0x2D2 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x689 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP3 SWAP2 SWAP1 PUSH2 0x38D6 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x2F3 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0x6C0 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x71A JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x7F1 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x316 CALLDATASIZE PUSH1 0x4 PUSH2 0x3195 JUMP JUMPDEST PUSH2 0x815 JUMP JUMPDEST PUSH2 0x32E PUSH2 0x329 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x830 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP3 SWAP2 SWAP1 PUSH2 0x378C JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x34A CALLDATASIZE PUSH1 0x4 PUSH2 0x3195 JUMP JUMPDEST PUSH2 0x8D2 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x35D CALLDATASIZE PUSH1 0x4 PUSH2 0x346E JUMP JUMPDEST PUSH2 0x8ED JUMP JUMPDEST PUSH2 0x2D7 PUSH2 0x370 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x93F JUMP JUMPDEST PUSH2 0x37D PUSH2 0x965 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x3778 JUMP JUMPDEST PUSH2 0x37D PUSH2 0x989 JUMP JUMPDEST PUSH2 0x210 PUSH2 0x9AD JUMP JUMPDEST PUSH2 0x230 PUSH2 0x3A8 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0xA0E JUMP JUMPDEST PUSH2 0x37D PUSH2 0xA1B JUMP JUMPDEST PUSH2 0x250 PUSH2 0x3C3 CALLDATASIZE PUSH1 0x4 PUSH2 0x3229 JUMP JUMPDEST PUSH2 0xA25 JUMP JUMPDEST PUSH2 0x32E PUSH2 0x3D6 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0xB6E JUMP JUMPDEST PUSH2 0x230 PUSH2 0x3E9 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0xC90 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x3FC CALLDATASIZE PUSH1 0x4 PUSH2 0x31B1 JUMP JUMPDEST PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x415 DUP4 DUP4 PUSH2 0x410 PUSH2 0xD15 JUMP JUMPDEST PUSH2 0xD39 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x41F PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x430 JUMPI INVALID JUMPDEST EQ PUSH2 0x447 JUMPI PUSH2 0x442 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0xFD2 JUMP JUMPDEST PUSH2 0x454 JUMP JUMPDEST PUSH2 0x454 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0x1047 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4EA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BF JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4EA JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4CD JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x502 CALLER DUP5 DUP5 PUSH2 0x10AB JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x514 PUSH2 0x1113 JUMP JUMPDEST PUSH2 0x51D DUP2 PUSH2 0x1141 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x533 PUSH2 0x11B4 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x53E PUSH2 0x11D1 JUMP JUMPDEST SWAP2 POP PUSH2 0x548 PUSH2 0x11F5 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x58D SWAP2 EQ DUP1 PUSH2 0x585 JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x598 DUP6 DUP6 DUP6 PUSH2 0x1227 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x5B3 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x5C5 JUMPI PUSH2 0x5C5 DUP6 CALLER DUP6 DUP5 SUB PUSH2 0x10AB JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E1 PUSH2 0x12F6 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x5EE PUSH2 0x1113 JUMP JUMPDEST PUSH2 0x5F6 PUSH2 0x1393 JUMP JUMPDEST PUSH2 0x609 PUSH5 0xE8D4A51000 DUP3 LT ISZERO PUSH1 0xCB PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x61F PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH1 0xCA PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x7 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9CABC14D438714DBCD9292DF9B3F89C42F98ACD93A675AD72CD6033777E9B8E7 SWAP1 PUSH2 0x654 SWAP1 DUP4 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x69F DUP7 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x13A8 JUMP JUMPDEST PUSH2 0x6B4 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x13B5 PUSH2 0x14BA PUSH2 0x151B JUMP JUMPDEST SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x6FC JUMPI PUSH2 0x6F7 CALLER DUP6 PUSH1 0x0 PUSH2 0x10AB JUMP JUMPDEST PUSH2 0x710 JUMP JUMPDEST PUSH2 0x710 CALLER DUP6 PUSH2 0x70B DUP5 DUP8 PUSH2 0xCFF JUMP JUMPDEST PUSH2 0x10AB JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x726 PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF94D4668 PUSH2 0x73C PUSH2 0x65F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x758 SWAP2 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x770 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x784 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x7AC SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x32C9 JUMP JUMPDEST POP SWAP2 POP POP PUSH2 0x7EB PUSH2 0x7BB PUSH2 0x520 JUMP JUMPDEST PUSH2 0x7E5 PUSH32 0x0 DUP5 PUSH2 0x163D JUMP JUMPDEST SWAP1 PUSH2 0x17B7 JUMP JUMPDEST SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0x85A PUSH2 0x83F PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH1 0xCD PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x86F PUSH2 0x865 PUSH2 0x65F JUMP JUMPDEST DUP3 EQ PUSH2 0x1F4 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x879 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0x885 DUP9 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x899 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x13B5 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x8A9 DUP14 DUP5 PUSH2 0x185C JUMP JUMPDEST PUSH2 0x8B3 DUP3 DUP6 PUSH2 0x14BA JUMP JUMPDEST PUSH2 0x8BD DUP2 DUP6 PUSH2 0x14BA JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP POP POP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x922 SWAP3 SWAP2 SWAP1 PUSH2 0x3735 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x950 DUP7 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x6B4 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x18EF PUSH2 0x1994 PUSH2 0x151B JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4EA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BF JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4EA JUMP JUMPDEST PUSH1 0x0 PUSH2 0x502 CALLER DUP5 DUP5 PUSH2 0x1227 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E1 PUSH2 0x19F5 JUMP JUMPDEST PUSH2 0xA33 DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD SWAP1 MLOAD SWAP1 SWAP3 SWAP2 PUSH2 0xA8A SWAP2 PUSH32 0x0 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP9 SWAP2 DUP14 SWAP2 ADD PUSH2 0x3805 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0xAAD DUP3 PUSH2 0x1A6F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xAD4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3865 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAF6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0xB38 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xB30 JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0xB61 DUP12 DUP12 DUP12 PUSH2 0x10AB JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0xB7D PUSH2 0x83F PUSH2 0x989 JUMP JUMPDEST PUSH2 0xB88 PUSH2 0x865 PUSH2 0x65F JUMP JUMPDEST PUSH1 0x60 PUSH2 0xB92 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0xB9C PUSH2 0x520 JUMP JUMPDEST PUSH2 0xC41 JUMPI PUSH1 0x0 PUSH1 0x60 PUSH2 0xBB0 DUP14 DUP14 DUP14 DUP11 PUSH2 0x1A8B JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xBC5 PUSH3 0xF4240 DUP4 LT ISZERO PUSH1 0xCC PUSH2 0x1219 JUMP JUMPDEST PUSH2 0xBD3 PUSH1 0x0 PUSH3 0xF4240 PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xBE2 DUP12 PUSH3 0xF4240 DUP5 SUB PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xBEC DUP2 DUP5 PUSH2 0x1994 JUMP JUMPDEST DUP1 PUSH2 0xBF5 PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xC0A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xC34 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0x8C5 JUMP JUMPDEST PUSH2 0xC4B DUP9 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0xC5F DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x18EF JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xC6F DUP13 DUP5 PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xC79 DUP3 DUP6 PUSH2 0x1994 JUMP JUMPDEST PUSH2 0xC83 DUP2 DUP6 PUSH2 0x14BA JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP PUSH2 0x8C5 SWAP2 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x502 SWAP2 DUP6 SWAP1 PUSH2 0x70B SWAP1 DUP7 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST DUP1 PUSH2 0xCFB DUP2 PUSH2 0x1BD0 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xD0F DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x1219 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0xD51 DUP2 DUP5 LT DUP1 ISZERO PUSH2 0xD4A JUMPI POP DUP2 DUP4 LT JUMPDEST PUSH1 0x64 PUSH2 0x1219 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0xD62 PUSH2 0xD15 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xD7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xDA6 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0xDDD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0xDF7 JUMP JUMPDEST SWAP2 POP PUSH2 0x4F2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0xE2E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0xE71 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0xEB4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0xEF7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0xF3A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0xF7D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0xFC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xFDE DUP6 DUP4 PUSH2 0x1808 JUMP JUMPDEST PUSH2 0xFFF DUP7 PUSH1 0x60 ADD MLOAD DUP4 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0xFF2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1C49 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x1012 DUP8 DUP8 DUP8 DUP8 PUSH2 0x1C55 JUMP JUMPDEST SWAP1 POP PUSH2 0x1031 DUP2 DUP5 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x1024 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1C92 JUMP JUMPDEST SWAP1 POP PUSH2 0x103C DUP2 PUSH2 0x1C9E JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1056 DUP7 PUSH1 0x60 ADD MLOAD PUSH2 0x1CB5 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x1065 DUP6 DUP4 PUSH2 0x1808 JUMP JUMPDEST PUSH2 0x1079 DUP7 PUSH1 0x60 ADD MLOAD DUP4 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0xFF2 JUMPI INVALID JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x108C DUP8 DUP8 DUP8 DUP8 PUSH2 0x1CD9 JUMP JUMPDEST SWAP1 POP PUSH2 0x103C DUP2 DUP5 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x109E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1D16 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP5 SWAP1 SSTORE MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0x1106 SWAP1 DUP6 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x112A PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x8ED JUMP JUMPDEST SWAP1 POP PUSH2 0x51D PUSH2 0x1139 DUP3 CALLER PUSH2 0x1D22 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x1219 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x1161 JUMPI PUSH2 0x115C PUSH2 0x1152 PUSH2 0x11D1 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x1176 JUMP JUMPDEST PUSH2 0x1176 PUSH2 0x116C PUSH2 0x11F5 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x654 SWAP1 DUP4 SWAP1 PUSH2 0x37BA JUMP JUMPDEST PUSH1 0x0 PUSH2 0x11BE PUSH2 0x11F5 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x5E1 JUMPI POP POP PUSH1 0x6 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST DUP2 PUSH2 0xCFB JUMPI PUSH2 0xCFB DUP2 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x124F DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x1266 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x1296 SWAP1 DUP4 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP7 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x12E8 SWAP1 DUP7 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x1363 PUSH2 0x1E65 JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1378 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3839 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x13A6 PUSH2 0x139E PUSH2 0x11B4 JUMP JUMPDEST PUSH2 0x192 PUSH2 0x1219 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0xCFB DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x13C2 PUSH2 0x11B4 JUMP JUMPDEST ISZERO PUSH2 0x1446 JUMPI PUSH2 0x13D4 DUP8 PUSH1 0x8 SLOAD DUP8 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH2 0x13E1 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1440 JUMPI PUSH2 0x1421 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x13F7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x142D JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x13D9 JUMP JUMPDEST POP PUSH2 0x1491 JUMP JUMPDEST PUSH2 0x144E PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1463 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x148D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP JUMPDEST PUSH2 0x149B DUP8 DUP6 PUSH2 0x1F72 JUMP JUMPDEST SWAP1 SWAP4 POP SWAP2 POP PUSH2 0x14AA DUP8 DUP4 PUSH2 0x1FDC JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x14C5 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x14FC DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x14DB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x14EF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x205C JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1508 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x14BD JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x15D9 JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x153F SWAP3 SWAP2 SWAP1 PUSH2 0x374D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x157C JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1581 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1590 JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x43ADBAFB PUSH1 0xE0 SHL DUP2 EQ PUSH2 0x15BB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x4 PUSH1 0x0 RETURNDATACOPY PUSH1 0x40 PUSH1 0x20 MSTORE PUSH1 0x24 RETURNDATASIZE SUB PUSH1 0x24 PUSH1 0x40 RETURNDATACOPY PUSH1 0x1C RETURNDATASIZE ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x15E3 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0x15EF DUP8 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1606 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x1619 DUP2 DUP5 DUP7 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP1 MLOAD PUSH1 0x1F NOT DUP3 ADD DUP4 SWAP1 MSTORE PUSH4 0x43ADBAFB PUSH1 0x3F NOT DUP4 ADD MSTORE PUSH1 0x20 MUL PUSH1 0x23 NOT DUP3 ADD PUSH1 0x44 DUP3 ADD DUP2 REVERT JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x167E JUMPI PUSH2 0x1674 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x165D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x1646 JUMP JUMPDEST POP DUP2 PUSH2 0x168F JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 PUSH2 0x169D DUP9 DUP6 PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x17AA JUMPI PUSH1 0x0 PUSH2 0x16CB DUP7 DUP11 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x1704 JUMPI PUSH2 0x16FA PUSH2 0x16F4 PUSH2 0x16EE DUP5 DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP10 PUSH2 0x207C JUMP JUMPDEST DUP7 PUSH2 0x20A0 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x16D0 JUMP JUMPDEST POP DUP4 SWAP5 POP PUSH2 0x1764 PUSH2 0x173A PUSH2 0x1721 PUSH2 0x171B DUP7 DUP12 PUSH2 0x207C JUMP JUMPDEST DUP5 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x1734 PUSH2 0x172E DUP11 DUP10 PUSH2 0x207C JUMP JUMPDEST DUP9 PUSH2 0x207C JUMP JUMPDEST SWAP1 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x175F PUSH2 0x1751 PUSH2 0x174B DUP8 PUSH1 0x1 PUSH2 0xCFF JUMP JUMPDEST DUP6 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x1734 PUSH2 0x16EE DUP12 PUSH1 0x1 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x20A0 JUMP JUMPDEST SWAP4 POP DUP5 DUP5 GT ISZERO PUSH2 0x178A JUMPI PUSH1 0x1 PUSH2 0x177A DUP6 DUP8 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x1785 JUMPI POP PUSH2 0x17AA JUMP JUMPDEST PUSH2 0x17A1 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x1796 DUP7 DUP7 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x17A1 JUMPI POP PUSH2 0x17AA JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x16A2 JUMP JUMPDEST POP SWAP1 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x17C6 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x17D3 JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x17F6 SWAP1 DUP6 DUP4 DUP2 PUSH2 0x17ED JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0x1219 JUMP JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x17FF JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x1813 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x183D DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1829 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1849 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x180B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x1884 DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP3 DUP3 SUB SWAP1 SSTORE PUSH1 0x2 SLOAD PUSH2 0x18AE SWAP1 DUP4 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1106 SWAP1 DUP7 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x18FC PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x190B DUP9 PUSH1 0x8 SLOAD DUP9 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH2 0x1918 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1961 JUMPI PUSH2 0x1942 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x192E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP11 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x194E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1910 JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 PUSH2 0x1970 DUP11 DUP9 PUSH2 0x20D3 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x197E DUP11 DUP3 PUSH2 0x212B JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP1 SWAP13 SWAP1 SWAP12 POP SWAP1 SWAP10 POP SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x199F PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x19D6 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x19B5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x19C9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x20A0 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x19E2 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1997 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19FF PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1A37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1A4B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x5E1 SWAP2 SWAP1 PUSH2 0x3496 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1A79 PUSH2 0x12F6 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x922 SWAP3 SWAP2 SWAP1 PUSH2 0x375D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1A97 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1AA2 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH2 0x1ABD PUSH1 0x0 DUP3 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1AB5 JUMPI INVALID JUMPDEST EQ PUSH1 0xCE PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1AC8 DUP6 PUSH2 0x21AC JUMP JUMPDEST SWAP1 POP PUSH2 0x1AD7 DUP2 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x1AE8 DUP2 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B14 PUSH32 0x0 DUP4 PUSH2 0x163D JUMP JUMPDEST PUSH1 0x8 DUP2 SWAP1 SSTORE SWAP10 SWAP2 SWAP9 POP SWAP1 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x1B4B SWAP1 DUP3 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x2 SLOAD PUSH2 0x1B71 SWAP1 DUP3 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1BB2 SWAP1 DUP6 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x5CB DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH2 0x1BDF JUMPI PUSH2 0x51D JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1BEE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1C16 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x1C3F DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH2 0x1219 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x1BFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x207C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C5F PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x454 PUSH32 0x0 DUP7 DUP7 DUP7 DUP11 PUSH1 0x60 ADD MLOAD PUSH2 0x21C2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x20A0 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x506 PUSH2 0x1CAE PUSH1 0x7 SLOAD PUSH2 0x2268 JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x228E JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1CCD PUSH1 0x7 SLOAD DUP5 PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x5CB DUP4 DUP3 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1CE3 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x454 PUSH32 0x0 DUP7 DUP7 DUP7 DUP11 PUSH1 0x60 ADD MLOAD PUSH2 0x2318 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x205C JUMP JUMPDEST PUSH1 0x0 PUSH20 0xBA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1B PUSH2 0x1D41 PUSH2 0x965 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x1D5C JUMPI POP PUSH2 0x1D5C DUP4 PUSH2 0x23A2 JUMP JUMPDEST ISZERO PUSH2 0x1D84 JUMPI PUSH2 0x1D69 PUSH2 0x965 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH2 0x1D8C PUSH2 0x19F5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1DBB SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x37E6 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1DD3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1DE7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1E0B SWAP2 SWAP1 PUSH2 0x33B0 JUMP JUMPDEST SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x1E74 PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1E89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1EB3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP3 PUSH2 0x1EC2 JUMPI SWAP1 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 DUP1 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1ED2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST PUSH2 0x1EEB PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1F22 JUMPI PUSH1 0x0 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1F00 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP DUP3 DUP2 GT ISZERO PUSH2 0x1F19 JUMPI DUP2 SWAP4 POP DUP1 SWAP3 POP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1EE3 JUMP JUMPDEST POP PUSH2 0x1F50 PUSH32 0x0 DUP9 DUP9 DUP6 DUP10 PUSH2 0x23BC JUMP JUMPDEST DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F5C JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP SWAP1 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x1F81 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1F91 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1FAB JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2418 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x1FD5 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1FB9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1FC9 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x24EE JUMP JUMPDEST PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2520 JUMP JUMPDEST POP JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH2 0x1FE8 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x2031 JUMPI PUSH2 0x2012 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1FFE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x201E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1FE0 JUMP JUMPDEST POP PUSH2 0x5CB PUSH32 0x0 DUP5 PUSH2 0x163D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x206B DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x2074 JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x5CB DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x20AF DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x20BC JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x20C8 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x20E2 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x20F2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2102 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x25AA JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2110 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2120 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2624 JUMP JUMPDEST PUSH2 0x1FD3 PUSH2 0x136 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH2 0x2137 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x2031 JUMPI PUSH2 0x2177 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x214D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2183 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x212F JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x506 SWAP2 SWAP1 PUSH2 0x34B2 JUMP JUMPDEST PUSH1 0x60 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5CB SWAP2 SWAP1 PUSH2 0x3577 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x21CF DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x21E1 DUP4 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x21ED JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x2207 DUP9 DUP9 DUP5 DUP10 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH2 0x2219 DUP5 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2225 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x225C PUSH1 0x1 PUSH2 0x1734 DUP10 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x2245 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 DUP3 LT PUSH2 0x2280 JUMPI PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x229D DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x22AA JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x22C4 SWAP1 DUP6 DUP4 DUP2 PUSH2 0x17ED JUMPI INVALID JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x22D0 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x22F6 DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST DUP1 PUSH2 0x2305 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD PUSH2 0x22D0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2325 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2337 DUP4 DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP7 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2343 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x235D DUP9 DUP9 DUP5 DUP9 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH2 0x236F DUP5 DUP9 DUP9 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x237B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x225C PUSH1 0x1 PUSH2 0x239C DUP4 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x23B4 PUSH4 0x1C74C917 PUSH1 0xE1 SHL PUSH2 0x8ED JUMP JUMPDEST SWAP1 SWAP2 EQ SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x23CB DUP8 DUP8 DUP8 DUP8 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x23DC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD GT PUSH2 0x23F0 JUMPI PUSH1 0x0 PUSH2 0x2400 JUMP JUMPDEST PUSH2 0x2400 DUP3 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x225C PUSH8 0xDE0B6B3A7640000 PUSH2 0x7E5 DUP4 DUP8 PUSH2 0x289E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2424 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x242E PUSH2 0xD15 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x243C DUP7 PUSH2 0x28CA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x244D DUP4 DUP3 LT PUSH1 0x64 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2465 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x248F JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x24C9 PUSH32 0x0 DUP10 DUP5 DUP7 PUSH2 0x24C1 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x28EC JUMP JUMPDEST DUP2 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x24D5 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP2 SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x24FD DUP5 PUSH2 0x29E4 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x2513 DUP7 DUP4 PUSH2 0x250E PUSH2 0x520 JUMP JUMPDEST PUSH2 0x29FA JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x252C PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2539 DUP6 PUSH2 0x2AAB JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x254A DUP3 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x2556 DUP3 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x258E PUSH32 0x0 DUP9 DUP6 PUSH2 0x2586 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2AC3 JUMP JUMPDEST SWAP1 POP PUSH2 0x259E DUP3 DUP3 GT ISZERO PUSH1 0xCF PUSH2 0x1219 JUMP JUMPDEST SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x25BA DUP6 PUSH2 0x2AAB JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x25D0 PUSH2 0x25C9 PUSH2 0xD15 JUMP JUMPDEST DUP4 MLOAD PUSH2 0x13A8 JUMP JUMPDEST PUSH2 0x25DC DUP3 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2614 PUSH32 0x0 DUP9 DUP6 PUSH2 0x260C PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2D59 JUMP JUMPDEST SWAP1 POP PUSH2 0x259E DUP3 DUP3 LT ISZERO PUSH1 0xD0 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0x2634 DUP6 PUSH2 0x28CA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH2 0x2671 PUSH32 0x0 DUP9 DUP5 DUP7 PUSH2 0x2669 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2F96 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x267D PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2692 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x26BC JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 DUP2 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x26CC JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP8 SWAP3 SWAP7 POP SWAP2 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x26F3 DUP7 DUP7 MLOAD PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x2704 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH2 0x2722 DUP8 MLOAD DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x276E JUMPI PUSH2 0x2753 PUSH2 0x274D PUSH2 0x2746 DUP5 DUP12 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP11 MLOAD PUSH2 0x207C JUMP JUMPDEST DUP9 PUSH2 0x205C JUMP JUMPDEST SWAP2 POP PUSH2 0x2764 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x165D JUMPI INVALID JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x2727 JUMP JUMPDEST POP PUSH2 0x2795 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x277E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x27AC PUSH2 0x27A6 DUP9 DUP10 PUSH2 0x207C JUMP JUMPDEST DUP6 PUSH2 0x20A0 JUMP JUMPDEST SWAP1 POP PUSH2 0x27DE DUP3 PUSH2 0x27D8 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x27C1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 PUSH2 0x228E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x27F6 PUSH2 0x27EF DUP10 DUP8 PUSH2 0x17B7 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x1BBE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x2816 PUSH2 0x2808 DUP12 DUP6 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x27D8 DUP7 PUSH2 0x1734 DUP15 DUP1 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x288E JUMPI DUP2 SWAP3 POP PUSH2 0x284B PUSH2 0x283D DUP13 PUSH2 0x239C DUP8 PUSH2 0x1734 DUP8 PUSH1 0x2 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x27D8 DUP8 PUSH2 0x1734 DUP7 DUP1 PUSH2 0x22DC JUMP JUMPDEST SWAP2 POP DUP3 DUP3 GT ISZERO PUSH2 0x2870 JUMPI PUSH1 0x1 PUSH2 0x2861 DUP4 DUP6 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x286B JUMPI PUSH2 0x288E JUMP JUMPDEST PUSH2 0x2886 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x287C DUP5 DUP5 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x2886 JUMPI PUSH2 0x288E JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x281B JUMP JUMPDEST POP SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x28B8 DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x28E1 SWAP2 SWAP1 PUSH2 0x3541 JUMP JUMPDEST SWAP1 SWAP6 SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x28F9 DUP9 DUP9 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2915 DUP3 PUSH2 0x290F DUP8 PUSH2 0x27D8 DUP2 DUP12 PUSH2 0xCFF JUMP JUMPDEST SWAP1 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2954 JUMPI PUSH2 0x294A DUP11 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x291B JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2963 DUP12 DUP12 DUP6 DUP13 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2977 DUP3 DUP13 DUP13 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29A1 DUP5 DUP14 DUP14 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x17B7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29AE DUP3 PUSH2 0x2268 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29BC DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH2 0x29D1 PUSH2 0x29CA DUP3 PUSH2 0x2268 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x289E JUMP JUMPDEST SWAP16 SWAP15 POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5CB SWAP2 SWAP1 PUSH2 0x3514 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2A08 DUP5 DUP5 PUSH2 0x17B7 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2A23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2A4D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0x2AA1 JUMPI PUSH2 0x2A82 DUP4 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x289E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2A8E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x2A53 JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x28E1 SWAP2 SWAP1 PUSH2 0x34CE JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2AD0 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x2AF8 JUMPI PUSH2 0x2AEE DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2AD6 JUMP JUMPDEST POP PUSH1 0x60 DUP7 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2B12 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2B3C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2C03 JUMPI PUSH1 0x0 PUSH2 0x2B74 DUP6 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2B5E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x228E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x2BB0 DUP12 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2B85 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x27D8 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2B9C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2BBC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2BF8 PUSH2 0x2BF1 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2BDB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x1BBE JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x2B43 JUMP JUMPDEST POP PUSH1 0x60 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2C1D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2C47 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP11 MLOAD DUP2 LT ISZERO PUSH2 0x2D1E JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2C64 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 GT PUSH2 0x2C7A JUMPI POP PUSH1 0x0 PUSH2 0x2CC2 JUMP JUMPDEST PUSH2 0x2CBF PUSH2 0x2C99 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2C8C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2268 JUMP JUMPDEST PUSH2 0x27D8 DUP8 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2CA8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x2CCE DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2CEA PUSH2 0x2CDE DUP4 PUSH2 0x2268 JUMP JUMPDEST DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2B5E JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2CFC DUP2 DUP16 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2D08 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP POP POP PUSH1 0x1 ADD PUSH2 0x2C4D JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2D2B DUP13 DUP4 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2D49 PUSH2 0x2D42 PUSH2 0x2D3D DUP4 DUP10 PUSH2 0x228E JUMP JUMPDEST PUSH2 0x2268 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x22DC JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2D66 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x2D8E JUMPI PUSH2 0x2D84 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2D6C JUMP JUMPDEST POP PUSH1 0x60 DUP7 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2DA8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2DD2 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2E66 JUMPI PUSH1 0x0 PUSH2 0x2DF4 DUP6 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2E30 DUP12 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2E05 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x7E5 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2E1C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2E3C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2E5B PUSH2 0x2BF1 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x2DD9 JUMP JUMPDEST POP PUSH1 0x60 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2E80 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2EAA JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP11 MLOAD DUP2 LT ISZERO PUSH2 0x2F67 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2EC7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 LT PUSH2 0x2EDD JUMPI POP PUSH1 0x0 PUSH2 0x2F0B JUMP JUMPDEST PUSH2 0x2F08 PUSH2 0x2EF8 PUSH8 0xDE0B6B3A7640000 DUP8 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST PUSH2 0x27D8 DUP7 DUP9 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x2F17 DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F33 PUSH2 0x2F27 DUP4 PUSH2 0x2268 JUMP JUMPDEST DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2F45 DUP2 DUP16 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2F51 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP POP POP PUSH1 0x1 ADD PUSH2 0x2EB0 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2F74 DUP13 DUP4 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2D49 PUSH2 0x2F8F PUSH8 0xDE0B6B3A7640000 PUSH2 0x239C DUP5 DUP11 PUSH2 0x17B7 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x289E JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2FA3 DUP9 DUP9 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2FB9 DUP3 PUSH2 0x290F DUP8 PUSH2 0x27D8 DUP2 DUP12 PUSH2 0x1BBE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2FE1 JUMPI PUSH2 0x2FD7 DUP11 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2FBF JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2FF0 DUP12 DUP12 DUP6 DUP13 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3003 DUP12 DUP12 DUP2 MLOAD DUP2 LT PUSH2 0x277E JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3017 DUP5 DUP14 DUP14 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3024 DUP3 PUSH2 0x2268 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3032 DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH2 0x29D1 PUSH2 0x3040 DUP3 PUSH2 0x2268 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x228E JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x506 DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3062 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x3075 PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST PUSH2 0x3905 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x3096 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x30B5 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3099 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x30D0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x30DE PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x30FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x30B5 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3102 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x312E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3143 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3156 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x3905 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x316D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x506 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x31A6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5CB DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x31C3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x31CE DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x31DE DUP2 PUSH2 0x394A JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x31FD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x3208 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x3218 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3243 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH2 0x324E DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x325E DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x3281 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP7 SWAP10 SWAP6 SWAP9 POP SWAP4 SWAP7 SWAP3 SWAP6 SWAP5 PUSH1 0xA0 DUP5 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 SWAP1 SWAP4 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x32B0 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x32BB DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x32DD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x32F3 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3306 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x3314 PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x3334 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x335F JUMPI DUP1 MLOAD PUSH2 0x334B DUP2 PUSH2 0x394A JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x3338 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x3376 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x3383 DUP7 DUP3 DUP8 ADD PUSH2 0x30C0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33A5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5CB DUP2 PUSH2 0x395F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33C1 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x395F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x33E6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP8 CALLDATALOAD SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x33F8 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD PUSH2 0x3408 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x3423 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x342F DUP12 DUP4 DUP13 ADD PUSH2 0x3052 JUMP JUMPDEST SWAP6 POP PUSH1 0x80 DUP11 ADD CALLDATALOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD CALLDATALOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3452 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x345F DUP11 DUP3 DUP12 ADD PUSH2 0x311E JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x347F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x5CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34A7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34C3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x34E2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x34ED DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3508 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3383 DUP7 DUP3 DUP8 ADD PUSH2 0x30C0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3526 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x3531 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x3555 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x3560 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD PUSH1 0x40 SWAP1 SWAP6 ADD MLOAD SWAP1 SWAP7 SWAP5 SWAP6 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3589 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x3594 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x35AF JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x35BB DUP6 DUP3 DUP7 ADD PUSH2 0x30C0 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x35DA JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x35F0 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP8 ADD SWAP2 POP PUSH2 0x120 DUP1 DUP4 DUP11 SUB SLT ISZERO PUSH2 0x3606 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x360F DUP2 PUSH2 0x3905 JUMP JUMPDEST SWAP1 POP PUSH2 0x361B DUP10 DUP5 PUSH2 0x3186 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x362A DUP10 PUSH1 0x20 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x363C DUP10 PUSH1 0x40 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x366C DUP10 PUSH1 0xC0 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x367E DUP10 PUSH1 0xE0 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 DUP1 DUP5 ADD CALLDATALOAD DUP4 DUP2 GT ISZERO PUSH2 0x3696 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH2 0x36A2 DUP12 DUP3 DUP8 ADD PUSH2 0x311E JUMP JUMPDEST DUP3 DUP5 ADD MSTORE POP POP DUP1 SWAP7 POP POP PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x36BF JUMPI DUP4 DUP5 REVERT JUMPDEST POP PUSH2 0x36CC DUP8 DUP3 DUP9 ADD PUSH2 0x3052 JUMP JUMPDEST SWAP5 SWAP8 SWAP5 SWAP7 POP POP POP POP PUSH1 0x40 DUP4 ADD CALLDATALOAD SWAP3 PUSH1 0x60 ADD CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x36F4 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x372A JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x370E JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x379F PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x36FB JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x37B1 DUP2 DUP6 PUSH2 0x36FB JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP6 DUP7 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x20 DUP8 ADD MSTORE SWAP3 SWAP1 SWAP4 AND PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0x80 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x38AF JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x3893 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x38C0 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x38EF PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x36FB JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x3923 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x3940 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE4 0xC2 0xDC 0xBB 0xBB 0xAE 0xEF DUP4 0xEF LOG3 0xC3 PUSH13 0xF243C46F81C40DBAF947020D33 LOG2 EXTCODESIZE 0x22 POP 0xD1 STOP 0xAD PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 POP ADDMOD EXP 0x29 0xE9 0xBF 0x1F 0xC9 0xF7 0x2A 0x4D 0xD0 0xC1 JUMPDEST JUMP DIV 0x21 DUP16 0xE7 COINBASE 0xC 0xCE SWAP14 NUMBER PUSH3 0x31FC04 0xB3 SELFBALANCE PUSH10 0xEF64736F6C6343000701 STOP CALLER ",
              "sourceMap": "914:994:35:-:0;;;990:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1377:14:31;;-1:-1:-1;;;;;;1377:14:31;;;1337:7:32;1652:15;:48;1625:75;;914:994:35;;178:295:-1;;309:2;297:9;288:7;284:23;280:32;277:2;;;-1:-1;;315:12;277:2;99:13;;-1:-1;;;;;754:54;;895:51;;885:2;;-1:-1;;950:12;885:2;367:90;271:202;-1:-1;;;271:202::o;:::-;914:994:35;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "8038": [
                  {
                    "length": 32,
                    "start": 477
                  }
                ],
                "8108": [
                  {
                    "length": 32,
                    "start": 214
                  },
                  {
                    "length": 32,
                    "start": 256
                  }
                ]
              },
              "linkReferences": {},
              "object": "60806040523480156200001157600080fd5b5060043610620000525760003560e01c80632da47c4014620000575780636634b753146200007a5780637932c7f314620000a05780638d928af814620000c6575b600080fd5b62000061620000d0565b604051620000719291906200055c565b60405180910390f35b620000916200008b366004620002da565b6200013c565b60405162000071919062000494565b620000b7620000b136600462000300565b6200015a565b60405162000071919062000480565b620000b7620001db565b600080427f00000000000000000000000000000000000000000000000000000000000000008110156200012e57807f000000000000000000000000000000000000000000000000000000000000000003925062278d00915062000137565b60009250600091505b509091565b6001600160a01b031660009081526020819052604090205460ff1690565b600080600062000169620000d0565b91509150600062000179620001db565b8a8a8a8a8a88888c6040516200018f906200024b565b620001a3999897969594939291906200049f565b604051809103906000f080158015620001c0573d6000803e3d6000fd5b509050620001ce81620001ff565b9998505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc9190a250565b61475180620005b883390190565b803562000266816200059e565b92915050565b600082601f8301126200027d578081fd5b813567ffffffffffffffff81111562000294578182fd5b620002a9601f8201601f19166020016200056a565b9150808252836020828501011115620002c157600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215620002ec578081fd5b8135620002f9816200059e565b9392505050565b60008060008060008060c0878903121562000319578182fd5b863567ffffffffffffffff8082111562000331578384fd5b6200033f8a838b016200026c565b975060209150818901358181111562000356578485fd5b620003648b828c016200026c565b97505060408901358181111562000379578485fd5b8901601f81018b136200038a578485fd5b80358281111562000399578586fd5b8381029250620003ab8484016200056a565b8181528481019083860185850187018f1015620003c6578889fd5b8895505b83861015620003f457620003df8f8262000259565b835260019590950194918601918601620003ca565b50985050505060608901359450505060808701359150620004198860a0890162000259565b90509295509295509295565b6001600160a01b03169052565b60008151808452815b8181101562000459576020818501810151868301820152016200043b565b818111156200046b5782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b901515815260200190565b6001600160a01b038a168152610120602080830182905260009190620004c88483018d62000432565b91508382036040850152620004de828c62000432565b84810360608601528a51808252828c01935090820190845b818110156200051e576200050b855162000592565b83529383019391830191600101620004f6565b50508093505050508660808301528560a08301528460c08301528360e08301526200054e61010083018462000425565b9a9950505050505050505050565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156200058a57600080fd5b604052919050565b6001600160a01b031690565b6001600160a01b0381168114620005b457600080fd5b5056fe6104006040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b5060405162004751380380620047518339810160408190526200005a9162000a52565b6040805180820190915260018152603160f81b6020808301918252336080526001600160601b0319606085901b1660a0528a51908b0190812060c0529151902060e0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6101005288518a918a918a918a91899189918991899189916000918a918a918a918a918a918a918a91849184918a918a91620000fe916003919062000870565b5080516200011490600490602084019062000870565b506200012c9150506276a700831115610194620006b0565b6200014062278d00821115610195620006b0565b429091016101408190520161016052845162000162906002111560c8620006b0565b6200017a60088651111560c9620006b060201b60201c565b6200019085620006c560201b62000cf11760201c565b620001a564e8d4a5100085101560cb620006b0565b620001bd67016345785d8a000085111560ca620006b0565b6040516309b2760f60e01b81526000906001600160a01b038b16906309b2760f90620001ee908c9060040162000bf5565b602060405180830381600087803b1580156200020957600080fd5b505af11580156200021e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000244919062000a39565b9050896001600160a01b03166366a9c7d2828889516001600160401b03811180156200026f57600080fd5b506040519080825280602002602001820160405280156200029a578160200160208202803683370190505b506040518463ffffffff1660e01b8152600401620002bb9392919062000b59565b600060405180830381600087803b158015620002d657600080fd5b505af1158015620002eb573d6000803e3d6000fd5b5050506001600160601b031960608c901b1661018052506101a0819052600785905585516101c05285516200032257600062000339565b856000815181106200033057fe5b60200260200101515b60601b6001600160601b0319166101e05285516001106200035c57600062000373565b856001815181106200036a57fe5b60200260200101515b60601b6001600160601b03191661020052855160021062000396576000620003ad565b85600281518110620003a457fe5b60200260200101515b60601b6001600160601b031916610220528551600310620003d0576000620003e7565b85600381518110620003de57fe5b60200260200101515b60601b6001600160601b0319166102405285516004106200040a57600062000421565b856004815181106200041857fe5b60200260200101515b60601b6001600160601b031916610260528551600510620004445760006200045b565b856005815181106200045257fe5b60200260200101515b60601b6001600160601b0319166102805285516006106200047e57600062000495565b856006815181106200048c57fe5b60200260200101515b60601b6001600160601b0319166102a0528551600710620004b8576000620004cf565b85600781518110620004c657fe5b60200260200101515b60601b6001600160601b0319166102c0528551620004ef57600062000515565b62000515866000815181106200050157fe5b6020026020010151620006d160201b60201c565b6102e05285516001106200052b5760006200053d565b6200053d866001815181106200050157fe5b6103005285516002106200055357600062000565565b62000565866002815181106200050157fe5b6103205285516003106200057b5760006200058d565b6200058d866003815181106200050157fe5b610340528551600410620005a3576000620005b5565b620005b5866004815181106200050157fe5b610360528551600510620005cb576000620005dd565b620005dd866005815181106200050157fe5b610380528551600610620005f357600062000605565b62000605866006815181106200050157fe5b6103a05285516007106200061b5760006200062d565b6200062d866007815181106200050157fe5b6103c0818152505050505050505050505050505050505050505062000666670de0b6b3a764000086101561012c620006b060201b60201c565b6200068169010f0cf064dd5920000086111561012d620006b0565b6200069a60058751111561012f620006b060201b60201c565b5050506103e0919091525062000c539350505050565b81620006c157620006c18162000773565b5050565b80620006c181620007c6565b600080826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200070e57600080fd5b505afa15801562000723573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000749919062000b2f565b60ff1690506000620007686012836200085360201b62000cff1760201c565b600a0a949350505050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b600281511015620007d75762000850565b600081600081518110620007e757fe5b602002602001015190506000600190505b82518110156200084d5760008382815181106200081157fe5b6020026020010151905062000842816001600160a01b0316846001600160a01b0316106065620006b060201b60201c565b9150600101620007f8565b50505b50565b600062000865838311156001620006b0565b508082035b92915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620008b357805160ff1916838001178555620008e3565b82800160010185558215620008e3579182015b82811115620008e3578251825591602001919060010190620008c6565b50620008f1929150620008f5565b5090565b5b80821115620008f15760008155600101620008f6565b80516200086a8162000c3d565b600082601f8301126200092a578081fd5b81516001600160401b0381111562000940578182fd5b60208082026200095282820162000c0a565b838152935081840185830182870184018810156200096f57600080fd5b600092505b848310156200099f5780516200098a8162000c3d565b82526001929092019190830190830162000974565b505050505092915050565b600082601f830112620009bb578081fd5b81516001600160401b03811115620009d1578182fd5b6020620009e7601f8301601f1916820162000c0a565b92508183528481838601011115620009fe57600080fd5b60005b8281101562000a1e57848101820151848201830152810162000a01565b8281111562000a305760008284860101525b50505092915050565b60006020828403121562000a4b578081fd5b5051919050565b60008060008060008060008060006101208a8c03121562000a71578485fd5b62000a7d8b8b6200090c565b60208b01519099506001600160401b038082111562000a9a578687fd5b62000aa88d838e01620009aa565b995060408c015191508082111562000abe578687fd5b62000acc8d838e01620009aa565b985060608c015191508082111562000ae2578687fd5b5062000af18c828d0162000919565b96505060808a0151945060a08a0151935060c08a0151925060e08a0151915062000b208b6101008c016200090c565b90509295985092959850929598565b60006020828403121562000b41578081fd5b815160ff8116811462000b52578182fd5b9392505050565b60006060820185835260206060818501528186518084526080860191508288019350845b8181101562000ba55762000b92855162000c31565b8352938301939183019160010162000b7d565b505084810360408601528551808252908201925081860190845b8181101562000be75762000bd4835162000c31565b8552938301939183019160010162000bbf565b509298975050505050505050565b602081016003831062000c0457fe5b91905290565b6040518181016001600160401b038111828210171562000c2957600080fd5b604052919050565b6001600160a01b031690565b6001600160a01b03811681146200085057600080fd5b60805160a05160601c60c05160e051610100516101205161014051610160516101805160601c6101a0516101c0516101e05160601c6102005160601c6102205160601c6102405160601c6102605160601c6102805160601c6102a05160601c6102c05160601c6102e05161030051610320516103405161036051610380516103a0516103c0516103e0516139b062000da1600039806107c052806107f35280611aef5280611c665280611cea5280611f2852806120375280612497528061255d52806125e3528061263f525080610f94525080610f51525080610f0e525080610ecb525080610e88525080610e45525080610e02525080610db15250505050505050505080610d1752508061066152508061098b5250806111f75250806111d3525080610a5a5250806112fa52508061133c52508061131b5250806109675250806108f152506139b06000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80636daccffa116101045780638d928af8116100a2578063d505accf11610071578063d505accf146103b5578063d5c096c4146103c8578063d73dd623146103db578063dd62ed3e146103ee576101da565b80638d928af81461038a57806395d89b4114610392578063a9059cbb1461039a578063aaabadc5146103ad576101da565b80637ecebe00116100de5780637ecebe001461033c578063851c1bb31461034f57806387ec681714610362578063893d20e814610375576101da565b80636daccffa1461030057806370a082311461030857806374f3b0091461031b576101da565b8063313ce5671161017c57806355c676281161014b57806355c67628146102bc5780636028bfd4146102c457806366188463146102e5578063679aefce146102f8576101da565b8063313ce567146102845780633644e5151461029957806338e9922e146102a157806338fff2d0146102b4576101da565b806316c38b3c116101b857806316c38b3c1461023d57806318160ddd146102525780631c0de0511461025a57806323b872dd14610271576101da565b806301ec954a146101df57806306fdde0314610208578063095ea7b31461021d575b600080fd5b6101f26101ed3660046135c5565b610401565b6040516101ff91906137dd565b60405180910390f35b61021061045e565b6040516101ff9190613883565b61023061022b36600461329e565b6104f5565b6040516101ff91906137ba565b61025061024b366004613394565b61050c565b005b6101f2610520565b610262610526565b6040516101ff939291906137c5565b61023061027f3660046131e9565b61054f565b61028c6105d2565b6040516101ff91906138f7565b6101f26105d7565b6102506102af3660046136e3565b6105e6565b6101f261065f565b6101f2610683565b6102d76102d23660046133cc565b610689565b6040516101ff9291906138d6565b6102306102f336600461329e565b6106c0565b6101f261071a565b6101f26107f1565b6101f2610316366004613195565b610815565b61032e6103293660046133cc565b610830565b6040516101ff92919061378c565b6101f261034a366004613195565b6108d2565b6101f261035d36600461346e565b6108ed565b6102d76103703660046133cc565b61093f565b61037d610965565b6040516101ff9190613778565b61037d610989565b6102106109ad565b6102306103a836600461329e565b610a0e565b61037d610a1b565b6102506103c3366004613229565b610a25565b61032e6103d63660046133cc565b610b6e565b6102306103e936600461329e565b610c90565b6101f26103fc3660046131b1565b610cc6565b60006104158383610410610d15565b610d39565b606061041f610d56565b905060008651600181111561043057fe5b14610447576104428686868685610fd2565b610454565b6104548686868685611047565b9695505050505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ea5780601f106104bf576101008083540402835291602001916104ea565b820191906000526020600020905b8154815290600101906020018083116104cd57829003601f168201915b505050505090505b90565b60006105023384846110ab565b5060015b92915050565b610514611113565b61051d81611141565b50565b60025490565b60008060006105336111b4565b15925061053e6111d1565b91506105486111f5565b9050909192565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261058d9114806105855750838210155b610197611219565b610598858585611227565b336001600160a01b038616148015906105b357506000198114155b156105c5576105c585338584036110ab565b60019150505b9392505050565b601290565b60006105e16112f6565b905090565b6105ee611113565b6105f6611393565b61060964e8d4a5100082101560cb611219565b61061f67016345785d8a000082111560ca611219565b60078190556040517f9cabc14d438714dbcd9292df9b3f89c42f98acd93a675ad72cd6033777e9b8e7906106549083906137dd565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000090565b60075490565b6000606061069f865161069a610d15565b6113a8565b6106b4898989898989896113b56114ba61151b565b97509795505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106106fc576106f7338560006110ab565b610710565b610710338561070b8487610cff565b6110ab565b5060019392505050565b60006060610726610989565b6001600160a01b031663f94d466861073c61065f565b6040518263ffffffff1660e01b815260040161075891906137dd565b60006040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ac91908101906132c9565b509150506107eb6107bb610520565b6107e57f00000000000000000000000000000000000000000000000000000000000000008461163d565b906117b7565b91505090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b031660009081526020819052604090205490565b6060808861085a61083f610989565b6001600160a01b0316336001600160a01b03161460cd611219565b61086f61086561065f565b82146101f4611219565b6060610879610d56565b90506108858882611808565b60006060806108998e8e8e8e8e8e8e6113b5565b9250925092506108a98d8461185c565b6108b382856114ba565b6108bd81856114ba565b909550935050505b5097509795505050505050565b6001600160a01b031660009081526005602052604090205490565b60007f000000000000000000000000000000000000000000000000000000000000000082604051602001610922929190613735565b604051602081830303815290604052805190602001209050919050565b60006060610950865161069a610d15565b6106b4898989898989896118ef61199461151b565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ea5780601f106104bf576101008083540402835291602001916104ea565b6000610502338484611227565b60006105e16119f5565b610a338442111560d1611219565b6001600160a01b0387166000908152600560209081526040808320549051909291610a8a917f0000000000000000000000000000000000000000000000000000000000000000918c918c918c9188918d9101613805565b6040516020818303038152906040528051906020012090506000610aad82611a6f565b9050600060018288888860405160008152602001604052604051610ad49493929190613865565b6020604051602081039080840390855afa158015610af6573d6000803e3d6000fd5b5050604051601f1901519150610b3890506001600160a01b03821615801590610b3057508b6001600160a01b0316826001600160a01b0316145b6101f8611219565b6001600160a01b038b166000908152600560205260409020600185019055610b618b8b8b6110ab565b5050505050505050505050565b60608088610b7d61083f610989565b610b8861086561065f565b6060610b92610d56565b9050610b9c610520565b610c415760006060610bb08d8d8d8a611a8b565b91509150610bc5620f424083101560cc611219565b610bd36000620f4240611b28565b610be28b620f42408403611b28565b610bec8184611994565b80610bf5610d15565b6001600160401b0381118015610c0a57600080fd5b50604051908082528060200260200182016040528015610c34578160200160208202803683370190505b50955095505050506108c5565b610c4b8882611808565b6000606080610c5f8e8e8e8e8e8e8e6118ef565b925092509250610c6f8c84611b28565b610c798285611994565b610c8381856114ba565b90955093506108c5915050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161050291859061070b9086611bbe565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b80610cfb81611bd0565b5050565b6000610d0f838311156001611219565b50900390565b7f000000000000000000000000000000000000000000000000000000000000000090565b610d518184108015610d4a57508183105b6064611219565b505050565b60606000610d62610d15565b90506060816001600160401b0381118015610d7c57600080fd5b50604051908082528060200260200182016040528015610da6578160200160208202803683370190505b5090508115610dee577f000000000000000000000000000000000000000000000000000000000000000081600081518110610ddd57fe5b602002602001018181525050610df7565b91506104f29050565b6001821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600181518110610e2e57fe5b6020026020010181815250506002821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600281518110610e7157fe5b6020026020010181815250506003821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600381518110610eb457fe5b6020026020010181815250506004821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600481518110610ef757fe5b6020026020010181815250506005821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600581518110610f3a57fe5b6020026020010181815250506006821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600681518110610f7d57fe5b6020026020010181815250506007821115610dee577f000000000000000000000000000000000000000000000000000000000000000081600781518110610fc057fe5b60200260200101818152505091505090565b6000610fde8583611808565b610fff8660600151838581518110610ff257fe5b6020026020010151611c49565b6060870152600061101287878787611c55565b90506110318184878151811061102457fe5b6020026020010151611c92565b905061103c81611c9e565b979650505050505050565b60006110568660600151611cb5565b60608701526110658583611808565b6110798660600151838681518110610ff257fe5b6060870152600061108c87878787611cd9565b905061103c8184868151811061109e57fe5b6020026020010151611d16565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906111069085906137dd565b60405180910390a3505050565b600061112a6000356001600160e01b0319166108ed565b905061051d6111398233611d22565b610191611219565b80156111615761115c6111526111d1565b4210610193611219565b611176565b61117661116c6111f5565b42106101a9611219565b6006805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64906106549083906137ba565b60006111be6111f5565b4211806105e157505060065460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b81610cfb57610cfb81611e12565b6001600160a01b03831660009081526020819052604090205461124f82821015610196611219565b6112666001600160a01b0384161515610199611219565b6001600160a01b038085166000908152602081905260408082208585039055918516815220546112969083611bbe565b6001600160a01b0380851660008181526020819052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112e89086906137dd565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611363611e65565b30604051602001611378959493929190613839565b60405160208183030381529060405280519060200120905090565b6113a661139e6111b4565b610192611219565b565b610cfb8183146067611219565b60006060806113c26111b4565b15611446576113d48760085487611e69565b905060005b6113e1610d15565b811015611440576114218282815181106113f757fe5b602002602001015189838151811061140b57fe5b6020026020010151610cff90919063ffffffff16565b88828151811061142d57fe5b60209081029190910101526001016113d9565b50611491565b61144e610d15565b6001600160401b038111801561146357600080fd5b5060405190808252806020026020018201604052801561148d578160200160208202803683370190505b5090505b61149b8785611f72565b90935091506114aa8783611fdc565b6008559750975097945050505050565b60005b6114c5610d15565b811015610d51576114fc8382815181106114db57fe5b60200260200101518383815181106114ef57fe5b602002602001015161205c565b83828151811061150857fe5b60209081029190910101526001016114bd565b3330146115d9576000306001600160a01b031660003660405161153f92919061374d565b6000604051808303816000865af19150503d806000811461157c576040519150601f19603f3d011682016040523d82523d6000602084013e611581565b606091505b50509050806000811461159057fe5b60046000803e6000516001600160e01b0319166343adbafb60e01b81146115bb573d6000803e3d6000fd5b506020600460003e604060205260243d03602460403e601c3d016000f35b60606115e3610d56565b90506115ef8782611808565b600060606116068c8c8c8c8c8c8c8c63ffffffff16565b509150915061161981848663ffffffff16565b8051601f1982018390526343adbafb603f1983015260200260231982016044820181fd5b80516000908190815b8181101561167e5761167485828151811061165d57fe5b602002602001015184611bbe90919063ffffffff16565b9250600101611646565b508161168f57600092505050610506565b6000828161169d888561207c565b905060005b60ff8110156117aa5760006116cb868a6000815181106116be57fe5b602002602001015161207c565b905060015b86811015611704576116fa6116f46116ee848d85815181106116be57fe5b8961207c565b866120a0565b91506001016116d0565b5083945061176461173a61172161171b868b61207c565b8461207c565b61173461172e8a8961207c565b8861207c565b90611bbe565b61175f61175161174b876001610cff565b8561207c565b6117346116ee8b6001611bbe565b6120a0565b93508484111561178a57600161177a8587610cff565b1161178557506117aa565b6117a1565b60016117968686610cff565b116117a157506117aa565b506001016116a2565b5090979650505050505050565b60006117c68215156004611219565b826117d357506000610506565b670de0b6b3a7640000838102906117f6908583816117ed57fe5b04146005611219565b8281816117ff57fe5b04915050610506565b60005b611813610d15565b811015610d515761183d83828151811061182957fe5b60200260200101518383815181106116be57fe5b83828151811061184957fe5b602090810291909101015260010161180b565b6001600160a01b03821660009081526020819052604090205461188482821015610196611219565b6001600160a01b038316600090815260208190526040902082820390556002546118ae9083610cff565b6002556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111069086906137dd565b60006060806118fc611393565b606061190b8860085488611e69565b905060005b611918610d15565b8110156119615761194282828151811061192e57fe5b60200260200101518a838151811061140b57fe5b89828151811061194e57fe5b6020908102919091010152600101611910565b50600060606119708a886120d3565b9150915061197e8a8261212b565b600855909c909b50909950975050505050505050565b60005b61199f610d15565b811015610d51576119d68382815181106119b557fe5b60200260200101518383815181106119c957fe5b60200260200101516120a0565b8382815181106119e257fe5b6020908102919091010152600101611997565b60006119ff610989565b6001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3757600080fd5b505afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e19190613496565b6000611a796112f6565b8260405160200161092292919061375d565b60006060611a97611393565b6000611aa284612196565b9050611abd6000826002811115611ab557fe5b1460ce611219565b6060611ac8856121ac565b9050611ad7815161069a610d15565b611ae881611ae3610d56565b611808565b6000611b147f00000000000000000000000000000000000000000000000000000000000000008361163d565b600881905599919850909650505050505050565b6001600160a01b038216600090815260208190526040902054611b4b9082611bbe565b6001600160a01b038316600090815260208190526040902055600254611b719082611bbe565b6002556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611bb29085906137dd565b60405180910390a35050565b60008282016105cb8482101583611219565b600281511015611bdf5761051d565b600081600081518110611bee57fe5b602002602001015190506000600190505b8251811015610d51576000838281518110611c1657fe5b60200260200101519050611c3f816001600160a01b0316846001600160a01b0316106065611219565b9150600101611bff565b60006105cb838361207c565b6000611c5f611393565b60006104547f00000000000000000000000000000000000000000000000000000000000000008686868a606001516121c2565b60006105cb83836120a0565b6000610506611cae600754612268565b839061228e565b600080611ccd600754846122dc90919063ffffffff16565b90506105cb8382610cff565b6000611ce3611393565b60006104547f00000000000000000000000000000000000000000000000000000000000000008686868a60600151612318565b60006105cb838361205c565b600073ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b611d41610965565b6001600160a01b031614158015611d5c5750611d5c836123a2565b15611d8457611d69610965565b6001600160a01b0316336001600160a01b0316149050610506565b611d8c6119f5565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b8152600401611dbb939291906137e6565b60206040518083038186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0b91906133b0565b9050610506565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b4690565b606080611e74610d15565b6001600160401b0381118015611e8957600080fd5b50604051908082528060200260200182016040528015611eb3578160200160208202803683370190505b50905082611ec25790506105cb565b60008086600081518110611ed257fe5b602002602001015190506000600190505b611eeb610d15565b811015611f22576000888281518110611f0057fe5b6020026020010151905082811115611f19578193508092505b50600101611ee3565b50611f507f0000000000000000000000000000000000000000000000000000000000000000888885896123bc565b838381518110611f5c57fe5b6020908102919091010152509095945050505050565b600060606000611f8184612196565b90506000816002811115611f9157fe5b1415611fab57611fa18585612418565b9250925050611fd5565b6001816002811115611fb957fe5b1415611fc957611fa185856124ee565b611fa18585612520565b505b9250929050565b6000805b611fe8610d15565b81101561203157612012838281518110611ffe57fe5b602002602001015185838151811061140b57fe5b84828151811061201e57fe5b6020908102919091010152600101611fe0565b506105cb7f00000000000000000000000000000000000000000000000000000000000000008461163d565b600061206b8215156004611219565b81838161207457fe5b049392505050565b60008282026105cb84158061209957508385838161209657fe5b04145b6003611219565b60006120af8215156004611219565b826120bc57506000610506565b8160018403816120c857fe5b046001019050610506565b6000606060006120e284612196565b905060018160028111156120f257fe5b141561210257611fa185856125aa565b600281600281111561211057fe5b141561212057611fa18585612624565b611fd3610136611e12565b6000805b612137610d15565b8110156120315761217783828151811061214d57fe5b602002602001015185838151811061216157fe5b6020026020010151611bbe90919063ffffffff16565b84828151811061218357fe5b602090810291909101015260010161212f565b60008180602001905181019061050691906134b2565b6060818060200190518101906105cb9190613577565b6000806121cf878761163d565b90506121e18387868151811061140b57fe5b8685815181106121ed57fe5b6020026020010181815250506000612207888884896126e5565b90506122198488878151811061216157fe5b87868151811061222557fe5b60200260200101818152505061225c600161173489898151811061224557fe5b602002602001015184610cff90919063ffffffff16565b98975050505050505050565b6000670de0b6b3a76400008210612280576000610506565b50670de0b6b3a76400000390565b600061229d8215156004611219565b826122aa57506000610506565b670de0b6b3a7640000838102906122c4908583816117ed57fe5b8260018203816122d057fe5b04600101915050610506565b60008282026122f684158061209957508385838161209657fe5b80612305576000915050610506565b670de0b6b3a764000060001982016122d0565b600080612325878761163d565b90506123378387878151811061216157fe5b86868151811061234357fe5b602002602001018181525050600061235d888884886126e5565b905061236f8488888151811061140b57fe5b87878151811061237b57fe5b60200260200101818152505061225c600161239c838a898151811061140b57fe5b90610cff565b60006123b4631c74c91760e11b6108ed565b909114919050565b6000806123cb878787876126e5565b90506000818786815181106123dc57fe5b6020026020010151116123f0576000612400565b6124008288878151811061140b57fe5b905061225c670de0b6b3a76400006107e5838761289e565b60006060612424611393565b600061242e610d15565b905060008061243c866128ca565b9150915061244d8382106064611219565b6060836001600160401b038111801561246557600080fd5b5060405190808252806020026020018201604052801561248f578160200160208202803683370190505b5090506124c97f00000000000000000000000000000000000000000000000000000000000000008984866124c1610520565b6007546128ec565b8183815181106124d557fe5b6020908102919091010152919791965090945050505050565b6000606060006124fd846129e4565b90506060612513868361250e610520565b6129fa565b9196919550909350505050565b6000606061252c611393565b6060600061253985612aab565b9150915061254a825161069a610d15565b61255682611ae3610d56565b600061258e7f00000000000000000000000000000000000000000000000000000000000000008885612586610520565b600754612ac3565b905061259e8282111560cf611219565b96919550909350505050565b600060608060006125ba85612aab565b915091506125d06125c9610d15565b83516113a8565b6125dc82611ae3610d56565b60006126147f0000000000000000000000000000000000000000000000000000000000000000888561260c610520565b600754612d59565b905061259e8282101560d0611219565b60006060600080612634856128ca565b9150915060006126717f0000000000000000000000000000000000000000000000000000000000000000888486612669610520565b600754612f96565b9050606061267d610d15565b6001600160401b038111801561269257600080fd5b506040519080825280602002602001820160405280156126bc578160200160208202803683370190505b509050818184815181106126cc57fe5b6020908102919091010152929792965091945050505050565b6000806126f386865161207c565b905060008560008151811061270457fe5b6020026020010151905060006127228751886000815181106116be57fe5b905060015b875181101561276e5761275361274d612746848b85815181106116be57fe5b8a5161207c565b8861205c565b915061276488828151811061165d57fe5b9250600101612727565b5061279587868151811061277e57fe5b602002602001015183610cff90919063ffffffff16565b915060006127ac6127a6888961207c565b856120a0565b90506127de826127d88a89815181106127c157fe5b6020026020010151846122dc90919063ffffffff16565b9061228e565b905060006127f66127ef89876117b7565b8590611bbe565b90506000806128166128088b85611bbe565b6127d8866117348e806122dc565b905060005b60ff81101561288e5781925061284b61283d8c61239c8761173487600261207c565b6127d88761173486806122dc565b9150828211156128705760016128618385610cff565b1161286b5761288e565b612886565b600161287c8484610cff565b116128865761288e565b60010161281b565b509b9a5050505050505050505050565b60008282026128b884158061209957508385838161209657fe5b670de0b6b3a764000090049392505050565b600080828060200190518101906128e19190613541565b909590945092505050565b6000806128f9888861163d565b905060006129158261290f876127d8818b610cff565b906122dc565b90506000805b89518110156129545761294a8a828151811061293357fe5b602002602001015183611bbe90919063ffffffff16565b915060010161291b565b5060006129638b8b858c6126e5565b90506000612977828c8c8151811061140b57fe5b905060006129a1848d8d8151811061298b57fe5b60200260200101516117b790919063ffffffff16565b905060006129ae82612268565b905060006129bc8a836122dc565b90506129d16129ca82612268565b859061289e565b9f9e505050505050505050505050505050565b6000818060200190518101906105cb9190613514565b60606000612a0884846117b7565b9050606085516001600160401b0381118015612a2357600080fd5b50604051908082528060200260200182016040528015612a4d578160200160208202803683370190505b50905060005b8651811015612aa157612a8283888381518110612a6c57fe5b602002602001015161289e90919063ffffffff16565b828281518110612a8e57fe5b6020908102919091010152600101612a53565b5095945050505050565b60606000828060200190518101906128e191906134ce565b600080612ad0878761163d565b90506000805b8751811015612af857612aee88828151811061293357fe5b9150600101612ad6565b50606086516001600160401b0381118015612b1257600080fd5b50604051908082528060200260200182016040528015612b3c578160200160208202803683370190505b5090506000805b8951811015612c03576000612b74858c8481518110612b5e57fe5b602002602001015161228e90919063ffffffff16565b9050612bb08b8381518110612b8557fe5b60200260200101516127d88c8581518110612b9c57fe5b60200260200101518e868151811061140b57fe5b848381518110612bbc57fe5b602002602001018181525050612bf8612bf182868581518110612bdb57fe5b60200260200101516122dc90919063ffffffff16565b8490611bbe565b925050600101612b43565b50606089516001600160401b0381118015612c1d57600080fd5b50604051908082528060200260200182016040528015612c47578160200160208202803683370190505b50905060005b8a51811015612d1e576000848281518110612c6457fe5b60200260200101518411612c7a57506000612cc2565b612cbf612c99868481518110612c8c57fe5b6020026020010151612268565b6127d8878581518110612ca857fe5b602002602001015187610cff90919063ffffffff16565b90505b6000612cce8a836122dc565b90506000612cea612cde83612268565b8e8681518110612b5e57fe5b9050612cfc818f868151811061140b57fe5b858581518110612d0857fe5b6020908102919091010152505050600101612c4d565b506000612d2b8c8361163d565b9050612d49612d42612d3d838961228e565b612268565b8a906122dc565b9c9b505050505050505050505050565b600080612d66878761163d565b90506000805b8751811015612d8e57612d8488828151811061293357fe5b9150600101612d6c565b50606086516001600160401b0381118015612da857600080fd5b50604051908082528060200260200182016040528015612dd2578160200160208202803683370190505b5090506000805b8951811015612e66576000612df4858c848151811061298b57fe5b9050612e308b8381518110612e0557fe5b60200260200101516107e58c8581518110612e1c57fe5b60200260200101518e868151811061216157fe5b848381518110612e3c57fe5b602002602001018181525050612e5b612bf182868581518110612a6c57fe5b925050600101612dd9565b50606089516001600160401b0381118015612e8057600080fd5b50604051908082528060200260200182016040528015612eaa578160200160208202803683370190505b50905060005b8a51811015612f67576000848281518110612ec757fe5b60200260200101518410612edd57506000612f0b565b612f08612ef8670de0b6b3a764000087858151811061140b57fe5b6127d88688868151811061140b57fe5b90505b6000612f178a836122dc565b90506000612f33612f2783612268565b8e8681518110612a6c57fe5b9050612f45818f868151811061216157fe5b858581518110612f5157fe5b6020908102919091010152505050600101612eb0565b506000612f748c8361163d565b9050612d49612f8f670de0b6b3a764000061239c848a6117b7565b8a9061289e565b600080612fa3888861163d565b90506000612fb98261290f876127d8818b611bbe565b90506000805b8951811015612fe157612fd78a828151811061293357fe5b9150600101612fbf565b506000612ff08b8b858c6126e5565b905060006130038b8b8151811061277e57fe5b90506000613017848d8d8151811061298b57fe5b9050600061302482612268565b905060006130328a836122dc565b90506129d161304082612268565b859061228e565b80356105068161394a565b600082601f830112613062578081fd5b81356130756130708261392b565b613905565b81815291506020808301908481018184028601820187101561309657600080fd5b60005b848110156130b557813584529282019290820190600101613099565b505050505092915050565b600082601f8301126130d0578081fd5b81516130de6130708261392b565b8181529150602080830190848101818402860182018710156130ff57600080fd5b60005b848110156130b557815184529282019290820190600101613102565b600082601f83011261312e578081fd5b81356001600160401b03811115613143578182fd5b613156601f8201601f1916602001613905565b915080825283602082850101111561316d57600080fd5b8060208401602084013760009082016020015292915050565b80356002811061050657600080fd5b6000602082840312156131a6578081fd5b81356105cb8161394a565b600080604083850312156131c3578081fd5b82356131ce8161394a565b915060208301356131de8161394a565b809150509250929050565b6000806000606084860312156131fd578081fd5b83356132088161394a565b925060208401356132188161394a565b929592945050506040919091013590565b600080600080600080600060e0888a031215613243578283fd5b873561324e8161394a565b9650602088013561325e8161394a565b95506040880135945060608801359350608088013560ff81168114613281578384fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156132b0578182fd5b82356132bb8161394a565b946020939093013593505050565b6000806000606084860312156132dd578081fd5b83516001600160401b03808211156132f3578283fd5b818601915086601f830112613306578283fd5b81516133146130708261392b565b80828252602080830192508086018b828387028901011115613334578788fd5b8796505b8487101561335f57805161334b8161394a565b845260019690960195928101928101613338565b508901519097509350505080821115613376578283fd5b50613383868287016130c0565b925050604084015190509250925092565b6000602082840312156133a5578081fd5b81356105cb8161395f565b6000602082840312156133c1578081fd5b81516105cb8161395f565b600080600080600080600060e0888a0312156133e6578081fd5b8735965060208801356133f88161394a565b955060408801356134088161394a565b945060608801356001600160401b0380821115613423578283fd5b61342f8b838c01613052565b955060808a0135945060a08a0135935060c08a0135915080821115613452578283fd5b5061345f8a828b0161311e565b91505092959891949750929550565b60006020828403121561347f578081fd5b81356001600160e01b0319811681146105cb578182fd5b6000602082840312156134a7578081fd5b81516105cb8161394a565b6000602082840312156134c3578081fd5b81516105cb8161396d565b6000806000606084860312156134e2578081fd5b83516134ed8161396d565b60208501519093506001600160401b03811115613508578182fd5b613383868287016130c0565b60008060408385031215613526578182fd5b82516135318161396d565b6020939093015192949293505050565b600080600060608486031215613555578081fd5b83516135608161396d565b602085015160409095015190969495509392505050565b60008060408385031215613589578182fd5b82516135948161396d565b60208401519092506001600160401b038111156135af578182fd5b6135bb858286016130c0565b9150509250929050565b600080600080608085870312156135da578182fd5b84356001600160401b03808211156135f0578384fd5b818701915061012080838a031215613606578485fd5b61360f81613905565b905061361b8984613186565b815261362a8960208501613047565b602082015261363c8960408501613047565b6040820152606083013560608201526080830135608082015260a083013560a082015261366c8960c08501613047565b60c082015261367e8960e08501613047565b60e08201526101008084013583811115613696578687fd5b6136a28b82870161311e565b8284015250508096505060208701359150808211156136bf578384fd5b506136cc87828801613052565b949794965050505060408301359260600135919050565b6000602082840312156136f4578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561372a5781518752958201959082019060010161370e565b509495945050505050565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b60006040825261379f60408301856136fb565b82810360208401526137b181856136fb565b95945050505050565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b818110156138af57858101830151858201604001528201613893565b818111156138c05783604083870101525b50601f01601f1916929092016040019392505050565b6000838252604060208301526138ef60408301846136fb565b949350505050565b60ff91909116815260200190565b6040518181016001600160401b038111828210171561392357600080fd5b604052919050565b60006001600160401b03821115613940578081fd5b5060209081020190565b6001600160a01b038116811461051d57600080fd5b801515811461051d57600080fd5b6003811061051d57600080fdfea2646970667358221220e4c2dcbbbbaeef83efa3c36cf243c46f81c40dbaf947020d33a23b2250d100ad64736f6c63430007010033a264697066735822122050080a29e9bf1fc9f72a4dd0c15b5604218fe7410cce9d436231fc04b34769ef64736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH3 0x52 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2DA47C40 EQ PUSH3 0x57 JUMPI DUP1 PUSH4 0x6634B753 EQ PUSH3 0x7A JUMPI DUP1 PUSH4 0x7932C7F3 EQ PUSH3 0xA0 JUMPI DUP1 PUSH4 0x8D928AF8 EQ PUSH3 0xC6 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH3 0x61 PUSH3 0xD0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP3 SWAP2 SWAP1 PUSH3 0x55C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH3 0x91 PUSH3 0x8B CALLDATASIZE PUSH1 0x4 PUSH3 0x2DA JUMP JUMPDEST PUSH3 0x13C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP2 SWAP1 PUSH3 0x494 JUMP JUMPDEST PUSH3 0xB7 PUSH3 0xB1 CALLDATASIZE PUSH1 0x4 PUSH3 0x300 JUMP JUMPDEST PUSH3 0x15A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP2 SWAP1 PUSH3 0x480 JUMP JUMPDEST PUSH3 0xB7 PUSH3 0x1DB JUMP JUMPDEST PUSH1 0x0 DUP1 TIMESTAMP PUSH32 0x0 DUP2 LT ISZERO PUSH3 0x12E JUMPI DUP1 PUSH32 0x0 SUB SWAP3 POP PUSH3 0x278D00 SWAP2 POP PUSH3 0x137 JUMP JUMPDEST PUSH1 0x0 SWAP3 POP PUSH1 0x0 SWAP2 POP JUMPDEST POP SWAP1 SWAP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH3 0x169 PUSH3 0xD0 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH3 0x179 PUSH3 0x1DB JUMP JUMPDEST DUP11 DUP11 DUP11 DUP11 DUP11 DUP9 DUP9 DUP13 PUSH1 0x40 MLOAD PUSH3 0x18F SWAP1 PUSH3 0x24B JUMP JUMPDEST PUSH3 0x1A3 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0x49F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH3 0x1C0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP1 POP PUSH3 0x1CE DUP2 PUSH3 0x1FF JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE MLOAD PUSH32 0x83A48FBCFC991335314E74D0496AAB6A1987E992DDC85DDDBCC4D6DD6EF2E9FC SWAP2 SWAP1 LOG2 POP JUMP JUMPDEST PUSH2 0x4751 DUP1 PUSH3 0x5B8 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH3 0x266 DUP2 PUSH3 0x59E JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x27D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH3 0x294 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH3 0x2A9 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH3 0x56A JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH3 0x2C1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0x2EC JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH3 0x2F9 DUP2 PUSH3 0x59E JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH3 0x319 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP7 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH3 0x331 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH3 0x33F DUP11 DUP4 DUP12 ADD PUSH3 0x26C JUMP JUMPDEST SWAP8 POP PUSH1 0x20 SWAP2 POP DUP2 DUP10 ADD CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH3 0x356 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH3 0x364 DUP12 DUP3 DUP13 ADD PUSH3 0x26C JUMP JUMPDEST SWAP8 POP POP PUSH1 0x40 DUP10 ADD CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH3 0x379 JUMPI DUP5 DUP6 REVERT JUMPDEST DUP10 ADD PUSH1 0x1F DUP2 ADD DUP12 SGT PUSH3 0x38A JUMPI DUP5 DUP6 REVERT JUMPDEST DUP1 CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH3 0x399 JUMPI DUP6 DUP7 REVERT JUMPDEST DUP4 DUP2 MUL SWAP3 POP PUSH3 0x3AB DUP5 DUP5 ADD PUSH3 0x56A JUMP JUMPDEST DUP2 DUP2 MSTORE DUP5 DUP2 ADD SWAP1 DUP4 DUP7 ADD DUP6 DUP6 ADD DUP8 ADD DUP16 LT ISZERO PUSH3 0x3C6 JUMPI DUP9 DUP10 REVERT JUMPDEST DUP9 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH3 0x3F4 JUMPI PUSH3 0x3DF DUP16 DUP3 PUSH3 0x259 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH3 0x3CA JUMP JUMPDEST POP SWAP9 POP POP POP POP PUSH1 0x60 DUP10 ADD CALLDATALOAD SWAP5 POP POP POP PUSH1 0x80 DUP8 ADD CALLDATALOAD SWAP2 POP PUSH3 0x419 DUP9 PUSH1 0xA0 DUP10 ADD PUSH3 0x259 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x459 JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH3 0x43B JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH3 0x46B JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP11 AND DUP2 MSTORE PUSH2 0x120 PUSH1 0x20 DUP1 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 PUSH3 0x4C8 DUP5 DUP4 ADD DUP14 PUSH3 0x432 JUMP JUMPDEST SWAP2 POP DUP4 DUP3 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH3 0x4DE DUP3 DUP13 PUSH3 0x432 JUMP JUMPDEST DUP5 DUP2 SUB PUSH1 0x60 DUP7 ADD MSTORE DUP11 MLOAD DUP1 DUP3 MSTORE DUP3 DUP13 ADD SWAP4 POP SWAP1 DUP3 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x51E JUMPI PUSH3 0x50B DUP6 MLOAD PUSH3 0x592 JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0x4F6 JUMP JUMPDEST POP POP DUP1 SWAP4 POP POP POP POP DUP7 PUSH1 0x80 DUP4 ADD MSTORE DUP6 PUSH1 0xA0 DUP4 ADD MSTORE DUP5 PUSH1 0xC0 DUP4 ADD MSTORE DUP4 PUSH1 0xE0 DUP4 ADD MSTORE PUSH3 0x54E PUSH2 0x100 DUP4 ADD DUP5 PUSH3 0x425 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0x58A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x5B4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID PUSH2 0x400 PUSH1 0x40 MSTORE PUSH32 0x6E71EDAE12B1B97F4D1F60370FEF10105FA2FAAE0126114A169C64845D6126C9 PUSH2 0x120 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x4751 CODESIZE SUB DUP1 PUSH3 0x4751 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x5A SWAP2 PUSH3 0xA52 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 DUP3 MSTORE CALLER PUSH1 0x80 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP6 SWAP1 SHL AND PUSH1 0xA0 MSTORE DUP11 MLOAD SWAP1 DUP12 ADD SWAP1 DUP2 KECCAK256 PUSH1 0xC0 MSTORE SWAP2 MLOAD SWAP1 KECCAK256 PUSH1 0xE0 MSTORE PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH2 0x100 MSTORE DUP9 MLOAD DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 DUP10 SWAP2 PUSH1 0x0 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP5 SWAP2 DUP5 SWAP2 DUP11 SWAP2 DUP11 SWAP2 PUSH3 0xFE SWAP2 PUSH1 0x3 SWAP2 SWAP1 PUSH3 0x870 JUMP JUMPDEST POP DUP1 MLOAD PUSH3 0x114 SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0x870 JUMP JUMPDEST POP PUSH3 0x12C SWAP2 POP POP PUSH3 0x76A700 DUP4 GT ISZERO PUSH2 0x194 PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x140 PUSH3 0x278D00 DUP3 GT ISZERO PUSH2 0x195 PUSH3 0x6B0 JUMP JUMPDEST TIMESTAMP SWAP1 SWAP2 ADD PUSH2 0x140 DUP2 SWAP1 MSTORE ADD PUSH2 0x160 MSTORE DUP5 MLOAD PUSH3 0x162 SWAP1 PUSH1 0x2 GT ISZERO PUSH1 0xC8 PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x17A PUSH1 0x8 DUP7 MLOAD GT ISZERO PUSH1 0xC9 PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x190 DUP6 PUSH3 0x6C5 PUSH1 0x20 SHL PUSH3 0xCF1 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x1A5 PUSH5 0xE8D4A51000 DUP6 LT ISZERO PUSH1 0xCB PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x1BD PUSH8 0x16345785D8A0000 DUP6 GT ISZERO PUSH1 0xCA PUSH3 0x6B0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x9B2760F PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND SWAP1 PUSH4 0x9B2760F SWAP1 PUSH3 0x1EE SWAP1 DUP13 SWAP1 PUSH1 0x4 ADD PUSH3 0xBF5 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x209 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x21E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x244 SWAP2 SWAP1 PUSH3 0xA39 JUMP JUMPDEST SWAP1 POP DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x66A9C7D2 DUP3 DUP9 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH3 0x26F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH3 0x29A JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH3 0x2BB SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0xB59 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x2D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x2EB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP13 SWAP1 SHL AND PUSH2 0x180 MSTORE POP PUSH2 0x1A0 DUP2 SWAP1 MSTORE PUSH1 0x7 DUP6 SWAP1 SSTORE DUP6 MLOAD PUSH2 0x1C0 MSTORE DUP6 MLOAD PUSH3 0x322 JUMPI PUSH1 0x0 PUSH3 0x339 JUMP JUMPDEST DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x330 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x1E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x35C JUMPI PUSH1 0x0 PUSH3 0x373 JUMP JUMPDEST DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x36A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x200 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x396 JUMPI PUSH1 0x0 PUSH3 0x3AD JUMP JUMPDEST DUP6 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x3A4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x220 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x3D0 JUMPI PUSH1 0x0 PUSH3 0x3E7 JUMP JUMPDEST DUP6 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x3DE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x240 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x40A JUMPI PUSH1 0x0 PUSH3 0x421 JUMP JUMPDEST DUP6 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x418 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x260 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x444 JUMPI PUSH1 0x0 PUSH3 0x45B JUMP JUMPDEST DUP6 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x452 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x280 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x47E JUMPI PUSH1 0x0 PUSH3 0x495 JUMP JUMPDEST DUP6 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x48C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x4B8 JUMPI PUSH1 0x0 PUSH3 0x4CF JUMP JUMPDEST DUP6 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x4C6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2C0 MSTORE DUP6 MLOAD PUSH3 0x4EF JUMPI PUSH1 0x0 PUSH3 0x515 JUMP JUMPDEST PUSH3 0x515 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH3 0x6D1 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH2 0x2E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x52B JUMPI PUSH1 0x0 PUSH3 0x53D JUMP JUMPDEST PUSH3 0x53D DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x300 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x553 JUMPI PUSH1 0x0 PUSH3 0x565 JUMP JUMPDEST PUSH3 0x565 DUP7 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x320 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x57B JUMPI PUSH1 0x0 PUSH3 0x58D JUMP JUMPDEST PUSH3 0x58D DUP7 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x340 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x5A3 JUMPI PUSH1 0x0 PUSH3 0x5B5 JUMP JUMPDEST PUSH3 0x5B5 DUP7 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x360 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x5CB JUMPI PUSH1 0x0 PUSH3 0x5DD JUMP JUMPDEST PUSH3 0x5DD DUP7 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x380 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x5F3 JUMPI PUSH1 0x0 PUSH3 0x605 JUMP JUMPDEST PUSH3 0x605 DUP7 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x3A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x61B JUMPI PUSH1 0x0 PUSH3 0x62D JUMP JUMPDEST PUSH3 0x62D DUP7 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x501 JUMPI INVALID JUMPDEST PUSH2 0x3C0 DUP2 DUP2 MSTORE POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP PUSH3 0x666 PUSH8 0xDE0B6B3A7640000 DUP7 LT ISZERO PUSH2 0x12C PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x681 PUSH10 0x10F0CF064DD59200000 DUP7 GT ISZERO PUSH2 0x12D PUSH3 0x6B0 JUMP JUMPDEST PUSH3 0x69A PUSH1 0x5 DUP8 MLOAD GT ISZERO PUSH2 0x12F PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST POP POP POP PUSH2 0x3E0 SWAP2 SWAP1 SWAP2 MSTORE POP PUSH3 0xC53 SWAP4 POP POP POP POP JUMP JUMPDEST DUP2 PUSH3 0x6C1 JUMPI PUSH3 0x6C1 DUP2 PUSH3 0x773 JUMP JUMPDEST POP POP JUMP JUMPDEST DUP1 PUSH3 0x6C1 DUP2 PUSH3 0x7C6 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x313CE567 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x70E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH3 0x723 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x749 SWAP2 SWAP1 PUSH3 0xB2F JUMP JUMPDEST PUSH1 0xFF AND SWAP1 POP PUSH1 0x0 PUSH3 0x768 PUSH1 0x12 DUP4 PUSH3 0x853 PUSH1 0x20 SHL PUSH3 0xCFF OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0xA EXP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH3 0x7D7 JUMPI PUSH3 0x850 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x7E7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH3 0x84D JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH3 0x811 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0x842 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH3 0x6B0 PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH3 0x7F8 JUMP JUMPDEST POP POP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0x865 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH3 0x6B0 JUMP JUMPDEST POP DUP1 DUP3 SUB JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0x8B3 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0x8E3 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0x8E3 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0x8E3 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0x8C6 JUMP JUMPDEST POP PUSH3 0x8F1 SWAP3 SWAP2 POP PUSH3 0x8F5 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0x8F1 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0x8F6 JUMP JUMPDEST DUP1 MLOAD PUSH3 0x86A DUP2 PUSH3 0xC3D JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x92A JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0x940 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP1 DUP3 MUL PUSH3 0x952 DUP3 DUP3 ADD PUSH3 0xC0A JUMP JUMPDEST DUP4 DUP2 MSTORE SWAP4 POP DUP2 DUP5 ADD DUP6 DUP4 ADD DUP3 DUP8 ADD DUP5 ADD DUP9 LT ISZERO PUSH3 0x96F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST DUP5 DUP4 LT ISZERO PUSH3 0x99F JUMPI DUP1 MLOAD PUSH3 0x98A DUP2 PUSH3 0xC3D JUMP JUMPDEST DUP3 MSTORE PUSH1 0x1 SWAP3 SWAP1 SWAP3 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 DUP4 ADD PUSH3 0x974 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x9BB JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0x9D1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH3 0x9E7 PUSH1 0x1F DUP4 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH3 0xC0A JUMP JUMPDEST SWAP3 POP DUP2 DUP4 MSTORE DUP5 DUP2 DUP4 DUP7 ADD ADD GT ISZERO PUSH3 0x9FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH3 0xA1E JUMPI DUP5 DUP2 ADD DUP3 ADD MLOAD DUP5 DUP3 ADD DUP4 ADD MSTORE DUP2 ADD PUSH3 0xA01 JUMP JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xA30 JUMPI PUSH1 0x0 DUP3 DUP5 DUP7 ADD ADD MSTORE JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xA4B JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH3 0xA71 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH3 0xA7D DUP12 DUP12 PUSH3 0x90C JUMP JUMPDEST PUSH1 0x20 DUP12 ADD MLOAD SWAP1 SWAP10 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH3 0xA9A JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xAA8 DUP14 DUP4 DUP15 ADD PUSH3 0x9AA JUMP JUMPDEST SWAP10 POP PUSH1 0x40 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xABE JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xACC DUP14 DUP4 DUP15 ADD PUSH3 0x9AA JUMP JUMPDEST SWAP9 POP PUSH1 0x60 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xAE2 JUMPI DUP7 DUP8 REVERT JUMPDEST POP PUSH3 0xAF1 DUP13 DUP3 DUP14 ADD PUSH3 0x919 JUMP JUMPDEST SWAP7 POP POP PUSH1 0x80 DUP11 ADD MLOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD MLOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD MLOAD SWAP3 POP PUSH1 0xE0 DUP11 ADD MLOAD SWAP2 POP PUSH3 0xB20 DUP12 PUSH2 0x100 DUP13 ADD PUSH3 0x90C JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xB41 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH3 0xB52 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 ADD DUP6 DUP4 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP6 ADD MSTORE DUP2 DUP7 MLOAD DUP1 DUP5 MSTORE PUSH1 0x80 DUP7 ADD SWAP2 POP DUP3 DUP9 ADD SWAP4 POP DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xBA5 JUMPI PUSH3 0xB92 DUP6 MLOAD PUSH3 0xC31 JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xB7D JUMP JUMPDEST POP POP DUP5 DUP2 SUB PUSH1 0x40 DUP7 ADD MSTORE DUP6 MLOAD DUP1 DUP3 MSTORE SWAP1 DUP3 ADD SWAP3 POP DUP2 DUP7 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xBE7 JUMPI PUSH3 0xBD4 DUP4 MLOAD PUSH3 0xC31 JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xBBF JUMP JUMPDEST POP SWAP3 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP2 ADD PUSH1 0x3 DUP4 LT PUSH3 0xC04 JUMPI INVALID JUMPDEST SWAP2 SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0xC29 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x850 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x180 MLOAD PUSH1 0x60 SHR PUSH2 0x1A0 MLOAD PUSH2 0x1C0 MLOAD PUSH2 0x1E0 MLOAD PUSH1 0x60 SHR PUSH2 0x200 MLOAD PUSH1 0x60 SHR PUSH2 0x220 MLOAD PUSH1 0x60 SHR PUSH2 0x240 MLOAD PUSH1 0x60 SHR PUSH2 0x260 MLOAD PUSH1 0x60 SHR PUSH2 0x280 MLOAD PUSH1 0x60 SHR PUSH2 0x2A0 MLOAD PUSH1 0x60 SHR PUSH2 0x2C0 MLOAD PUSH1 0x60 SHR PUSH2 0x2E0 MLOAD PUSH2 0x300 MLOAD PUSH2 0x320 MLOAD PUSH2 0x340 MLOAD PUSH2 0x360 MLOAD PUSH2 0x380 MLOAD PUSH2 0x3A0 MLOAD PUSH2 0x3C0 MLOAD PUSH2 0x3E0 MLOAD PUSH2 0x39B0 PUSH3 0xDA1 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x7C0 MSTORE DUP1 PUSH2 0x7F3 MSTORE DUP1 PUSH2 0x1AEF MSTORE DUP1 PUSH2 0x1C66 MSTORE DUP1 PUSH2 0x1CEA MSTORE DUP1 PUSH2 0x1F28 MSTORE DUP1 PUSH2 0x2037 MSTORE DUP1 PUSH2 0x2497 MSTORE DUP1 PUSH2 0x255D MSTORE DUP1 PUSH2 0x25E3 MSTORE DUP1 PUSH2 0x263F MSTORE POP DUP1 PUSH2 0xF94 MSTORE POP DUP1 PUSH2 0xF51 MSTORE POP DUP1 PUSH2 0xF0E MSTORE POP DUP1 PUSH2 0xECB MSTORE POP DUP1 PUSH2 0xE88 MSTORE POP DUP1 PUSH2 0xE45 MSTORE POP DUP1 PUSH2 0xE02 MSTORE POP DUP1 PUSH2 0xDB1 MSTORE POP POP POP POP POP POP POP POP POP DUP1 PUSH2 0xD17 MSTORE POP DUP1 PUSH2 0x661 MSTORE POP DUP1 PUSH2 0x98B MSTORE POP DUP1 PUSH2 0x11F7 MSTORE POP DUP1 PUSH2 0x11D3 MSTORE POP DUP1 PUSH2 0xA5A MSTORE POP DUP1 PUSH2 0x12FA MSTORE POP DUP1 PUSH2 0x133C MSTORE POP DUP1 PUSH2 0x131B MSTORE POP DUP1 PUSH2 0x967 MSTORE POP DUP1 PUSH2 0x8F1 MSTORE POP PUSH2 0x39B0 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1DA JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6DACCFFA GT PUSH2 0x104 JUMPI DUP1 PUSH4 0x8D928AF8 GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD505ACCF GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x3B5 JUMPI DUP1 PUSH4 0xD5C096C4 EQ PUSH2 0x3C8 JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x3DB JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x3EE JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x8D928AF8 EQ PUSH2 0x38A JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x392 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x39A JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x3AD JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x7ECEBE00 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x33C JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x34F JUMPI DUP1 PUSH4 0x87EC6817 EQ PUSH2 0x362 JUMPI DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x375 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x6DACCFFA EQ PUSH2 0x300 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x308 JUMPI DUP1 PUSH4 0x74F3B009 EQ PUSH2 0x31B JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x313CE567 GT PUSH2 0x17C JUMPI DUP1 PUSH4 0x55C67628 GT PUSH2 0x14B JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0x2BC JUMPI DUP1 PUSH4 0x6028BFD4 EQ PUSH2 0x2C4 JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x2E5 JUMPI DUP1 PUSH4 0x679AEFCE EQ PUSH2 0x2F8 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x313CE567 EQ PUSH2 0x284 JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x299 JUMPI DUP1 PUSH4 0x38E9922E EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x38FFF2D0 EQ PUSH2 0x2B4 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x16C38B3C GT PUSH2 0x1B8 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x23D JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x252 JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x25A JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x271 JUMPI PUSH2 0x1DA JUMP JUMPDEST DUP1 PUSH4 0x1EC954A EQ PUSH2 0x1DF JUMPI DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x208 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x21D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F2 PUSH2 0x1ED CALLDATASIZE PUSH1 0x4 PUSH2 0x35C5 JUMP JUMPDEST PUSH2 0x401 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x210 PUSH2 0x45E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x3883 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x22B CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0x4F5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x37BA JUMP JUMPDEST PUSH2 0x250 PUSH2 0x24B CALLDATASIZE PUSH1 0x4 PUSH2 0x3394 JUMP JUMPDEST PUSH2 0x50C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1F2 PUSH2 0x520 JUMP JUMPDEST PUSH2 0x262 PUSH2 0x526 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x37C5 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x27F CALLDATASIZE PUSH1 0x4 PUSH2 0x31E9 JUMP JUMPDEST PUSH2 0x54F JUMP JUMPDEST PUSH2 0x28C PUSH2 0x5D2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x38F7 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x5D7 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x2AF CALLDATASIZE PUSH1 0x4 PUSH2 0x36E3 JUMP JUMPDEST PUSH2 0x5E6 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x65F JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x683 JUMP JUMPDEST PUSH2 0x2D7 PUSH2 0x2D2 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x689 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP3 SWAP2 SWAP1 PUSH2 0x38D6 JUMP JUMPDEST PUSH2 0x230 PUSH2 0x2F3 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0x6C0 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x71A JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x7F1 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x316 CALLDATASIZE PUSH1 0x4 PUSH2 0x3195 JUMP JUMPDEST PUSH2 0x815 JUMP JUMPDEST PUSH2 0x32E PUSH2 0x329 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x830 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP3 SWAP2 SWAP1 PUSH2 0x378C JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x34A CALLDATASIZE PUSH1 0x4 PUSH2 0x3195 JUMP JUMPDEST PUSH2 0x8D2 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x35D CALLDATASIZE PUSH1 0x4 PUSH2 0x346E JUMP JUMPDEST PUSH2 0x8ED JUMP JUMPDEST PUSH2 0x2D7 PUSH2 0x370 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0x93F JUMP JUMPDEST PUSH2 0x37D PUSH2 0x965 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1FF SWAP2 SWAP1 PUSH2 0x3778 JUMP JUMPDEST PUSH2 0x37D PUSH2 0x989 JUMP JUMPDEST PUSH2 0x210 PUSH2 0x9AD JUMP JUMPDEST PUSH2 0x230 PUSH2 0x3A8 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0xA0E JUMP JUMPDEST PUSH2 0x37D PUSH2 0xA1B JUMP JUMPDEST PUSH2 0x250 PUSH2 0x3C3 CALLDATASIZE PUSH1 0x4 PUSH2 0x3229 JUMP JUMPDEST PUSH2 0xA25 JUMP JUMPDEST PUSH2 0x32E PUSH2 0x3D6 CALLDATASIZE PUSH1 0x4 PUSH2 0x33CC JUMP JUMPDEST PUSH2 0xB6E JUMP JUMPDEST PUSH2 0x230 PUSH2 0x3E9 CALLDATASIZE PUSH1 0x4 PUSH2 0x329E JUMP JUMPDEST PUSH2 0xC90 JUMP JUMPDEST PUSH2 0x1F2 PUSH2 0x3FC CALLDATASIZE PUSH1 0x4 PUSH2 0x31B1 JUMP JUMPDEST PUSH2 0xCC6 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x415 DUP4 DUP4 PUSH2 0x410 PUSH2 0xD15 JUMP JUMPDEST PUSH2 0xD39 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x41F PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x430 JUMPI INVALID JUMPDEST EQ PUSH2 0x447 JUMPI PUSH2 0x442 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0xFD2 JUMP JUMPDEST PUSH2 0x454 JUMP JUMPDEST PUSH2 0x454 DUP7 DUP7 DUP7 DUP7 DUP6 PUSH2 0x1047 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4EA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BF JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4EA JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4CD JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x502 CALLER DUP5 DUP5 PUSH2 0x10AB JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x514 PUSH2 0x1113 JUMP JUMPDEST PUSH2 0x51D DUP2 PUSH2 0x1141 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x533 PUSH2 0x11B4 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x53E PUSH2 0x11D1 JUMP JUMPDEST SWAP2 POP PUSH2 0x548 PUSH2 0x11F5 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x58D SWAP2 EQ DUP1 PUSH2 0x585 JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x598 DUP6 DUP6 DUP6 PUSH2 0x1227 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x5B3 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x5C5 JUMPI PUSH2 0x5C5 DUP6 CALLER DUP6 DUP5 SUB PUSH2 0x10AB JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E1 PUSH2 0x12F6 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x5EE PUSH2 0x1113 JUMP JUMPDEST PUSH2 0x5F6 PUSH2 0x1393 JUMP JUMPDEST PUSH2 0x609 PUSH5 0xE8D4A51000 DUP3 LT ISZERO PUSH1 0xCB PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x61F PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH1 0xCA PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x7 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9CABC14D438714DBCD9292DF9B3F89C42F98ACD93A675AD72CD6033777E9B8E7 SWAP1 PUSH2 0x654 SWAP1 DUP4 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x69F DUP7 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x13A8 JUMP JUMPDEST PUSH2 0x6B4 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x13B5 PUSH2 0x14BA PUSH2 0x151B JUMP JUMPDEST SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x6FC JUMPI PUSH2 0x6F7 CALLER DUP6 PUSH1 0x0 PUSH2 0x10AB JUMP JUMPDEST PUSH2 0x710 JUMP JUMPDEST PUSH2 0x710 CALLER DUP6 PUSH2 0x70B DUP5 DUP8 PUSH2 0xCFF JUMP JUMPDEST PUSH2 0x10AB JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x726 PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF94D4668 PUSH2 0x73C PUSH2 0x65F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x758 SWAP2 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x770 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x784 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x7AC SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x32C9 JUMP JUMPDEST POP SWAP2 POP POP PUSH2 0x7EB PUSH2 0x7BB PUSH2 0x520 JUMP JUMPDEST PUSH2 0x7E5 PUSH32 0x0 DUP5 PUSH2 0x163D JUMP JUMPDEST SWAP1 PUSH2 0x17B7 JUMP JUMPDEST SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0x85A PUSH2 0x83F PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH1 0xCD PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x86F PUSH2 0x865 PUSH2 0x65F JUMP JUMPDEST DUP3 EQ PUSH2 0x1F4 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x879 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0x885 DUP9 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x899 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x13B5 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x8A9 DUP14 DUP5 PUSH2 0x185C JUMP JUMPDEST PUSH2 0x8B3 DUP3 DUP6 PUSH2 0x14BA JUMP JUMPDEST PUSH2 0x8BD DUP2 DUP6 PUSH2 0x14BA JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP POP POP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x922 SWAP3 SWAP2 SWAP1 PUSH2 0x3735 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x950 DUP7 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x6B4 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x18EF PUSH2 0x1994 PUSH2 0x151B JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4EA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x4BF JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4EA JUMP JUMPDEST PUSH1 0x0 PUSH2 0x502 CALLER DUP5 DUP5 PUSH2 0x1227 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E1 PUSH2 0x19F5 JUMP JUMPDEST PUSH2 0xA33 DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD SWAP1 MLOAD SWAP1 SWAP3 SWAP2 PUSH2 0xA8A SWAP2 PUSH32 0x0 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP9 SWAP2 DUP14 SWAP2 ADD PUSH2 0x3805 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0xAAD DUP3 PUSH2 0x1A6F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xAD4 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3865 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAF6 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0xB38 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xB30 JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0xB61 DUP12 DUP12 DUP12 PUSH2 0x10AB JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0xB7D PUSH2 0x83F PUSH2 0x989 JUMP JUMPDEST PUSH2 0xB88 PUSH2 0x865 PUSH2 0x65F JUMP JUMPDEST PUSH1 0x60 PUSH2 0xB92 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0xB9C PUSH2 0x520 JUMP JUMPDEST PUSH2 0xC41 JUMPI PUSH1 0x0 PUSH1 0x60 PUSH2 0xBB0 DUP14 DUP14 DUP14 DUP11 PUSH2 0x1A8B JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xBC5 PUSH3 0xF4240 DUP4 LT ISZERO PUSH1 0xCC PUSH2 0x1219 JUMP JUMPDEST PUSH2 0xBD3 PUSH1 0x0 PUSH3 0xF4240 PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xBE2 DUP12 PUSH3 0xF4240 DUP5 SUB PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xBEC DUP2 DUP5 PUSH2 0x1994 JUMP JUMPDEST DUP1 PUSH2 0xBF5 PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xC0A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xC34 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0x8C5 JUMP JUMPDEST PUSH2 0xC4B DUP9 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0xC5F DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x18EF JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xC6F DUP13 DUP5 PUSH2 0x1B28 JUMP JUMPDEST PUSH2 0xC79 DUP3 DUP6 PUSH2 0x1994 JUMP JUMPDEST PUSH2 0xC83 DUP2 DUP6 PUSH2 0x14BA JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP PUSH2 0x8C5 SWAP2 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x502 SWAP2 DUP6 SWAP1 PUSH2 0x70B SWAP1 DUP7 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST DUP1 PUSH2 0xCFB DUP2 PUSH2 0x1BD0 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xD0F DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x1219 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0xD51 DUP2 DUP5 LT DUP1 ISZERO PUSH2 0xD4A JUMPI POP DUP2 DUP4 LT JUMPDEST PUSH1 0x64 PUSH2 0x1219 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0xD62 PUSH2 0xD15 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xD7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xDA6 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0xDDD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0xDF7 JUMP JUMPDEST SWAP2 POP PUSH2 0x4F2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0xE2E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0xE71 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0xEB4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0xEF7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0xF3A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0xF7D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0xDEE JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0xFC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xFDE DUP6 DUP4 PUSH2 0x1808 JUMP JUMPDEST PUSH2 0xFFF DUP7 PUSH1 0x60 ADD MLOAD DUP4 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0xFF2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1C49 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x1012 DUP8 DUP8 DUP8 DUP8 PUSH2 0x1C55 JUMP JUMPDEST SWAP1 POP PUSH2 0x1031 DUP2 DUP5 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x1024 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1C92 JUMP JUMPDEST SWAP1 POP PUSH2 0x103C DUP2 PUSH2 0x1C9E JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1056 DUP7 PUSH1 0x60 ADD MLOAD PUSH2 0x1CB5 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x1065 DUP6 DUP4 PUSH2 0x1808 JUMP JUMPDEST PUSH2 0x1079 DUP7 PUSH1 0x60 ADD MLOAD DUP4 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0xFF2 JUMPI INVALID JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x108C DUP8 DUP8 DUP8 DUP8 PUSH2 0x1CD9 JUMP JUMPDEST SWAP1 POP PUSH2 0x103C DUP2 DUP5 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x109E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1D16 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP5 SWAP1 SSTORE MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0x1106 SWAP1 DUP6 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x112A PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x8ED JUMP JUMPDEST SWAP1 POP PUSH2 0x51D PUSH2 0x1139 DUP3 CALLER PUSH2 0x1D22 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x1219 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x1161 JUMPI PUSH2 0x115C PUSH2 0x1152 PUSH2 0x11D1 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x1176 JUMP JUMPDEST PUSH2 0x1176 PUSH2 0x116C PUSH2 0x11F5 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x654 SWAP1 DUP4 SWAP1 PUSH2 0x37BA JUMP JUMPDEST PUSH1 0x0 PUSH2 0x11BE PUSH2 0x11F5 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x5E1 JUMPI POP POP PUSH1 0x6 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST DUP2 PUSH2 0xCFB JUMPI PUSH2 0xCFB DUP2 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x124F DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x1219 JUMP JUMPDEST PUSH2 0x1266 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x1296 SWAP1 DUP4 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP7 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x12E8 SWAP1 DUP7 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x1363 PUSH2 0x1E65 JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x1378 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x3839 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x13A6 PUSH2 0x139E PUSH2 0x11B4 JUMP JUMPDEST PUSH2 0x192 PUSH2 0x1219 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0xCFB DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x13C2 PUSH2 0x11B4 JUMP JUMPDEST ISZERO PUSH2 0x1446 JUMPI PUSH2 0x13D4 DUP8 PUSH1 0x8 SLOAD DUP8 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH2 0x13E1 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1440 JUMPI PUSH2 0x1421 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x13F7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x142D JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x13D9 JUMP JUMPDEST POP PUSH2 0x1491 JUMP JUMPDEST PUSH2 0x144E PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1463 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x148D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP JUMPDEST PUSH2 0x149B DUP8 DUP6 PUSH2 0x1F72 JUMP JUMPDEST SWAP1 SWAP4 POP SWAP2 POP PUSH2 0x14AA DUP8 DUP4 PUSH2 0x1FDC JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x14C5 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x14FC DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x14DB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x14EF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x205C JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1508 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x14BD JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x15D9 JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x153F SWAP3 SWAP2 SWAP1 PUSH2 0x374D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x157C JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1581 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1590 JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x43ADBAFB PUSH1 0xE0 SHL DUP2 EQ PUSH2 0x15BB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x4 PUSH1 0x0 RETURNDATACOPY PUSH1 0x40 PUSH1 0x20 MSTORE PUSH1 0x24 RETURNDATASIZE SUB PUSH1 0x24 PUSH1 0x40 RETURNDATACOPY PUSH1 0x1C RETURNDATASIZE ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x15E3 PUSH2 0xD56 JUMP JUMPDEST SWAP1 POP PUSH2 0x15EF DUP8 DUP3 PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1606 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x1619 DUP2 DUP5 DUP7 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP1 MLOAD PUSH1 0x1F NOT DUP3 ADD DUP4 SWAP1 MSTORE PUSH4 0x43ADBAFB PUSH1 0x3F NOT DUP4 ADD MSTORE PUSH1 0x20 MUL PUSH1 0x23 NOT DUP3 ADD PUSH1 0x44 DUP3 ADD DUP2 REVERT JUMPDEST DUP1 MLOAD PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x167E JUMPI PUSH2 0x1674 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x165D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x1646 JUMP JUMPDEST POP DUP2 PUSH2 0x168F JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 PUSH2 0x169D DUP9 DUP6 PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x17AA JUMPI PUSH1 0x0 PUSH2 0x16CB DUP7 DUP11 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x1704 JUMPI PUSH2 0x16FA PUSH2 0x16F4 PUSH2 0x16EE DUP5 DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP10 PUSH2 0x207C JUMP JUMPDEST DUP7 PUSH2 0x20A0 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x16D0 JUMP JUMPDEST POP DUP4 SWAP5 POP PUSH2 0x1764 PUSH2 0x173A PUSH2 0x1721 PUSH2 0x171B DUP7 DUP12 PUSH2 0x207C JUMP JUMPDEST DUP5 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x1734 PUSH2 0x172E DUP11 DUP10 PUSH2 0x207C JUMP JUMPDEST DUP9 PUSH2 0x207C JUMP JUMPDEST SWAP1 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x175F PUSH2 0x1751 PUSH2 0x174B DUP8 PUSH1 0x1 PUSH2 0xCFF JUMP JUMPDEST DUP6 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x1734 PUSH2 0x16EE DUP12 PUSH1 0x1 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x20A0 JUMP JUMPDEST SWAP4 POP DUP5 DUP5 GT ISZERO PUSH2 0x178A JUMPI PUSH1 0x1 PUSH2 0x177A DUP6 DUP8 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x1785 JUMPI POP PUSH2 0x17AA JUMP JUMPDEST PUSH2 0x17A1 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x1796 DUP7 DUP7 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x17A1 JUMPI POP PUSH2 0x17AA JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x16A2 JUMP JUMPDEST POP SWAP1 SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x17C6 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x17D3 JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x17F6 SWAP1 DUP6 DUP4 DUP2 PUSH2 0x17ED JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0x1219 JUMP JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x17FF JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x1813 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x183D DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1829 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1849 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x180B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x1884 DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP3 DUP3 SUB SWAP1 SSTORE PUSH1 0x2 SLOAD PUSH2 0x18AE SWAP1 DUP4 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1106 SWAP1 DUP7 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x18FC PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x190B DUP9 PUSH1 0x8 SLOAD DUP9 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH2 0x1918 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1961 JUMPI PUSH2 0x1942 DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x192E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP11 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x194E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1910 JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 PUSH2 0x1970 DUP11 DUP9 PUSH2 0x20D3 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x197E DUP11 DUP3 PUSH2 0x212B JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP1 SWAP13 SWAP1 SWAP12 POP SWAP1 SWAP10 POP SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x199F PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH2 0x19D6 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x19B5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x19C9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x20A0 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x19E2 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1997 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19FF PUSH2 0x989 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1A37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1A4B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x5E1 SWAP2 SWAP1 PUSH2 0x3496 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1A79 PUSH2 0x12F6 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x922 SWAP3 SWAP2 SWAP1 PUSH2 0x375D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1A97 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1AA2 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH2 0x1ABD PUSH1 0x0 DUP3 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1AB5 JUMPI INVALID JUMPDEST EQ PUSH1 0xCE PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1AC8 DUP6 PUSH2 0x21AC JUMP JUMPDEST SWAP1 POP PUSH2 0x1AD7 DUP2 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x1AE8 DUP2 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH2 0x1808 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B14 PUSH32 0x0 DUP4 PUSH2 0x163D JUMP JUMPDEST PUSH1 0x8 DUP2 SWAP1 SSTORE SWAP10 SWAP2 SWAP9 POP SWAP1 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x1B4B SWAP1 DUP3 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x2 SLOAD PUSH2 0x1B71 SWAP1 DUP3 PUSH2 0x1BBE JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1BB2 SWAP1 DUP6 SWAP1 PUSH2 0x37DD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x5CB DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH2 0x1BDF JUMPI PUSH2 0x51D JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1BEE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xD51 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1C16 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x1C3F DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH2 0x1219 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x1BFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x207C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C5F PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x454 PUSH32 0x0 DUP7 DUP7 DUP7 DUP11 PUSH1 0x60 ADD MLOAD PUSH2 0x21C2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x20A0 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x506 PUSH2 0x1CAE PUSH1 0x7 SLOAD PUSH2 0x2268 JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x228E JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1CCD PUSH1 0x7 SLOAD DUP5 PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x5CB DUP4 DUP3 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1CE3 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x454 PUSH32 0x0 DUP7 DUP7 DUP7 DUP11 PUSH1 0x60 ADD MLOAD PUSH2 0x2318 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5CB DUP4 DUP4 PUSH2 0x205C JUMP JUMPDEST PUSH1 0x0 PUSH20 0xBA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1B PUSH2 0x1D41 PUSH2 0x965 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x1D5C JUMPI POP PUSH2 0x1D5C DUP4 PUSH2 0x23A2 JUMP JUMPDEST ISZERO PUSH2 0x1D84 JUMPI PUSH2 0x1D69 PUSH2 0x965 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH2 0x1D8C PUSH2 0x19F5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1DBB SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x37E6 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1DD3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1DE7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1E0B SWAP2 SWAP1 PUSH2 0x33B0 JUMP JUMPDEST SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x1E74 PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1E89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1EB3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP3 PUSH2 0x1EC2 JUMPI SWAP1 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 DUP1 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1ED2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST PUSH2 0x1EEB PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1F22 JUMPI PUSH1 0x0 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1F00 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP DUP3 DUP2 GT ISZERO PUSH2 0x1F19 JUMPI DUP2 SWAP4 POP DUP1 SWAP3 POP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1EE3 JUMP JUMPDEST POP PUSH2 0x1F50 PUSH32 0x0 DUP9 DUP9 DUP6 DUP10 PUSH2 0x23BC JUMP JUMPDEST DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F5C JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP SWAP1 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x1F81 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1F91 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1FAB JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2418 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x1FD5 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1FB9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1FC9 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x24EE JUMP JUMPDEST PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2520 JUMP JUMPDEST POP JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH2 0x1FE8 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x2031 JUMPI PUSH2 0x2012 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1FFE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x201E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1FE0 JUMP JUMPDEST POP PUSH2 0x5CB PUSH32 0x0 DUP5 PUSH2 0x163D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x206B DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x2074 JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x5CB DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x20AF DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x20BC JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x20C8 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x20E2 DUP5 PUSH2 0x2196 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x20F2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2102 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x25AA JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2110 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2120 JUMPI PUSH2 0x1FA1 DUP6 DUP6 PUSH2 0x2624 JUMP JUMPDEST PUSH2 0x1FD3 PUSH2 0x136 PUSH2 0x1E12 JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH2 0x2137 PUSH2 0xD15 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x2031 JUMPI PUSH2 0x2177 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x214D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2183 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x212F JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x506 SWAP2 SWAP1 PUSH2 0x34B2 JUMP JUMPDEST PUSH1 0x60 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5CB SWAP2 SWAP1 PUSH2 0x3577 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x21CF DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x21E1 DUP4 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x21ED JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x2207 DUP9 DUP9 DUP5 DUP10 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH2 0x2219 DUP5 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2225 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x225C PUSH1 0x1 PUSH2 0x1734 DUP10 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x2245 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 DUP3 LT PUSH2 0x2280 JUMPI PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x229D DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0x1219 JUMP JUMPDEST DUP3 PUSH2 0x22AA JUMPI POP PUSH1 0x0 PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x22C4 SWAP1 DUP6 DUP4 DUP2 PUSH2 0x17ED JUMPI INVALID JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x22D0 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x22F6 DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST DUP1 PUSH2 0x2305 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x506 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD PUSH2 0x22D0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2325 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2337 DUP4 DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP7 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2343 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x0 PUSH2 0x235D DUP9 DUP9 DUP5 DUP9 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH2 0x236F DUP5 DUP9 DUP9 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP8 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x237B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x225C PUSH1 0x1 PUSH2 0x239C DUP4 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 PUSH2 0xCFF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x23B4 PUSH4 0x1C74C917 PUSH1 0xE1 SHL PUSH2 0x8ED JUMP JUMPDEST SWAP1 SWAP2 EQ SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x23CB DUP8 DUP8 DUP8 DUP8 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x23DC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD GT PUSH2 0x23F0 JUMPI PUSH1 0x0 PUSH2 0x2400 JUMP JUMPDEST PUSH2 0x2400 DUP3 DUP9 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x225C PUSH8 0xDE0B6B3A7640000 PUSH2 0x7E5 DUP4 DUP8 PUSH2 0x289E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2424 PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x242E PUSH2 0xD15 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x243C DUP7 PUSH2 0x28CA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x244D DUP4 DUP3 LT PUSH1 0x64 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2465 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x248F JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x24C9 PUSH32 0x0 DUP10 DUP5 DUP7 PUSH2 0x24C1 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x28EC JUMP JUMPDEST DUP2 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x24D5 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP2 SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x24FD DUP5 PUSH2 0x29E4 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x2513 DUP7 DUP4 PUSH2 0x250E PUSH2 0x520 JUMP JUMPDEST PUSH2 0x29FA JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x252C PUSH2 0x1393 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2539 DUP6 PUSH2 0x2AAB JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x254A DUP3 MLOAD PUSH2 0x69A PUSH2 0xD15 JUMP JUMPDEST PUSH2 0x2556 DUP3 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x258E PUSH32 0x0 DUP9 DUP6 PUSH2 0x2586 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2AC3 JUMP JUMPDEST SWAP1 POP PUSH2 0x259E DUP3 DUP3 GT ISZERO PUSH1 0xCF PUSH2 0x1219 JUMP JUMPDEST SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x25BA DUP6 PUSH2 0x2AAB JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x25D0 PUSH2 0x25C9 PUSH2 0xD15 JUMP JUMPDEST DUP4 MLOAD PUSH2 0x13A8 JUMP JUMPDEST PUSH2 0x25DC DUP3 PUSH2 0x1AE3 PUSH2 0xD56 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2614 PUSH32 0x0 DUP9 DUP6 PUSH2 0x260C PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2D59 JUMP JUMPDEST SWAP1 POP PUSH2 0x259E DUP3 DUP3 LT ISZERO PUSH1 0xD0 PUSH2 0x1219 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0x2634 DUP6 PUSH2 0x28CA JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH2 0x2671 PUSH32 0x0 DUP9 DUP5 DUP7 PUSH2 0x2669 PUSH2 0x520 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2F96 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x267D PUSH2 0xD15 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2692 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x26BC JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 DUP2 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x26CC JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP3 SWAP8 SWAP3 SWAP7 POP SWAP2 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x26F3 DUP7 DUP7 MLOAD PUSH2 0x207C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x2704 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH2 0x2722 DUP8 MLOAD DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x276E JUMPI PUSH2 0x2753 PUSH2 0x274D PUSH2 0x2746 DUP5 DUP12 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x16BE JUMPI INVALID JUMPDEST DUP11 MLOAD PUSH2 0x207C JUMP JUMPDEST DUP9 PUSH2 0x205C JUMP JUMPDEST SWAP2 POP PUSH2 0x2764 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x165D JUMPI INVALID JUMPDEST SWAP3 POP PUSH1 0x1 ADD PUSH2 0x2727 JUMP JUMPDEST POP PUSH2 0x2795 DUP8 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x277E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x27AC PUSH2 0x27A6 DUP9 DUP10 PUSH2 0x207C JUMP JUMPDEST DUP6 PUSH2 0x20A0 JUMP JUMPDEST SWAP1 POP PUSH2 0x27DE DUP3 PUSH2 0x27D8 DUP11 DUP10 DUP2 MLOAD DUP2 LT PUSH2 0x27C1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 PUSH2 0x228E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x27F6 PUSH2 0x27EF DUP10 DUP8 PUSH2 0x17B7 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x1BBE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH2 0x2816 PUSH2 0x2808 DUP12 DUP6 PUSH2 0x1BBE JUMP JUMPDEST PUSH2 0x27D8 DUP7 PUSH2 0x1734 DUP15 DUP1 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST PUSH1 0xFF DUP2 LT ISZERO PUSH2 0x288E JUMPI DUP2 SWAP3 POP PUSH2 0x284B PUSH2 0x283D DUP13 PUSH2 0x239C DUP8 PUSH2 0x1734 DUP8 PUSH1 0x2 PUSH2 0x207C JUMP JUMPDEST PUSH2 0x27D8 DUP8 PUSH2 0x1734 DUP7 DUP1 PUSH2 0x22DC JUMP JUMPDEST SWAP2 POP DUP3 DUP3 GT ISZERO PUSH2 0x2870 JUMPI PUSH1 0x1 PUSH2 0x2861 DUP4 DUP6 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x286B JUMPI PUSH2 0x288E JUMP JUMPDEST PUSH2 0x2886 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x287C DUP5 DUP5 PUSH2 0xCFF JUMP JUMPDEST GT PUSH2 0x2886 JUMPI PUSH2 0x288E JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x281B JUMP JUMPDEST POP SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x28B8 DUP5 ISZERO DUP1 PUSH2 0x2099 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2096 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x28E1 SWAP2 SWAP1 PUSH2 0x3541 JUMP JUMPDEST SWAP1 SWAP6 SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x28F9 DUP9 DUP9 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2915 DUP3 PUSH2 0x290F DUP8 PUSH2 0x27D8 DUP2 DUP12 PUSH2 0xCFF JUMP JUMPDEST SWAP1 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2954 JUMPI PUSH2 0x294A DUP11 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x1BBE SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x291B JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2963 DUP12 DUP12 DUP6 DUP13 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2977 DUP3 DUP13 DUP13 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29A1 DUP5 DUP14 DUP14 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x17B7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29AE DUP3 PUSH2 0x2268 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29BC DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH2 0x29D1 PUSH2 0x29CA DUP3 PUSH2 0x2268 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x289E JUMP JUMPDEST SWAP16 SWAP15 POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5CB SWAP2 SWAP1 PUSH2 0x3514 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2A08 DUP5 DUP5 PUSH2 0x17B7 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2A23 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2A4D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0x2AA1 JUMPI PUSH2 0x2A82 DUP4 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x289E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2A8E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x2A53 JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x28E1 SWAP2 SWAP1 PUSH2 0x34CE JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2AD0 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x2AF8 JUMPI PUSH2 0x2AEE DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2AD6 JUMP JUMPDEST POP PUSH1 0x60 DUP7 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2B12 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2B3C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2C03 JUMPI PUSH1 0x0 PUSH2 0x2B74 DUP6 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2B5E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x228E SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x2BB0 DUP12 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2B85 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x27D8 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2B9C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2BBC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2BF8 PUSH2 0x2BF1 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2BDB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x22DC SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x1BBE JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x2B43 JUMP JUMPDEST POP PUSH1 0x60 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2C1D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2C47 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP11 MLOAD DUP2 LT ISZERO PUSH2 0x2D1E JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2C64 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 GT PUSH2 0x2C7A JUMPI POP PUSH1 0x0 PUSH2 0x2CC2 JUMP JUMPDEST PUSH2 0x2CBF PUSH2 0x2C99 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2C8C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2268 JUMP JUMPDEST PUSH2 0x27D8 DUP8 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2CA8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 PUSH2 0xCFF SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x2CCE DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2CEA PUSH2 0x2CDE DUP4 PUSH2 0x2268 JUMP JUMPDEST DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2B5E JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2CFC DUP2 DUP16 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2D08 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP POP POP PUSH1 0x1 ADD PUSH2 0x2C4D JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2D2B DUP13 DUP4 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2D49 PUSH2 0x2D42 PUSH2 0x2D3D DUP4 DUP10 PUSH2 0x228E JUMP JUMPDEST PUSH2 0x2268 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x22DC JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2D66 DUP8 DUP8 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x2D8E JUMPI PUSH2 0x2D84 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2D6C JUMP JUMPDEST POP PUSH1 0x60 DUP7 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2DA8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2DD2 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2E66 JUMPI PUSH1 0x0 PUSH2 0x2DF4 DUP6 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2E30 DUP12 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2E05 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x7E5 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2E1C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2E3C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2E5B PUSH2 0x2BF1 DUP3 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x2DD9 JUMP JUMPDEST POP PUSH1 0x60 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2E80 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2EAA JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP11 MLOAD DUP2 LT ISZERO PUSH2 0x2F67 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2EC7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 LT PUSH2 0x2EDD JUMPI POP PUSH1 0x0 PUSH2 0x2F0B JUMP JUMPDEST PUSH2 0x2F08 PUSH2 0x2EF8 PUSH8 0xDE0B6B3A7640000 DUP8 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST PUSH2 0x27D8 DUP7 DUP9 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x140B JUMPI INVALID JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x2F17 DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F33 PUSH2 0x2F27 DUP4 PUSH2 0x2268 JUMP JUMPDEST DUP15 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2A6C JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x2F45 DUP2 DUP16 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x2161 JUMPI INVALID JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x2F51 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP POP POP PUSH1 0x1 ADD PUSH2 0x2EB0 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2F74 DUP13 DUP4 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH2 0x2D49 PUSH2 0x2F8F PUSH8 0xDE0B6B3A7640000 PUSH2 0x239C DUP5 DUP11 PUSH2 0x17B7 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x289E JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2FA3 DUP9 DUP9 PUSH2 0x163D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2FB9 DUP3 PUSH2 0x290F DUP8 PUSH2 0x27D8 DUP2 DUP12 PUSH2 0x1BBE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x2FE1 JUMPI PUSH2 0x2FD7 DUP11 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2933 JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x2FBF JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x2FF0 DUP12 DUP12 DUP6 DUP13 PUSH2 0x26E5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3003 DUP12 DUP12 DUP2 MLOAD DUP2 LT PUSH2 0x277E JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3017 DUP5 DUP14 DUP14 DUP2 MLOAD DUP2 LT PUSH2 0x298B JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3024 DUP3 PUSH2 0x2268 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3032 DUP11 DUP4 PUSH2 0x22DC JUMP JUMPDEST SWAP1 POP PUSH2 0x29D1 PUSH2 0x3040 DUP3 PUSH2 0x2268 JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x228E JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x506 DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3062 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x3075 PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST PUSH2 0x3905 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x3096 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x30B5 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3099 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x30D0 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x30DE PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x30FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x30B5 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3102 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x312E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3143 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3156 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x3905 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x316D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x506 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x31A6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5CB DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x31C3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x31CE DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x31DE DUP2 PUSH2 0x394A JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x31FD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x3208 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x3218 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3243 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH2 0x324E DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x325E DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x3281 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP7 SWAP10 SWAP6 SWAP9 POP SWAP4 SWAP7 SWAP3 SWAP6 SWAP5 PUSH1 0xA0 DUP5 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 SWAP1 SWAP4 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x32B0 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x32BB DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x32DD JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x32F3 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3306 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x3314 PUSH2 0x3070 DUP3 PUSH2 0x392B JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x3334 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x335F JUMPI DUP1 MLOAD PUSH2 0x334B DUP2 PUSH2 0x394A JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x3338 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x3376 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x3383 DUP7 DUP3 DUP8 ADD PUSH2 0x30C0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33A5 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5CB DUP2 PUSH2 0x395F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x33C1 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x395F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x33E6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP8 CALLDATALOAD SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x33F8 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD PUSH2 0x3408 DUP2 PUSH2 0x394A JUMP JUMPDEST SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x3423 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x342F DUP12 DUP4 DUP13 ADD PUSH2 0x3052 JUMP JUMPDEST SWAP6 POP PUSH1 0x80 DUP11 ADD CALLDATALOAD SWAP5 POP PUSH1 0xA0 DUP11 ADD CALLDATALOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x3452 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x345F DUP11 DUP3 DUP12 ADD PUSH2 0x311E JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x347F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x5CB JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34A7 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x394A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x34C3 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5CB DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x34E2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x34ED DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3508 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3383 DUP7 DUP3 DUP8 ADD PUSH2 0x30C0 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3526 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x3531 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x3555 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x3560 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD PUSH1 0x40 SWAP1 SWAP6 ADD MLOAD SWAP1 SWAP7 SWAP5 SWAP6 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3589 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x3594 DUP2 PUSH2 0x396D JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x35AF JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x35BB DUP6 DUP3 DUP7 ADD PUSH2 0x30C0 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x35DA JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x35F0 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP8 ADD SWAP2 POP PUSH2 0x120 DUP1 DUP4 DUP11 SUB SLT ISZERO PUSH2 0x3606 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH2 0x360F DUP2 PUSH2 0x3905 JUMP JUMPDEST SWAP1 POP PUSH2 0x361B DUP10 DUP5 PUSH2 0x3186 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x362A DUP10 PUSH1 0x20 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x363C DUP10 PUSH1 0x40 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x366C DUP10 PUSH1 0xC0 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x367E DUP10 PUSH1 0xE0 DUP6 ADD PUSH2 0x3047 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 DUP1 DUP5 ADD CALLDATALOAD DUP4 DUP2 GT ISZERO PUSH2 0x3696 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH2 0x36A2 DUP12 DUP3 DUP8 ADD PUSH2 0x311E JUMP JUMPDEST DUP3 DUP5 ADD MSTORE POP POP DUP1 SWAP7 POP POP PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x36BF JUMPI DUP4 DUP5 REVERT JUMPDEST POP PUSH2 0x36CC DUP8 DUP3 DUP9 ADD PUSH2 0x3052 JUMP JUMPDEST SWAP5 SWAP8 SWAP5 SWAP7 POP POP POP POP PUSH1 0x40 DUP4 ADD CALLDATALOAD SWAP3 PUSH1 0x60 ADD CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x36F4 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x372A JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x370E JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x379F PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x36FB JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x37B1 DUP2 DUP6 PUSH2 0x36FB JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP6 DUP7 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x20 DUP8 ADD MSTORE SWAP3 SWAP1 SWAP4 AND PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0x80 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x38AF JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x3893 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x38C0 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x38EF PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x36FB JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x3923 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x3940 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x51D JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE4 0xC2 0xDC 0xBB 0xBB 0xAE 0xEF DUP4 0xEF LOG3 0xC3 PUSH13 0xF243C46F81C40DBAF947020D33 LOG2 EXTCODESIZE 0x22 POP 0xD1 STOP 0xAD PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 POP ADDMOD EXP 0x29 0xE9 0xBF 0x1F 0xC9 0xF7 0x2A 0x4D 0xD0 0xC1 JUMPDEST JUMP DIV 0x21 DUP16 0xE7 COINBASE 0xC 0xCE SWAP14 NUMBER PUSH3 0x31FC04 0xB3 SELFBALANCE PUSH10 0xEF64736F6C6343000701 STOP CALLER ",
              "sourceMap": "914:994:35:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2066:887:32;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;1626:118:31;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1165:741:35:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1461:79:31:-;;;:::i;2066:887:32:-;2120:27;;2211:15;2254:24;2240:38;;2236:711;;;2577:11;2550:24;:38;2528:60;;1401:7;2637:46;;2236:711;;;2897:1;2875:23;;2935:1;2912:24;;2236:711;2066:887;;;:::o;1626:118:31:-;-1:-1:-1;;;;;1713:24:31;1690:4;1713:24;;;;;;;;;;;;;;1626:118::o;1165:741:35:-;1393:7;1413:27;1442:28;1474:23;:21;:23::i;:::-;1412:85;;;;1508:12;1576:10;:8;:10::i;:::-;1604:4;1626:6;1650;1674:22;1714:17;1749:19;1786:20;1824:5;1544:299;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1508:345;;1863:15;1873:4;1863:9;:15::i;:::-;1895:4;1165:741;-1:-1:-1;;;;;;;;;1165:741:35:o;1461:79:31:-;1527:6;1461:79;:::o;1851:122::-;-1:-1:-1;;;;;1903:24:31;;:18;:24;;;;;;;;;;;:31;;-1:-1:-1;;1903:31:31;1930:4;1903:31;;;1949:17;;;1903:18;1949:17;1851:122;:::o;-1:-1:-1:-;;;;;;;;:::o;5:130::-;72:20;;97:33;72:20;97:33;:::i;:::-;57:78;;;;:::o;1096:442::-;;1198:3;1191:4;1183:6;1179:17;1175:27;1165:2;;-1:-1;;1206:12;1165:2;1253:6;1240:20;8521:18;8513:6;8510:30;8507:2;;;-1:-1;;8543:12;8507:2;1275:65;8616:9;8597:17;;-1:-1;;8593:33;8684:4;8674:15;1275:65;:::i;:::-;1266:74;;1360:6;1353:5;1346:21;1464:3;8684:4;1455:6;1388;1446:16;;1443:25;1440:2;;;1481:1;;1471:12;1440:2;10827:6;8684:4;1388:6;1384:17;8684:4;1422:5;1418:16;10804:30;10883:1;10865:16;;;8684:4;10865:16;10858:27;1422:5;1158:380;-1:-1;;1158:380::o;1683:241::-;;1787:2;1775:9;1766:7;1762:23;1758:32;1755:2;;;-1:-1;;1793:12;1755:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;1845:63;1749:175;-1:-1;;;1749:175::o;1931:1247::-;;;;;;;2180:3;2168:9;2159:7;2155:23;2151:33;2148:2;;;-1:-1;;2187:12;2148:2;2245:17;2232:31;2283:18;;2275:6;2272:30;2269:2;;;-1:-1;;2305:12;2269:2;2335:63;2390:7;2381:6;2370:9;2366:22;2335:63;:::i;:::-;2325:73;;2463:2;;;;2452:9;2448:18;2435:32;2283:18;2479:6;2476:30;2473:2;;;-1:-1;;2509:12;2473:2;2539:63;2594:7;2585:6;2574:9;2570:22;2539:63;:::i;:::-;2529:73;;;2667:2;2656:9;2652:18;2639:32;2283:18;2683:6;2680:30;2677:2;;;-1:-1;;2713:12;2677:2;2804:22;;293:4;281:17;;277:27;-1:-1;267:2;;-1:-1;;308:12;267:2;355:6;342:20;2283:18;8217:6;8214:30;8211:2;;;-1:-1;;8247:12;8211:2;2463;8284:6;8280:17;;;377:95;2463:2;8280:17;8345:15;377:95;:::i;:::-;500:21;;;557:14;;;;532:17;;;637:27;;;;;634:36;-1:-1;631:2;;;-1:-1;;673:12;631:2;-1:-1;699:10;;693:221;718:6;715:1;712:13;693:221;;;798:52;846:3;834:10;798:52;:::i;:::-;786:65;;740:1;733:9;;;;;865:14;;;;893;;693:221;;;-1:-1;2733:103;-1:-1;;;;2873:2;2912:22;;1613:20;;-1:-1;;;2981:3;3021:22;;1613:20;;-1:-1;3109:53;3154:7;3090:3;3130:22;;3109:53;:::i;:::-;3099:63;;2142:1036;;;;;;;;:::o;3397:113::-;-1:-1;;;;;10021:54;3468:37;;3462:48::o;4758:347::-;;4903:5;8997:12;9428:6;9423:3;9416:19;-1:-1;10972:101;10986:6;10983:1;10980:13;10972:101;;;9465:4;11053:11;;;;;11047:18;11034:11;;;;;11027:39;11001:10;10972:101;;;11088:6;11085:1;11082:13;11079:2;;;-1:-1;9465:4;11144:6;9460:3;11135:16;;11128:27;11079:2;-1:-1;8616:9;11244:14;-1:-1;;11240:28;5061:39;;;;9465:4;5061:39;;4850:255;-1:-1;;4850:255::o;5232:222::-;-1:-1;;;;;10021:54;;;;3468:37;;5359:2;5344:18;;5330:124::o;5461:210::-;9820:13;;9813:21;4394:34;;5582:2;5567:18;;5553:118::o;5939:1502::-;-1:-1;;;;;10021:54;;4516:65;;6411:3;6546:2;6531:18;;;6524:48;;;5939:1502;;6411:3;6586:78;6396:19;;;6650:6;6586:78;:::i;:::-;6578:86;;6712:9;6706:4;6702:20;6697:2;6686:9;6682:18;6675:48;6737:78;6810:4;6801:6;6737:78;:::i;:::-;6853:20;;;6848:2;6833:18;;6826:48;8997:12;;9416:19;;;8836:14;;;;-1:-1;9456:14;;;;-1:-1;4009:290;4034:6;4031:1;4028:13;4009:290;;;10260:52;4101:6;4095:13;10260:52;:::i;:::-;4516:65;;9271:14;;;;3369;;;;4056:1;4049:9;4009:290;;;4013:14;;6880:131;;;;;;5213:5;7090:3;7079:9;7075:19;5183:37;5213:5;7174:3;7163:9;7159:19;5183:37;5213:5;7258:3;7247:9;7243:19;5183:37;5213:5;7342:3;7331:9;7327:19;5183:37;7358:73;7426:3;7415:9;7411:19;7402:6;7358:73;:::i;:::-;6382:1059;;;;;;;;;;;;:::o;7448:333::-;5183:37;;;7767:2;7752:18;;5183:37;7603:2;7588:18;;7574:207::o;7788:256::-;7850:2;7844:9;7876:17;;;7951:18;7936:34;;7972:22;;;7933:62;7930:2;;;8008:1;;7998:12;7930:2;7850;8017:22;7828:216;;-1:-1;7828:216::o;9656:91::-;-1:-1;;;;;10021:54;;9701:46::o;11281:117::-;-1:-1;;;;;10021:54;;11340:35;;11330:2;;11389:1;;11379:12;11330:2;11324:74;:::o"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "3954800",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "create(string,string,address[],uint256,uint256,address)": "infinite",
                "getPauseConfiguration()": "infinite",
                "getVault()": "infinite",
                "isPoolFromFactory(address)": "1279"
              }
            },
            "methodIdentifiers": {
              "create(string,string,address[],uint256,uint256,address)": "7932c7f3",
              "getPauseConfiguration()": "2da47c40",
              "getVault()": "8d928af8",
              "isPoolFromFactory(address)": "6634b753"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVault\",\"name\":\"vault\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"PoolCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"amplificationParameter\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"create\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPauseConfiguration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pauseWindowDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"isPoolFromFactory\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"create(string,string,address[],uint256,uint256,address)\":{\"details\":\"Deploys a new `StablePool`.\"},\"getPauseConfiguration()\":{\"details\":\"Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this factory. `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable.\"},\"getVault()\":{\"details\":\"Returns the Vault's address.\"},\"isPoolFromFactory(address)\":{\"details\":\"Returns true if `pool` was created by this factory.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/stable/StablePoolFactory.sol\":\"StablePoolFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IGeneralPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseGeneralPool is IGeneralPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            IVault.PoolSpecialization.GENERAL,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external view virtual override returns (uint256) {\\n        _validateIndexes(indexIn, indexOut, _getTotalTokens());\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        return\\n            swapRequest.kind == IVault.SwapKind.GIVEN_IN\\n                ? _swapGivenIn(swapRequest, balances, indexIn, indexOut, scalingFactors)\\n                : _swapGivenOut(swapRequest, balances, indexIn, indexOut, scalingFactors);\\n    }\\n\\n    function _swapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n        swapRequest.amount = _subtractSwapFeeAmount(swapRequest.amount);\\n\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexIn]);\\n\\n        uint256 amountOut = _onSwapGivenIn(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountOut tokens are exiting the Pool, so we round down.\\n        return _downscaleDown(amountOut, scalingFactors[indexOut]);\\n    }\\n\\n    function _swapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexOut]);\\n\\n        uint256 amountIn = _onSwapGivenOut(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountIn tokens are entering the Pool, so we round up.\\n        amountIn = _downscaleUp(amountIn, scalingFactors[indexIn]);\\n\\n        // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n        return _addSwapFeeAmount(amountIn);\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled. The swap fee has already been deducted from\\n     * `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    function _validateIndexes(\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256 limit\\n    ) private pure {\\n        _require(indexIn < limit && indexOut < limit, Errors.OUT_OF_BOUNDS);\\n    }\\n}\\n\",\"keccak256\":\"0x5d7c075a9885e120f7bb1844efe6d20b118840f04e359ce25ea1d9f14af647a8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/factories/BasePoolFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../vault/interfaces/IVault.sol\\\";\\nimport \\\"../../vault/interfaces/IBasePool.sol\\\";\\n\\n/**\\n * @dev Base contract for Pool factories.\\n *\\n * Pools are deployed from factories to allow third parties to reason about them. Unknown Pools may have arbitrary\\n * logic: being able to assert that a Pool's behavior follows certain rules (those imposed by the contracts created by\\n * the factory) is very powerful.\\n */\\nabstract contract BasePoolFactory {\\n    IVault private immutable _vault;\\n    mapping(address => bool) private _isPoolFromFactory;\\n\\n    event PoolCreated(address indexed pool);\\n\\n    constructor(IVault vault) {\\n        _vault = vault;\\n    }\\n\\n    /**\\n     * @dev Returns the Vault's address.\\n     */\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    /**\\n     * @dev Returns true if `pool` was created by this factory.\\n     */\\n    function isPoolFromFactory(address pool) external view returns (bool) {\\n        return _isPoolFromFactory[pool];\\n    }\\n\\n    /**\\n     * @dev Registers a new created pool.\\n     *\\n     * Emits a `PoolCreated` event.\\n     */\\n    function _register(address pool) internal {\\n        _isPoolFromFactory[pool] = true;\\n        emit PoolCreated(pool);\\n    }\\n}\\n\",\"keccak256\":\"0xed4f6356224bb6c41649e51d8b6af0f826d487c1ff5380f6d51f128202a3a3cf\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/factories/FactoryWidePauseWindow.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @dev Utility to create Pool factories for Pools that use the `TemporarilyPausable` contract.\\n *\\n * By calling `TemporarilyPausable`'s constructor with the result of `getPauseConfiguration`, all Pools created by this\\n * factory will share the same Pause Window end time, after which both old and new Pools will not be pausable.\\n */\\ncontract FactoryWidePauseWindow {\\n    // This contract relies on timestamps in a similar way as `TemporarilyPausable` does - the same caveats apply.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _INITIAL_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _BUFFER_PERIOD_DURATION = 30 days;\\n\\n    // Time when the pause window for all created Pools expires, and the pause window duration of new Pools becomes\\n    // zero.\\n    uint256 private immutable _poolsPauseWindowEndTime;\\n\\n    constructor() {\\n        _poolsPauseWindowEndTime = block.timestamp + _INITIAL_PAUSE_WINDOW_DURATION;\\n    }\\n\\n    /**\\n     * @dev Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this\\n     * factory.\\n     *\\n     * `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and\\n     * `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable.\\n     */\\n    function getPauseConfiguration() public view returns (uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        uint256 currentTime = block.timestamp;\\n        if (currentTime < _poolsPauseWindowEndTime) {\\n            // The buffer period is always the same since its duration is related to how much time is needed to respond\\n            // to a potential emergency. The Pause Window duration however decreases as the end time approaches.\\n\\n            pauseWindowDuration = _poolsPauseWindowEndTime - currentTime; // No need for checked arithmetic.\\n            bufferPeriodDuration = _BUFFER_PERIOD_DURATION;\\n        } else {\\n            // After the end time, newly created Pools have no Pause Window, nor Buffer Period (since they are not\\n            // pausable in the first place).\\n\\n            pauseWindowDuration = 0;\\n            bufferPeriodDuration = 0;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x7d764b70fdb9f4d2b07f2914ff5deec66f1bc193741017afef2fa14be57dc4ef\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\n\\n// This is a contract to emulate file-level functions. Convert to a library\\n// after the migration to solc v0.7.1.\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable var-name-mixedcase\\n\\ncontract StableMath {\\n    using FixedPoint for uint256;\\n\\n    uint256 internal constant _MIN_AMP = 1e18;\\n    uint256 internal constant _MAX_AMP = 5000 * (1e18);\\n\\n    uint256 internal constant _MAX_STABLE_TOKENS = 5;\\n\\n    // Computes the invariant given the current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calculateInvariant(uint256 amplificationParameter, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256)\\n    {\\n        /**********************************************************************************************\\n        // invariant                                                                                 //\\n        // D = invariant                                                  D^(n+1)                    //\\n        // A = amplification coefficient      A  n^n S + D = A D n^n + -----------                   //\\n        // S = sum of balances                                             n^n P                     //\\n        // P = product of balances                                                                   //\\n        // n = number of tokens                                                                      //\\n        *********x************************************************************************************/\\n\\n        // We round up the invariant.\\n\\n        uint256 sum = 0;\\n        uint256 numTokens = balances.length;\\n        for (uint256 i = 0; i < numTokens; i++) {\\n            sum = sum.add(balances[i]);\\n        }\\n        if (sum == 0) {\\n            return 0;\\n        }\\n        uint256 prevInvariant = 0;\\n        uint256 invariant = sum;\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, numTokens);\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            uint256 P_D = Math.mul(numTokens, balances[0]);\\n            for (uint256 j = 1; j < numTokens; j++) {\\n                P_D = Math.divUp(Math.mul(Math.mul(P_D, balances[j]), numTokens), invariant);\\n            }\\n            prevInvariant = invariant;\\n            invariant = Math.divUp(\\n                Math.mul(Math.mul(numTokens, invariant), invariant).add(Math.mul(Math.mul(ampTimesTotal, sum), P_D)),\\n                Math.mul(numTokens.add(1), invariant).add(Math.mul(ampTimesTotal.sub(1), P_D))\\n            );\\n\\n            if (invariant > prevInvariant) {\\n                if (invariant.sub(prevInvariant) <= 1) {\\n                    break;\\n                }\\n            } else if (prevInvariant.sub(invariant) <= 1) {\\n                break;\\n            }\\n        }\\n        return invariant;\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `tokenAmountIn` are sent, given the current balances.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcOutGivenIn(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountIn\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // outGivenIn token x for y - polynomial equation to solve                                                   //\\n        // ay = amount out to calculate                                                                              //\\n        // by = balance token out                                                                                    //\\n        // y = by - ay (finalBalanceOut)                                                                             //\\n        // D = invariant                                               D                     D^(n+1)                 //\\n        // A = amplification coefficient               y^2 + ( S - ----------  - D) * y -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but y                                                                           //\\n        // P = product of final balances but y                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].add(tokenAmountIn);\\n\\n        uint256 finalBalanceOut = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexOut\\n        );\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].sub(tokenAmountIn);\\n\\n        return balances[tokenIndexOut].sub(finalBalanceOut).sub(1);\\n    }\\n\\n    // Computes how many tokens must be sent to a pool if `tokenAmountOut` are sent given the\\n    // current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcInGivenOut(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountOut\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // inGivenOut token x for y - polynomial equation to solve                                                   //\\n        // ax = amount in to calculate                                                                               //\\n        // bx = balance token in                                                                                     //\\n        // x = bx + ax (finalBalanceIn)                                                                              //\\n        // D = invariant                                                D                     D^(n+1)                //\\n        // A = amplification coefficient               x^2 + ( S - ----------  - D) * x -  ------------- = 0         //\\n        // n = number of tokens                                     (A * n^n)               A * n^2n * P             //\\n        // S = sum of final balances but x                                                                           //\\n        // P = product of final balances but x                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].sub(tokenAmountOut);\\n\\n        uint256 finalBalanceIn = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexIn\\n        );\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].add(tokenAmountOut);\\n\\n        return finalBalanceIn.sub(balances[tokenIndexIn]).add(1);\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountsTokenIn -> amountsInProportional ->\\n    amountsInPercentageExcess -> amountsInAfterFee -> newInvariant -> amountBPTOut\\n    TODO: remove equations below and save them to Notion documentation\\n    amountInPercentageExcess = 1 - amountInProportional/amountIn (if amountIn>amountInProportional)\\n    amountInAfterFee = amountIn * (1 - swapFeePercentage * amountInPercentageExcess)\\n    amountInAfterFee = amountIn - fee amount\\n    fee amount = (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn - (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn * (1 - (1 - amountInProportional/amountIn) * swapFeePercentage)\\n    amountInAfterFee = amountIn * (1 - amountInPercentageExcess * swapFeePercentage)\\n    */\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        // Get current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token, relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsIn.length);\\n        // The weighted sum of token balance ratios without fee\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divDown(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulDown(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Percentage of the amount supplied that will be implicitly swapped for other tokens in the pool\\n            uint256 tokenBalancePercentageExcess;\\n            // Some tokens might have amounts supplied in excess of a 'balanced' join: these are identified if\\n            // the token's balance ratio without fee is larger than the weighted balance ratio, and swap fees are\\n            // charged on the swap amount\\n            if (weightedBalanceRatio >= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = tokenBalanceRatiosWithoutFee[i].sub(weightedBalanceRatio).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].sub(FixedPoint.ONE)\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountInAfterFee = amountsIn[i].mulDown(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].add(amountInAfterFee);\\n        }\\n\\n        // get the new invariant, taking swap fees into account\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTOut\\n        return bptTotalSupply.mulDown(newInvariant.divDown(currentInvariant).sub(FixedPoint.ONE));\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTOut -> newInvariant -> (amountInProportional, amountInAfterFee) ->\\n    amountInPercentageExcess -> amountIn\\n    */\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Token in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // Calculate new invariant\\n        uint256 newInvariant = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountInAfterFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountInAfterFee = newBalanceTokenIndex.sub(balances[tokenIndex]);\\n\\n        // Get tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountInAfterFee.divUp(swapFeeExcess.complement());\\n    }\\n\\n    /*\\n    Flow of calculations:\\n    amountsTokenOut -> amountsOutProportional ->\\n    amountOutPercentageExcess -> amountOutBeforeFee -> newInvariant -> amountBPTIn\\n    */\\n    function _calcBptInGivenExactTokensOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divUp(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulUp(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 tokenBalancePercentageExcess;\\n            // Compare each tokenBalanceRatioWithoutFee to the total weighted ratio (weightedBalanceRatio), and\\n            // decrease the fee by the excess amount\\n            if (weightedBalanceRatio <= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = weightedBalanceRatio.sub(tokenBalanceRatiosWithoutFee[i]).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].complement()\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFee.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountOutBeforeFee = amountsOut[i].divUp(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].sub(amountOutBeforeFee);\\n        }\\n\\n        // get the new invariant, taking into account swap fees\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTIn\\n        return bptTotalSupply.mulUp(newInvariant.divUp(currentInvariant).complement());\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTin -> newInvariant -> (amountOutProportional, amountOutBeforeFee) ->\\n    amountOutPercentageExcess -> amountOut\\n    */\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n        // Calculate the new invariant\\n        uint256 newInvariant = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountOutBeforeFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountOutBeforeFee = balances[tokenIndex].sub(newBalanceTokenIndex);\\n\\n        // Calculate tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountOutBeforeFee.mulDown(swapFeeExcess.complement());\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = tokenAmountOut             /        bptIn         \\\\                                  //\\n        // b = tokenBalance      a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\     bptTotalSupply    /                                 //\\n        // bpt = bptTotalSupply                                                                      //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(bptTotalSupply);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 lastInvariant,\\n        uint256 tokenIndex,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // oneTokenSwapFee - polynomial equation to solve                                                            //\\n        // af = fee amount to calculate in one token                                                                 //\\n        // bf = balance of fee token                                                                                 //\\n        // f = bf - af (finalBalanceFeeToken)                                                                        //\\n        // D = old invariant                                            D                     D^(n+1)                //\\n        // A = amplification coefficient               f^2 + ( S - ----------  - D) * f -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but f                                                                           //\\n        // P = product of final balances but f                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Protocol swap fee amount, so we round down overall.\\n\\n        uint256 finalBalanceFeeToken = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            lastInvariant,\\n            tokenIndex\\n        );\\n\\n        // Result is rounded down\\n        uint256 accumulatedTokenSwapFees = balances[tokenIndex] > finalBalanceFeeToken\\n            ? balances[tokenIndex].sub(finalBalanceFeeToken)\\n            : 0;\\n        return accumulatedTokenSwapFees.mulDown(protocolSwapFeePercentage).divDown(FixedPoint.ONE);\\n    }\\n\\n    // Private functions\\n\\n    // This function calculates the balance of a given token (tokenIndex)\\n    // given all the other balances and the invariant\\n    function _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 invariant,\\n        uint256 tokenIndex\\n    ) private pure returns (uint256) {\\n        // Rounds result up overall\\n\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, balances.length);\\n        uint256 sum = balances[0];\\n        uint256 P_D = Math.mul(balances.length, balances[0]);\\n        for (uint256 j = 1; j < balances.length; j++) {\\n            P_D = Math.divDown(Math.mul(Math.mul(P_D, balances[j]), balances.length), invariant);\\n            sum = sum.add(balances[j]);\\n        }\\n        sum = sum.sub(balances[tokenIndex]);\\n\\n        uint256 c = Math.divUp(Math.mul(invariant, invariant), ampTimesTotal);\\n        // We remove the balance fromm c by multiplying it\\n        c = c.mulUp(balances[tokenIndex]).divUp(P_D);\\n\\n        uint256 b = sum.add(invariant.divDown(ampTimesTotal));\\n\\n        // We iterate to find the balance\\n        uint256 prevTokenBalance = 0;\\n        // We multiply the first iteration outside the loop with the invariant to set the value of the\\n        // initial approximation.\\n        uint256 tokenBalance = invariant.mulUp(invariant).add(c).divUp(invariant.add(b));\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            prevTokenBalance = tokenBalance;\\n\\n            tokenBalance = tokenBalance.mulUp(tokenBalance).add(c).divUp(\\n                Math.mul(tokenBalance, 2).add(b).sub(invariant)\\n            );\\n\\n            if (tokenBalance > prevTokenBalance) {\\n                if (tokenBalance.sub(prevTokenBalance) <= 1) {\\n                    break;\\n                }\\n            } else if (prevTokenBalance.sub(tokenBalance) <= 1) {\\n                break;\\n            }\\n        }\\n        return tokenBalance;\\n    }\\n}\\n\",\"keccak256\":\"0x74dc5f28798be90708c30ce59d65de8a99128e642c1ed554248807ac3aaecae8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\nimport \\\"../BaseGeneralPool.sol\\\";\\n\\nimport \\\"./StableMath.sol\\\";\\nimport \\\"./StablePoolUserDataHelpers.sol\\\";\\n\\ncontract StablePool is BaseGeneralPool, StableMath {\\n    using FixedPoint for uint256;\\n    using StablePoolUserDataHelpers for bytes;\\n\\n    uint256 private immutable _amplificationParameter;\\n\\n    uint256 private _lastInvariant;\\n\\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\\n\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 amplificationParameter,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BaseGeneralPool(\\n            vault,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        _require(amplificationParameter >= _MIN_AMP, Errors.MIN_AMP);\\n        _require(amplificationParameter <= _MAX_AMP, Errors.MAX_AMP);\\n\\n        _require(tokens.length <= _MAX_STABLE_TOKENS, Errors.MAX_STABLE_TOKENS);\\n\\n        _amplificationParameter = amplificationParameter;\\n    }\\n\\n    function getAmplificationParameter() external view returns (uint256) {\\n        return _amplificationParameter;\\n    }\\n\\n    // Base Pool handlers\\n\\n    // Swap\\n\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        uint256 amountOut = StableMath._calcOutGivenIn(\\n            _amplificationParameter,\\n            balances,\\n            indexIn,\\n            indexOut,\\n            swapRequest.amount\\n        );\\n\\n        return amountOut;\\n    }\\n\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        uint256 amountIn = StableMath._calcInGivenOut(\\n            _amplificationParameter,\\n            balances,\\n            indexIn,\\n            indexOut,\\n            swapRequest.amount\\n        );\\n\\n        return amountIn;\\n    }\\n\\n    // Initialize\\n\\n    function _onInitializePool(\\n        bytes32,\\n        address,\\n        address,\\n        bytes memory userData\\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\\n        StablePool.JoinKind kind = userData.joinKind();\\n        _require(kind == StablePool.JoinKind.INIT, Errors.UNINITIALIZED);\\n\\n        uint256[] memory amountsIn = userData.initialAmountsIn();\\n        InputHelpers.ensureInputLengthMatch(amountsIn.length, _getTotalTokens());\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 invariantAfterJoin = StableMath._calculateInvariant(_amplificationParameter, amountsIn);\\n        uint256 bptAmountOut = invariantAfterJoin;\\n\\n        _lastInvariant = invariantAfterJoin;\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Join\\n\\n    function _onJoinPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        whenNotPaused\\n        returns (\\n            uint256,\\n            uint256[] memory,\\n            uint256[] memory\\n        )\\n    {\\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas to\\n        // calculate the fee amounts during each individual swap.\\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n            balances,\\n            _lastInvariant,\\n            protocolSwapFeePercentage\\n        );\\n\\n        // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\\n        // function returns.\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\\n        }\\n\\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn);\\n\\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doJoin(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        JoinKind kind = userData.joinKind();\\n\\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\\n            return _joinExactTokensInForBPTOut(balances, userData);\\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\\n            return _joinTokenInForExactBPTOut(balances, userData);\\n        } else {\\n            _revert(Errors.UNHANDLED_JOIN_KIND);\\n        }\\n    }\\n\\n    function _joinExactTokensInForBPTOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 bptAmountOut = StableMath._calcBptOutGivenExactTokensIn(\\n            _amplificationParameter,\\n            balances,\\n            amountsIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    function _joinTokenInForExactBPTOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\\n\\n        uint256 amountIn = StableMath._calcTokenInGivenExactBptOut(\\n            _amplificationParameter,\\n            balances,\\n            tokenIndex,\\n            bptAmountOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        // We are joining with a single token, so initialize downscaledAmountsIn with zeros, and\\n        // only set downscaledAmountsIn[tokenIndex]\\n        uint256[] memory downscaledAmountsIn = new uint256[](_getTotalTokens());\\n        downscaledAmountsIn[tokenIndex] = amountIn;\\n\\n        return (bptAmountOut, downscaledAmountsIn);\\n    }\\n\\n    // Exit\\n\\n    function _onExitPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        if (_isNotPaused()) {\\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\\n            // spending gas calculating fee amounts during each individual swap\\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(balances, _lastInvariant, protocolSwapFeePercentage);\\n\\n            // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\\n            // function returns.\\n            for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n                balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\\n            }\\n        } else {\\n            // To avoid extra calculations, swap protocol fee amounts are not charged when the contract is paused.\\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n        }\\n\\n        (bptAmountIn, amountsOut) = _doExit(balances, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterExit(balances, amountsOut);\\n\\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doExit(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        ExitKind kind = userData.exitKind();\\n\\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\\n            return _exitExactBPTInForTokenOut(balances, userData);\\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\\n            return _exitExactBPTInForTokensOut(balances, userData);\\n        } else {\\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\\n            return _exitBPTInForExactTokensOut(balances, userData);\\n        }\\n    }\\n\\n    function _exitExactBPTInForTokenOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        whenNotPaused\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is disabled if the contract is paused.\\n        uint256 totalTokens = _getTotalTokens();\\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\\n        _require(tokenIndex < totalTokens, Errors.OUT_OF_BOUNDS);\\n\\n        // We exit in a single token, so initialize amountsOut with zeros and only set amountsOut[tokenIndex]\\n        uint256[] memory amountsOut = new uint256[](totalTokens);\\n\\n        amountsOut[tokenIndex] = StableMath._calcTokenOutGivenExactBptIn(\\n            _amplificationParameter,\\n            balances,\\n            tokenIndex,\\n            bptAmountIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\\n        // This particular exit function is the only one that remains available because it is the simplest one, and\\n        // therefore the one with the lowest likelihood of errors.\\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\\n\\n        uint256[] memory amountsOut = StableMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitBPTInForExactTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        whenNotPaused\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\\n\\n        _upscaleArray(amountsOut, _scalingFactors());\\n\\n        uint256 bptAmountIn = StableMath._calcBptInGivenExactTokensOut(\\n            _amplificationParameter,\\n            balances,\\n            amountsOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    // Helpers\\n\\n    function _getDueProtocolFeeAmounts(\\n        uint256[] memory balances,\\n        uint256 previousInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) private view returns (uint256[] memory) {\\n        // Initialize with zeros\\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n\\n        // Early exit if there is no protocol swap fee\\n        if (protocolSwapFeePercentage == 0) {\\n            return dueProtocolFeeAmounts;\\n        }\\n\\n        // Instead of paying the protocol swap fee in all tokens proportionally, we will pay it in a single one. This\\n        // will reduce gas costs for single asset joins and exits, as at most only two Pool balances will change (the\\n        // token joined/exited, and the token in which fees will be paid).\\n\\n        // The protocol fee is charged using the token with the highest balance in the pool.\\n        uint256 chosenTokenIndex = 0;\\n        uint256 maxBalance = balances[0];\\n        for (uint256 i = 1; i < _getTotalTokens(); ++i) {\\n            uint256 currentBalance = balances[i];\\n            if (currentBalance > maxBalance) {\\n                chosenTokenIndex = i;\\n                maxBalance = currentBalance;\\n            }\\n        }\\n\\n        // Set the fee amount to pay in the selected token\\n        dueProtocolFeeAmounts[chosenTokenIndex] = StableMath._calcDueTokenProtocolSwapFeeAmount(\\n            _amplificationParameter,\\n            balances,\\n            previousInvariant,\\n            chosenTokenIndex,\\n            protocolSwapFeePercentage\\n        );\\n\\n        return dueProtocolFeeAmounts;\\n    }\\n\\n    function _invariantAfterJoin(uint256[] memory balances, uint256[] memory amountsIn) private view returns (uint256) {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].add(amountsIn[i]);\\n        }\\n\\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\\n    }\\n\\n    function _invariantAfterExit(uint256[] memory balances, uint256[] memory amountsOut)\\n        private\\n        view\\n        returns (uint256)\\n    {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].sub(amountsOut[i]);\\n        }\\n\\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\\n    }\\n\\n    /**\\n     * @dev This function returns the appreciation of one BPT relative to the\\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\\n     */\\n    function getRate() public view returns (uint256) {\\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\\n        return StableMath._calculateInvariant(_amplificationParameter, balances).divDown(totalSupply());\\n    }\\n}\\n\",\"keccak256\":\"0x30dc67f7ae8053481e9a8ee13c1caef632eb88667393374ce961e4ba870055db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePoolFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../vault/interfaces/IVault.sol\\\";\\n\\nimport \\\"../factories/BasePoolFactory.sol\\\";\\nimport \\\"../factories/FactoryWidePauseWindow.sol\\\";\\n\\nimport \\\"./StablePool.sol\\\";\\n\\ncontract StablePoolFactory is BasePoolFactory, FactoryWidePauseWindow {\\n    constructor(IVault vault) BasePoolFactory(vault) {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    /**\\n     * @dev Deploys a new `StablePool`.\\n     */\\n    function create(\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 amplificationParameter,\\n        uint256 swapFeePercentage,\\n        address owner\\n    ) external returns (address) {\\n        (uint256 pauseWindowDuration, uint256 bufferPeriodDuration) = getPauseConfiguration();\\n\\n        address pool = address(\\n            new StablePool(\\n                getVault(),\\n                name,\\n                symbol,\\n                tokens,\\n                amplificationParameter,\\n                swapFeePercentage,\\n                pauseWindowDuration,\\n                bufferPeriodDuration,\\n                owner\\n            )\\n        );\\n        _register(pool);\\n        return pool;\\n    }\\n}\\n\",\"keccak256\":\"0xe63f12fd808ca9728633707a6c1032e6ff1bcf1c8bde63527bdbaffa7a1faf55\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./StablePool.sol\\\";\\n\\nlibrary StablePoolUserDataHelpers {\\n    function joinKind(bytes memory self) internal pure returns (StablePool.JoinKind) {\\n        return abi.decode(self, (StablePool.JoinKind));\\n    }\\n\\n    function exitKind(bytes memory self) internal pure returns (StablePool.ExitKind) {\\n        return abi.decode(self, (StablePool.ExitKind));\\n    }\\n\\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\\n        (, amountsIn) = abi.decode(self, (StablePool.JoinKind, uint256[]));\\n    }\\n\\n    function exactTokensInForBptOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountIn)\\n    {\\n        (, amountsIn, minBPTAmountIn) = abi.decode(self, (StablePool.JoinKind, uint256[], uint256));\\n    }\\n\\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (StablePool.JoinKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (StablePool.ExitKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\\n        (, bptAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256));\\n    }\\n\\n    function bptInForExactTokensOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\\n    {\\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256[], uint256));\\n    }\\n}\\n\",\"keccak256\":\"0xc098d1ec4fc41f10ec46a12dbf0bd5e1ffca9cafcbf4f8fa3b3815fd837d4f8d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev IPools with the General specialization setting should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\\n * grant to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IGeneralPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7f11733a5cd8f81c123c02f79d94ead7b65217021ebddafda10e796a25e1ef41\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 8042,
                "contract": "src.sol/amm/pools/stable/StablePoolFactory.sol:StablePoolFactory",
                "label": "_isPoolFromFactory",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_bool)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol": {
        "StablePoolUserDataHelpers": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122053b8d912117c5427aa2f8fac44e4de4e911445e893d08edc7420f57fb9e856de64736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MSTORE8 0xB8 0xD9 SLT GT PUSH29 0x5427AA2F8FAC44E4DE4E911445E893D08EDC7420F57FB9E856DE64736F PUSH13 0x63430007010033000000000000 ",
              "sourceMap": "786:1693:36:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122053b8d912117c5427aa2f8fac44e4de4e911445e893d08edc7420f57fb9e856de64736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MSTORE8 0xB8 0xD9 SLT GT PUSH29 0x5427AA2F8FAC44E4DE4E911445E893D08EDC7420F57FB9E856DE64736F PUSH13 0x63430007010033000000000000 ",
              "sourceMap": "786:1693:36:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "bptInForExactTokensOut(bytes memory)": "infinite",
                "exactBptInForTokenOut(bytes memory)": "infinite",
                "exactBptInForTokensOut(bytes memory)": "infinite",
                "exactTokensInForBptOut(bytes memory)": "infinite",
                "exitKind(bytes memory)": "infinite",
                "initialAmountsIn(bytes memory)": "infinite",
                "joinKind(bytes memory)": "infinite",
                "tokenInForExactBptOut(bytes memory)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol\":\"StablePoolUserDataHelpers\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IGeneralPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseGeneralPool is IGeneralPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            IVault.PoolSpecialization.GENERAL,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external view virtual override returns (uint256) {\\n        _validateIndexes(indexIn, indexOut, _getTotalTokens());\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        return\\n            swapRequest.kind == IVault.SwapKind.GIVEN_IN\\n                ? _swapGivenIn(swapRequest, balances, indexIn, indexOut, scalingFactors)\\n                : _swapGivenOut(swapRequest, balances, indexIn, indexOut, scalingFactors);\\n    }\\n\\n    function _swapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n        swapRequest.amount = _subtractSwapFeeAmount(swapRequest.amount);\\n\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexIn]);\\n\\n        uint256 amountOut = _onSwapGivenIn(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountOut tokens are exiting the Pool, so we round down.\\n        return _downscaleDown(amountOut, scalingFactors[indexOut]);\\n    }\\n\\n    function _swapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256[] memory scalingFactors\\n    ) internal view returns (uint256) {\\n        _upscaleArray(balances, scalingFactors);\\n        swapRequest.amount = _upscale(swapRequest.amount, scalingFactors[indexOut]);\\n\\n        uint256 amountIn = _onSwapGivenOut(swapRequest, balances, indexIn, indexOut);\\n\\n        // amountIn tokens are entering the Pool, so we round up.\\n        amountIn = _downscaleUp(amountIn, scalingFactors[indexIn]);\\n\\n        // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n        return _addSwapFeeAmount(amountIn);\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled. The swap fee has already been deducted from\\n     * `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest` and `balances` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual returns (uint256);\\n\\n    function _validateIndexes(\\n        uint256 indexIn,\\n        uint256 indexOut,\\n        uint256 limit\\n    ) private pure {\\n        _require(indexIn < limit && indexOut < limit, Errors.OUT_OF_BOUNDS);\\n    }\\n}\\n\",\"keccak256\":\"0x5d7c075a9885e120f7bb1844efe6d20b118840f04e359ce25ea1d9f14af647a8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\n\\n// This is a contract to emulate file-level functions. Convert to a library\\n// after the migration to solc v0.7.1.\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable var-name-mixedcase\\n\\ncontract StableMath {\\n    using FixedPoint for uint256;\\n\\n    uint256 internal constant _MIN_AMP = 1e18;\\n    uint256 internal constant _MAX_AMP = 5000 * (1e18);\\n\\n    uint256 internal constant _MAX_STABLE_TOKENS = 5;\\n\\n    // Computes the invariant given the current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calculateInvariant(uint256 amplificationParameter, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256)\\n    {\\n        /**********************************************************************************************\\n        // invariant                                                                                 //\\n        // D = invariant                                                  D^(n+1)                    //\\n        // A = amplification coefficient      A  n^n S + D = A D n^n + -----------                   //\\n        // S = sum of balances                                             n^n P                     //\\n        // P = product of balances                                                                   //\\n        // n = number of tokens                                                                      //\\n        *********x************************************************************************************/\\n\\n        // We round up the invariant.\\n\\n        uint256 sum = 0;\\n        uint256 numTokens = balances.length;\\n        for (uint256 i = 0; i < numTokens; i++) {\\n            sum = sum.add(balances[i]);\\n        }\\n        if (sum == 0) {\\n            return 0;\\n        }\\n        uint256 prevInvariant = 0;\\n        uint256 invariant = sum;\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, numTokens);\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            uint256 P_D = Math.mul(numTokens, balances[0]);\\n            for (uint256 j = 1; j < numTokens; j++) {\\n                P_D = Math.divUp(Math.mul(Math.mul(P_D, balances[j]), numTokens), invariant);\\n            }\\n            prevInvariant = invariant;\\n            invariant = Math.divUp(\\n                Math.mul(Math.mul(numTokens, invariant), invariant).add(Math.mul(Math.mul(ampTimesTotal, sum), P_D)),\\n                Math.mul(numTokens.add(1), invariant).add(Math.mul(ampTimesTotal.sub(1), P_D))\\n            );\\n\\n            if (invariant > prevInvariant) {\\n                if (invariant.sub(prevInvariant) <= 1) {\\n                    break;\\n                }\\n            } else if (prevInvariant.sub(invariant) <= 1) {\\n                break;\\n            }\\n        }\\n        return invariant;\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `tokenAmountIn` are sent, given the current balances.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcOutGivenIn(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountIn\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // outGivenIn token x for y - polynomial equation to solve                                                   //\\n        // ay = amount out to calculate                                                                              //\\n        // by = balance token out                                                                                    //\\n        // y = by - ay (finalBalanceOut)                                                                             //\\n        // D = invariant                                               D                     D^(n+1)                 //\\n        // A = amplification coefficient               y^2 + ( S - ----------  - D) * y -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but y                                                                           //\\n        // P = product of final balances but y                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].add(tokenAmountIn);\\n\\n        uint256 finalBalanceOut = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexOut\\n        );\\n\\n        balances[tokenIndexIn] = balances[tokenIndexIn].sub(tokenAmountIn);\\n\\n        return balances[tokenIndexOut].sub(finalBalanceOut).sub(1);\\n    }\\n\\n    // Computes how many tokens must be sent to a pool if `tokenAmountOut` are sent given the\\n    // current balances, using the Newton-Raphson approximation.\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcInGivenOut(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 tokenIndexIn,\\n        uint256 tokenIndexOut,\\n        uint256 tokenAmountOut\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // inGivenOut token x for y - polynomial equation to solve                                                   //\\n        // ax = amount in to calculate                                                                               //\\n        // bx = balance token in                                                                                     //\\n        // x = bx + ax (finalBalanceIn)                                                                              //\\n        // D = invariant                                                D                     D^(n+1)                //\\n        // A = amplification coefficient               x^2 + ( S - ----------  - D) * x -  ------------- = 0         //\\n        // n = number of tokens                                     (A * n^n)               A * n^2n * P             //\\n        // S = sum of final balances but x                                                                           //\\n        // P = product of final balances but x                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        uint256 invariant = _calculateInvariant(amplificationParameter, balances);\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].sub(tokenAmountOut);\\n\\n        uint256 finalBalanceIn = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            invariant,\\n            tokenIndexIn\\n        );\\n\\n        balances[tokenIndexOut] = balances[tokenIndexOut].add(tokenAmountOut);\\n\\n        return finalBalanceIn.sub(balances[tokenIndexIn]).add(1);\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountsTokenIn -> amountsInProportional ->\\n    amountsInPercentageExcess -> amountsInAfterFee -> newInvariant -> amountBPTOut\\n    TODO: remove equations below and save them to Notion documentation\\n    amountInPercentageExcess = 1 - amountInProportional/amountIn (if amountIn>amountInProportional)\\n    amountInAfterFee = amountIn * (1 - swapFeePercentage * amountInPercentageExcess)\\n    amountInAfterFee = amountIn - fee amount\\n    fee amount = (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn - (amountIn - amountInProportional) * swapFeePercentage\\n    amountInAfterFee = amountIn * (1 - (1 - amountInProportional/amountIn) * swapFeePercentage)\\n    amountInAfterFee = amountIn * (1 - amountInPercentageExcess * swapFeePercentage)\\n    */\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        // Get current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token, relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsIn.length);\\n        // The weighted sum of token balance ratios without fee\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divDown(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulDown(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Percentage of the amount supplied that will be implicitly swapped for other tokens in the pool\\n            uint256 tokenBalancePercentageExcess;\\n            // Some tokens might have amounts supplied in excess of a 'balanced' join: these are identified if\\n            // the token's balance ratio without fee is larger than the weighted balance ratio, and swap fees are\\n            // charged on the swap amount\\n            if (weightedBalanceRatio >= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = tokenBalanceRatiosWithoutFee[i].sub(weightedBalanceRatio).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].sub(FixedPoint.ONE)\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountInAfterFee = amountsIn[i].mulDown(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].add(amountInAfterFee);\\n        }\\n\\n        // get the new invariant, taking swap fees into account\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTOut\\n        return bptTotalSupply.mulDown(newInvariant.divDown(currentInvariant).sub(FixedPoint.ONE));\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTOut -> newInvariant -> (amountInProportional, amountInAfterFee) ->\\n    amountInPercentageExcess -> amountIn\\n    */\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Token in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // Calculate new invariant\\n        uint256 newInvariant = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountInAfterFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountInAfterFee = newBalanceTokenIndex.sub(balances[tokenIndex]);\\n\\n        // Get tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountInAfterFee.divUp(swapFeeExcess.complement());\\n    }\\n\\n    /*\\n    Flow of calculations:\\n    amountsTokenOut -> amountsOutProportional ->\\n    amountOutPercentageExcess -> amountOutBeforeFee -> newInvariant -> amountBPTIn\\n    */\\n    function _calcBptInGivenExactTokensOut(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n\\n        // First loop calculates the sum of all token balances, which will be used to calculate\\n        // the current weights of each token relative to this sum\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // Calculate the weighted balance ratio without considering fees\\n        uint256[] memory tokenBalanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 weightedBalanceRatio = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 currentWeight = balances[i].divUp(sumBalances);\\n            tokenBalanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            weightedBalanceRatio = weightedBalanceRatio.add(tokenBalanceRatiosWithoutFee[i].mulUp(currentWeight));\\n        }\\n\\n        // Second loop calculates new amounts in, taking into account the fee on the percentage excess\\n        uint256[] memory newBalances = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 tokenBalancePercentageExcess;\\n            // Compare each tokenBalanceRatioWithoutFee to the total weighted ratio (weightedBalanceRatio), and\\n            // decrease the fee by the excess amount\\n            if (weightedBalanceRatio <= tokenBalanceRatiosWithoutFee[i]) {\\n                tokenBalancePercentageExcess = 0;\\n            } else {\\n                tokenBalancePercentageExcess = weightedBalanceRatio.sub(tokenBalanceRatiosWithoutFee[i]).divUp(\\n                    tokenBalanceRatiosWithoutFee[i].complement()\\n                );\\n            }\\n\\n            uint256 swapFeeExcess = swapFee.mulUp(tokenBalancePercentageExcess);\\n\\n            uint256 amountOutBeforeFee = amountsOut[i].divUp(swapFeeExcess.complement());\\n\\n            newBalances[i] = balances[i].sub(amountOutBeforeFee);\\n        }\\n\\n        // get the new invariant, taking into account swap fees\\n        uint256 newInvariant = _calculateInvariant(amp, newBalances);\\n\\n        // return amountBPTIn\\n        return bptTotalSupply.mulUp(newInvariant.divUp(currentInvariant).complement());\\n    }\\n\\n    /*\\n    TODO: document it correctly\\n    Flow of calculations:\\n    amountBPTin -> newInvariant -> (amountOutProportional, amountOutBeforeFee) ->\\n    amountOutPercentageExcess -> amountOut\\n    */\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 amp,\\n        uint256[] memory balances,\\n        uint256 tokenIndex,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFeePercentage\\n    ) internal pure returns (uint256) {\\n        // Get the current invariant\\n        uint256 currentInvariant = _calculateInvariant(amp, balances);\\n        // Calculate the new invariant\\n        uint256 newInvariant = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply).mulUp(currentInvariant);\\n\\n        // First calculate the sum of all token balances, which will be used to calculate\\n        // the current weight of each token\\n        uint256 sumBalances = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            sumBalances = sumBalances.add(balances[i]);\\n        }\\n\\n        // get amountOutBeforeFee\\n        uint256 newBalanceTokenIndex = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amp,\\n            balances,\\n            newInvariant,\\n            tokenIndex\\n        );\\n        uint256 amountOutBeforeFee = balances[tokenIndex].sub(newBalanceTokenIndex);\\n\\n        // Calculate tokenBalancePercentageExcess\\n        uint256 currentWeight = balances[tokenIndex].divDown(sumBalances);\\n        uint256 tokenBalancePercentageExcess = currentWeight.complement();\\n\\n        uint256 swapFeeExcess = swapFeePercentage.mulUp(tokenBalancePercentageExcess);\\n\\n        return amountOutBeforeFee.mulDown(swapFeeExcess.complement());\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = tokenAmountOut             /        bptIn         \\\\                                  //\\n        // b = tokenBalance      a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\     bptTotalSupply    /                                 //\\n        // bpt = bptTotalSupply                                                                      //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(bptTotalSupply);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    // The amplification parameter equals: A n^(n-1)\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 lastInvariant,\\n        uint256 tokenIndex,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /**************************************************************************************************************\\n        // oneTokenSwapFee - polynomial equation to solve                                                            //\\n        // af = fee amount to calculate in one token                                                                 //\\n        // bf = balance of fee token                                                                                 //\\n        // f = bf - af (finalBalanceFeeToken)                                                                        //\\n        // D = old invariant                                            D                     D^(n+1)                //\\n        // A = amplification coefficient               f^2 + ( S - ----------  - D) * f -  ------------- = 0         //\\n        // n = number of tokens                                    (A * n^n)               A * n^2n * P              //\\n        // S = sum of final balances but f                                                                           //\\n        // P = product of final balances but f                                                                       //\\n        **************************************************************************************************************/\\n\\n        // Protocol swap fee amount, so we round down overall.\\n\\n        uint256 finalBalanceFeeToken = _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n            amplificationParameter,\\n            balances,\\n            lastInvariant,\\n            tokenIndex\\n        );\\n\\n        // Result is rounded down\\n        uint256 accumulatedTokenSwapFees = balances[tokenIndex] > finalBalanceFeeToken\\n            ? balances[tokenIndex].sub(finalBalanceFeeToken)\\n            : 0;\\n        return accumulatedTokenSwapFees.mulDown(protocolSwapFeePercentage).divDown(FixedPoint.ONE);\\n    }\\n\\n    // Private functions\\n\\n    // This function calculates the balance of a given token (tokenIndex)\\n    // given all the other balances and the invariant\\n    function _getTokenBalanceGivenInvariantAndAllOtherBalances(\\n        uint256 amplificationParameter,\\n        uint256[] memory balances,\\n        uint256 invariant,\\n        uint256 tokenIndex\\n    ) private pure returns (uint256) {\\n        // Rounds result up overall\\n\\n        uint256 ampTimesTotal = Math.mul(amplificationParameter, balances.length);\\n        uint256 sum = balances[0];\\n        uint256 P_D = Math.mul(balances.length, balances[0]);\\n        for (uint256 j = 1; j < balances.length; j++) {\\n            P_D = Math.divDown(Math.mul(Math.mul(P_D, balances[j]), balances.length), invariant);\\n            sum = sum.add(balances[j]);\\n        }\\n        sum = sum.sub(balances[tokenIndex]);\\n\\n        uint256 c = Math.divUp(Math.mul(invariant, invariant), ampTimesTotal);\\n        // We remove the balance fromm c by multiplying it\\n        c = c.mulUp(balances[tokenIndex]).divUp(P_D);\\n\\n        uint256 b = sum.add(invariant.divDown(ampTimesTotal));\\n\\n        // We iterate to find the balance\\n        uint256 prevTokenBalance = 0;\\n        // We multiply the first iteration outside the loop with the invariant to set the value of the\\n        // initial approximation.\\n        uint256 tokenBalance = invariant.mulUp(invariant).add(c).divUp(invariant.add(b));\\n\\n        for (uint256 i = 0; i < 255; i++) {\\n            prevTokenBalance = tokenBalance;\\n\\n            tokenBalance = tokenBalance.mulUp(tokenBalance).add(c).divUp(\\n                Math.mul(tokenBalance, 2).add(b).sub(invariant)\\n            );\\n\\n            if (tokenBalance > prevTokenBalance) {\\n                if (tokenBalance.sub(prevTokenBalance) <= 1) {\\n                    break;\\n                }\\n            } else if (prevTokenBalance.sub(tokenBalance) <= 1) {\\n                break;\\n            }\\n        }\\n        return tokenBalance;\\n    }\\n}\\n\",\"keccak256\":\"0x74dc5f28798be90708c30ce59d65de8a99128e642c1ed554248807ac3aaecae8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\nimport \\\"../BaseGeneralPool.sol\\\";\\n\\nimport \\\"./StableMath.sol\\\";\\nimport \\\"./StablePoolUserDataHelpers.sol\\\";\\n\\ncontract StablePool is BaseGeneralPool, StableMath {\\n    using FixedPoint for uint256;\\n    using StablePoolUserDataHelpers for bytes;\\n\\n    uint256 private immutable _amplificationParameter;\\n\\n    uint256 private _lastInvariant;\\n\\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\\n\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 amplificationParameter,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BaseGeneralPool(\\n            vault,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        _require(amplificationParameter >= _MIN_AMP, Errors.MIN_AMP);\\n        _require(amplificationParameter <= _MAX_AMP, Errors.MAX_AMP);\\n\\n        _require(tokens.length <= _MAX_STABLE_TOKENS, Errors.MAX_STABLE_TOKENS);\\n\\n        _amplificationParameter = amplificationParameter;\\n    }\\n\\n    function getAmplificationParameter() external view returns (uint256) {\\n        return _amplificationParameter;\\n    }\\n\\n    // Base Pool handlers\\n\\n    // Swap\\n\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        uint256 amountOut = StableMath._calcOutGivenIn(\\n            _amplificationParameter,\\n            balances,\\n            indexIn,\\n            indexOut,\\n            swapRequest.amount\\n        );\\n\\n        return amountOut;\\n    }\\n\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        uint256 amountIn = StableMath._calcInGivenOut(\\n            _amplificationParameter,\\n            balances,\\n            indexIn,\\n            indexOut,\\n            swapRequest.amount\\n        );\\n\\n        return amountIn;\\n    }\\n\\n    // Initialize\\n\\n    function _onInitializePool(\\n        bytes32,\\n        address,\\n        address,\\n        bytes memory userData\\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\\n        StablePool.JoinKind kind = userData.joinKind();\\n        _require(kind == StablePool.JoinKind.INIT, Errors.UNINITIALIZED);\\n\\n        uint256[] memory amountsIn = userData.initialAmountsIn();\\n        InputHelpers.ensureInputLengthMatch(amountsIn.length, _getTotalTokens());\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 invariantAfterJoin = StableMath._calculateInvariant(_amplificationParameter, amountsIn);\\n        uint256 bptAmountOut = invariantAfterJoin;\\n\\n        _lastInvariant = invariantAfterJoin;\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Join\\n\\n    function _onJoinPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        whenNotPaused\\n        returns (\\n            uint256,\\n            uint256[] memory,\\n            uint256[] memory\\n        )\\n    {\\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas to\\n        // calculate the fee amounts during each individual swap.\\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n            balances,\\n            _lastInvariant,\\n            protocolSwapFeePercentage\\n        );\\n\\n        // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\\n        // function returns.\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\\n        }\\n\\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn);\\n\\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doJoin(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        JoinKind kind = userData.joinKind();\\n\\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\\n            return _joinExactTokensInForBPTOut(balances, userData);\\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\\n            return _joinTokenInForExactBPTOut(balances, userData);\\n        } else {\\n            _revert(Errors.UNHANDLED_JOIN_KIND);\\n        }\\n    }\\n\\n    function _joinExactTokensInForBPTOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 bptAmountOut = StableMath._calcBptOutGivenExactTokensIn(\\n            _amplificationParameter,\\n            balances,\\n            amountsIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    function _joinTokenInForExactBPTOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\\n\\n        uint256 amountIn = StableMath._calcTokenInGivenExactBptOut(\\n            _amplificationParameter,\\n            balances,\\n            tokenIndex,\\n            bptAmountOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        // We are joining with a single token, so initialize downscaledAmountsIn with zeros, and\\n        // only set downscaledAmountsIn[tokenIndex]\\n        uint256[] memory downscaledAmountsIn = new uint256[](_getTotalTokens());\\n        downscaledAmountsIn[tokenIndex] = amountIn;\\n\\n        return (bptAmountOut, downscaledAmountsIn);\\n    }\\n\\n    // Exit\\n\\n    function _onExitPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        if (_isNotPaused()) {\\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\\n            // spending gas calculating fee amounts during each individual swap\\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(balances, _lastInvariant, protocolSwapFeePercentage);\\n\\n            // Update the balances by subtracting the protocol fee amounts that will be charged by the Vault once this\\n            // function returns.\\n            for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n                balances[i] = balances[i].sub(dueProtocolFeeAmounts[i]);\\n            }\\n        } else {\\n            // To avoid extra calculations, swap protocol fee amounts are not charged when the contract is paused.\\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n        }\\n\\n        (bptAmountIn, amountsOut) = _doExit(balances, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterExit(balances, amountsOut);\\n\\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doExit(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        ExitKind kind = userData.exitKind();\\n\\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\\n            return _exitExactBPTInForTokenOut(balances, userData);\\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\\n            return _exitExactBPTInForTokensOut(balances, userData);\\n        } else {\\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\\n            return _exitBPTInForExactTokensOut(balances, userData);\\n        }\\n    }\\n\\n    function _exitExactBPTInForTokenOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        whenNotPaused\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is disabled if the contract is paused.\\n        uint256 totalTokens = _getTotalTokens();\\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\\n        _require(tokenIndex < totalTokens, Errors.OUT_OF_BOUNDS);\\n\\n        // We exit in a single token, so initialize amountsOut with zeros and only set amountsOut[tokenIndex]\\n        uint256[] memory amountsOut = new uint256[](totalTokens);\\n\\n        amountsOut[tokenIndex] = StableMath._calcTokenOutGivenExactBptIn(\\n            _amplificationParameter,\\n            balances,\\n            tokenIndex,\\n            bptAmountIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\\n        // This particular exit function is the only one that remains available because it is the simplest one, and\\n        // therefore the one with the lowest likelihood of errors.\\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\\n\\n        uint256[] memory amountsOut = StableMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitBPTInForExactTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        whenNotPaused\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\\n\\n        _upscaleArray(amountsOut, _scalingFactors());\\n\\n        uint256 bptAmountIn = StableMath._calcBptInGivenExactTokensOut(\\n            _amplificationParameter,\\n            balances,\\n            amountsOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    // Helpers\\n\\n    function _getDueProtocolFeeAmounts(\\n        uint256[] memory balances,\\n        uint256 previousInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) private view returns (uint256[] memory) {\\n        // Initialize with zeros\\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n\\n        // Early exit if there is no protocol swap fee\\n        if (protocolSwapFeePercentage == 0) {\\n            return dueProtocolFeeAmounts;\\n        }\\n\\n        // Instead of paying the protocol swap fee in all tokens proportionally, we will pay it in a single one. This\\n        // will reduce gas costs for single asset joins and exits, as at most only two Pool balances will change (the\\n        // token joined/exited, and the token in which fees will be paid).\\n\\n        // The protocol fee is charged using the token with the highest balance in the pool.\\n        uint256 chosenTokenIndex = 0;\\n        uint256 maxBalance = balances[0];\\n        for (uint256 i = 1; i < _getTotalTokens(); ++i) {\\n            uint256 currentBalance = balances[i];\\n            if (currentBalance > maxBalance) {\\n                chosenTokenIndex = i;\\n                maxBalance = currentBalance;\\n            }\\n        }\\n\\n        // Set the fee amount to pay in the selected token\\n        dueProtocolFeeAmounts[chosenTokenIndex] = StableMath._calcDueTokenProtocolSwapFeeAmount(\\n            _amplificationParameter,\\n            balances,\\n            previousInvariant,\\n            chosenTokenIndex,\\n            protocolSwapFeePercentage\\n        );\\n\\n        return dueProtocolFeeAmounts;\\n    }\\n\\n    function _invariantAfterJoin(uint256[] memory balances, uint256[] memory amountsIn) private view returns (uint256) {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].add(amountsIn[i]);\\n        }\\n\\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\\n    }\\n\\n    function _invariantAfterExit(uint256[] memory balances, uint256[] memory amountsOut)\\n        private\\n        view\\n        returns (uint256)\\n    {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            balances[i] = balances[i].sub(amountsOut[i]);\\n        }\\n\\n        return StableMath._calculateInvariant(_amplificationParameter, balances);\\n    }\\n\\n    /**\\n     * @dev This function returns the appreciation of one BPT relative to the\\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\\n     */\\n    function getRate() public view returns (uint256) {\\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\\n        return StableMath._calculateInvariant(_amplificationParameter, balances).divDown(totalSupply());\\n    }\\n}\\n\",\"keccak256\":\"0x30dc67f7ae8053481e9a8ee13c1caef632eb88667393374ce961e4ba870055db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./StablePool.sol\\\";\\n\\nlibrary StablePoolUserDataHelpers {\\n    function joinKind(bytes memory self) internal pure returns (StablePool.JoinKind) {\\n        return abi.decode(self, (StablePool.JoinKind));\\n    }\\n\\n    function exitKind(bytes memory self) internal pure returns (StablePool.ExitKind) {\\n        return abi.decode(self, (StablePool.ExitKind));\\n    }\\n\\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\\n        (, amountsIn) = abi.decode(self, (StablePool.JoinKind, uint256[]));\\n    }\\n\\n    function exactTokensInForBptOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountIn)\\n    {\\n        (, amountsIn, minBPTAmountIn) = abi.decode(self, (StablePool.JoinKind, uint256[], uint256));\\n    }\\n\\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (StablePool.JoinKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (StablePool.ExitKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\\n        (, bptAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256));\\n    }\\n\\n    function bptInForExactTokensOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\\n    {\\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (StablePool.ExitKind, uint256[], uint256));\\n    }\\n}\\n\",\"keccak256\":\"0xc098d1ec4fc41f10ec46a12dbf0bd5e1ffca9cafcbf4f8fa3b3815fd837d4f8d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev IPools with the General specialization setting should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\\n * grant to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IGeneralPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7f11733a5cd8f81c123c02f79d94ead7b65217021ebddafda10e796a25e1ef41\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/weighted/WeightedMath.sol": {
        "WeightedMath": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220463d1a0c8d5caa57cc2768140d1e3ad36ba5eb9711c0fa83aff6a9db8670e3ed64736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x3F DUP1 PUSH1 0x1D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CHAINID RETURNDATASIZE BYTE 0xC DUP14 0x5C 0xAA JUMPI 0xCC 0x27 PUSH9 0x140D1E3AD36BA5EB97 GT 0xC0 STATICCALL DUP4 0xAF 0xF6 0xA9 0xDB DUP7 PUSH17 0xE3ED64736F6C6343000701003300000000 ",
              "sourceMap": "888:18049:37:-:0;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "6080604052600080fdfea2646970667358221220463d1a0c8d5caa57cc2768140d1e3ad36ba5eb9711c0fa83aff6a9db8670e3ed64736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CHAINID RETURNDATASIZE BYTE 0xC DUP14 0x5C 0xAA JUMPI 0xCC 0x27 PUSH9 0x140D1E3AD36BA5EB97 GT 0xC0 STATICCALL DUP4 0xAF 0xF6 0xA9 0xDB DUP7 PUSH17 0xE3ED64736F6C6343000701003300000000 ",
              "sourceMap": "888:18049:37:-:0;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "12600",
                "executionCost": "66",
                "totalCost": "12666"
              },
              "internal": {
                "_calcBptInGivenExactTokensOut(uint256[] memory,uint256[] memory,uint256[] memory,uint256,uint256)": "infinite",
                "_calcBptOutGivenExactTokensIn(uint256[] memory,uint256[] memory,uint256[] memory,uint256,uint256)": "infinite",
                "_calcDueTokenProtocolSwapFeeAmount(uint256,uint256,uint256,uint256,uint256)": "infinite",
                "_calcInGivenOut(uint256,uint256,uint256,uint256,uint256)": "infinite",
                "_calcOutGivenIn(uint256,uint256,uint256,uint256,uint256)": "infinite",
                "_calcTokenInGivenExactBptOut(uint256,uint256,uint256,uint256,uint256)": "infinite",
                "_calcTokenOutGivenExactBptIn(uint256,uint256,uint256,uint256,uint256)": "infinite",
                "_calcTokensOutGivenExactBptIn(uint256[] memory,uint256,uint256)": "infinite",
                "_calculateInvariant(uint256[] memory,uint256[] memory)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/weighted/WeightedMath.sol\":\"WeightedMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/pools/weighted/WeightedMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\ncontract WeightedMath {\\n    using FixedPoint for uint256;\\n    // A minimum normalized weight imposes a maximum weight ratio. We need this due to limitations in the\\n    // implementation of the power function, as these ratios are often exponents.\\n    uint256 internal constant _MIN_WEIGHT = 0.01e18;\\n    // Having a minimum normalized weight imposes a limit on the maximum number of tokens;\\n    // i.e., the largest possible pool is one where all tokens have exactly the minimum weight.\\n    uint256 internal constant _MAX_WEIGHTED_TOKENS = 100;\\n\\n    // Pool limits that arise from limitations in the fixed point power function (and the imposed 1:100 maximum weight\\n    // ratio).\\n\\n    // Swap limits: amounts swapped may not be larger than this percentage of total balance.\\n    uint256 internal constant _MAX_IN_RATIO = 0.3e18;\\n    uint256 internal constant _MAX_OUT_RATIO = 0.3e18;\\n\\n    // Invariant growth limit: non-proportional joins cannot cause the invariant to increase by more than this ratio.\\n    uint256 internal constant _MAX_INVARIANT_RATIO = 3e18;\\n    // Invariant shrink limit: non-proportional exits cannot cause the invariant to decrease by less than this ratio.\\n    uint256 internal constant _MIN_INVARIANT_RATIO = 0.7e18;\\n\\n    // Invariant is used to collect protocol swap fees by comparing its value between two times.\\n    // So we can round always to the same direction. It is also used to initiate the BPT amount\\n    // and, because there is a minimum BPT, we round down the invariant.\\n    function _calculateInvariant(uint256[] memory normalizedWeights, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256 invariant)\\n    {\\n        /**********************************************************************************************\\n        // invariant               _____                                                             //\\n        // wi = weight index i      | |      wi                                                      //\\n        // bi = balance index i     | |  bi ^   = i                                                  //\\n        // i = invariant                                                                             //\\n        **********************************************************************************************/\\n\\n        invariant = FixedPoint.ONE;\\n        for (uint256 i = 0; i < normalizedWeights.length; i++) {\\n            invariant = invariant.mulDown(balances[i].powDown(normalizedWeights[i]));\\n        }\\n\\n        _require(invariant > 0, Errors.ZERO_INVARIANT);\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `amountIn` are sent, given the\\n    // current balances and weights.\\n    function _calcOutGivenIn(\\n        uint256 balanceIn,\\n        uint256 weightIn,\\n        uint256 balanceOut,\\n        uint256 weightOut,\\n        uint256 amountIn\\n    ) internal pure returns (uint256) {\\n        /**********************************************************************************************\\n        // outGivenIn                                                                                //\\n        // aO = amountOut                                                                            //\\n        // bO = balanceOut                                                                           //\\n        // bI = balanceIn              /      /            bI             \\\\    (wI / wO) \\\\           //\\n        // aI = amountIn    aO = bO * |  1 - | --------------------------  | ^            |          //\\n        // wI = weightIn               \\\\      \\\\       ( bI + aI )         /              /           //\\n        // wO = weightOut                                                                            //\\n        **********************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        // The multiplication rounds down, and the subtrahend (power) rounds up (so the base rounds up too).\\n        // Because bI / (bI + aI) <= 1, the exponent rounds down.\\n\\n        // Cannot exceed maximum in ratio\\n        _require(amountIn <= balanceIn.mulDown(_MAX_IN_RATIO), Errors.MAX_IN_RATIO);\\n\\n        uint256 denominator = balanceIn.add(amountIn);\\n        uint256 base = balanceIn.divUp(denominator);\\n        uint256 exponent = weightIn.divDown(weightOut);\\n        uint256 power = base.powUp(exponent);\\n\\n        return balanceOut.mulDown(power.complement());\\n    }\\n\\n    // Computes how many tokens must be sent to a pool in order to take `amountOut`, given the\\n    // current balances and weights.\\n    function _calcInGivenOut(\\n        uint256 balanceIn,\\n        uint256 weightIn,\\n        uint256 balanceOut,\\n        uint256 weightOut,\\n        uint256 amountOut\\n    ) internal pure returns (uint256) {\\n        /**********************************************************************************************\\n        // inGivenOut                                                                                //\\n        // aO = amountOut                                                                            //\\n        // bO = balanceOut                                                                           //\\n        // bI = balanceIn              /  /            bO             \\\\    (wO / wI)      \\\\          //\\n        // aI = amountIn    aI = bI * |  | --------------------------  | ^            - 1  |         //\\n        // wI = weightIn               \\\\  \\\\       ( bO - aO )         /                   /          //\\n        // wO = weightOut                                                                            //\\n        **********************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        // The multiplication rounds up, and the power rounds up (so the base rounds up too).\\n        // Because b0 / (b0 - a0) >= 1, the exponent rounds up.\\n\\n        // Cannot exceed maximum out ratio\\n        _require(amountOut <= balanceOut.mulDown(_MAX_OUT_RATIO), Errors.MAX_OUT_RATIO);\\n\\n        uint256 base = balanceOut.divUp(balanceOut.sub(amountOut));\\n        uint256 exponent = weightOut.divUp(weightIn);\\n        uint256 power = base.powUp(exponent);\\n\\n        // Because the base is larger than one (and the power rounds up), the power should always be larger than one, so\\n        // the following subtraction should never revert.\\n        uint256 ratio = power.sub(FixedPoint.ONE);\\n\\n        return balanceIn.mulUp(ratio);\\n    }\\n\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        uint256[] memory balanceRatiosWithFee = new uint256[](amountsIn.length);\\n\\n        uint256 invariantRatioWithFees = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            balanceRatiosWithFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            invariantRatioWithFees = invariantRatioWithFees.add(balanceRatiosWithFee[i].mulDown(normalizedWeights[i]));\\n        }\\n\\n        uint256 invariantRatio = FixedPoint.ONE;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 amountInWithoutFee;\\n\\n            if (balanceRatiosWithFee[i] > invariantRatioWithFees) {\\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithFees.sub(FixedPoint.ONE));\\n                uint256 taxableAmount = amountsIn[i].sub(nonTaxableAmount);\\n                amountInWithoutFee = nonTaxableAmount.add(taxableAmount.mulDown(FixedPoint.ONE.sub(swapFee)));\\n            } else {\\n                amountInWithoutFee = amountsIn[i];\\n            }\\n\\n            uint256 balanceRatio = balances[i].add(amountInWithoutFee).divDown(balances[i]);\\n\\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\\n        }\\n\\n        if (invariantRatio >= FixedPoint.ONE) {\\n            return bptTotalSupply.mulDown(invariantRatio.sub(FixedPoint.ONE));\\n        } else {\\n            return 0;\\n        }\\n    }\\n\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        /******************************************************************************************\\n        // tokenInForExactBPTOut                                                                 //\\n        // a = amountIn                                                                          //\\n        // b = balance                      /  /    totalBPT + bptOut      \\\\    (1 / w)       \\\\  //\\n        // bptOut = bptAmountOut   a = b * |  | --------------------------  | ^          - 1  |  //\\n        // bpt = totalBPT                   \\\\  \\\\       totalBPT            /                  /  //\\n        // w = weight                                                                            //\\n        ******************************************************************************************/\\n\\n        // Token in, so we round up overall.\\n\\n        // Calculate the factor by which the invariant will increase after minting BPTAmountOut\\n        uint256 invariantRatio = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply);\\n        _require(invariantRatio <= _MAX_INVARIANT_RATIO, Errors.MAX_OUT_BPT_FOR_TOKEN_IN);\\n\\n        // Calculate by how much the token balance has to increase to match the invariantRatio\\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divUp(normalizedWeight));\\n\\n        uint256 amountInWithoutFee = balance.mulUp(balanceRatio.sub(FixedPoint.ONE));\\n\\n        // We can now compute how much extra balance is being deposited and used in virtual swaps, and charge swap fees\\n        // accordingly.\\n        uint256 taxablePercentage = normalizedWeight.complement();\\n        uint256 taxableAmount = amountInWithoutFee.mulUp(taxablePercentage);\\n        uint256 nonTaxableAmount = amountInWithoutFee.sub(taxableAmount);\\n\\n        return nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\\n    }\\n\\n    function _calcBptInGivenExactTokensOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        uint256[] memory balanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 invariantRatioWithoutFees = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            balanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            invariantRatioWithoutFees = invariantRatioWithoutFees.add(\\n                balanceRatiosWithoutFee[i].mulUp(normalizedWeights[i])\\n            );\\n        }\\n\\n        uint256 invariantRatio = FixedPoint.ONE;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Swap fees are typically charged on 'token in', but there is no 'token in' here,\\n            // o we apply it to 'token out'.\\n            // This results in slightly larger price impact.\\n\\n            uint256 amountOutWithFee;\\n            if (invariantRatioWithoutFees > balanceRatiosWithoutFee[i]) {\\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithoutFees.complement());\\n                uint256 taxableAmount = amountsOut[i].sub(nonTaxableAmount);\\n\\n                amountOutWithFee = nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\\n            } else {\\n                amountOutWithFee = amountsOut[i];\\n            }\\n\\n            uint256 balanceRatio = balances[i].sub(amountOutWithFee).divDown(balances[i]);\\n\\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\\n        }\\n\\n        return bptTotalSupply.mulUp(invariantRatio.complement());\\n    }\\n\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        /*****************************************************************************************\\n        // exactBPTInForTokenOut                                                                //\\n        // a = amountOut                                                                        //\\n        // b = balance                     /      /    totalBPT - bptIn       \\\\    (1 / w)  \\\\   //\\n        // bptIn = bptAmountIn    a = b * |  1 - | --------------------------  | ^           |  //\\n        // bpt = totalBPT                  \\\\      \\\\       totalBPT            /             /   //\\n        // w = weight                                                                           //\\n        *****************************************************************************************/\\n\\n        // Token out, so we round down overall. The multiplication rounds down, but the power rounds up (so the base\\n        // rounds up). Because (totalBPT - bptIn) / totalBPT <= 1, the exponent rounds down.\\n\\n        // Calculate the factor by which the invariant will decrease after burning BPTAmountIn\\n        uint256 invariantRatio = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply);\\n        _require(invariantRatio >= _MIN_INVARIANT_RATIO, Errors.MIN_BPT_IN_FOR_TOKEN_OUT);\\n\\n        // Calculate by how much the token balance has to decrease to match invariantRatio\\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divDown(normalizedWeight));\\n\\n        // Because of rounding up, balanceRatio can be greater than one. Using complement prevents reverts.\\n        uint256 amountOutWithoutFee = balance.mulDown(balanceRatio.complement());\\n\\n        // We can now compute how much excess balance is being withdrawn as a result of the virtual swaps, which result\\n        // in swap fees.\\n        uint256 taxablePercentage = normalizedWeight.complement();\\n\\n        // Swap fees are typically charged on 'token in', but there is no 'token in' here, so we apply it\\n        // to 'token out'. This results in slightly larger price impact. Fees are rounded up.\\n        uint256 taxableAmount = amountOutWithoutFee.mulUp(taxablePercentage);\\n        uint256 nonTaxableAmount = amountOutWithoutFee.sub(taxableAmount);\\n\\n        return nonTaxableAmount.add(taxableAmount.mulDown(swapFee.complement()));\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 totalBPT\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = amountOut                  /        bptIn         \\\\                                  //\\n        // b = balance           a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\       totalBPT       /                                  //\\n        // bpt = totalBPT                                                                            //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(totalBPT);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 previousInvariant,\\n        uint256 currentInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /*********************************************************************************\\n        /*  protocolSwapFeePercentage * balanceToken * ( 1 - (previousInvariant / currentInvariant) ^ (1 / weightToken))\\n        *********************************************************************************/\\n\\n        if (currentInvariant <= previousInvariant) {\\n            // This shouldn't happen outside of rounding errors, but have this safeguard nonetheless to prevent the Pool\\n            // from entering a locked state in which joins and exits revert while computing accumulated swap fees.\\n            return 0;\\n        }\\n\\n        // We round down to prevent issues in the Pool's accounting, even if it means paying slightly less in protocol\\n        // fees to the Vault.\\n\\n        // Fee percentage and balance multiplications round down, while the subtrahend (power) rounds up (as does the\\n        // base). Because previousInvariant / currentInvariant <= 1, the exponent rounds down.\\n\\n        uint256 base = previousInvariant.divUp(currentInvariant);\\n        uint256 exponent = FixedPoint.ONE.divDown(normalizedWeight);\\n\\n        // Because the exponent is larger than one, the base of the power function has a lower bound. We cap to this\\n        // value to avoid numeric issues, which means in the extreme case (where the invariant growth is larger than\\n        // 1 / min exponent) the Pool will pay less in protocol fees than it should.\\n        base = Math.max(base, FixedPoint.MIN_POW_BASE_FREE_EXPONENT);\\n\\n        uint256 power = base.powUp(exponent);\\n\\n        uint256 tokenAccruedFees = balance.mulDown(power.complement());\\n        return tokenAccruedFees.mulDown(protocolSwapFeePercentage);\\n    }\\n}\\n\",\"keccak256\":\"0xb7b712312afa0000d491862a7e50e1d6814a18e92ca16897baaa412ef5aff138\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/weighted/WeightedPool.sol": {
        "WeightedPool": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "contract IVault",
                  "name": "vault",
                  "type": "address"
                },
                {
                  "internalType": "string",
                  "name": "name",
                  "type": "string"
                },
                {
                  "internalType": "string",
                  "name": "symbol",
                  "type": "string"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "normalizedWeights",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowDuration",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodDuration",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "SwapFeeChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "DOMAIN_SEPARATOR",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "decimals",
              "outputs": [
                {
                  "internalType": "uint8",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "pure",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "decreaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getInvariant",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getLastInvariant",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getNormalizedWeights",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getOwner",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPoolId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getRate",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getSwapFeePercentage",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getVault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "increaseApproval",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "name",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "nonces",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onExitPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onJoinPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "lastChangeBlock",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "from",
                      "type": "address"
                    },
                    {
                      "internalType": "address",
                      "name": "to",
                      "type": "address"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IPoolSwapStructs.SwapRequest",
                  "name": "request",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "balanceTokenIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "balanceTokenOut",
                  "type": "uint256"
                }
              ],
              "name": "onSwap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                },
                {
                  "internalType": "uint8",
                  "name": "v",
                  "type": "uint8"
                },
                {
                  "internalType": "bytes32",
                  "name": "r",
                  "type": "bytes32"
                },
                {
                  "internalType": "bytes32",
                  "name": "s",
                  "type": "bytes32"
                }
              ],
              "name": "permit",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryExit",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "queryJoin",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "bptOut",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "setSwapFeePercentage",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "symbol",
              "outputs": [
                {
                  "internalType": "string",
                  "name": "",
                  "type": "string"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "DOMAIN_SEPARATOR()": {
                "details": "Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}."
              },
              "allowance(address,address)": {
                "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
              },
              "approve(address,uint256)": {
                "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
              },
              "balanceOf(address)": {
                "details": "Returns the amount of tokens owned by `account`."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getInvariant()": {
                "details": "Returns the current value of the invariant."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getRate()": {
                "details": "This function returns the appreciation of one BPT relative to the underlying tokens. This starts at 1 when the pool is created and grows over time"
              },
              "nonces(address)": {
                "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times."
              },
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares."
              },
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares."
              },
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
                "details": "Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]."
              },
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction."
              },
              "totalSupply()": {
                "details": "Returns the amount of tokens in existence."
              },
              "transfer(address,uint256)": {
                "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              },
              "transferFrom(address,address,uint256)": {
                "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "6105006040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b506040516200583f3803806200583f8339810160408190526200005a9162000caa565b88888888878787878785516002146200007557600162000078565b60025b6040805180820190915260018152603160f81b6020808301918252336080526001600160601b0319606087901b1660a0528b51908c0190812060c0529151902060e0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6101005289518a918a918a918a918a918a918a91849184918a918a9162000107916003919062000a73565b5080516200011d90600490602084019062000a73565b50620001359150506276a7008311156101946200088c565b6200014962278d008211156101956200088c565b42909101610140819052016101605284516200016b906002111560c86200088c565b6200018360088651111560c96200088c60201b60201c565b6200019985620008a160201b62000db61760201c565b620001ae64e8d4a5100085101560cb6200088c565b620001c667016345785d8a000085111560ca6200088c565b6040516309b2760f60e01b81526000906001600160a01b038b16906309b2760f90620001f7908c9060040162000e63565b602060405180830381600087803b1580156200021257600080fd5b505af115801562000227573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200024d919062000c91565b9050896001600160a01b03166366a9c7d2828889516001600160401b03811180156200027857600080fd5b50604051908082528060200260200182016040528015620002a3578160200160208202803683370190505b506040518463ffffffff1660e01b8152600401620002c49392919062000dc7565b600060405180830381600087803b158015620002df57600080fd5b505af1158015620002f4573d6000803e3d6000fd5b5050506001600160601b031960608c901b1661018052506101a0819052600785905585516101c05285516200032b57600062000342565b856000815181106200033957fe5b60200260200101515b60601b6001600160601b0319166101e0528551600110620003655760006200037c565b856001815181106200037357fe5b60200260200101515b60601b6001600160601b0319166102005285516002106200039f576000620003b6565b85600281518110620003ad57fe5b60200260200101515b60601b6001600160601b031916610220528551600310620003d9576000620003f0565b85600381518110620003e757fe5b60200260200101515b60601b6001600160601b031916610240528551600410620004135760006200042a565b856004815181106200042157fe5b60200260200101515b60601b6001600160601b0319166102605285516005106200044d57600062000464565b856005815181106200045b57fe5b60200260200101515b60601b6001600160601b031916610280528551600610620004875760006200049e565b856006815181106200049557fe5b60200260200101515b60601b6001600160601b0319166102a0528551600710620004c1576000620004d8565b85600781518110620004cf57fe5b60200260200101515b60601b6001600160601b0319166102c0528551620004f85760006200051e565b6200051e866000815181106200050a57fe5b6020026020010151620008ad60201b60201c565b6102e05285516001106200053457600062000546565b62000546866001815181106200050a57fe5b6103005285516002106200055c5760006200056e565b6200056e866002815181106200050a57fe5b6103205285516003106200058457600062000596565b62000596866003815181106200050a57fe5b610340528551600410620005ac576000620005be565b620005be866004815181106200050a57fe5b610360528551600510620005d4576000620005e6565b620005e6866005815181106200050a57fe5b610380528551600610620005fc5760006200060e565b6200060e866006815181106200050a57fe5b6103a05285516007106200062457600062000636565b62000636866007815181106200050a57fe5b6103c081815250505050505050505050505050505050505050506000865190506200066e8187516200094f60201b62000dc41760201c565b6000806000805b848160ff161015620006f45760008a8260ff16815181106200069357fe5b60200260200101519050620006bb662386f26fc1000082101561012e6200088c60201b60201c565b620006d581866200095e60201b62000dd11790919060201c565b945082811115620006ea578160ff1693508092505b5060010162000675565b506200070d670de0b6b3a764000084146101346200088c565b6103e082905288516200072257600062000739565b886000815181106200073057fe5b60200260200101515b6104005288516001106200074f57600062000766565b886001815181106200075d57fe5b60200260200101515b6104205288516002106200077c57600062000793565b886002815181106200078a57fe5b60200260200101515b610440528851600310620007a9576000620007c0565b88600381518110620007b757fe5b60200260200101515b610460528851600410620007d6576000620007ed565b88600481518110620007e457fe5b60200260200101515b610480528851600510620008035760006200081a565b886005815181106200081157fe5b60200260200101515b6104a05288516006106200083057600062000847565b886006815181106200083e57fe5b60200260200101515b6104c05288516007106200085d57600062000874565b886007815181106200086b57fe5b60200260200101515b6104e0525062000ee19b505050505050505050505050565b816200089d576200089d816200097b565b5050565b806200089d81620009ce565b600080826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015620008ea57600080fd5b505afa158015620008ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000925919062000da4565b60ff16905060006200094460128362000a5b60201b62000de31760201c565b600a0a949350505050565b6200089d82821460676200088c565b60008282016200097284821015836200088c565b90505b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b600281511015620009df5762000a58565b600081600081518110620009ef57fe5b602002602001015190506000600190505b825181101562000a5557600083828151811062000a1957fe5b6020026020010151905062000a4a816001600160a01b0316846001600160a01b03161060656200088c60201b60201c565b915060010162000a00565b50505b50565b600062000a6d8383111560016200088c565b50900390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000ab657805160ff191683800117855562000ae6565b8280016001018555821562000ae6579182015b8281111562000ae657825182559160200191906001019062000ac9565b5062000af492915062000af8565b5090565b5b8082111562000af4576000815560010162000af9565b8051620009758162000ecb565b600082601f83011262000b2d578081fd5b815162000b4462000b3e8262000e9f565b62000e78565b81815291506020808301908481018184028601820187101562000b6657600080fd5b60005b8481101562000b9257815162000b7f8162000ecb565b8452928201929082019060010162000b69565b505050505092915050565b600082601f83011262000bae578081fd5b815162000bbf62000b3e8262000e9f565b81815291506020808301908481018184028601820187101562000be157600080fd5b60005b8481101562000b925781518452928201929082019060010162000be4565b600082601f83011262000c13578081fd5b81516001600160401b0381111562000c29578182fd5b602062000c3f601f8301601f1916820162000e78565b9250818352848183860101111562000c5657600080fd5b60005b8281101562000c7657848101820151848201830152810162000c59565b8281111562000c885760008284860101525b50505092915050565b60006020828403121562000ca3578081fd5b5051919050565b60008060008060008060008060006101208a8c03121562000cc9578485fd5b62000cd58b8b62000b0f565b60208b01519099506001600160401b038082111562000cf2578687fd5b62000d008d838e0162000c02565b995060408c015191508082111562000d16578687fd5b62000d248d838e0162000c02565b985060608c015191508082111562000d3a578687fd5b62000d488d838e0162000b1c565b975060808c015191508082111562000d5e578687fd5b5062000d6d8c828d0162000b9d565b95505060a08a0151935060c08a0151925060e08a0151915062000d958b6101008c0162000b0f565b90509295985092959850929598565b60006020828403121562000db6578081fd5b815160ff8116811462000972578182fd5b60006060820185835260206060818501528186518084526080860191508288019350845b8181101562000e135762000e00855162000ebf565b8352938301939183019160010162000deb565b505084810360408601528551808252908201925081860190845b8181101562000e555762000e42835162000ebf565b8552938301939183019160010162000e2d565b509298975050505050505050565b602081016003831062000e7257fe5b91905290565b6040518181016001600160401b038111828210171562000e9757600080fd5b604052919050565b60006001600160401b0382111562000eb5578081fd5b5060209081020190565b6001600160a01b031690565b6001600160a01b038116811462000a5857600080fd5b60805160a05160601c60c05160e051610100516101205161014051610160516101805160601c6101a0516101c0516101e05160601c6102005160601c6102205160601c6102405160601c6102605160601c6102805160601c6102a05160601c6102c05160601c6102e05161030051610320516103405161036051610380516103a0516103c0516103e05161040051610420516104405161046051610480516104a0516104c0516104e051614748620010f760003980611eb85280612849525080611e7552806127e8525080611e325280612787525080611def5280612726525080611dac52806126c5525080611d695280612664525080611d265280612603525080611ce352806125a25250806122c252806122f6528061233252508061161c5280611b125250806115d95280611ab15250806115965280611a5052508061155352806119ef525080611510528061198e5250806114cd528061192d52508061148a52806118cc525080611439528061186b525080611ad7528061280e525080611a7652806127ad525080611a15528061274c5250806119b452806126eb525080611953528061268a5250806118f2528061262952508061189152806125c852508061183052806125675250806110f8525080610637525080610895525080610f45525080610f21525080610b1552508061104852508061108a5250806110695250806108715250806107fb52506147486000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80637ecebe001161010f578063a9059cbb116100a2578063d5c096c411610071578063d5c096c4146103e6578063d73dd623146103f9578063dd62ed3e1461040c578063f89f27ed1461041f576101f0565b8063a9059cbb146103b0578063aaabadc5146103c3578063c0ff1a15146103cb578063d505accf146103d3576101f0565b80638d928af8116100de5780638d928af81461038557806395d89b411461038d5780639b02cdde146103955780639d2c110c1461039d576101f0565b80637ecebe0014610337578063851c1bb31461034a57806387ec68171461035d578063893d20e814610370576101f0565b806338e9922e11610187578063661884631161015657806366188463146102e8578063679aefce146102fb57806370a082311461030357806374f3b00914610316576101f0565b806338e9922e146102a457806338fff2d0146102b757806355c67628146102bf5780636028bfd4146102c7576101f0565b80631c0de051116101c35780631c0de0511461025d57806323b872dd14610274578063313ce567146102875780633644e5151461029c576101f0565b806306fdde03146101f5578063095ea7b31461021357806316c38b3c1461023357806318160ddd14610248575b600080fd5b6101fd610434565b60405161020a9190614623565b60405180910390f35b610226610221366004613ffd565b6104cb565b60405161020a919061455a565b6102466102413660046140f3565b6104e2565b005b6102506104f6565b60405161020a919061457d565b6102656104fc565b60405161020a93929190614565565b610226610282366004613f48565b610525565b61028f6105a8565b60405161020a919061468f565b6102506105ad565b6102466102b2366004614479565b6105bc565b610250610635565b610250610659565b6102da6102d536600461412b565b61065f565b60405161020a929190614676565b6102266102f6366004613ffd565b610696565b6102506106f0565b610250610311366004613ef4565b61071b565b61032961032436600461412b565b61073a565b60405161020a929190614535565b610250610345366004613ef4565b6107dc565b610250610358366004614227565b6107f7565b6102da61036b36600461412b565b610849565b61037861086f565b60405161020a919061450e565b610378610893565b6101fd6108b7565b610250610918565b6102506103ab36600461437e565b61091e565b6102266103be366004613ffd565b610a05565b610378610a12565b610250610a1c565b6102466103e1366004613f88565b610ae0565b6103296103f436600461412b565b610c29565b610226610407366004613ffd565b610d4b565b61025061041a366004613f10565b610d81565b610427610dac565b60405161020a9190614522565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c05780601f10610495576101008083540402835291602001916104c0565b820191906000526020600020905b8154815290600101906020018083116104a357829003601f168201915b505050505090505b90565b60006104d8338484610df9565b5060015b92915050565b6104ea610e61565b6104f381610e8f565b50565b60025490565b6000806000610509610f02565b159250610514610f1f565b915061051e610f43565b9050909192565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261056391148061055b5750838210155b610197610f67565b61056e858585610f75565b336001600160a01b0386161480159061058957506000198114155b1561059b5761059b8533858403610df9565b60019150505b9392505050565b601290565b60006105b7611044565b905090565b6105c4610e61565b6105cc6110e1565b6105df64e8d4a5100082101560cb610f67565b6105f567016345785d8a000082111560ca610f67565b60078190556040517f9cabc14d438714dbcd9292df9b3f89c42f98acd93a675ad72cd6033777e9b8e79061062a90839061457d565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000090565b60075490565b6000606061067586516106706110f6565b610dc4565b61068a8989898989898961111a6111e1611247565b97509795505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106106d2576106cd33856000610df9565b6106e6565b6106e633856106e18487610de3565b610df9565b5060019392505050565b60006105b76106fd6104f6565b610715610708610a1c565b6107106110f6565b611369565b9061138d565b6001600160a01b0381166000908152602081905260409020545b919050565b60608088610764610749610893565b6001600160a01b0316336001600160a01b03161460cd610f67565b61077961076f610635565b82146101f4610f67565b60606107836113de565b905061078f888261165a565b60006060806107a38e8e8e8e8e8e8e61111a565b9250925092506107b38d846116bb565b6107bd82856111e1565b6107c781856111e1565b909550935050505b5097509795505050505050565b6001600160a01b031660009081526005602052604090205490565b60007f00000000000000000000000000000000000000000000000000000000000000008260405160200161082c9291906144cb565b604051602081830303815290604052805190602001209050919050565b6000606061085a86516106706110f6565b61068a8989898989898961174e6117cb611247565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c05780601f10610495576101008083540402835291602001916104c0565b60085490565b60008061092e856020015161182c565b9050600061093f866040015161182c565b905060008651600181111561095057fe5b14156109b6576109638660600151611b41565b60608701526109728583611b65565b945061097e8482611b65565b935061098e866060015183611b65565b606087015260006109a0878787611b71565b90506109ac8183611bac565b93505050506105a1565b6109c08583611b65565b94506109cc8482611b65565b93506109dc866060015182611b65565b606087015260006109ee878787611bb8565b90506109fa8184611beb565b90506109ac81611bf7565b60006104d8338484610f75565b60006105b7611c0e565b60006060610a28610893565b6001600160a01b031663f94d4668610a3e610635565b6040518263ffffffff1660e01b8152600401610a5a919061457d565b60006040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aae9190810190614028565b50915050610ac381610abe6113de565b61165a565b6060610acd611c88565b9050610ad98183611ee4565b9250505090565b610aee8442111560d1610f67565b6001600160a01b0387166000908152600560209081526040808320549051909291610b45917f0000000000000000000000000000000000000000000000000000000000000000918c918c918c9188918d91016145a5565b6040516020818303038152906040528051906020012090506000610b6882611f56565b9050600060018288888860405160008152602001604052604051610b8f9493929190614605565b6020604051602081039080840390855afa158015610bb1573d6000803e3d6000fd5b5050604051601f1901519150610bf390506001600160a01b03821615801590610beb57508b6001600160a01b0316826001600160a01b0316145b6101f8610f67565b6001600160a01b038b166000908152600560205260409020600185019055610c1c8b8b8b610df9565b5050505050505050505050565b60608088610c38610749610893565b610c4361076f610635565b6060610c4d6113de565b9050610c576104f6565b610cfc5760006060610c6b8d8d8d8a611f72565b91509150610c80620f424083101560cc610f67565b610c8e6000620f424061200d565b610c9d8b620f4240840361200d565b610ca781846117cb565b80610cb06110f6565b6001600160401b0381118015610cc557600080fd5b50604051908082528060200260200182016040528015610cef578160200160208202803683370190505b50955095505050506107cf565b610d06888261165a565b6000606080610d1a8e8e8e8e8e8e8e61174e565b925092509250610d2a8c8461200d565b610d3482856117cb565b610d3e81856111e1565b90955093506107cf915050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104d89185906106e19086610dd1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606105b7611c88565b80610dc0816120a3565b5050565b610dc08183146067610f67565b60008282016105a18482101583610f67565b6000610df3838311156001610f67565b50900390565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610e5490859061457d565b60405180910390a3505050565b6000610e786000356001600160e01b0319166107f7565b90506104f3610e87823361211c565b610191610f67565b8015610eaf57610eaa610ea0610f1f565b4210610193610f67565b610ec4565b610ec4610eba610f43565b42106101a9610f67565b6006805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be649061062a90839061455a565b6000610f0c610f43565b4211806105b757505060065460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b81610dc057610dc08161220c565b6001600160a01b038316600090815260208190526040902054610f9d82821015610196610f67565b610fb46001600160a01b0384161515610199610f67565b6001600160a01b03808516600090815260208190526040808220858503905591851681522054610fe49083610dd1565b6001600160a01b0380851660008181526020819052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061103690869061457d565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006110b161225f565b306040516020016110c69594939291906145d9565b60405160208183030381529060405280519060200120905090565b6110f46110ec610f02565b610192610f67565b565b7f000000000000000000000000000000000000000000000000000000000000000090565b60006060806060611129611c88565b9050611133610f02565b1561116a576000611144828a611ee4565b90506111558983600854848b612263565b92506111648984610de3612372565b506111b5565b6111726110f6565b6001600160401b038111801561118757600080fd5b506040519080825280602002602001820160405280156111b1578160200160208202803683370190505b5091505b6111c08882876123dd565b90945092506111d088848361244a565b600855509750975097945050505050565b60005b6111ec6110f6565b8110156112425761122383828151811061120257fe5b602002602001015183838151811061121657fe5b6020026020010151612463565b83828151811061122f57fe5b60209081029190910101526001016111e4565b505050565b333014611305576000306001600160a01b031660003660405161126b9291906144e3565b6000604051808303816000865af19150503d80600081146112a8576040519150601f19603f3d011682016040523d82523d6000602084013e6112ad565b606091505b5050905080600081146112bc57fe5b60046000803e6000516001600160e01b0319166343adbafb60e01b81146112e7573d6000803e3d6000fd5b506020600460003e604060205260243d03602460403e601c3d016000f35b606061130f6113de565b905061131b878261165a565b600060606113328c8c8c8c8c8c8c8c63ffffffff16565b509150915061134581848663ffffffff16565b8051601f1982018390526343adbafb603f1983015260200260231982016044820181fd5b60008282026105a184158061138657508385838161138357fe5b04145b6003610f67565b600061139c8215156004610f67565b826113a9575060006104dc565b670de0b6b3a7640000838102906113cc908583816113c357fe5b04146005610f67565b8281816113d557fe5b049150506104dc565b606060006113ea6110f6565b90506060816001600160401b038111801561140457600080fd5b5060405190808252806020026020018201604052801561142e578160200160208202803683370190505b5090508115611476577f00000000000000000000000000000000000000000000000000000000000000008160008151811061146557fe5b60200260200101818152505061147f565b91506104c89050565b6001821115611476577f0000000000000000000000000000000000000000000000000000000000000000816001815181106114b657fe5b6020026020010181815250506002821115611476577f0000000000000000000000000000000000000000000000000000000000000000816002815181106114f957fe5b6020026020010181815250506003821115611476577f00000000000000000000000000000000000000000000000000000000000000008160038151811061153c57fe5b6020026020010181815250506004821115611476577f00000000000000000000000000000000000000000000000000000000000000008160048151811061157f57fe5b6020026020010181815250506005821115611476577f0000000000000000000000000000000000000000000000000000000000000000816005815181106115c257fe5b6020026020010181815250506006821115611476577f00000000000000000000000000000000000000000000000000000000000000008160068151811061160557fe5b6020026020010181815250506007821115611476577f00000000000000000000000000000000000000000000000000000000000000008160078151811061164857fe5b60200260200101818152505091505090565b60005b6116656110f6565b8110156112425761169c83828151811061167b57fe5b602002602001015183838151811061168f57fe5b6020026020010151611369565b8382815181106116a857fe5b602090810291909101015260010161165d565b6001600160a01b0382166000908152602081905260409020546116e382821015610196610f67565b6001600160a01b0383166000908152602081905260409020828203905560025461170d9083610de3565b6002556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610e5490869061457d565b600060608061175b6110e1565b6060611765611c88565b90506000611773828a611ee4565b905060606117868a84600854858c612263565b90506117958a82610de3612372565b600060606117a48c868b612483565b915091506117b38c82876124dd565b600855909e909d50909b509950505050505050505050565b60005b6117d66110f6565b8110156112425761180d8382815181106117ec57fe5b602002602001015183838151811061180057fe5b60200260200101516124ec565b83828151811061181957fe5b60209081029190910101526001016117ce565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561188f57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156118f057507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561195157507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156119b257507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611a1357507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611a7457507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611ad557507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611b3657507f0000000000000000000000000000000000000000000000000000000000000000610735565b61073561013561220c565b600080611b596007548461251f90919063ffffffff16565b90506105a18382610de3565b60006105a18383611369565b6000611b7b6110e1565b611ba483611b8c8660200151612563565b84611b9a8860400151612563565b886060015161286d565b949350505050565b60006105a18383612463565b6000611bc26110e1565b611ba483611bd38660200151612563565b84611be18860400151612563565b88606001516128e8565b60006105a183836124ec565b60006104dc611c0760075461295e565b8390612984565b6000611c18610893565b6001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b7919061424f565b60606000611c946110f6565b90506060816001600160401b0381118015611cae57600080fd5b50604051908082528060200260200182016040528015611cd8578160200160208202803683370190505b5090508115611476577f000000000000000000000000000000000000000000000000000000000000000081600081518110611d0f57fe5b6020026020010181815250506001821115611476577f000000000000000000000000000000000000000000000000000000000000000081600181518110611d5257fe5b6020026020010181815250506002821115611476577f000000000000000000000000000000000000000000000000000000000000000081600281518110611d9557fe5b6020026020010181815250506003821115611476577f000000000000000000000000000000000000000000000000000000000000000081600381518110611dd857fe5b6020026020010181815250506004821115611476577f000000000000000000000000000000000000000000000000000000000000000081600481518110611e1b57fe5b6020026020010181815250506005821115611476577f000000000000000000000000000000000000000000000000000000000000000081600581518110611e5e57fe5b6020026020010181815250506006821115611476577f000000000000000000000000000000000000000000000000000000000000000081600681518110611ea157fe5b6020026020010181815250506007821115611476577f00000000000000000000000000000000000000000000000000000000000000008160078151811061164857fe5b670de0b6b3a764000060005b8351811015611f4657611f3c611f35858381518110611f0b57fe5b6020026020010151858481518110611f1f57fe5b60200260200101516129c690919063ffffffff16565b8390612a15565b9150600101611ef0565b506104dc60008211610137610f67565b6000611f60611044565b8260405160200161082c9291906144f3565b60006060611f7e6110e1565b6000611f8984612a41565b9050611fa46000826002811115611f9c57fe5b1460ce610f67565b6060611faf85612a57565b9050611fc3611fbc6110f6565b8251610dc4565b611fcf81610abe6113de565b6060611fd9611c88565b90506000611fe78284611ee4565b90506000611ff7826107106110f6565b6008929092555099919850909650505050505050565b6001600160a01b0382166000908152602081905260409020546120309082610dd1565b6001600160a01b0383166000908152602081905260409020556002546120569082610dd1565b6002556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061209790859061457d565b60405180910390a35050565b6002815110156120b2576104f3565b6000816000815181106120c157fe5b602002602001015190506000600190505b82518110156112425760008382815181106120e957fe5b60200260200101519050612112816001600160a01b0316846001600160a01b0316106065610f67565b91506001016120d2565b600073ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b61213b61086f565b6001600160a01b031614158015612156575061215683612a6d565b1561217e5761216361086f565b6001600160a01b0316336001600160a01b03161490506104dc565b612186611c0e565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b81526004016121b593929190614586565b60206040518083038186803b1580156121cd57600080fd5b505afa1580156121e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612205919061410f565b90506104dc565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b4690565b60608061226e6110f6565b6001600160401b038111801561228357600080fd5b506040519080825280602002602001820160405280156122ad578160200160208202803683370190505b509050826122bc579050612369565b61232f877f0000000000000000000000000000000000000000000000000000000000000000815181106122eb57fe5b6020026020010151877f00000000000000000000000000000000000000000000000000000000000000008151811061231f57fe5b6020026020010151878787612a87565b817f00000000000000000000000000000000000000000000000000000000000000008151811061235b57fe5b602090810291909101015290505b95945050505050565b60005b61237d6110f6565b8110156123d7576123b884828151811061239357fe5b60200260200101518483815181106123a757fe5b60200260200101518463ffffffff16565b8482815181106123c457fe5b6020908102919091010152600101612375565b50505050565b6000606060006123ec84612a41565b905060008160028111156123fc57fe5b14156124175761240d868686612aff565b9250925050612442565b600181600281111561242557fe5b14156124355761240d8685612bdc565b61240d868686612c0e565b505b935093915050565b60006124598484610de3612372565b611ba48285611ee4565b60006124728215156004610f67565b81838161247b57fe5b049392505050565b60006060600061249284612a41565b905060018160028111156124a257fe5b14156124b35761240d868686612c79565b60028160028111156124c157fe5b14156124d25761240d868686612cd3565b61244061013661220c565b60006124598484610dd1612372565b60006124fb8215156004610f67565b82612508575060006104dc565b81600184038161251457fe5b0460010190506104dc565b600082820261253984158061138657508385838161138357fe5b806125485760009150506104dc565b670de0b6b3a764000060001982015b046001019150506104dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156125c657507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561262757507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561268857507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156126e957507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561274a57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156127ab57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561280c57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611b3657507f0000000000000000000000000000000000000000000000000000000000000000610735565b600061288f61288487670429d069189e0000612a15565b831115610130610f67565b600061289b8784610dd1565b905060006128a98883612984565b905060006128b7888761138d565b905060006128c58383612d7a565b90506128da6128d38261295e565b8990612a15565b9a9950505050505050505050565b600061290a6128ff85670429d069189e0000612a15565b831115610131610f67565b60006129206129198685610de3565b8690612984565b9050600061292e8588612984565b9050600061293c8383612d7a565b9050600061295282670de0b6b3a7640000610de3565b90506128da8a8261251f565b6000670de0b6b3a764000082106129765760006104dc565b50670de0b6b3a76400000390565b60006129938215156004610f67565b826129a0575060006104dc565b670de0b6b3a7640000838102906129ba908583816113c357fe5b82600182038161255757fe5b6000806129d38484612da6565b905060006129ed6129e68361271061251f565b6001610dd1565b905080821015612a02576000925050506104dc565b612a0c8282610de3565b925050506104dc565b6000828202612a2f84158061138657508385838161138357fe5b670de0b6b3a764000090049392505050565b6000818060200190518101906104dc919061426b565b6060818060200190518101906105a19190614330565b6000612a7f631c74c91760e11b6107f7565b909114919050565b6000838311612a9857506000612369565b6000612aa48585612984565b90506000612aba670de0b6b3a76400008861138d565b9050612ace826709b6e64a8ec60000612eb1565b91506000612adc8383612d7a565b90506000612af3612aec8361295e565b8b90612a15565b90506128da8187612a15565b60006060612b0b6110e1565b600080612b1785612ec8565b91509150612b2f612b266110f6565b82106064610f67565b6060612b396110f6565b6001600160401b0381118015612b4e57600080fd5b50604051908082528060200260200182016040528015612b78578160200160208202803683370190505b509050612bb7888381518110612b8a57fe5b6020026020010151888481518110612b9e57fe5b602002602001015185612baf6104f6565b600754612eea565b818381518110612bc357fe5b6020908102919091010152919791965090945050505050565b600060606000612beb84612fa7565b90506060612c018683612bfc6104f6565b612fbd565b9196919550909350505050565b60006060612c1a6110e1565b60606000612c278561306e565b91509150612c3882516106706110f6565b612c4482610abe6113de565b6000612c5c888885612c546104f6565b600754613086565b9050612c6c8282111560cf610f67565b9791965090945050505050565b60006060806000612c898561306e565b91509150612c9f612c986110f6565b8351610dc4565b612cab82610abe6113de565b6000612cc3888885612cbb6104f6565b6007546132aa565b9050612c6c8282101560d0610f67565b60006060600080612ce385612ec8565b91509150612cf2612b266110f6565b6060612cfc6110f6565b6001600160401b0381118015612d1157600080fd5b50604051908082528060200260200182016040528015612d3b578160200160208202803683370190505b509050612bb7888381518110612d4d57fe5b6020026020010151888481518110612d6157fe5b602002602001015185612d726104f6565b6007546134ba565b600080612d878484612da6565b90506000612d9a6129e68361271061251f565b90506123698282610dd1565b600081612dbc5750670de0b6b3a76400006104dc565b82612dc9575060006104dc565b612dda600160ff1b84106006610f67565b82612e00770bce5086492111aea88f4bb1ca6bcf584181ea8059f7653284106007610f67565b826000670c7d713b49da000083138015612e215750670f43fc2c04ee000083125b15612e58576000612e318461355c565b9050670de0b6b3a764000080820784020583670de0b6b3a764000083050201915050612e66565b81612e628461367a565b0290505b670de0b6b3a76400009005612e9e680238fd42c5cf03ffff198212801590612e97575068070c1cc73b00c800008213155b6008610f67565b612ea781613a27565b9695505050505050565b600081831015612ec157816105a1565b5090919050565b60008082806020019051810190612edf91906142fa565b909590945092505050565b600080612f0184612efb8188610de3565b90612984565b9050612f1a6709b6e64a8ec60000821015610132610f67565b6000612f38612f31670de0b6b3a76400008961138d565b8390612d7a565b90506000612f4f612f488361295e565b8a90612a15565b90506000612f5c8961295e565b90506000612f6a838361251f565b90506000612f788483610de3565b9050612f97612f90612f898a61295e565b8490612a15565b8290610dd1565b9c9b505050505050505050505050565b6000818060200190518101906105a191906142cd565b60606000612fcb848461138d565b9050606085516001600160401b0381118015612fe657600080fd5b50604051908082528060200260200182016040528015613010578160200160208202803683370190505b50905060005b8651811015613064576130458388838151811061302f57fe5b6020026020010151612a1590919063ffffffff16565b82828151811061305157fe5b6020908102919091010152600101613016565b5095945050505050565b6060600082806020019051810190612edf9190614287565b6000606084516001600160401b03811180156130a157600080fd5b506040519080825280602002602001820160405280156130cb578160200160208202803683370190505b5090506000805b88518110156131905761312b8982815181106130ea57fe5b6020026020010151612efb89848151811061310157fe5b60200260200101518c858151811061311557fe5b6020026020010151610de390919063ffffffff16565b83828151811061313757fe5b60200260200101818152505061318661317f89838151811061315557fe5b602002602001015185848151811061316957fe5b602002602001015161251f90919063ffffffff16565b8390610dd1565b91506001016130d2565b50670de0b6b3a764000060005b89518110156132895760008482815181106131b457fe5b602002602001015184111561320b5760006131dd6131d18661295e565b8d858151811061302f57fe5b905060006131f1828c868151811061311557fe5b905061320261317f611c078b61295e565b92505050613222565b88828151811061321757fe5b602002602001015190505b600061324b8c848151811061323357fe5b6020026020010151610715848f878151811061311557fe5b905061327d6132768c858151811061325f57fe5b6020026020010151836129c690919063ffffffff16565b8590612a15565b9350505060010161319d565b5061329d6132968261295e565b879061251f565b9998505050505050505050565b6000606084516001600160401b03811180156132c557600080fd5b506040519080825280602002602001820160405280156132ef578160200160208202803683370190505b5090506000805b88518110156133975761334f89828151811061330e57fe5b602002602001015161071589848151811061332557fe5b60200260200101518c858151811061333957fe5b6020026020010151610dd190919063ffffffff16565b83828151811061335b57fe5b60200260200101818152505061338d61317f89838151811061337957fe5b602002602001015185848151811061302f57fe5b91506001016132f6565b50670de0b6b3a764000060005b8951811015613478576000838583815181106133bc57fe5b602002602001015111156134185760006133e16131d186670de0b6b3a7640000610de3565b905060006133f5828c868151811061311557fe5b905061340f61317f611f35670de0b6b3a76400008c610de3565b9250505061342f565b88828151811061342457fe5b602002602001015190505b60006134588c848151811061344057fe5b6020026020010151610715848f878151811061333957fe5b905061346c6132768c858151811061325f57fe5b935050506001016133a4565b50670de0b6b3a764000081106134ae576134a461349d82670de0b6b3a7640000610de3565b8790612a15565b9350505050612369565b60009350505050612369565b6000806134cb84612efb8188610dd1565b90506134e46729a2241af62c0000821115610133610f67565b60006134fb612f31670de0b6b3a764000089612984565b9050600061351b61351483670de0b6b3a7640000610de3565b8a9061251f565b905060006135288961295e565b90506000613536838361251f565b905060006135448483610de3565b9050612f97612f906135558a61295e565b8490612984565b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff198501028161359757fe5b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f826002919005919091010295945050505050565b600061368a600083136064610f67565b670de0b6b3a76400008212156136c4576136ba826a0c097ce7bc90715b34b9f160241b816136b457fe5b0561367a565b6000039050610735565b60007e1600ef3172e58d2e933ec884fde10064c63b5372d805e203c0000000000000831261371557770195e54c5dd42177f53a27172fa9ec630262827000000000830592506806f05b59d3b2000000015b73011798004d755d3c8bc8e03204cf44619e000000831261374d576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312613795576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a70083126137d0576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf850831261380757693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e2831261383e57690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d0383126138735768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261389e57680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d83126138d3576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f17757889379378312613908576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b286603831261393c576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac8312613970576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d63100000808603028161399357fe5b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6000613a56680238fd42c5cf03ffff198312158015613a4f575068070c1cc73b00c800008313155b6009610f67565b6000821215613a8957613a6b82600003613a27565b6a0c097ce7bc90715b34b9f160241b81613a8157fe5b059050610735565b60006806f05b59d3b20000008312613ac957506806f05b59d3b1ffffff1990910190770195e54c5dd42177f53a27172fa9ec630262827000000000613aff565b6803782dace9d90000008312613afb57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380613aff565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412613b4f5768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412613b8b576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412613bc557682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412613bff576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412613c3857680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412613c715768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412613caa576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412613ce35768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b80356104dc816146e2565b600082601f830112613e1f578081fd5b8151613e32613e2d826146c3565b61469d565b818152915060208083019084810181840286018201871015613e5357600080fd5b60005b84811015613e7257815184529282019290820190600101613e56565b505050505092915050565b600082601f830112613e8d578081fd5b81356001600160401b03811115613ea2578182fd5b613eb5601f8201601f191660200161469d565b9150808252836020828501011115613ecc57600080fd5b8060208401602084013760009082016020015292915050565b8035600281106104dc57600080fd5b600060208284031215613f05578081fd5b81356105a1816146e2565b60008060408385031215613f22578081fd5b8235613f2d816146e2565b91506020830135613f3d816146e2565b809150509250929050565b600080600060608486031215613f5c578081fd5b8335613f67816146e2565b92506020840135613f77816146e2565b929592945050506040919091013590565b600080600080600080600060e0888a031215613fa2578283fd5b8735613fad816146e2565b96506020880135613fbd816146e2565b95506040880135945060608801359350608088013560ff81168114613fe0578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561400f578182fd5b823561401a816146e2565b946020939093013593505050565b60008060006060848603121561403c578081fd5b83516001600160401b0380821115614052578283fd5b818601915086601f830112614065578283fd5b8151614073613e2d826146c3565b80828252602080830192508086018b828387028901011115614093578788fd5b8796505b848710156140be5780516140aa816146e2565b845260019690960195928101928101614097565b5089015190975093505050808211156140d5578283fd5b506140e286828701613e0f565b925050604084015190509250925092565b600060208284031215614104578081fd5b81356105a1816146f7565b600060208284031215614120578081fd5b81516105a1816146f7565b600080600080600080600060e0888a031215614145578081fd5b87359650602080890135614158816146e2565b96506040890135614168816146e2565b955060608901356001600160401b0380821115614183578384fd5b818b0191508b601f830112614196578384fd5b81356141a4613e2d826146c3565b8082825285820191508585018f8788860288010111156141c2578788fd5b8795505b838610156141e45780358352600195909501949186019186016141c6565b509850505060808b0135955060a08b0135945060c08b013592508083111561420a578384fd5b50506142188a828b01613e7d565b91505092959891949750929550565b600060208284031215614238578081fd5b81356001600160e01b0319811681146105a1578182fd5b600060208284031215614260578081fd5b81516105a1816146e2565b60006020828403121561427c578081fd5b81516105a181614705565b60008060006060848603121561429b578081fd5b83516142a681614705565b60208501519093506001600160401b038111156142c1578182fd5b6140e286828701613e0f565b600080604083850312156142df578182fd5b82516142ea81614705565b6020939093015192949293505050565b60008060006060848603121561430e578081fd5b835161431981614705565b602085015160409095015190969495509392505050565b60008060408385031215614342578182fd5b825161434d81614705565b60208401519092506001600160401b03811115614368578182fd5b61437485828601613e0f565b9150509250929050565b600080600060608486031215614392578081fd5b83356001600160401b03808211156143a8578283fd5b81860191506101208083890312156143be578384fd5b6143c78161469d565b90506143d38884613ee5565b81526143e28860208501613e04565b60208201526143f48860408501613e04565b6040820152606083013560608201526080830135608082015260a083013560a08201526144248860c08501613e04565b60c08201526144368860e08501613e04565b60e0820152610100808401358381111561444e578586fd5b61445a8a828701613e7d565b9183019190915250976020870135975060409096013595945050505050565b60006020828403121561448a578081fd5b5035919050565b6000815180845260208085019450808401835b838110156144c0578151875295820195908201906001016144a4565b509495945050505050565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6000602082526105a16020830184614491565b6000604082526145486040830185614491565b82810360208401526123698185614491565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b8181101561464f57858101830151858201604001528201614633565b818111156146605783604083870101525b50601f01601f1916929092016040019392505050565b600083825260406020830152611ba46040830184614491565b60ff91909116815260200190565b6040518181016001600160401b03811182821017156146bb57600080fd5b604052919050565b60006001600160401b038211156146d8578081fd5b5060209081020190565b6001600160a01b03811681146104f357600080fd5b80151581146104f357600080fd5b600381106104f357600080fdfea2646970667358221220765dae8954494fc239d6edd2b70a6d1304f3ce003f1a0ad7655693250300088064736f6c63430007010033",
              "opcodes": "PUSH2 0x500 PUSH1 0x40 MSTORE PUSH32 0x6E71EDAE12B1B97F4D1F60370FEF10105FA2FAAE0126114A169C64845D6126C9 PUSH2 0x120 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x583F CODESIZE SUB DUP1 PUSH3 0x583F DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x5A SWAP2 PUSH3 0xCAA JUMP JUMPDEST DUP9 DUP9 DUP9 DUP9 DUP8 DUP8 DUP8 DUP8 DUP8 DUP6 MLOAD PUSH1 0x2 EQ PUSH3 0x75 JUMPI PUSH1 0x1 PUSH3 0x78 JUMP JUMPDEST PUSH1 0x2 JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 DUP3 MSTORE CALLER PUSH1 0x80 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP8 SWAP1 SHL AND PUSH1 0xA0 MSTORE DUP12 MLOAD SWAP1 DUP13 ADD SWAP1 DUP2 KECCAK256 PUSH1 0xC0 MSTORE SWAP2 MLOAD SWAP1 KECCAK256 PUSH1 0xE0 MSTORE PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH2 0x100 MSTORE DUP10 MLOAD DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP5 SWAP2 DUP5 SWAP2 DUP11 SWAP2 DUP11 SWAP2 PUSH3 0x107 SWAP2 PUSH1 0x3 SWAP2 SWAP1 PUSH3 0xA73 JUMP JUMPDEST POP DUP1 MLOAD PUSH3 0x11D SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0xA73 JUMP JUMPDEST POP PUSH3 0x135 SWAP2 POP POP PUSH3 0x76A700 DUP4 GT ISZERO PUSH2 0x194 PUSH3 0x88C JUMP JUMPDEST PUSH3 0x149 PUSH3 0x278D00 DUP3 GT ISZERO PUSH2 0x195 PUSH3 0x88C JUMP JUMPDEST TIMESTAMP SWAP1 SWAP2 ADD PUSH2 0x140 DUP2 SWAP1 MSTORE ADD PUSH2 0x160 MSTORE DUP5 MLOAD PUSH3 0x16B SWAP1 PUSH1 0x2 GT ISZERO PUSH1 0xC8 PUSH3 0x88C JUMP JUMPDEST PUSH3 0x183 PUSH1 0x8 DUP7 MLOAD GT ISZERO PUSH1 0xC9 PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x199 DUP6 PUSH3 0x8A1 PUSH1 0x20 SHL PUSH3 0xDB6 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x1AE PUSH5 0xE8D4A51000 DUP6 LT ISZERO PUSH1 0xCB PUSH3 0x88C JUMP JUMPDEST PUSH3 0x1C6 PUSH8 0x16345785D8A0000 DUP6 GT ISZERO PUSH1 0xCA PUSH3 0x88C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x9B2760F PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND SWAP1 PUSH4 0x9B2760F SWAP1 PUSH3 0x1F7 SWAP1 DUP13 SWAP1 PUSH1 0x4 ADD PUSH3 0xE63 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x212 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x227 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x24D SWAP2 SWAP1 PUSH3 0xC91 JUMP JUMPDEST SWAP1 POP DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x66A9C7D2 DUP3 DUP9 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH3 0x278 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH3 0x2A3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH3 0x2C4 SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0xDC7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x2DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x2F4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP13 SWAP1 SHL AND PUSH2 0x180 MSTORE POP PUSH2 0x1A0 DUP2 SWAP1 MSTORE PUSH1 0x7 DUP6 SWAP1 SSTORE DUP6 MLOAD PUSH2 0x1C0 MSTORE DUP6 MLOAD PUSH3 0x32B JUMPI PUSH1 0x0 PUSH3 0x342 JUMP JUMPDEST DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x339 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x1E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x365 JUMPI PUSH1 0x0 PUSH3 0x37C JUMP JUMPDEST DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x373 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x200 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x39F JUMPI PUSH1 0x0 PUSH3 0x3B6 JUMP JUMPDEST DUP6 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x3AD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x220 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x3D9 JUMPI PUSH1 0x0 PUSH3 0x3F0 JUMP JUMPDEST DUP6 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x3E7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x240 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x413 JUMPI PUSH1 0x0 PUSH3 0x42A JUMP JUMPDEST DUP6 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x421 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x260 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x44D JUMPI PUSH1 0x0 PUSH3 0x464 JUMP JUMPDEST DUP6 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x45B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x280 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x487 JUMPI PUSH1 0x0 PUSH3 0x49E JUMP JUMPDEST DUP6 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x495 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x4C1 JUMPI PUSH1 0x0 PUSH3 0x4D8 JUMP JUMPDEST DUP6 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x4CF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2C0 MSTORE DUP6 MLOAD PUSH3 0x4F8 JUMPI PUSH1 0x0 PUSH3 0x51E JUMP JUMPDEST PUSH3 0x51E DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH3 0x8AD PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH2 0x2E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x534 JUMPI PUSH1 0x0 PUSH3 0x546 JUMP JUMPDEST PUSH3 0x546 DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x300 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x55C JUMPI PUSH1 0x0 PUSH3 0x56E JUMP JUMPDEST PUSH3 0x56E DUP7 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x320 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x584 JUMPI PUSH1 0x0 PUSH3 0x596 JUMP JUMPDEST PUSH3 0x596 DUP7 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x340 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x5AC JUMPI PUSH1 0x0 PUSH3 0x5BE JUMP JUMPDEST PUSH3 0x5BE DUP7 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x360 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x5D4 JUMPI PUSH1 0x0 PUSH3 0x5E6 JUMP JUMPDEST PUSH3 0x5E6 DUP7 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x380 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x5FC JUMPI PUSH1 0x0 PUSH3 0x60E JUMP JUMPDEST PUSH3 0x60E DUP7 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x3A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x624 JUMPI PUSH1 0x0 PUSH3 0x636 JUMP JUMPDEST PUSH3 0x636 DUP7 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x3C0 DUP2 DUP2 MSTORE POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP PUSH1 0x0 DUP7 MLOAD SWAP1 POP PUSH3 0x66E DUP2 DUP8 MLOAD PUSH3 0x94F PUSH1 0x20 SHL PUSH3 0xDC4 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 JUMPDEST DUP5 DUP2 PUSH1 0xFF AND LT ISZERO PUSH3 0x6F4 JUMPI PUSH1 0x0 DUP11 DUP3 PUSH1 0xFF AND DUP2 MLOAD DUP2 LT PUSH3 0x693 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0x6BB PUSH7 0x2386F26FC10000 DUP3 LT ISZERO PUSH2 0x12E PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x6D5 DUP2 DUP7 PUSH3 0x95E PUSH1 0x20 SHL PUSH3 0xDD1 OR SWAP1 SWAP2 SWAP1 PUSH1 0x20 SHR JUMP JUMPDEST SWAP5 POP DUP3 DUP2 GT ISZERO PUSH3 0x6EA JUMPI DUP2 PUSH1 0xFF AND SWAP4 POP DUP1 SWAP3 POP JUMPDEST POP PUSH1 0x1 ADD PUSH3 0x675 JUMP JUMPDEST POP PUSH3 0x70D PUSH8 0xDE0B6B3A7640000 DUP5 EQ PUSH2 0x134 PUSH3 0x88C JUMP JUMPDEST PUSH2 0x3E0 DUP3 SWAP1 MSTORE DUP9 MLOAD PUSH3 0x722 JUMPI PUSH1 0x0 PUSH3 0x739 JUMP JUMPDEST DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x730 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x400 MSTORE DUP9 MLOAD PUSH1 0x1 LT PUSH3 0x74F JUMPI PUSH1 0x0 PUSH3 0x766 JUMP JUMPDEST DUP9 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x75D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x420 MSTORE DUP9 MLOAD PUSH1 0x2 LT PUSH3 0x77C JUMPI PUSH1 0x0 PUSH3 0x793 JUMP JUMPDEST DUP9 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x78A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x440 MSTORE DUP9 MLOAD PUSH1 0x3 LT PUSH3 0x7A9 JUMPI PUSH1 0x0 PUSH3 0x7C0 JUMP JUMPDEST DUP9 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x7B7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x460 MSTORE DUP9 MLOAD PUSH1 0x4 LT PUSH3 0x7D6 JUMPI PUSH1 0x0 PUSH3 0x7ED JUMP JUMPDEST DUP9 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x7E4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x480 MSTORE DUP9 MLOAD PUSH1 0x5 LT PUSH3 0x803 JUMPI PUSH1 0x0 PUSH3 0x81A JUMP JUMPDEST DUP9 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x811 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4A0 MSTORE DUP9 MLOAD PUSH1 0x6 LT PUSH3 0x830 JUMPI PUSH1 0x0 PUSH3 0x847 JUMP JUMPDEST DUP9 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x83E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4C0 MSTORE DUP9 MLOAD PUSH1 0x7 LT PUSH3 0x85D JUMPI PUSH1 0x0 PUSH3 0x874 JUMP JUMPDEST DUP9 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x86B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4E0 MSTORE POP PUSH3 0xEE1 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP2 PUSH3 0x89D JUMPI PUSH3 0x89D DUP2 PUSH3 0x97B JUMP JUMPDEST POP POP JUMP JUMPDEST DUP1 PUSH3 0x89D DUP2 PUSH3 0x9CE JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x313CE567 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x8EA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH3 0x8FF JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x925 SWAP2 SWAP1 PUSH3 0xDA4 JUMP JUMPDEST PUSH1 0xFF AND SWAP1 POP PUSH1 0x0 PUSH3 0x944 PUSH1 0x12 DUP4 PUSH3 0xA5B PUSH1 0x20 SHL PUSH3 0xDE3 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0xA EXP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH3 0x89D DUP3 DUP3 EQ PUSH1 0x67 PUSH3 0x88C JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH3 0x972 DUP5 DUP3 LT ISZERO DUP4 PUSH3 0x88C JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH3 0x9DF JUMPI PUSH3 0xA58 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x9EF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH3 0xA55 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH3 0xA19 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0xA4A DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH3 0xA00 JUMP JUMPDEST POP POP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0xA6D DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH3 0x88C JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0xAB6 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0xAE6 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0xAE6 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xAE6 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0xAC9 JUMP JUMPDEST POP PUSH3 0xAF4 SWAP3 SWAP2 POP PUSH3 0xAF8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0xAF4 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0xAF9 JUMP JUMPDEST DUP1 MLOAD PUSH3 0x975 DUP2 PUSH3 0xECB JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xB2D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH3 0xB44 PUSH3 0xB3E DUP3 PUSH3 0xE9F JUMP JUMPDEST PUSH3 0xE78 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0xB66 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0xB92 JUMPI DUP2 MLOAD PUSH3 0xB7F DUP2 PUSH3 0xECB JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0xB69 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xBAE JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH3 0xBBF PUSH3 0xB3E DUP3 PUSH3 0xE9F JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0xBE1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0xB92 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0xBE4 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xC13 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0xC29 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH3 0xC3F PUSH1 0x1F DUP4 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH3 0xE78 JUMP JUMPDEST SWAP3 POP DUP2 DUP4 MSTORE DUP5 DUP2 DUP4 DUP7 ADD ADD GT ISZERO PUSH3 0xC56 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH3 0xC76 JUMPI DUP5 DUP2 ADD DUP3 ADD MLOAD DUP5 DUP3 ADD DUP4 ADD MSTORE DUP2 ADD PUSH3 0xC59 JUMP JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xC88 JUMPI PUSH1 0x0 DUP3 DUP5 DUP7 ADD ADD MSTORE JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xCA3 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH3 0xCC9 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH3 0xCD5 DUP12 DUP12 PUSH3 0xB0F JUMP JUMPDEST PUSH1 0x20 DUP12 ADD MLOAD SWAP1 SWAP10 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH3 0xCF2 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD00 DUP14 DUP4 DUP15 ADD PUSH3 0xC02 JUMP JUMPDEST SWAP10 POP PUSH1 0x40 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD16 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD24 DUP14 DUP4 DUP15 ADD PUSH3 0xC02 JUMP JUMPDEST SWAP9 POP PUSH1 0x60 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD3A JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD48 DUP14 DUP4 DUP15 ADD PUSH3 0xB1C JUMP JUMPDEST SWAP8 POP PUSH1 0x80 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD5E JUMPI DUP7 DUP8 REVERT JUMPDEST POP PUSH3 0xD6D DUP13 DUP3 DUP14 ADD PUSH3 0xB9D JUMP JUMPDEST SWAP6 POP POP PUSH1 0xA0 DUP11 ADD MLOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD MLOAD SWAP3 POP PUSH1 0xE0 DUP11 ADD MLOAD SWAP2 POP PUSH3 0xD95 DUP12 PUSH2 0x100 DUP13 ADD PUSH3 0xB0F JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xDB6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH3 0x972 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 ADD DUP6 DUP4 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP6 ADD MSTORE DUP2 DUP7 MLOAD DUP1 DUP5 MSTORE PUSH1 0x80 DUP7 ADD SWAP2 POP DUP3 DUP9 ADD SWAP4 POP DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xE13 JUMPI PUSH3 0xE00 DUP6 MLOAD PUSH3 0xEBF JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xDEB JUMP JUMPDEST POP POP DUP5 DUP2 SUB PUSH1 0x40 DUP7 ADD MSTORE DUP6 MLOAD DUP1 DUP3 MSTORE SWAP1 DUP3 ADD SWAP3 POP DUP2 DUP7 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xE55 JUMPI PUSH3 0xE42 DUP4 MLOAD PUSH3 0xEBF JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xE2D JUMP JUMPDEST POP SWAP3 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP2 ADD PUSH1 0x3 DUP4 LT PUSH3 0xE72 JUMPI INVALID JUMPDEST SWAP2 SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0xE97 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH3 0xEB5 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0xA58 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x180 MLOAD PUSH1 0x60 SHR PUSH2 0x1A0 MLOAD PUSH2 0x1C0 MLOAD PUSH2 0x1E0 MLOAD PUSH1 0x60 SHR PUSH2 0x200 MLOAD PUSH1 0x60 SHR PUSH2 0x220 MLOAD PUSH1 0x60 SHR PUSH2 0x240 MLOAD PUSH1 0x60 SHR PUSH2 0x260 MLOAD PUSH1 0x60 SHR PUSH2 0x280 MLOAD PUSH1 0x60 SHR PUSH2 0x2A0 MLOAD PUSH1 0x60 SHR PUSH2 0x2C0 MLOAD PUSH1 0x60 SHR PUSH2 0x2E0 MLOAD PUSH2 0x300 MLOAD PUSH2 0x320 MLOAD PUSH2 0x340 MLOAD PUSH2 0x360 MLOAD PUSH2 0x380 MLOAD PUSH2 0x3A0 MLOAD PUSH2 0x3C0 MLOAD PUSH2 0x3E0 MLOAD PUSH2 0x400 MLOAD PUSH2 0x420 MLOAD PUSH2 0x440 MLOAD PUSH2 0x460 MLOAD PUSH2 0x480 MLOAD PUSH2 0x4A0 MLOAD PUSH2 0x4C0 MLOAD PUSH2 0x4E0 MLOAD PUSH2 0x4748 PUSH3 0x10F7 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x1EB8 MSTORE DUP1 PUSH2 0x2849 MSTORE POP DUP1 PUSH2 0x1E75 MSTORE DUP1 PUSH2 0x27E8 MSTORE POP DUP1 PUSH2 0x1E32 MSTORE DUP1 PUSH2 0x2787 MSTORE POP DUP1 PUSH2 0x1DEF MSTORE DUP1 PUSH2 0x2726 MSTORE POP DUP1 PUSH2 0x1DAC MSTORE DUP1 PUSH2 0x26C5 MSTORE POP DUP1 PUSH2 0x1D69 MSTORE DUP1 PUSH2 0x2664 MSTORE POP DUP1 PUSH2 0x1D26 MSTORE DUP1 PUSH2 0x2603 MSTORE POP DUP1 PUSH2 0x1CE3 MSTORE DUP1 PUSH2 0x25A2 MSTORE POP DUP1 PUSH2 0x22C2 MSTORE DUP1 PUSH2 0x22F6 MSTORE DUP1 PUSH2 0x2332 MSTORE POP DUP1 PUSH2 0x161C MSTORE DUP1 PUSH2 0x1B12 MSTORE POP DUP1 PUSH2 0x15D9 MSTORE DUP1 PUSH2 0x1AB1 MSTORE POP DUP1 PUSH2 0x1596 MSTORE DUP1 PUSH2 0x1A50 MSTORE POP DUP1 PUSH2 0x1553 MSTORE DUP1 PUSH2 0x19EF MSTORE POP DUP1 PUSH2 0x1510 MSTORE DUP1 PUSH2 0x198E MSTORE POP DUP1 PUSH2 0x14CD MSTORE DUP1 PUSH2 0x192D MSTORE POP DUP1 PUSH2 0x148A MSTORE DUP1 PUSH2 0x18CC MSTORE POP DUP1 PUSH2 0x1439 MSTORE DUP1 PUSH2 0x186B MSTORE POP DUP1 PUSH2 0x1AD7 MSTORE DUP1 PUSH2 0x280E MSTORE POP DUP1 PUSH2 0x1A76 MSTORE DUP1 PUSH2 0x27AD MSTORE POP DUP1 PUSH2 0x1A15 MSTORE DUP1 PUSH2 0x274C MSTORE POP DUP1 PUSH2 0x19B4 MSTORE DUP1 PUSH2 0x26EB MSTORE POP DUP1 PUSH2 0x1953 MSTORE DUP1 PUSH2 0x268A MSTORE POP DUP1 PUSH2 0x18F2 MSTORE DUP1 PUSH2 0x2629 MSTORE POP DUP1 PUSH2 0x1891 MSTORE DUP1 PUSH2 0x25C8 MSTORE POP DUP1 PUSH2 0x1830 MSTORE DUP1 PUSH2 0x2567 MSTORE POP DUP1 PUSH2 0x10F8 MSTORE POP DUP1 PUSH2 0x637 MSTORE POP DUP1 PUSH2 0x895 MSTORE POP DUP1 PUSH2 0xF45 MSTORE POP DUP1 PUSH2 0xF21 MSTORE POP DUP1 PUSH2 0xB15 MSTORE POP DUP1 PUSH2 0x1048 MSTORE POP DUP1 PUSH2 0x108A MSTORE POP DUP1 PUSH2 0x1069 MSTORE POP DUP1 PUSH2 0x871 MSTORE POP DUP1 PUSH2 0x7FB MSTORE POP PUSH2 0x4748 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1F0 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7ECEBE00 GT PUSH2 0x10F JUMPI DUP1 PUSH4 0xA9059CBB GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD5C096C4 GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD5C096C4 EQ PUSH2 0x3E6 JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x3F9 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x40C JUMPI DUP1 PUSH4 0xF89F27ED EQ PUSH2 0x41F JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x3B0 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x3C3 JUMPI DUP1 PUSH4 0xC0FF1A15 EQ PUSH2 0x3CB JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x3D3 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x8D928AF8 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8D928AF8 EQ PUSH2 0x385 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x38D JUMPI DUP1 PUSH4 0x9B02CDDE EQ PUSH2 0x395 JUMPI DUP1 PUSH4 0x9D2C110C EQ PUSH2 0x39D JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x337 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x34A JUMPI DUP1 PUSH4 0x87EC6817 EQ PUSH2 0x35D JUMPI DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x370 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E GT PUSH2 0x187 JUMPI DUP1 PUSH4 0x66188463 GT PUSH2 0x156 JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x2E8 JUMPI DUP1 PUSH4 0x679AEFCE EQ PUSH2 0x2FB JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x303 JUMPI DUP1 PUSH4 0x74F3B009 EQ PUSH2 0x316 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E EQ PUSH2 0x2A4 JUMPI DUP1 PUSH4 0x38FFF2D0 EQ PUSH2 0x2B7 JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0x2BF JUMPI DUP1 PUSH4 0x6028BFD4 EQ PUSH2 0x2C7 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x1C0DE051 GT PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x25D JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x274 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x287 JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x29C JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x1F5 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x213 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x233 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x248 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FD PUSH2 0x434 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x4623 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x226 PUSH2 0x221 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0x4CB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x455A JUMP JUMPDEST PUSH2 0x246 PUSH2 0x241 CALLDATASIZE PUSH1 0x4 PUSH2 0x40F3 JUMP JUMPDEST PUSH2 0x4E2 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x250 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH2 0x265 PUSH2 0x4FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4565 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x282 CALLDATASIZE PUSH1 0x4 PUSH2 0x3F48 JUMP JUMPDEST PUSH2 0x525 JUMP JUMPDEST PUSH2 0x28F PUSH2 0x5A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x468F JUMP JUMPDEST PUSH2 0x250 PUSH2 0x5AD JUMP JUMPDEST PUSH2 0x246 PUSH2 0x2B2 CALLDATASIZE PUSH1 0x4 PUSH2 0x4479 JUMP JUMPDEST PUSH2 0x5BC JUMP JUMPDEST PUSH2 0x250 PUSH2 0x635 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x659 JUMP JUMPDEST PUSH2 0x2DA PUSH2 0x2D5 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x65F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP3 SWAP2 SWAP1 PUSH2 0x4676 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x2F6 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0x696 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x6F0 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x311 CALLDATASIZE PUSH1 0x4 PUSH2 0x3EF4 JUMP JUMPDEST PUSH2 0x71B JUMP JUMPDEST PUSH2 0x329 PUSH2 0x324 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x73A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP3 SWAP2 SWAP1 PUSH2 0x4535 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x345 CALLDATASIZE PUSH1 0x4 PUSH2 0x3EF4 JUMP JUMPDEST PUSH2 0x7DC JUMP JUMPDEST PUSH2 0x250 PUSH2 0x358 CALLDATASIZE PUSH1 0x4 PUSH2 0x4227 JUMP JUMPDEST PUSH2 0x7F7 JUMP JUMPDEST PUSH2 0x2DA PUSH2 0x36B CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x849 JUMP JUMPDEST PUSH2 0x378 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x450E JUMP JUMPDEST PUSH2 0x378 PUSH2 0x893 JUMP JUMPDEST PUSH2 0x1FD PUSH2 0x8B7 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x918 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x3AB CALLDATASIZE PUSH1 0x4 PUSH2 0x437E JUMP JUMPDEST PUSH2 0x91E JUMP JUMPDEST PUSH2 0x226 PUSH2 0x3BE CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0xA05 JUMP JUMPDEST PUSH2 0x378 PUSH2 0xA12 JUMP JUMPDEST PUSH2 0x250 PUSH2 0xA1C JUMP JUMPDEST PUSH2 0x246 PUSH2 0x3E1 CALLDATASIZE PUSH1 0x4 PUSH2 0x3F88 JUMP JUMPDEST PUSH2 0xAE0 JUMP JUMPDEST PUSH2 0x329 PUSH2 0x3F4 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0xC29 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x407 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0xD4B JUMP JUMPDEST PUSH2 0x250 PUSH2 0x41A CALLDATASIZE PUSH1 0x4 PUSH2 0x3F10 JUMP JUMPDEST PUSH2 0xD81 JUMP JUMPDEST PUSH2 0x427 PUSH2 0xDAC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x4522 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x495 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4C0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4A3 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4D8 CALLER DUP5 DUP5 PUSH2 0xDF9 JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x4EA PUSH2 0xE61 JUMP JUMPDEST PUSH2 0x4F3 DUP2 PUSH2 0xE8F JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x509 PUSH2 0xF02 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x514 PUSH2 0xF1F JUMP JUMPDEST SWAP2 POP PUSH2 0x51E PUSH2 0xF43 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x563 SWAP2 EQ DUP1 PUSH2 0x55B JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x56E DUP6 DUP6 DUP6 PUSH2 0xF75 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x589 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x59B JUMPI PUSH2 0x59B DUP6 CALLER DUP6 DUP5 SUB PUSH2 0xDF9 JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x1044 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x5C4 PUSH2 0xE61 JUMP JUMPDEST PUSH2 0x5CC PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x5DF PUSH5 0xE8D4A51000 DUP3 LT ISZERO PUSH1 0xCB PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x5F5 PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH1 0xCA PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x7 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9CABC14D438714DBCD9292DF9B3F89C42F98ACD93A675AD72CD6033777E9B8E7 SWAP1 PUSH2 0x62A SWAP1 DUP4 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x675 DUP7 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x68A DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x111A PUSH2 0x11E1 PUSH2 0x1247 JUMP JUMPDEST SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x6D2 JUMPI PUSH2 0x6CD CALLER DUP6 PUSH1 0x0 PUSH2 0xDF9 JUMP JUMPDEST PUSH2 0x6E6 JUMP JUMPDEST PUSH2 0x6E6 CALLER DUP6 PUSH2 0x6E1 DUP5 DUP8 PUSH2 0xDE3 JUMP JUMPDEST PUSH2 0xDF9 JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x6FD PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0x715 PUSH2 0x708 PUSH2 0xA1C JUMP JUMPDEST PUSH2 0x710 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x1369 JUMP JUMPDEST SWAP1 PUSH2 0x138D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0x764 PUSH2 0x749 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH1 0xCD PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x779 PUSH2 0x76F PUSH2 0x635 JUMP JUMPDEST DUP3 EQ PUSH2 0x1F4 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x783 PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0x78F DUP9 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x7A3 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x111A JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x7B3 DUP14 DUP5 PUSH2 0x16BB JUMP JUMPDEST PUSH2 0x7BD DUP3 DUP6 PUSH2 0x11E1 JUMP JUMPDEST PUSH2 0x7C7 DUP2 DUP6 PUSH2 0x11E1 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP POP POP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x82C SWAP3 SWAP2 SWAP1 PUSH2 0x44CB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x85A DUP7 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x68A DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x174E PUSH2 0x17CB PUSH2 0x1247 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x495 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4C0 JUMP JUMPDEST PUSH1 0x8 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x92E DUP6 PUSH1 0x20 ADD MLOAD PUSH2 0x182C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x93F DUP7 PUSH1 0x40 ADD MLOAD PUSH2 0x182C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x950 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x9B6 JUMPI PUSH2 0x963 DUP7 PUSH1 0x60 ADD MLOAD PUSH2 0x1B41 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x972 DUP6 DUP4 PUSH2 0x1B65 JUMP JUMPDEST SWAP5 POP PUSH2 0x97E DUP5 DUP3 PUSH2 0x1B65 JUMP JUMPDEST SWAP4 POP PUSH2 0x98E DUP7 PUSH1 0x60 ADD MLOAD DUP4 PUSH2 0x1B65 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x9A0 DUP8 DUP8 DUP8 PUSH2 0x1B71 JUMP JUMPDEST SWAP1 POP PUSH2 0x9AC DUP2 DUP4 PUSH2 0x1BAC JUMP JUMPDEST SWAP4 POP POP POP POP PUSH2 0x5A1 JUMP JUMPDEST PUSH2 0x9C0 DUP6 DUP4 PUSH2 0x1B65 JUMP JUMPDEST SWAP5 POP PUSH2 0x9CC DUP5 DUP3 PUSH2 0x1B65 JUMP JUMPDEST SWAP4 POP PUSH2 0x9DC DUP7 PUSH1 0x60 ADD MLOAD DUP3 PUSH2 0x1B65 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x9EE DUP8 DUP8 DUP8 PUSH2 0x1BB8 JUMP JUMPDEST SWAP1 POP PUSH2 0x9FA DUP2 DUP5 PUSH2 0x1BEB JUMP JUMPDEST SWAP1 POP PUSH2 0x9AC DUP2 PUSH2 0x1BF7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4D8 CALLER DUP5 DUP5 PUSH2 0xF75 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x1C0E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0xA28 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF94D4668 PUSH2 0xA3E PUSH2 0x635 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xA5A SWAP2 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA72 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xA86 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0xAAE SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x4028 JUMP JUMPDEST POP SWAP2 POP POP PUSH2 0xAC3 DUP2 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH2 0x165A JUMP JUMPDEST PUSH1 0x60 PUSH2 0xACD PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH2 0xAD9 DUP2 DUP4 PUSH2 0x1EE4 JUMP JUMPDEST SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH2 0xAEE DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD SWAP1 MLOAD SWAP1 SWAP3 SWAP2 PUSH2 0xB45 SWAP2 PUSH32 0x0 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP9 SWAP2 DUP14 SWAP2 ADD PUSH2 0x45A5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0xB68 DUP3 PUSH2 0x1F56 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xB8F SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4605 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBB1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0xBF3 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xBEB JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0xC1C DUP12 DUP12 DUP12 PUSH2 0xDF9 JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0xC38 PUSH2 0x749 PUSH2 0x893 JUMP JUMPDEST PUSH2 0xC43 PUSH2 0x76F PUSH2 0x635 JUMP JUMPDEST PUSH1 0x60 PUSH2 0xC4D PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0xC57 PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0xCFC JUMPI PUSH1 0x0 PUSH1 0x60 PUSH2 0xC6B DUP14 DUP14 DUP14 DUP11 PUSH2 0x1F72 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xC80 PUSH3 0xF4240 DUP4 LT ISZERO PUSH1 0xCC PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xC8E PUSH1 0x0 PUSH3 0xF4240 PUSH2 0x200D JUMP JUMPDEST PUSH2 0xC9D DUP12 PUSH3 0xF4240 DUP5 SUB PUSH2 0x200D JUMP JUMPDEST PUSH2 0xCA7 DUP2 DUP5 PUSH2 0x17CB JUMP JUMPDEST DUP1 PUSH2 0xCB0 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xCC5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xCEF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0x7CF JUMP JUMPDEST PUSH2 0xD06 DUP9 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0xD1A DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x174E JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xD2A DUP13 DUP5 PUSH2 0x200D JUMP JUMPDEST PUSH2 0xD34 DUP3 DUP6 PUSH2 0x17CB JUMP JUMPDEST PUSH2 0xD3E DUP2 DUP6 PUSH2 0x11E1 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP PUSH2 0x7CF SWAP2 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x4D8 SWAP2 DUP6 SWAP1 PUSH2 0x6E1 SWAP1 DUP7 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x5B7 PUSH2 0x1C88 JUMP JUMPDEST DUP1 PUSH2 0xDC0 DUP2 PUSH2 0x20A3 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xDC0 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x5A1 DUP5 DUP3 LT ISZERO DUP4 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xDF3 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0xF67 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP5 SWAP1 SSTORE MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0xE54 SWAP1 DUP6 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE78 PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x7F7 JUMP JUMPDEST SWAP1 POP PUSH2 0x4F3 PUSH2 0xE87 DUP3 CALLER PUSH2 0x211C JUMP JUMPDEST PUSH2 0x191 PUSH2 0xF67 JUMP JUMPDEST DUP1 ISZERO PUSH2 0xEAF JUMPI PUSH2 0xEAA PUSH2 0xEA0 PUSH2 0xF1F JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xEC4 JUMP JUMPDEST PUSH2 0xEC4 PUSH2 0xEBA PUSH2 0xF43 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x62A SWAP1 DUP4 SWAP1 PUSH2 0x455A JUMP JUMPDEST PUSH1 0x0 PUSH2 0xF0C PUSH2 0xF43 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x5B7 JUMPI POP POP PUSH1 0x6 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST DUP2 PUSH2 0xDC0 JUMPI PUSH2 0xDC0 DUP2 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0xF9D DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xFB4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xFE4 SWAP1 DUP4 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP7 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1036 SWAP1 DUP7 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x10B1 PUSH2 0x225F JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10C6 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x45D9 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x10F4 PUSH2 0x10EC PUSH2 0xF02 JUMP JUMPDEST PUSH2 0x192 PUSH2 0xF67 JUMP JUMPDEST JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x60 PUSH2 0x1129 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH2 0x1133 PUSH2 0xF02 JUMP JUMPDEST ISZERO PUSH2 0x116A JUMPI PUSH1 0x0 PUSH2 0x1144 DUP3 DUP11 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH2 0x1155 DUP10 DUP4 PUSH1 0x8 SLOAD DUP5 DUP12 PUSH2 0x2263 JUMP JUMPDEST SWAP3 POP PUSH2 0x1164 DUP10 DUP5 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST POP PUSH2 0x11B5 JUMP JUMPDEST PUSH2 0x1172 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1187 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x11B1 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP JUMPDEST PUSH2 0x11C0 DUP9 DUP3 DUP8 PUSH2 0x23DD JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP PUSH2 0x11D0 DUP9 DUP5 DUP4 PUSH2 0x244A JUMP JUMPDEST PUSH1 0x8 SSTORE POP SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x11EC PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x1223 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1202 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1216 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2463 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x122F JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x11E4 JUMP JUMPDEST POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x1305 JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x126B SWAP3 SWAP2 SWAP1 PUSH2 0x44E3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x12A8 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x12AD JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x12BC JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x43ADBAFB PUSH1 0xE0 SHL DUP2 EQ PUSH2 0x12E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x4 PUSH1 0x0 RETURNDATACOPY PUSH1 0x40 PUSH1 0x20 MSTORE PUSH1 0x24 RETURNDATASIZE SUB PUSH1 0x24 PUSH1 0x40 RETURNDATACOPY PUSH1 0x1C RETURNDATASIZE ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x130F PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0x131B DUP8 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1332 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x1345 DUP2 DUP5 DUP7 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP1 MLOAD PUSH1 0x1F NOT DUP3 ADD DUP4 SWAP1 MSTORE PUSH4 0x43ADBAFB PUSH1 0x3F NOT DUP4 ADD MSTORE PUSH1 0x20 MUL PUSH1 0x23 NOT DUP3 ADD PUSH1 0x44 DUP3 ADD DUP2 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x5A1 DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139C DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x13A9 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x13CC SWAP1 DUP6 DUP4 DUP2 PUSH2 0x13C3 JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0xF67 JUMP JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x13D5 JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x13EA PUSH2 0x10F6 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1404 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x142E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1465 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x147F JUMP JUMPDEST SWAP2 POP PUSH2 0x4C8 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x14B6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x14F9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x153C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0x157F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0x15C2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0x1605 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0x1648 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x1665 PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x169C DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x167B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x168F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1369 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x16A8 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x165D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x16E3 DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP3 DUP3 SUB SWAP1 SSTORE PUSH1 0x2 SLOAD PUSH2 0x170D SWAP1 DUP4 PUSH2 0xDE3 JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0xE54 SWAP1 DUP7 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x175B PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1765 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1773 DUP3 DUP11 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x1786 DUP11 DUP5 PUSH1 0x8 SLOAD DUP6 DUP13 PUSH2 0x2263 JUMP JUMPDEST SWAP1 POP PUSH2 0x1795 DUP11 DUP3 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x17A4 DUP13 DUP7 DUP12 PUSH2 0x2483 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x17B3 DUP13 DUP3 DUP8 PUSH2 0x24DD JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP1 SWAP15 SWAP1 SWAP14 POP SWAP1 SWAP12 POP SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x17D6 PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x180D DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x17EC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1800 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x24EC JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1819 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x17CE JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x188F JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x18F0 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1951 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x19B2 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1A13 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1A74 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1AD5 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B36 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH2 0x735 PUSH2 0x135 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1B59 PUSH1 0x7 SLOAD DUP5 PUSH2 0x251F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x5A1 DUP4 DUP3 PUSH2 0xDE3 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x1369 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B7B PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x1BA4 DUP4 PUSH2 0x1B8C DUP7 PUSH1 0x20 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP5 PUSH2 0x1B9A DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x286D JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x2463 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BC2 PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x1BA4 DUP4 PUSH2 0x1BD3 DUP7 PUSH1 0x20 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP5 PUSH2 0x1BE1 DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x28E8 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x24EC JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4DC PUSH2 0x1C07 PUSH1 0x7 SLOAD PUSH2 0x295E JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2984 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C18 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1C50 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1C64 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x5B7 SWAP2 SWAP1 PUSH2 0x424F JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x1C94 PUSH2 0x10F6 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1CAE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1CD8 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1D0F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x1 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x1D52 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x1D95 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x1DD8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0x1E1B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0x1E5E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0x1EA1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0x1648 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x1F46 JUMPI PUSH2 0x1F3C PUSH2 0x1F35 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F0B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x1F1F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x29C6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x1EF0 JUMP JUMPDEST POP PUSH2 0x4DC PUSH1 0x0 DUP3 GT PUSH2 0x137 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1F60 PUSH2 0x1044 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x82C SWAP3 SWAP2 SWAP1 PUSH2 0x44F3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1F7E PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1F89 DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FA4 PUSH1 0x0 DUP3 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1F9C JUMPI INVALID JUMPDEST EQ PUSH1 0xCE PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1FAF DUP6 PUSH2 0x2A57 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FC3 PUSH2 0x1FBC PUSH2 0x10F6 JUMP JUMPDEST DUP3 MLOAD PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x1FCF DUP2 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1FD9 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1FE7 DUP3 DUP5 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1FF7 DUP3 PUSH2 0x710 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x8 SWAP3 SWAP1 SWAP3 SSTORE POP SWAP10 SWAP2 SWAP9 POP SWAP1 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x2030 SWAP1 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x2 SLOAD PUSH2 0x2056 SWAP1 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x2097 SWAP1 DUP6 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH2 0x20B2 JUMPI PUSH2 0x4F3 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x20C1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x20E9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x2112 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH2 0xF67 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x20D2 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xBA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1B PUSH2 0x213B PUSH2 0x86F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x2156 JUMPI POP PUSH2 0x2156 DUP4 PUSH2 0x2A6D JUMP JUMPDEST ISZERO PUSH2 0x217E JUMPI PUSH2 0x2163 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2186 PUSH2 0x1C0E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x21B5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4586 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x21CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x21E1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2205 SWAP2 SWAP1 PUSH2 0x410F JUMP JUMPDEST SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x226E PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x22AD JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP3 PUSH2 0x22BC JUMPI SWAP1 POP PUSH2 0x2369 JUMP JUMPDEST PUSH2 0x232F DUP8 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x22EB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x231F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 DUP8 DUP8 PUSH2 0x2A87 JUMP JUMPDEST DUP2 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x235B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP1 POP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x237D PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x23D7 JUMPI PUSH2 0x23B8 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2393 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x23A7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x23C4 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x2375 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x23EC DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x23FC JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2417 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2AFF JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x2442 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2425 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2435 JUMPI PUSH2 0x240D DUP7 DUP6 PUSH2 0x2BDC JUMP JUMPDEST PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2C0E JUMP JUMPDEST POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2459 DUP5 DUP5 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST PUSH2 0x1BA4 DUP3 DUP6 PUSH2 0x1EE4 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2472 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x247B JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x2492 DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x24A2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x24B3 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2C79 JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x24C1 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x24D2 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2CD3 JUMP JUMPDEST PUSH2 0x2440 PUSH2 0x136 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2459 DUP5 DUP5 PUSH2 0xDD1 PUSH2 0x2372 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x24FB DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x2508 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x2514 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2539 DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST DUP1 PUSH2 0x2548 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x25C6 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x2627 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x2688 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x26E9 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x274A JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x27AB JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x280C JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B36 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x288F PUSH2 0x2884 DUP8 PUSH8 0x429D069189E0000 PUSH2 0x2A15 JUMP JUMPDEST DUP4 GT ISZERO PUSH2 0x130 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x289B DUP8 DUP5 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28A9 DUP9 DUP4 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28B7 DUP9 DUP8 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28C5 DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA PUSH2 0x28D3 DUP3 PUSH2 0x295E JUMP JUMPDEST DUP10 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290A PUSH2 0x28FF DUP6 PUSH8 0x429D069189E0000 PUSH2 0x2A15 JUMP JUMPDEST DUP4 GT ISZERO PUSH2 0x131 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2920 PUSH2 0x2919 DUP7 DUP6 PUSH2 0xDE3 JUMP JUMPDEST DUP7 SWAP1 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x292E DUP6 DUP9 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x293C DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2952 DUP3 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA DUP11 DUP3 PUSH2 0x251F JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 DUP3 LT PUSH2 0x2976 JUMPI PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2993 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x29A0 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x29BA SWAP1 DUP6 DUP4 DUP2 PUSH2 0x13C3 JUMPI INVALID JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x2557 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x29D3 DUP5 DUP5 PUSH2 0x2DA6 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29ED PUSH2 0x29E6 DUP4 PUSH2 0x2710 PUSH2 0x251F JUMP JUMPDEST PUSH1 0x1 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP DUP1 DUP3 LT ISZERO PUSH2 0x2A02 JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2A0C DUP3 DUP3 PUSH2 0xDE3 JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2A2F DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x4DC SWAP2 SWAP1 PUSH2 0x426B JUMP JUMPDEST PUSH1 0x60 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5A1 SWAP2 SWAP1 PUSH2 0x4330 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2A7F PUSH4 0x1C74C917 PUSH1 0xE1 SHL PUSH2 0x7F7 JUMP JUMPDEST SWAP1 SWAP2 EQ SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP4 GT PUSH2 0x2A98 JUMPI POP PUSH1 0x0 PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2AA4 DUP6 DUP6 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2ABA PUSH8 0xDE0B6B3A7640000 DUP9 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH2 0x2ACE DUP3 PUSH8 0x9B6E64A8EC60000 PUSH2 0x2EB1 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x2ADC DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2AF3 PUSH2 0x2AEC DUP4 PUSH2 0x295E JUMP JUMPDEST DUP12 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA DUP2 DUP8 PUSH2 0x2A15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2B0B PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2B17 DUP6 PUSH2 0x2EC8 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2B2F PUSH2 0x2B26 PUSH2 0x10F6 JUMP JUMPDEST DUP3 LT PUSH1 0x64 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2B39 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2B4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2B78 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2BB7 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2B8A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2B9E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH2 0x2BAF PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2EEA JUMP JUMPDEST DUP2 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2BC3 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP2 SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x2BEB DUP5 PUSH2 0x2FA7 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x2C01 DUP7 DUP4 PUSH2 0x2BFC PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0x2FBD JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2C1A PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2C27 DUP6 PUSH2 0x306E JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2C38 DUP3 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x2C44 DUP3 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C5C DUP9 DUP9 DUP6 PUSH2 0x2C54 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x3086 JUMP JUMPDEST SWAP1 POP PUSH2 0x2C6C DUP3 DUP3 GT ISZERO PUSH1 0xCF PUSH2 0xF67 JUMP JUMPDEST SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x2C89 DUP6 PUSH2 0x306E JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2C9F PUSH2 0x2C98 PUSH2 0x10F6 JUMP JUMPDEST DUP4 MLOAD PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x2CAB DUP3 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2CC3 DUP9 DUP9 DUP6 PUSH2 0x2CBB PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x32AA JUMP JUMPDEST SWAP1 POP PUSH2 0x2C6C DUP3 DUP3 LT ISZERO PUSH1 0xD0 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0x2CE3 DUP6 PUSH2 0x2EC8 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2CF2 PUSH2 0x2B26 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2CFC PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2D11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2D3B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2BB7 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2D4D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2D61 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH2 0x2D72 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x34BA JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2D87 DUP5 DUP5 PUSH2 0x2DA6 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2D9A PUSH2 0x29E6 DUP4 PUSH2 0x2710 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH2 0x2369 DUP3 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x2DBC JUMPI POP PUSH8 0xDE0B6B3A7640000 PUSH2 0x4DC JUMP JUMPDEST DUP3 PUSH2 0x2DC9 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2DDA PUSH1 0x1 PUSH1 0xFF SHL DUP5 LT PUSH1 0x6 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x2E00 PUSH24 0xBCE5086492111AEA88F4BB1CA6BCF584181EA8059F76532 DUP5 LT PUSH1 0x7 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH1 0x0 PUSH8 0xC7D713B49DA0000 DUP4 SGT DUP1 ISZERO PUSH2 0x2E21 JUMPI POP PUSH8 0xF43FC2C04EE0000 DUP4 SLT JUMPDEST ISZERO PUSH2 0x2E58 JUMPI PUSH1 0x0 PUSH2 0x2E31 DUP5 PUSH2 0x355C JUMP JUMPDEST SWAP1 POP PUSH8 0xDE0B6B3A7640000 DUP1 DUP3 SMOD DUP5 MUL SDIV DUP4 PUSH8 0xDE0B6B3A7640000 DUP4 SDIV MUL ADD SWAP2 POP POP PUSH2 0x2E66 JUMP JUMPDEST DUP2 PUSH2 0x2E62 DUP5 PUSH2 0x367A JUMP JUMPDEST MUL SWAP1 POP JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 SDIV PUSH2 0x2E9E PUSH9 0x238FD42C5CF03FFFF NOT DUP3 SLT DUP1 ISZERO SWAP1 PUSH2 0x2E97 JUMPI POP PUSH9 0x70C1CC73B00C80000 DUP3 SGT ISZERO JUMPDEST PUSH1 0x8 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x2EA7 DUP2 PUSH2 0x3A27 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT ISZERO PUSH2 0x2EC1 JUMPI DUP2 PUSH2 0x5A1 JUMP JUMPDEST POP SWAP1 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2EDF SWAP2 SWAP1 PUSH2 0x42FA JUMP JUMPDEST SWAP1 SWAP6 SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2F01 DUP5 PUSH2 0x2EFB DUP2 DUP9 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F1A PUSH8 0x9B6E64A8EC60000 DUP3 LT ISZERO PUSH2 0x132 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2F38 PUSH2 0x2F31 PUSH8 0xDE0B6B3A7640000 DUP10 PUSH2 0x138D JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F4F PUSH2 0x2F48 DUP4 PUSH2 0x295E JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F5C DUP10 PUSH2 0x295E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F6A DUP4 DUP4 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F78 DUP5 DUP4 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F97 PUSH2 0x2F90 PUSH2 0x2F89 DUP11 PUSH2 0x295E JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST DUP3 SWAP1 PUSH2 0xDD1 JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5A1 SWAP2 SWAP1 PUSH2 0x42CD JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2FCB DUP5 DUP5 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2FE6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3010 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0x3064 JUMPI PUSH2 0x3045 DUP4 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2A15 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3051 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x3016 JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2EDF SWAP2 SWAP1 PUSH2 0x4287 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x30A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x30CB JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x3190 JUMPI PUSH2 0x312B DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x30EA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2EFB DUP10 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3101 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xDE3 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3137 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x3186 PUSH2 0x317F DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3155 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3169 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x251F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 SWAP1 PUSH2 0xDD1 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x30D2 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x3289 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x31B4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 GT ISZERO PUSH2 0x320B JUMPI PUSH1 0x0 PUSH2 0x31DD PUSH2 0x31D1 DUP7 PUSH2 0x295E JUMP JUMPDEST DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x31F1 DUP3 DUP13 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x3202 PUSH2 0x317F PUSH2 0x1C07 DUP12 PUSH2 0x295E JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x3222 JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3217 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x324B DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3233 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP5 DUP16 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x327D PUSH2 0x3276 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x325F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x29C6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP4 POP POP POP PUSH1 0x1 ADD PUSH2 0x319D JUMP JUMPDEST POP PUSH2 0x329D PUSH2 0x3296 DUP3 PUSH2 0x295E JUMP JUMPDEST DUP8 SWAP1 PUSH2 0x251F JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x32C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x32EF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x3397 JUMPI PUSH2 0x334F DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x330E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP10 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3325 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3339 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xDD1 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x335B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x338D PUSH2 0x317F DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3379 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x32F6 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x3478 JUMPI PUSH1 0x0 DUP4 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x33BC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD GT ISZERO PUSH2 0x3418 JUMPI PUSH1 0x0 PUSH2 0x33E1 PUSH2 0x31D1 DUP7 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x33F5 DUP3 DUP13 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x340F PUSH2 0x317F PUSH2 0x1F35 PUSH8 0xDE0B6B3A7640000 DUP13 PUSH2 0xDE3 JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x342F JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3424 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x3458 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3440 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP5 DUP16 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3339 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x346C PUSH2 0x3276 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x325F JUMPI INVALID JUMPDEST SWAP4 POP POP POP PUSH1 0x1 ADD PUSH2 0x33A4 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 DUP2 LT PUSH2 0x34AE JUMPI PUSH2 0x34A4 PUSH2 0x349D DUP3 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST DUP8 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP4 POP POP POP POP PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 SWAP4 POP POP POP POP PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x34CB DUP5 PUSH2 0x2EFB DUP2 DUP9 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP PUSH2 0x34E4 PUSH8 0x29A2241AF62C0000 DUP3 GT ISZERO PUSH2 0x133 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x34FB PUSH2 0x2F31 PUSH8 0xDE0B6B3A7640000 DUP10 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x351B PUSH2 0x3514 DUP4 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3528 DUP10 PUSH2 0x295E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3536 DUP4 DUP4 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3544 DUP5 DUP4 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F97 PUSH2 0x2F90 PUSH2 0x3555 DUP11 PUSH2 0x295E JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x2984 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 MUL PUSH1 0x0 DUP1 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP1 DUP5 ADD SWAP1 PUSH15 0xC097CE7BC90715B34B9F0FFFFFFFFF NOT DUP6 ADD MUL DUP2 PUSH2 0x3597 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH1 0x0 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP1 MUL SDIV SWAP1 POP DUP2 DUP1 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 DUP5 MUL SDIV SWAP2 POP PUSH1 0x3 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x5 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x7 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x9 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xB DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xD DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xF DUP3 PUSH1 0x2 SWAP2 SWAP1 SDIV SWAP2 SWAP1 SWAP2 ADD MUL SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x368A PUSH1 0x0 DUP4 SGT PUSH1 0x64 PUSH2 0xF67 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP3 SLT ISZERO PUSH2 0x36C4 JUMPI PUSH2 0x36BA DUP3 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 PUSH2 0x36B4 JUMPI INVALID JUMPDEST SDIV PUSH2 0x367A JUMP JUMPDEST PUSH1 0x0 SUB SWAP1 POP PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH31 0x1600EF3172E58D2E933EC884FDE10064C63B5372D805E203C0000000000000 DUP4 SLT PUSH2 0x3715 JUMPI PUSH24 0x195E54C5DD42177F53A27172FA9EC630262827000000000 DUP4 SDIV SWAP3 POP PUSH9 0x6F05B59D3B2000000 ADD JUMPDEST PUSH20 0x11798004D755D3C8BC8E03204CF44619E000000 DUP4 SLT PUSH2 0x374D JUMPI PUSH12 0x1425982CF597CD205CEF7380 DUP4 SDIV SWAP3 POP PUSH9 0x3782DACE9D9000000 ADD JUMPDEST PUSH1 0x64 SWAP3 DUP4 MUL SWAP3 MUL PUSH15 0x1855144814A7FF805980FF0084000 DUP4 SLT PUSH2 0x3795 JUMPI PUSH15 0x1855144814A7FF805980FF0084000 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0xAD78EBC5AC62000000 ADD JUMPDEST PUSH12 0x2DF0AB5A80A22C61AB5A700 DUP4 SLT PUSH2 0x37D0 JUMPI PUSH12 0x2DF0AB5A80A22C61AB5A700 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x56BC75E2D631000000 ADD JUMPDEST PUSH10 0x3F1FCE3DA636EA5CF850 DUP4 SLT PUSH2 0x3807 JUMPI PUSH10 0x3F1FCE3DA636EA5CF850 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x2B5E3AF16B18800000 ADD JUMPDEST PUSH10 0x127FA27722CC06CC5E2 DUP4 SLT PUSH2 0x383E JUMPI PUSH10 0x127FA27722CC06CC5E2 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x15AF1D78B58C400000 ADD JUMPDEST PUSH9 0x280E60114EDB805D03 DUP4 SLT PUSH2 0x3873 JUMPI PUSH9 0x280E60114EDB805D03 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0xAD78EBC5AC6200000 ADD JUMPDEST PUSH9 0xEBC5FB41746121110 DUP4 SLT PUSH2 0x389E JUMPI PUSH9 0xEBC5FB41746121110 PUSH9 0x56BC75E2D63100000 SWAP4 DUP5 MUL SDIV SWAP3 ADD JUMPDEST PUSH9 0x8F00F760A4B2DB55D DUP4 SLT PUSH2 0x38D3 JUMPI PUSH9 0x8F00F760A4B2DB55D PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x2B5E3AF16B1880000 ADD JUMPDEST PUSH9 0x6F5F1775788937937 DUP4 SLT PUSH2 0x3908 JUMPI PUSH9 0x6F5F1775788937937 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x15AF1D78B58C40000 ADD JUMPDEST PUSH9 0x6248F33704B286603 DUP4 SLT PUSH2 0x393C JUMPI PUSH9 0x6248F33704B286603 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH8 0xAD78EBC5AC620000 ADD JUMPDEST PUSH9 0x5C548670B9510E7AC DUP4 SLT PUSH2 0x3970 JUMPI PUSH9 0x5C548670B9510E7AC PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH8 0x56BC75E2D6310000 ADD JUMPDEST PUSH1 0x0 PUSH9 0x56BC75E2D63100000 DUP5 ADD PUSH9 0x56BC75E2D63100000 DUP1 DUP7 SUB MUL DUP2 PUSH2 0x3993 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH1 0x0 PUSH9 0x56BC75E2D63100000 DUP3 DUP1 MUL SDIV SWAP1 POP DUP2 DUP1 PUSH9 0x56BC75E2D63100000 DUP2 DUP5 MUL SDIV SWAP2 POP PUSH1 0x3 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x5 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x7 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x9 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xB DUP3 SDIV ADD PUSH1 0x2 MUL PUSH1 0x64 DUP6 DUP3 ADD SDIV SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3A56 PUSH9 0x238FD42C5CF03FFFF NOT DUP4 SLT ISZERO DUP1 ISZERO PUSH2 0x3A4F JUMPI POP PUSH9 0x70C1CC73B00C80000 DUP4 SGT ISZERO JUMPDEST PUSH1 0x9 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 DUP3 SLT ISZERO PUSH2 0x3A89 JUMPI PUSH2 0x3A6B DUP3 PUSH1 0x0 SUB PUSH2 0x3A27 JUMP JUMPDEST PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 PUSH2 0x3A81 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH9 0x6F05B59D3B2000000 DUP4 SLT PUSH2 0x3AC9 JUMPI POP PUSH9 0x6F05B59D3B1FFFFFF NOT SWAP1 SWAP2 ADD SWAP1 PUSH24 0x195E54C5DD42177F53A27172FA9EC630262827000000000 PUSH2 0x3AFF JUMP JUMPDEST PUSH9 0x3782DACE9D9000000 DUP4 SLT PUSH2 0x3AFB JUMPI POP PUSH9 0x3782DACE9D8FFFFFF NOT SWAP1 SWAP2 ADD SWAP1 PUSH12 0x1425982CF597CD205CEF7380 PUSH2 0x3AFF JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST PUSH1 0x64 SWAP3 SWAP1 SWAP3 MUL SWAP2 PUSH9 0x56BC75E2D63100000 PUSH9 0xAD78EBC5AC62000000 DUP5 SLT PUSH2 0x3B4F JUMPI PUSH9 0xAD78EBC5AC61FFFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH15 0x1855144814A7FF805980FF0084000 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D631000000 DUP5 SLT PUSH2 0x3B8B JUMPI PUSH9 0x56BC75E2D630FFFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH12 0x2DF0AB5A80A22C61AB5A700 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x2B5E3AF16B18800000 DUP5 SLT PUSH2 0x3BC5 JUMPI PUSH9 0x2B5E3AF16B187FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH10 0x3F1FCE3DA636EA5CF850 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x15AF1D78B58C400000 DUP5 SLT PUSH2 0x3BFF JUMPI PUSH9 0x15AF1D78B58C3FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH10 0x127FA27722CC06CC5E2 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0xAD78EBC5AC6200000 DUP5 SLT PUSH2 0x3C38 JUMPI PUSH9 0xAD78EBC5AC61FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x280E60114EDB805D03 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D63100000 DUP5 SLT PUSH2 0x3C71 JUMPI PUSH9 0x56BC75E2D630FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0xEBC5FB41746121110 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x2B5E3AF16B1880000 DUP5 SLT PUSH2 0x3CAA JUMPI PUSH9 0x2B5E3AF16B187FFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x8F00F760A4B2DB55D DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x15AF1D78B58C40000 DUP5 SLT PUSH2 0x3CE3 JUMPI PUSH9 0x15AF1D78B58C3FFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x6F5F1775788937937 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D63100000 DUP5 DUP2 ADD SWAP1 DUP6 SWAP1 PUSH1 0x2 SWAP1 DUP3 DUP1 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x3 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x4 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x5 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x6 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x7 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x8 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x9 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xA PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xB PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xC PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x64 PUSH9 0x56BC75E2D63100000 DUP5 DUP5 MUL SDIV DUP6 MUL SDIV SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x4DC DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3E1F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x3E32 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST PUSH2 0x469D JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x3E53 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x3E72 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3E56 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3E8D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3EA2 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3EB5 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x469D JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x3ECC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x4DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3F05 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5A1 DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3F22 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x3F2D DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x3F3D DUP2 PUSH2 0x46E2 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x3F5C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x3F67 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x3F77 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3FA2 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH2 0x3FAD DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x3FBD DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x3FE0 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP7 SWAP10 SWAP6 SWAP9 POP SWAP4 SWAP7 SWAP3 SWAP6 SWAP5 PUSH1 0xA0 DUP5 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 SWAP1 SWAP4 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x400F JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x401A DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x403C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4052 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4065 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x4073 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x4093 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x40BE JUMPI DUP1 MLOAD PUSH2 0x40AA DUP2 PUSH2 0x46E2 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x4097 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x40D5 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x40E2 DUP7 DUP3 DUP8 ADD PUSH2 0x3E0F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4104 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5A1 DUP2 PUSH2 0x46F7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4120 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x46F7 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x4145 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP8 CALLDATALOAD SWAP7 POP PUSH1 0x20 DUP1 DUP10 ADD CALLDATALOAD PUSH2 0x4158 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP7 POP PUSH1 0x40 DUP10 ADD CALLDATALOAD PUSH2 0x4168 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP6 POP PUSH1 0x60 DUP10 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4183 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP12 ADD SWAP2 POP DUP12 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4196 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x41A4 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE DUP6 DUP3 ADD SWAP2 POP DUP6 DUP6 ADD DUP16 DUP8 DUP9 DUP7 MUL DUP9 ADD ADD GT ISZERO PUSH2 0x41C2 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x41E4 JUMPI DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH2 0x41C6 JUMP JUMPDEST POP SWAP9 POP POP POP PUSH1 0x80 DUP12 ADD CALLDATALOAD SWAP6 POP PUSH1 0xA0 DUP12 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD SWAP3 POP DUP1 DUP4 GT ISZERO PUSH2 0x420A JUMPI DUP4 DUP5 REVERT JUMPDEST POP POP PUSH2 0x4218 DUP11 DUP3 DUP12 ADD PUSH2 0x3E7D JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4238 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x5A1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4260 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x427C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x429B JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x42A6 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x42C1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x40E2 DUP7 DUP3 DUP8 ADD PUSH2 0x3E0F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x42DF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x42EA DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x430E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x4319 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD PUSH1 0x40 SWAP1 SWAP6 ADD MLOAD SWAP1 SWAP7 SWAP5 SWAP6 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x4342 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x434D DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x4368 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x4374 DUP6 DUP3 DUP7 ADD PUSH2 0x3E0F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x4392 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x43A8 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP PUSH2 0x120 DUP1 DUP4 DUP10 SUB SLT ISZERO PUSH2 0x43BE JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x43C7 DUP2 PUSH2 0x469D JUMP JUMPDEST SWAP1 POP PUSH2 0x43D3 DUP9 DUP5 PUSH2 0x3EE5 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x43E2 DUP9 PUSH1 0x20 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x43F4 DUP9 PUSH1 0x40 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x4424 DUP9 PUSH1 0xC0 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x4436 DUP9 PUSH1 0xE0 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 DUP1 DUP5 ADD CALLDATALOAD DUP4 DUP2 GT ISZERO PUSH2 0x444E JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH2 0x445A DUP11 DUP3 DUP8 ADD PUSH2 0x3E7D JUMP JUMPDEST SWAP2 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP8 PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP8 POP PUSH1 0x40 SWAP1 SWAP7 ADD CALLDATALOAD SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x448A JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x44C0 JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x44A4 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x5A1 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x4491 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x4548 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x4491 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x2369 DUP2 DUP6 PUSH2 0x4491 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP6 DUP7 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x20 DUP8 ADD MSTORE SWAP3 SWAP1 SWAP4 AND PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0x80 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x464F JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x4633 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x4660 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x1BA4 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x4491 JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x46BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x46D8 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x5DAE8954494FC239D6EDD2B70A6D1304F3CE003F1A0AD7 PUSH6 0x569325030008 DUP1 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "1242:21086:38:-:0;;;1979:109:26;1933:155;;2290:2221:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2642:5;2661:4;2679:6;2699;2719:17;2750:19;2783:20;2817:5;1417::28;1436:6;:13;1453:1;1436:18;:102;;1495:43;1436:102;;;1457:35;1436:102;2020:280:15;;;;;;;;;;;;-1:-1:-1;;;2020:280:15;;;;;;;4921:10:29;1929:46:2;;-1:-1:-1;1688:14:30;;;-1:-1:-1;;;;;;1688:14:30;;;2100:22:15;;;;;;;;2085:37;;2150:25;;;;2132:43;;2198:95;2185:108;;2222:17:26;;2100:22:15;;1570:6:28;;1590;;1610:17;;1641:19;;1674:20;;1688:14:30;;1641:19:28;;1674:20;;2100:22:15;;1570:6:28;;2222:17:26::1;::::0;:5:::1;::::0;2100:22:15;2222:17:26::1;:::i;:::-;-1:-1:-1::0;2249:21:26;;::::1;::::0;:7:::1;::::0;:21:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;2441:93:8;;-1:-1:-1;;2103:7:8;2450:49;;;6544:3:3;2441:8:8;:93::i;:::-;2544:96;2171:7;2553:51;;;6608:3:3;2544:8:8;:96::i;:::-;2680:15;:37;;;2728:40;;;;2801:41;2778:64;;5106:13:29;;5097:57:::4;::::0;2480:1:::4;-1:-1:-1::0;5106:28:29::4;5119:3:3;5097:8:29;:57::i;:::-;5164;2526:1;5173:6;:13;:28;;5167:3:3;5164:8:29;;;:57;;:::i;:::-;5769:40;5802:6;5769:32;;;;;:40;;:::i;:::-;5820:87;2632:4;5829:45:::0;::::4;;5289:3:3;5820:8:29;:87::i;:::-;5917;2705:4;5926:45:::0;::::4;;5228:3:3;5917:8:29;:87::i;:::-;6032:34;::::0;-1:-1:-1;;;6032:34:29;;6015:14:::4;::::0;-1:-1:-1;;;;;6032:18:29;::::4;::::0;-1:-1:-1;;6032:34:29::4;::::0;6051:14;;6032:34:::4;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6181:13:::0;;6015:51;;-1:-1:-1;;;;;;6130:20:29;::::4;::::0;::::4;::::0;6015:51;;6159:6;;-1:-1:-1;6167:28:29;::::4;::::0;::::4;;;;::::0;::::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;6167:28:29::4;;6130:66;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;::::0;::::4;;;;;-1:-1:-1::0;;;;;6297:14:29;;;-1:-1:-1;;;;;;6297:14:29;::::4;::::0;6321:16:::4;::::0;;;6347:18:::4;:38:::0;;;6410:13;;6395:28:::4;::::0;6560:13;;:41:::4;;6599:1;6560:41;;;6580:6;6587:1;6580:9;;;;;;;;;;;;;;6560:41;6550:51;::::0;-1:-1:-1;;;;;;6550:51:29;::::4;::::0;6621:13;;-1:-1:-1;;6621:41:29::4;;6660:1;6621:41;;;6641:6;6648:1;6641:9;;;;;;;;;;;;;;6621:41;6611:51;::::0;-1:-1:-1;;;;;;6611:51:29;::::4;::::0;6682:13;;6698:1:::4;-1:-1:-1::0;6682:41:29::4;;6721:1;6682:41;;;6702:6;6709:1;6702:9;;;;;;;;;;;;;;6682:41;6672:51;::::0;-1:-1:-1;;;;;;6672:51:29;::::4;::::0;6743:13;;6759:1:::4;-1:-1:-1::0;6743:41:29::4;;6782:1;6743:41;;;6763:6;6770:1;6763:9;;;;;;;;;;;;;;6743:41;6733:51;::::0;-1:-1:-1;;;;;;6733:51:29;::::4;::::0;6804:13;;6820:1:::4;-1:-1:-1::0;6804:41:29::4;;6843:1;6804:41;;;6824:6;6831:1;6824:9;;;;;;;;;;;;;;6804:41;6794:51;::::0;-1:-1:-1;;;;;;6794:51:29;::::4;::::0;6865:13;;6881:1:::4;-1:-1:-1::0;6865:41:29::4;;6904:1;6865:41;;;6885:6;6892:1;6885:9;;;;;;;;;;;;;;6865:41;6855:51;::::0;-1:-1:-1;;;;;;6855:51:29;::::4;::::0;6926:13;;6942:1:::4;-1:-1:-1::0;6926:41:29::4;;6965:1;6926:41;;;6946:6;6953:1;6946:9;;;;;;;;;;;;;;6926:41;6916:51;::::0;-1:-1:-1;;;;;;6916:51:29;::::4;::::0;6987:13;;7003:1:::4;-1:-1:-1::0;6987:41:29::4;;7026:1;6987:41;;;7007:6;7014:1;7007:9;;;;;;;;;;;;;;6987:41;6977:51;::::0;-1:-1:-1;;;;;;6977:51:29;::::4;::::0;7057:13;;:56:::4;;7112:1;7057:56;;;7077:32;7099:6;7106:1;7099:9;;;;;;;;;;;;;;7077:21;;;:32;;:::i;:::-;7039:74;::::0;7141:13;;7157:1:::4;-1:-1:-1::0;7141:56:29::4;;7196:1;7141:56;;;7161:32;7183:6;7190:1;7183:9;;;;;;;7161:32;7123:74;::::0;7225:13;;7241:1:::4;-1:-1:-1::0;7225:56:29::4;;7280:1;7225:56;;;7245:32;7267:6;7274:1;7267:9;;;;;;;7245:32;7207:74;::::0;7309:13;;7325:1:::4;-1:-1:-1::0;7309:56:29::4;;7364:1;7309:56;;;7329:32;7351:6;7358:1;7351:9;;;;;;;7329:32;7291:74;::::0;7393:13;;7409:1:::4;-1:-1:-1::0;7393:56:29::4;;7448:1;7393:56;;;7413:32;7435:6;7442:1;7435:9;;;;;;;7413:32;7375:74;::::0;7477:13;;7493:1:::4;-1:-1:-1::0;7477:56:29::4;;7532:1;7477:56;;;7497:32;7519:6;7526:1;7519:9;;;;;;;7497:32;7459:74;::::0;7561:13;;7577:1:::4;-1:-1:-1::0;7561:56:29::4;;7616:1;7561:56;;;7581:32;7603:6;7610:1;7603:9;;;;;;;7581:32;7543:74;::::0;7645:13;;7661:1:::4;-1:-1:-1::0;7645:56:29::4;;7700:1;7645:56;;;7665:32;7687:6;7694:1;7687:9;;;;;;;7665:32;7627:74;;;;::::0;::::4;4039:3669;::::0;;;;;;;;;1124:668:28;;;;;;;;2847:17:38::1;2867:6;:13;2847:33;;2890:72;2926:9;2937:17;:24;2890:35;;;;;:72;;:::i;:::-;3084:21;3119:27:::0;3160::::1;3206:7:::0;3201:419:::1;3223:9;3219:1;:13;;;3201:419;;;3253:24;3280:17;3298:1;3280:20;;;;;;;;;;;;;;;;3253:47;;3314:60;1178:7:37;3323:16:38;:31;;5758:3:3;3314:8:38;;;:60;;:::i;:::-;3405:35;3423:16;3405:13;:17;;;;;;:35;;;;:::i;:::-;3389:51;;3477:19;3458:16;:38;3454:156;;;3538:1;3516:23;;;;3579:16;3557:38;;3454:156;-1:-1:-1::0;3234:3:38::1;;3201:419;;;-1:-1:-1::0;3686:77:38::1;893:4:9;3695:31:38::0;::::1;6103:3:3;3686:8:38;:77::i;:::-;3774:42;::::0;;;3847:24;;:55:::1;;3901:1;3847:55;;;3878:17;3896:1;3878:20;;;;;;;;;;;;;;3847:55;3826:76;::::0;3933:24;;3960:1:::1;-1:-1:-1::0;3933:55:38::1;;3987:1;3933:55;;;3964:17;3982:1;3964:20;;;;;;;;;;;;;;3933:55;3912:76;::::0;4019:24;;4046:1:::1;-1:-1:-1::0;4019:55:38::1;;4073:1;4019:55;;;4050:17;4068:1;4050:20;;;;;;;;;;;;;;4019:55;3998:76;::::0;4105:24;;4132:1:::1;-1:-1:-1::0;4105:55:38::1;;4159:1;4105:55;;;4136:17;4154:1;4136:20;;;;;;;;;;;;;;4105:55;4084:76;::::0;4191:24;;4218:1:::1;-1:-1:-1::0;4191:55:38::1;;4245:1;4191:55;;;4222:17;4240:1;4222:20;;;;;;;;;;;;;;4191:55;4170:76;::::0;4277:24;;4304:1:::1;-1:-1:-1::0;4277:55:38::1;;4331:1;4277:55;;;4308:17;4326:1;4308:20;;;;;;;;;;;;;;4277:55;4256:76;::::0;4363:24;;4390:1:::1;-1:-1:-1::0;4363:55:38::1;;4417:1;4363:55;;;4394:17;4412:1;4394:20;;;;;;;;;;;;;;4363:55;4342:76;::::0;4449:24;;4476:1:::1;-1:-1:-1::0;4449:55:38::1;;4503:1;4449:55;;;4480:17;4498:1;4480:20;;;;;;;;;;;;;;4449:55;4428:76;::::0;-1:-1:-1;1242:21086:38;;-1:-1:-1;;;;;;;;;;;;1242:21086:38;866:101:3;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;1460:274:6:-;1670:5;1694:33;1670:5;1694:19;:33::i;20273:399:29:-;20340:7;20439:21;20477:5;-1:-1:-1;;;;;20463:30:29;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;20439:56;;;;20570:26;20599:27;20608:2;20612:13;20599:8;;;;;:27;;:::i;:::-;20643:2;:22;;20273:399;-1:-1:-1;;;;20273:399:29:o;855:131:6:-;933:46;942:6;;;5002:3:3;933:8:6;:46::i;1157:239:9:-;1215:7;1319:5;;;1334:37;1343:6;;;;1215:7;1334:8;:37::i;:::-;1388:1;-1:-1:-1;1157:239:9;;;;;:::o;1074:3172:3:-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2210:2;2243:18;;;2336;;;2383;;;2215:4;2379:29;;;3057:2;3053:17;2195:18;;;;2288;;;;2284:29;;;;3040:1;3036:14;3025:26;;;;3021:50;;;;2999:73;;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;1740:374:6;1836:1;1821:5;:12;:16;1817:53;;;1853:7;;1817:53;1880:16;1899:5;1905:1;1899:8;;;;;;;;;;;;;;1880:27;;1922:9;1934:1;1922:13;;1917:191;1941:5;:12;1937:1;:16;1917:191;;;1974:15;1992:5;1998:1;1992:8;;;;;;;;;;;;;;;;;;;-1:-1:-1;2014:51:6;-1:-1:-1;;;;;2023:18:6;;;;;;;4890:3:3;2014:8:6;:51::i;:::-;2090:7;-1:-1:-1;1955:3:6;;1917:191;;;;1740:374;;;:::o;948:166:11:-;1006:7;1025:37;1034:6;;;;4370:1:3;1025:8:11;:37::i;:::-;-1:-1:-1;1084:5:11;;;948:166::o;1242:21086:38:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1242:21086:38;;;-1:-1:-1;1242:21086:38;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;5:134:-1;83:13;;101:33;83:13;101:33;:::i;172:767::-;;315:3;308:4;300:6;296:17;292:27;282:2;;-1:-1;;323:12;282:2;363:6;357:13;385:95;400:79;472:6;400:79;:::i;:::-;385:95;:::i;:::-;508:21;;;376:104;-1:-1;552:4;565:14;;;;540:17;;;654;;;645:27;;;;642:36;-1:-1;639:2;;;691:1;;681:12;639:2;716:1;701:232;726:6;723:1;720:13;701:232;;;1935:6;1929:13;1947:48;1989:5;1947:48;:::i;:::-;794:76;;884:14;;;;912;;;;748:1;741:9;701:232;;;705:14;;;;;275:664;;;;:::o;965:722::-;;1093:3;1086:4;1078:6;1074:17;1070:27;1060:2;;-1:-1;;1101:12;1060:2;1141:6;1135:13;1163:80;1178:64;1235:6;1178:64;:::i;1163:80::-;1271:21;;;1154:89;-1:-1;1315:4;1328:14;;;;1303:17;;;1417;;;1408:27;;;;1405:36;-1:-1;1402:2;;;1454:1;;1444:12;1402:2;1479:1;1464:217;1489:6;1486:1;1483:13;1464:217;;;2711:13;;1557:61;;1632:14;;;;1660;;;;1511:1;1504:9;1464:217;;2181:444;;2294:3;2287:4;2279:6;2275:17;2271:27;2261:2;;-1:-1;;2302:12;2261:2;2336:13;;-1:-1;9907:30;;9904:2;;;-1:-1;;9940:12;9904:2;10081:4;2364:65;-1:-1;;10013:9;9994:17;;9990:33;10071:15;;2364:65;:::i;:::-;2355:74;;2449:6;2442:5;2435:21;2553:3;10081:4;2544:6;2477;2535:16;;2532:25;2529:2;;;2570:1;;2560:12;2529:2;12544:1;12551:101;12565:6;12562:1;12559:13;12551:101;;;12632:11;;;;;12626:18;12613:11;;;;;12606:39;12580:10;;12551:101;;;12667:6;12664:1;12661:13;12658:2;;;12544:1;10081:4;12723:6;2511:5;12714:16;;12707:27;12658:2;;;;2254:371;;;;:::o;2911:263::-;;3026:2;3014:9;3005:7;3001:23;2997:32;2994:2;;;-1:-1;;3032:12;2994:2;-1:-1;1773:13;;2988:186;-1:-1;2988:186::o;3181:1875::-;;;;;;;;;;3533:3;3521:9;3512:7;3508:23;3504:33;3501:2;;;-1:-1;;3540:12;3501:2;3602:80;3674:7;3650:22;3602:80;:::i;:::-;3740:2;3725:18;;3719:25;3592:90;;-1:-1;;3753:30;;;3750:2;;;-1:-1;;3786:12;3750:2;3816:74;3882:7;3873:6;3862:9;3858:22;3816:74;:::i;:::-;3806:84;;3948:2;3937:9;3933:18;3927:25;3913:39;;3764:18;3964:6;3961:30;3958:2;;;-1:-1;;3994:12;3958:2;4024:74;4090:7;4081:6;4070:9;4066:22;4024:74;:::i;:::-;4014:84;;4156:2;4145:9;4141:18;4135:25;4121:39;;3764:18;4172:6;4169:30;4166:2;;;-1:-1;;4202:12;4166:2;4232:104;4328:7;4319:6;4308:9;4304:22;4232:104;:::i;:::-;4222:114;;4394:3;4383:9;4379:19;4373:26;4359:40;;3764:18;4411:6;4408:30;4405:2;;;-1:-1;;4441:12;4405:2;;4471:89;4552:7;4543:6;4532:9;4528:22;4471:89;:::i;:::-;4461:99;;;4597:3;4652:9;4648:22;2711:13;4606:74;;4717:3;4772:9;4768:22;2711:13;4726:74;;4837:3;4892:9;4888:22;2711:13;4846:74;;4976:64;5032:7;4957:3;5012:9;5008:22;4976:64;:::i;:::-;4966:74;;3495:1561;;;;;;;;;;;:::o;5063:259::-;;5176:2;5164:9;5155:7;5151:23;5147:32;5144:2;;;-1:-1;;5182:12;5144:2;2856:6;2850:13;12012:4;13642:5;12001:16;13619:5;13616:33;13606:2;;-1:-1;;13653:12;7824:770;;8122:2;8111:9;8107:18;7475:5;7452:3;7445:37;8240:2;8122;8240;8229:9;8225:18;8218:48;8280:123;6824:5;10537:12;11113:6;11108:3;11101:19;11141:14;8111:9;11141:14;6836:93;;8240:2;7015:5;10218:14;7027:21;;-1:-1;7054:290;7079:6;7076:1;7073:13;7054:290;;;12123:52;7146:6;7140:13;12123:52;:::i;:::-;7570:65;;10826:14;;;;5695;;;;7101:1;7094:9;7054:290;;;-1:-1;;8441:20;;;8436:2;8421:18;;8414:48;10537:12;;11101:19;;;11141:14;;;;-1:-1;10218:14;;;;-1:-1;6272:260;6297:6;6294:1;6291:13;6272:260;;;11231:24;6364:6;6358:13;11231:24;:::i;:::-;5784:37;;5483:14;;;;10826;;;;7101:1;6312:9;6272:260;;;-1:-1;8468:116;;8093:501;-1:-1;;;;;;;;8093:501::o;8601:266::-;8750:2;8735:18;;12848:1;12838:12;;12828:2;;12854:9;12828:2;7740:72;;;8721:146;:::o;8874:256::-;8936:2;8930:9;8962:17;;;9058:22;;;-1:-1;9022:34;;9019:62;9016:2;;;9094:1;;9084:12;9016:2;8936;9103:22;8914:216;;-1:-1;8914:216::o;9137:319::-;;-1:-1;9300:30;;9297:2;;;-1:-1;;9333:12;9297:2;-1:-1;9378:4;9366:17;;;9431:15;;9234:222::o;11169:91::-;-1:-1;;;;;11796:54;;11214:46::o;12877:117::-;-1:-1;;;;;11796:54;;12936:35;;12926:2;;12985:1;;12975:12;12920:74;1242:21086:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "275": [
                  {
                    "length": 32,
                    "start": 2043
                  }
                ],
                "1305": [
                  {
                    "length": 32,
                    "start": 3873
                  }
                ],
                "1307": [
                  {
                    "length": 32,
                    "start": 3909
                  }
                ],
                "3802": [
                  {
                    "length": 32,
                    "start": 4201
                  }
                ],
                "3804": [
                  {
                    "length": 32,
                    "start": 4234
                  }
                ],
                "3806": [
                  {
                    "length": 32,
                    "start": 4168
                  }
                ],
                "5433": [
                  {
                    "length": 32,
                    "start": 2837
                  }
                ],
                "6483": [
                  {
                    "length": 32,
                    "start": 2197
                  }
                ],
                "6485": [
                  {
                    "length": 32,
                    "start": 1591
                  }
                ],
                "6487": [
                  {
                    "length": 32,
                    "start": 4344
                  }
                ],
                "6489": [
                  {
                    "length": 32,
                    "start": 6192
                  },
                  {
                    "length": 32,
                    "start": 9575
                  }
                ],
                "6491": [
                  {
                    "length": 32,
                    "start": 6289
                  },
                  {
                    "length": 32,
                    "start": 9672
                  }
                ],
                "6493": [
                  {
                    "length": 32,
                    "start": 6386
                  },
                  {
                    "length": 32,
                    "start": 9769
                  }
                ],
                "6495": [
                  {
                    "length": 32,
                    "start": 6483
                  },
                  {
                    "length": 32,
                    "start": 9866
                  }
                ],
                "6497": [
                  {
                    "length": 32,
                    "start": 6580
                  },
                  {
                    "length": 32,
                    "start": 9963
                  }
                ],
                "6499": [
                  {
                    "length": 32,
                    "start": 6677
                  },
                  {
                    "length": 32,
                    "start": 10060
                  }
                ],
                "6501": [
                  {
                    "length": 32,
                    "start": 6774
                  },
                  {
                    "length": 32,
                    "start": 10157
                  }
                ],
                "6503": [
                  {
                    "length": 32,
                    "start": 6871
                  },
                  {
                    "length": 32,
                    "start": 10254
                  }
                ],
                "6505": [
                  {
                    "length": 32,
                    "start": 5177
                  },
                  {
                    "length": 32,
                    "start": 6251
                  }
                ],
                "6507": [
                  {
                    "length": 32,
                    "start": 5258
                  },
                  {
                    "length": 32,
                    "start": 6348
                  }
                ],
                "6509": [
                  {
                    "length": 32,
                    "start": 5325
                  },
                  {
                    "length": 32,
                    "start": 6445
                  }
                ],
                "6511": [
                  {
                    "length": 32,
                    "start": 5392
                  },
                  {
                    "length": 32,
                    "start": 6542
                  }
                ],
                "6513": [
                  {
                    "length": 32,
                    "start": 5459
                  },
                  {
                    "length": 32,
                    "start": 6639
                  }
                ],
                "6515": [
                  {
                    "length": 32,
                    "start": 5526
                  },
                  {
                    "length": 32,
                    "start": 6736
                  }
                ],
                "6517": [
                  {
                    "length": 32,
                    "start": 5593
                  },
                  {
                    "length": 32,
                    "start": 6833
                  }
                ],
                "6519": [
                  {
                    "length": 32,
                    "start": 5660
                  },
                  {
                    "length": 32,
                    "start": 6930
                  }
                ],
                "7938": [
                  {
                    "length": 32,
                    "start": 2161
                  }
                ],
                "11672": [
                  {
                    "length": 32,
                    "start": 8898
                  },
                  {
                    "length": 32,
                    "start": 8950
                  },
                  {
                    "length": 32,
                    "start": 9010
                  }
                ],
                "11674": [
                  {
                    "length": 32,
                    "start": 7395
                  },
                  {
                    "length": 32,
                    "start": 9634
                  }
                ],
                "11676": [
                  {
                    "length": 32,
                    "start": 7462
                  },
                  {
                    "length": 32,
                    "start": 9731
                  }
                ],
                "11678": [
                  {
                    "length": 32,
                    "start": 7529
                  },
                  {
                    "length": 32,
                    "start": 9828
                  }
                ],
                "11680": [
                  {
                    "length": 32,
                    "start": 7596
                  },
                  {
                    "length": 32,
                    "start": 9925
                  }
                ],
                "11682": [
                  {
                    "length": 32,
                    "start": 7663
                  },
                  {
                    "length": 32,
                    "start": 10022
                  }
                ],
                "11684": [
                  {
                    "length": 32,
                    "start": 7730
                  },
                  {
                    "length": 32,
                    "start": 10119
                  }
                ],
                "11686": [
                  {
                    "length": 32,
                    "start": 7797
                  },
                  {
                    "length": 32,
                    "start": 10216
                  }
                ],
                "11688": [
                  {
                    "length": 32,
                    "start": 7864
                  },
                  {
                    "length": 32,
                    "start": 10313
                  }
                ]
              },
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50600436106101f05760003560e01c80637ecebe001161010f578063a9059cbb116100a2578063d5c096c411610071578063d5c096c4146103e6578063d73dd623146103f9578063dd62ed3e1461040c578063f89f27ed1461041f576101f0565b8063a9059cbb146103b0578063aaabadc5146103c3578063c0ff1a15146103cb578063d505accf146103d3576101f0565b80638d928af8116100de5780638d928af81461038557806395d89b411461038d5780639b02cdde146103955780639d2c110c1461039d576101f0565b80637ecebe0014610337578063851c1bb31461034a57806387ec68171461035d578063893d20e814610370576101f0565b806338e9922e11610187578063661884631161015657806366188463146102e8578063679aefce146102fb57806370a082311461030357806374f3b00914610316576101f0565b806338e9922e146102a457806338fff2d0146102b757806355c67628146102bf5780636028bfd4146102c7576101f0565b80631c0de051116101c35780631c0de0511461025d57806323b872dd14610274578063313ce567146102875780633644e5151461029c576101f0565b806306fdde03146101f5578063095ea7b31461021357806316c38b3c1461023357806318160ddd14610248575b600080fd5b6101fd610434565b60405161020a9190614623565b60405180910390f35b610226610221366004613ffd565b6104cb565b60405161020a919061455a565b6102466102413660046140f3565b6104e2565b005b6102506104f6565b60405161020a919061457d565b6102656104fc565b60405161020a93929190614565565b610226610282366004613f48565b610525565b61028f6105a8565b60405161020a919061468f565b6102506105ad565b6102466102b2366004614479565b6105bc565b610250610635565b610250610659565b6102da6102d536600461412b565b61065f565b60405161020a929190614676565b6102266102f6366004613ffd565b610696565b6102506106f0565b610250610311366004613ef4565b61071b565b61032961032436600461412b565b61073a565b60405161020a929190614535565b610250610345366004613ef4565b6107dc565b610250610358366004614227565b6107f7565b6102da61036b36600461412b565b610849565b61037861086f565b60405161020a919061450e565b610378610893565b6101fd6108b7565b610250610918565b6102506103ab36600461437e565b61091e565b6102266103be366004613ffd565b610a05565b610378610a12565b610250610a1c565b6102466103e1366004613f88565b610ae0565b6103296103f436600461412b565b610c29565b610226610407366004613ffd565b610d4b565b61025061041a366004613f10565b610d81565b610427610dac565b60405161020a9190614522565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c05780601f10610495576101008083540402835291602001916104c0565b820191906000526020600020905b8154815290600101906020018083116104a357829003601f168201915b505050505090505b90565b60006104d8338484610df9565b5060015b92915050565b6104ea610e61565b6104f381610e8f565b50565b60025490565b6000806000610509610f02565b159250610514610f1f565b915061051e610f43565b9050909192565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261056391148061055b5750838210155b610197610f67565b61056e858585610f75565b336001600160a01b0386161480159061058957506000198114155b1561059b5761059b8533858403610df9565b60019150505b9392505050565b601290565b60006105b7611044565b905090565b6105c4610e61565b6105cc6110e1565b6105df64e8d4a5100082101560cb610f67565b6105f567016345785d8a000082111560ca610f67565b60078190556040517f9cabc14d438714dbcd9292df9b3f89c42f98acd93a675ad72cd6033777e9b8e79061062a90839061457d565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000090565b60075490565b6000606061067586516106706110f6565b610dc4565b61068a8989898989898961111a6111e1611247565b97509795505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106106d2576106cd33856000610df9565b6106e6565b6106e633856106e18487610de3565b610df9565b5060019392505050565b60006105b76106fd6104f6565b610715610708610a1c565b6107106110f6565b611369565b9061138d565b6001600160a01b0381166000908152602081905260409020545b919050565b60608088610764610749610893565b6001600160a01b0316336001600160a01b03161460cd610f67565b61077961076f610635565b82146101f4610f67565b60606107836113de565b905061078f888261165a565b60006060806107a38e8e8e8e8e8e8e61111a565b9250925092506107b38d846116bb565b6107bd82856111e1565b6107c781856111e1565b909550935050505b5097509795505050505050565b6001600160a01b031660009081526005602052604090205490565b60007f00000000000000000000000000000000000000000000000000000000000000008260405160200161082c9291906144cb565b604051602081830303815290604052805190602001209050919050565b6000606061085a86516106706110f6565b61068a8989898989898961174e6117cb611247565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c05780601f10610495576101008083540402835291602001916104c0565b60085490565b60008061092e856020015161182c565b9050600061093f866040015161182c565b905060008651600181111561095057fe5b14156109b6576109638660600151611b41565b60608701526109728583611b65565b945061097e8482611b65565b935061098e866060015183611b65565b606087015260006109a0878787611b71565b90506109ac8183611bac565b93505050506105a1565b6109c08583611b65565b94506109cc8482611b65565b93506109dc866060015182611b65565b606087015260006109ee878787611bb8565b90506109fa8184611beb565b90506109ac81611bf7565b60006104d8338484610f75565b60006105b7611c0e565b60006060610a28610893565b6001600160a01b031663f94d4668610a3e610635565b6040518263ffffffff1660e01b8152600401610a5a919061457d565b60006040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aae9190810190614028565b50915050610ac381610abe6113de565b61165a565b6060610acd611c88565b9050610ad98183611ee4565b9250505090565b610aee8442111560d1610f67565b6001600160a01b0387166000908152600560209081526040808320549051909291610b45917f0000000000000000000000000000000000000000000000000000000000000000918c918c918c9188918d91016145a5565b6040516020818303038152906040528051906020012090506000610b6882611f56565b9050600060018288888860405160008152602001604052604051610b8f9493929190614605565b6020604051602081039080840390855afa158015610bb1573d6000803e3d6000fd5b5050604051601f1901519150610bf390506001600160a01b03821615801590610beb57508b6001600160a01b0316826001600160a01b0316145b6101f8610f67565b6001600160a01b038b166000908152600560205260409020600185019055610c1c8b8b8b610df9565b5050505050505050505050565b60608088610c38610749610893565b610c4361076f610635565b6060610c4d6113de565b9050610c576104f6565b610cfc5760006060610c6b8d8d8d8a611f72565b91509150610c80620f424083101560cc610f67565b610c8e6000620f424061200d565b610c9d8b620f4240840361200d565b610ca781846117cb565b80610cb06110f6565b6001600160401b0381118015610cc557600080fd5b50604051908082528060200260200182016040528015610cef578160200160208202803683370190505b50955095505050506107cf565b610d06888261165a565b6000606080610d1a8e8e8e8e8e8e8e61174e565b925092509250610d2a8c8461200d565b610d3482856117cb565b610d3e81856111e1565b90955093506107cf915050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104d89185906106e19086610dd1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606105b7611c88565b80610dc0816120a3565b5050565b610dc08183146067610f67565b60008282016105a18482101583610f67565b6000610df3838311156001610f67565b50900390565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610e5490859061457d565b60405180910390a3505050565b6000610e786000356001600160e01b0319166107f7565b90506104f3610e87823361211c565b610191610f67565b8015610eaf57610eaa610ea0610f1f565b4210610193610f67565b610ec4565b610ec4610eba610f43565b42106101a9610f67565b6006805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be649061062a90839061455a565b6000610f0c610f43565b4211806105b757505060065460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b81610dc057610dc08161220c565b6001600160a01b038316600090815260208190526040902054610f9d82821015610196610f67565b610fb46001600160a01b0384161515610199610f67565b6001600160a01b03808516600090815260208190526040808220858503905591851681522054610fe49083610dd1565b6001600160a01b0380851660008181526020819052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061103690869061457d565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006110b161225f565b306040516020016110c69594939291906145d9565b60405160208183030381529060405280519060200120905090565b6110f46110ec610f02565b610192610f67565b565b7f000000000000000000000000000000000000000000000000000000000000000090565b60006060806060611129611c88565b9050611133610f02565b1561116a576000611144828a611ee4565b90506111558983600854848b612263565b92506111648984610de3612372565b506111b5565b6111726110f6565b6001600160401b038111801561118757600080fd5b506040519080825280602002602001820160405280156111b1578160200160208202803683370190505b5091505b6111c08882876123dd565b90945092506111d088848361244a565b600855509750975097945050505050565b60005b6111ec6110f6565b8110156112425761122383828151811061120257fe5b602002602001015183838151811061121657fe5b6020026020010151612463565b83828151811061122f57fe5b60209081029190910101526001016111e4565b505050565b333014611305576000306001600160a01b031660003660405161126b9291906144e3565b6000604051808303816000865af19150503d80600081146112a8576040519150601f19603f3d011682016040523d82523d6000602084013e6112ad565b606091505b5050905080600081146112bc57fe5b60046000803e6000516001600160e01b0319166343adbafb60e01b81146112e7573d6000803e3d6000fd5b506020600460003e604060205260243d03602460403e601c3d016000f35b606061130f6113de565b905061131b878261165a565b600060606113328c8c8c8c8c8c8c8c63ffffffff16565b509150915061134581848663ffffffff16565b8051601f1982018390526343adbafb603f1983015260200260231982016044820181fd5b60008282026105a184158061138657508385838161138357fe5b04145b6003610f67565b600061139c8215156004610f67565b826113a9575060006104dc565b670de0b6b3a7640000838102906113cc908583816113c357fe5b04146005610f67565b8281816113d557fe5b049150506104dc565b606060006113ea6110f6565b90506060816001600160401b038111801561140457600080fd5b5060405190808252806020026020018201604052801561142e578160200160208202803683370190505b5090508115611476577f00000000000000000000000000000000000000000000000000000000000000008160008151811061146557fe5b60200260200101818152505061147f565b91506104c89050565b6001821115611476577f0000000000000000000000000000000000000000000000000000000000000000816001815181106114b657fe5b6020026020010181815250506002821115611476577f0000000000000000000000000000000000000000000000000000000000000000816002815181106114f957fe5b6020026020010181815250506003821115611476577f00000000000000000000000000000000000000000000000000000000000000008160038151811061153c57fe5b6020026020010181815250506004821115611476577f00000000000000000000000000000000000000000000000000000000000000008160048151811061157f57fe5b6020026020010181815250506005821115611476577f0000000000000000000000000000000000000000000000000000000000000000816005815181106115c257fe5b6020026020010181815250506006821115611476577f00000000000000000000000000000000000000000000000000000000000000008160068151811061160557fe5b6020026020010181815250506007821115611476577f00000000000000000000000000000000000000000000000000000000000000008160078151811061164857fe5b60200260200101818152505091505090565b60005b6116656110f6565b8110156112425761169c83828151811061167b57fe5b602002602001015183838151811061168f57fe5b6020026020010151611369565b8382815181106116a857fe5b602090810291909101015260010161165d565b6001600160a01b0382166000908152602081905260409020546116e382821015610196610f67565b6001600160a01b0383166000908152602081905260409020828203905560025461170d9083610de3565b6002556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610e5490869061457d565b600060608061175b6110e1565b6060611765611c88565b90506000611773828a611ee4565b905060606117868a84600854858c612263565b90506117958a82610de3612372565b600060606117a48c868b612483565b915091506117b38c82876124dd565b600855909e909d50909b509950505050505050505050565b60005b6117d66110f6565b8110156112425761180d8382815181106117ec57fe5b602002602001015183838151811061180057fe5b60200260200101516124ec565b83828151811061181957fe5b60209081029190910101526001016117ce565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561188f57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156118f057507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561195157507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156119b257507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611a1357507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611a7457507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611ad557507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611b3657507f0000000000000000000000000000000000000000000000000000000000000000610735565b61073561013561220c565b600080611b596007548461251f90919063ffffffff16565b90506105a18382610de3565b60006105a18383611369565b6000611b7b6110e1565b611ba483611b8c8660200151612563565b84611b9a8860400151612563565b886060015161286d565b949350505050565b60006105a18383612463565b6000611bc26110e1565b611ba483611bd38660200151612563565b84611be18860400151612563565b88606001516128e8565b60006105a183836124ec565b60006104dc611c0760075461295e565b8390612984565b6000611c18610893565b6001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b7919061424f565b60606000611c946110f6565b90506060816001600160401b0381118015611cae57600080fd5b50604051908082528060200260200182016040528015611cd8578160200160208202803683370190505b5090508115611476577f000000000000000000000000000000000000000000000000000000000000000081600081518110611d0f57fe5b6020026020010181815250506001821115611476577f000000000000000000000000000000000000000000000000000000000000000081600181518110611d5257fe5b6020026020010181815250506002821115611476577f000000000000000000000000000000000000000000000000000000000000000081600281518110611d9557fe5b6020026020010181815250506003821115611476577f000000000000000000000000000000000000000000000000000000000000000081600381518110611dd857fe5b6020026020010181815250506004821115611476577f000000000000000000000000000000000000000000000000000000000000000081600481518110611e1b57fe5b6020026020010181815250506005821115611476577f000000000000000000000000000000000000000000000000000000000000000081600581518110611e5e57fe5b6020026020010181815250506006821115611476577f000000000000000000000000000000000000000000000000000000000000000081600681518110611ea157fe5b6020026020010181815250506007821115611476577f00000000000000000000000000000000000000000000000000000000000000008160078151811061164857fe5b670de0b6b3a764000060005b8351811015611f4657611f3c611f35858381518110611f0b57fe5b6020026020010151858481518110611f1f57fe5b60200260200101516129c690919063ffffffff16565b8390612a15565b9150600101611ef0565b506104dc60008211610137610f67565b6000611f60611044565b8260405160200161082c9291906144f3565b60006060611f7e6110e1565b6000611f8984612a41565b9050611fa46000826002811115611f9c57fe5b1460ce610f67565b6060611faf85612a57565b9050611fc3611fbc6110f6565b8251610dc4565b611fcf81610abe6113de565b6060611fd9611c88565b90506000611fe78284611ee4565b90506000611ff7826107106110f6565b6008929092555099919850909650505050505050565b6001600160a01b0382166000908152602081905260409020546120309082610dd1565b6001600160a01b0383166000908152602081905260409020556002546120569082610dd1565b6002556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061209790859061457d565b60405180910390a35050565b6002815110156120b2576104f3565b6000816000815181106120c157fe5b602002602001015190506000600190505b82518110156112425760008382815181106120e957fe5b60200260200101519050612112816001600160a01b0316846001600160a01b0316106065610f67565b91506001016120d2565b600073ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b61213b61086f565b6001600160a01b031614158015612156575061215683612a6d565b1561217e5761216361086f565b6001600160a01b0316336001600160a01b03161490506104dc565b612186611c0e565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b81526004016121b593929190614586565b60206040518083038186803b1580156121cd57600080fd5b505afa1580156121e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612205919061410f565b90506104dc565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b4690565b60608061226e6110f6565b6001600160401b038111801561228357600080fd5b506040519080825280602002602001820160405280156122ad578160200160208202803683370190505b509050826122bc579050612369565b61232f877f0000000000000000000000000000000000000000000000000000000000000000815181106122eb57fe5b6020026020010151877f00000000000000000000000000000000000000000000000000000000000000008151811061231f57fe5b6020026020010151878787612a87565b817f00000000000000000000000000000000000000000000000000000000000000008151811061235b57fe5b602090810291909101015290505b95945050505050565b60005b61237d6110f6565b8110156123d7576123b884828151811061239357fe5b60200260200101518483815181106123a757fe5b60200260200101518463ffffffff16565b8482815181106123c457fe5b6020908102919091010152600101612375565b50505050565b6000606060006123ec84612a41565b905060008160028111156123fc57fe5b14156124175761240d868686612aff565b9250925050612442565b600181600281111561242557fe5b14156124355761240d8685612bdc565b61240d868686612c0e565b505b935093915050565b60006124598484610de3612372565b611ba48285611ee4565b60006124728215156004610f67565b81838161247b57fe5b049392505050565b60006060600061249284612a41565b905060018160028111156124a257fe5b14156124b35761240d868686612c79565b60028160028111156124c157fe5b14156124d25761240d868686612cd3565b61244061013661220c565b60006124598484610dd1612372565b60006124fb8215156004610f67565b82612508575060006104dc565b81600184038161251457fe5b0460010190506104dc565b600082820261253984158061138657508385838161138357fe5b806125485760009150506104dc565b670de0b6b3a764000060001982015b046001019150506104dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156125c657507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561262757507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561268857507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156126e957507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561274a57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156127ab57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561280c57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611b3657507f0000000000000000000000000000000000000000000000000000000000000000610735565b600061288f61288487670429d069189e0000612a15565b831115610130610f67565b600061289b8784610dd1565b905060006128a98883612984565b905060006128b7888761138d565b905060006128c58383612d7a565b90506128da6128d38261295e565b8990612a15565b9a9950505050505050505050565b600061290a6128ff85670429d069189e0000612a15565b831115610131610f67565b60006129206129198685610de3565b8690612984565b9050600061292e8588612984565b9050600061293c8383612d7a565b9050600061295282670de0b6b3a7640000610de3565b90506128da8a8261251f565b6000670de0b6b3a764000082106129765760006104dc565b50670de0b6b3a76400000390565b60006129938215156004610f67565b826129a0575060006104dc565b670de0b6b3a7640000838102906129ba908583816113c357fe5b82600182038161255757fe5b6000806129d38484612da6565b905060006129ed6129e68361271061251f565b6001610dd1565b905080821015612a02576000925050506104dc565b612a0c8282610de3565b925050506104dc565b6000828202612a2f84158061138657508385838161138357fe5b670de0b6b3a764000090049392505050565b6000818060200190518101906104dc919061426b565b6060818060200190518101906105a19190614330565b6000612a7f631c74c91760e11b6107f7565b909114919050565b6000838311612a9857506000612369565b6000612aa48585612984565b90506000612aba670de0b6b3a76400008861138d565b9050612ace826709b6e64a8ec60000612eb1565b91506000612adc8383612d7a565b90506000612af3612aec8361295e565b8b90612a15565b90506128da8187612a15565b60006060612b0b6110e1565b600080612b1785612ec8565b91509150612b2f612b266110f6565b82106064610f67565b6060612b396110f6565b6001600160401b0381118015612b4e57600080fd5b50604051908082528060200260200182016040528015612b78578160200160208202803683370190505b509050612bb7888381518110612b8a57fe5b6020026020010151888481518110612b9e57fe5b602002602001015185612baf6104f6565b600754612eea565b818381518110612bc357fe5b6020908102919091010152919791965090945050505050565b600060606000612beb84612fa7565b90506060612c018683612bfc6104f6565b612fbd565b9196919550909350505050565b60006060612c1a6110e1565b60606000612c278561306e565b91509150612c3882516106706110f6565b612c4482610abe6113de565b6000612c5c888885612c546104f6565b600754613086565b9050612c6c8282111560cf610f67565b9791965090945050505050565b60006060806000612c898561306e565b91509150612c9f612c986110f6565b8351610dc4565b612cab82610abe6113de565b6000612cc3888885612cbb6104f6565b6007546132aa565b9050612c6c8282101560d0610f67565b60006060600080612ce385612ec8565b91509150612cf2612b266110f6565b6060612cfc6110f6565b6001600160401b0381118015612d1157600080fd5b50604051908082528060200260200182016040528015612d3b578160200160208202803683370190505b509050612bb7888381518110612d4d57fe5b6020026020010151888481518110612d6157fe5b602002602001015185612d726104f6565b6007546134ba565b600080612d878484612da6565b90506000612d9a6129e68361271061251f565b90506123698282610dd1565b600081612dbc5750670de0b6b3a76400006104dc565b82612dc9575060006104dc565b612dda600160ff1b84106006610f67565b82612e00770bce5086492111aea88f4bb1ca6bcf584181ea8059f7653284106007610f67565b826000670c7d713b49da000083138015612e215750670f43fc2c04ee000083125b15612e58576000612e318461355c565b9050670de0b6b3a764000080820784020583670de0b6b3a764000083050201915050612e66565b81612e628461367a565b0290505b670de0b6b3a76400009005612e9e680238fd42c5cf03ffff198212801590612e97575068070c1cc73b00c800008213155b6008610f67565b612ea781613a27565b9695505050505050565b600081831015612ec157816105a1565b5090919050565b60008082806020019051810190612edf91906142fa565b909590945092505050565b600080612f0184612efb8188610de3565b90612984565b9050612f1a6709b6e64a8ec60000821015610132610f67565b6000612f38612f31670de0b6b3a76400008961138d565b8390612d7a565b90506000612f4f612f488361295e565b8a90612a15565b90506000612f5c8961295e565b90506000612f6a838361251f565b90506000612f788483610de3565b9050612f97612f90612f898a61295e565b8490612a15565b8290610dd1565b9c9b505050505050505050505050565b6000818060200190518101906105a191906142cd565b60606000612fcb848461138d565b9050606085516001600160401b0381118015612fe657600080fd5b50604051908082528060200260200182016040528015613010578160200160208202803683370190505b50905060005b8651811015613064576130458388838151811061302f57fe5b6020026020010151612a1590919063ffffffff16565b82828151811061305157fe5b6020908102919091010152600101613016565b5095945050505050565b6060600082806020019051810190612edf9190614287565b6000606084516001600160401b03811180156130a157600080fd5b506040519080825280602002602001820160405280156130cb578160200160208202803683370190505b5090506000805b88518110156131905761312b8982815181106130ea57fe5b6020026020010151612efb89848151811061310157fe5b60200260200101518c858151811061311557fe5b6020026020010151610de390919063ffffffff16565b83828151811061313757fe5b60200260200101818152505061318661317f89838151811061315557fe5b602002602001015185848151811061316957fe5b602002602001015161251f90919063ffffffff16565b8390610dd1565b91506001016130d2565b50670de0b6b3a764000060005b89518110156132895760008482815181106131b457fe5b602002602001015184111561320b5760006131dd6131d18661295e565b8d858151811061302f57fe5b905060006131f1828c868151811061311557fe5b905061320261317f611c078b61295e565b92505050613222565b88828151811061321757fe5b602002602001015190505b600061324b8c848151811061323357fe5b6020026020010151610715848f878151811061311557fe5b905061327d6132768c858151811061325f57fe5b6020026020010151836129c690919063ffffffff16565b8590612a15565b9350505060010161319d565b5061329d6132968261295e565b879061251f565b9998505050505050505050565b6000606084516001600160401b03811180156132c557600080fd5b506040519080825280602002602001820160405280156132ef578160200160208202803683370190505b5090506000805b88518110156133975761334f89828151811061330e57fe5b602002602001015161071589848151811061332557fe5b60200260200101518c858151811061333957fe5b6020026020010151610dd190919063ffffffff16565b83828151811061335b57fe5b60200260200101818152505061338d61317f89838151811061337957fe5b602002602001015185848151811061302f57fe5b91506001016132f6565b50670de0b6b3a764000060005b8951811015613478576000838583815181106133bc57fe5b602002602001015111156134185760006133e16131d186670de0b6b3a7640000610de3565b905060006133f5828c868151811061311557fe5b905061340f61317f611f35670de0b6b3a76400008c610de3565b9250505061342f565b88828151811061342457fe5b602002602001015190505b60006134588c848151811061344057fe5b6020026020010151610715848f878151811061333957fe5b905061346c6132768c858151811061325f57fe5b935050506001016133a4565b50670de0b6b3a764000081106134ae576134a461349d82670de0b6b3a7640000610de3565b8790612a15565b9350505050612369565b60009350505050612369565b6000806134cb84612efb8188610dd1565b90506134e46729a2241af62c0000821115610133610f67565b60006134fb612f31670de0b6b3a764000089612984565b9050600061351b61351483670de0b6b3a7640000610de3565b8a9061251f565b905060006135288961295e565b90506000613536838361251f565b905060006135448483610de3565b9050612f97612f906135558a61295e565b8490612984565b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff198501028161359757fe5b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f826002919005919091010295945050505050565b600061368a600083136064610f67565b670de0b6b3a76400008212156136c4576136ba826a0c097ce7bc90715b34b9f160241b816136b457fe5b0561367a565b6000039050610735565b60007e1600ef3172e58d2e933ec884fde10064c63b5372d805e203c0000000000000831261371557770195e54c5dd42177f53a27172fa9ec630262827000000000830592506806f05b59d3b2000000015b73011798004d755d3c8bc8e03204cf44619e000000831261374d576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312613795576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a70083126137d0576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf850831261380757693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e2831261383e57690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d0383126138735768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261389e57680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d83126138d3576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f17757889379378312613908576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b286603831261393c576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac8312613970576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d63100000808603028161399357fe5b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6000613a56680238fd42c5cf03ffff198312158015613a4f575068070c1cc73b00c800008313155b6009610f67565b6000821215613a8957613a6b82600003613a27565b6a0c097ce7bc90715b34b9f160241b81613a8157fe5b059050610735565b60006806f05b59d3b20000008312613ac957506806f05b59d3b1ffffff1990910190770195e54c5dd42177f53a27172fa9ec630262827000000000613aff565b6803782dace9d90000008312613afb57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380613aff565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412613b4f5768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412613b8b576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412613bc557682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412613bff576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412613c3857680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412613c715768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412613caa576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412613ce35768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b80356104dc816146e2565b600082601f830112613e1f578081fd5b8151613e32613e2d826146c3565b61469d565b818152915060208083019084810181840286018201871015613e5357600080fd5b60005b84811015613e7257815184529282019290820190600101613e56565b505050505092915050565b600082601f830112613e8d578081fd5b81356001600160401b03811115613ea2578182fd5b613eb5601f8201601f191660200161469d565b9150808252836020828501011115613ecc57600080fd5b8060208401602084013760009082016020015292915050565b8035600281106104dc57600080fd5b600060208284031215613f05578081fd5b81356105a1816146e2565b60008060408385031215613f22578081fd5b8235613f2d816146e2565b91506020830135613f3d816146e2565b809150509250929050565b600080600060608486031215613f5c578081fd5b8335613f67816146e2565b92506020840135613f77816146e2565b929592945050506040919091013590565b600080600080600080600060e0888a031215613fa2578283fd5b8735613fad816146e2565b96506020880135613fbd816146e2565b95506040880135945060608801359350608088013560ff81168114613fe0578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561400f578182fd5b823561401a816146e2565b946020939093013593505050565b60008060006060848603121561403c578081fd5b83516001600160401b0380821115614052578283fd5b818601915086601f830112614065578283fd5b8151614073613e2d826146c3565b80828252602080830192508086018b828387028901011115614093578788fd5b8796505b848710156140be5780516140aa816146e2565b845260019690960195928101928101614097565b5089015190975093505050808211156140d5578283fd5b506140e286828701613e0f565b925050604084015190509250925092565b600060208284031215614104578081fd5b81356105a1816146f7565b600060208284031215614120578081fd5b81516105a1816146f7565b600080600080600080600060e0888a031215614145578081fd5b87359650602080890135614158816146e2565b96506040890135614168816146e2565b955060608901356001600160401b0380821115614183578384fd5b818b0191508b601f830112614196578384fd5b81356141a4613e2d826146c3565b8082825285820191508585018f8788860288010111156141c2578788fd5b8795505b838610156141e45780358352600195909501949186019186016141c6565b509850505060808b0135955060a08b0135945060c08b013592508083111561420a578384fd5b50506142188a828b01613e7d565b91505092959891949750929550565b600060208284031215614238578081fd5b81356001600160e01b0319811681146105a1578182fd5b600060208284031215614260578081fd5b81516105a1816146e2565b60006020828403121561427c578081fd5b81516105a181614705565b60008060006060848603121561429b578081fd5b83516142a681614705565b60208501519093506001600160401b038111156142c1578182fd5b6140e286828701613e0f565b600080604083850312156142df578182fd5b82516142ea81614705565b6020939093015192949293505050565b60008060006060848603121561430e578081fd5b835161431981614705565b602085015160409095015190969495509392505050565b60008060408385031215614342578182fd5b825161434d81614705565b60208401519092506001600160401b03811115614368578182fd5b61437485828601613e0f565b9150509250929050565b600080600060608486031215614392578081fd5b83356001600160401b03808211156143a8578283fd5b81860191506101208083890312156143be578384fd5b6143c78161469d565b90506143d38884613ee5565b81526143e28860208501613e04565b60208201526143f48860408501613e04565b6040820152606083013560608201526080830135608082015260a083013560a08201526144248860c08501613e04565b60c08201526144368860e08501613e04565b60e0820152610100808401358381111561444e578586fd5b61445a8a828701613e7d565b9183019190915250976020870135975060409096013595945050505050565b60006020828403121561448a578081fd5b5035919050565b6000815180845260208085019450808401835b838110156144c0578151875295820195908201906001016144a4565b509495945050505050565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6000602082526105a16020830184614491565b6000604082526145486040830185614491565b82810360208401526123698185614491565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b8181101561464f57858101830151858201604001528201614633565b818111156146605783604083870101525b50601f01601f1916929092016040019392505050565b600083825260406020830152611ba46040830184614491565b60ff91909116815260200190565b6040518181016001600160401b03811182821017156146bb57600080fd5b604052919050565b60006001600160401b038211156146d8578081fd5b5060209081020190565b6001600160a01b03811681146104f357600080fd5b80151581146104f357600080fd5b600381106104f357600080fdfea2646970667358221220765dae8954494fc239d6edd2b70a6d1304f3ce003f1a0ad7655693250300088064736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1F0 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7ECEBE00 GT PUSH2 0x10F JUMPI DUP1 PUSH4 0xA9059CBB GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD5C096C4 GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD5C096C4 EQ PUSH2 0x3E6 JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x3F9 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x40C JUMPI DUP1 PUSH4 0xF89F27ED EQ PUSH2 0x41F JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x3B0 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x3C3 JUMPI DUP1 PUSH4 0xC0FF1A15 EQ PUSH2 0x3CB JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x3D3 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x8D928AF8 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8D928AF8 EQ PUSH2 0x385 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x38D JUMPI DUP1 PUSH4 0x9B02CDDE EQ PUSH2 0x395 JUMPI DUP1 PUSH4 0x9D2C110C EQ PUSH2 0x39D JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x337 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x34A JUMPI DUP1 PUSH4 0x87EC6817 EQ PUSH2 0x35D JUMPI DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x370 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E GT PUSH2 0x187 JUMPI DUP1 PUSH4 0x66188463 GT PUSH2 0x156 JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x2E8 JUMPI DUP1 PUSH4 0x679AEFCE EQ PUSH2 0x2FB JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x303 JUMPI DUP1 PUSH4 0x74F3B009 EQ PUSH2 0x316 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E EQ PUSH2 0x2A4 JUMPI DUP1 PUSH4 0x38FFF2D0 EQ PUSH2 0x2B7 JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0x2BF JUMPI DUP1 PUSH4 0x6028BFD4 EQ PUSH2 0x2C7 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x1C0DE051 GT PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x25D JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x274 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x287 JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x29C JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x1F5 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x213 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x233 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x248 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FD PUSH2 0x434 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x4623 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x226 PUSH2 0x221 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0x4CB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x455A JUMP JUMPDEST PUSH2 0x246 PUSH2 0x241 CALLDATASIZE PUSH1 0x4 PUSH2 0x40F3 JUMP JUMPDEST PUSH2 0x4E2 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x250 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH2 0x265 PUSH2 0x4FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4565 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x282 CALLDATASIZE PUSH1 0x4 PUSH2 0x3F48 JUMP JUMPDEST PUSH2 0x525 JUMP JUMPDEST PUSH2 0x28F PUSH2 0x5A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x468F JUMP JUMPDEST PUSH2 0x250 PUSH2 0x5AD JUMP JUMPDEST PUSH2 0x246 PUSH2 0x2B2 CALLDATASIZE PUSH1 0x4 PUSH2 0x4479 JUMP JUMPDEST PUSH2 0x5BC JUMP JUMPDEST PUSH2 0x250 PUSH2 0x635 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x659 JUMP JUMPDEST PUSH2 0x2DA PUSH2 0x2D5 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x65F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP3 SWAP2 SWAP1 PUSH2 0x4676 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x2F6 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0x696 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x6F0 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x311 CALLDATASIZE PUSH1 0x4 PUSH2 0x3EF4 JUMP JUMPDEST PUSH2 0x71B JUMP JUMPDEST PUSH2 0x329 PUSH2 0x324 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x73A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP3 SWAP2 SWAP1 PUSH2 0x4535 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x345 CALLDATASIZE PUSH1 0x4 PUSH2 0x3EF4 JUMP JUMPDEST PUSH2 0x7DC JUMP JUMPDEST PUSH2 0x250 PUSH2 0x358 CALLDATASIZE PUSH1 0x4 PUSH2 0x4227 JUMP JUMPDEST PUSH2 0x7F7 JUMP JUMPDEST PUSH2 0x2DA PUSH2 0x36B CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x849 JUMP JUMPDEST PUSH2 0x378 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x450E JUMP JUMPDEST PUSH2 0x378 PUSH2 0x893 JUMP JUMPDEST PUSH2 0x1FD PUSH2 0x8B7 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x918 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x3AB CALLDATASIZE PUSH1 0x4 PUSH2 0x437E JUMP JUMPDEST PUSH2 0x91E JUMP JUMPDEST PUSH2 0x226 PUSH2 0x3BE CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0xA05 JUMP JUMPDEST PUSH2 0x378 PUSH2 0xA12 JUMP JUMPDEST PUSH2 0x250 PUSH2 0xA1C JUMP JUMPDEST PUSH2 0x246 PUSH2 0x3E1 CALLDATASIZE PUSH1 0x4 PUSH2 0x3F88 JUMP JUMPDEST PUSH2 0xAE0 JUMP JUMPDEST PUSH2 0x329 PUSH2 0x3F4 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0xC29 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x407 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0xD4B JUMP JUMPDEST PUSH2 0x250 PUSH2 0x41A CALLDATASIZE PUSH1 0x4 PUSH2 0x3F10 JUMP JUMPDEST PUSH2 0xD81 JUMP JUMPDEST PUSH2 0x427 PUSH2 0xDAC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x4522 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x495 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4C0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4A3 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4D8 CALLER DUP5 DUP5 PUSH2 0xDF9 JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x4EA PUSH2 0xE61 JUMP JUMPDEST PUSH2 0x4F3 DUP2 PUSH2 0xE8F JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x509 PUSH2 0xF02 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x514 PUSH2 0xF1F JUMP JUMPDEST SWAP2 POP PUSH2 0x51E PUSH2 0xF43 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x563 SWAP2 EQ DUP1 PUSH2 0x55B JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x56E DUP6 DUP6 DUP6 PUSH2 0xF75 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x589 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x59B JUMPI PUSH2 0x59B DUP6 CALLER DUP6 DUP5 SUB PUSH2 0xDF9 JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x1044 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x5C4 PUSH2 0xE61 JUMP JUMPDEST PUSH2 0x5CC PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x5DF PUSH5 0xE8D4A51000 DUP3 LT ISZERO PUSH1 0xCB PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x5F5 PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH1 0xCA PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x7 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9CABC14D438714DBCD9292DF9B3F89C42F98ACD93A675AD72CD6033777E9B8E7 SWAP1 PUSH2 0x62A SWAP1 DUP4 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x675 DUP7 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x68A DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x111A PUSH2 0x11E1 PUSH2 0x1247 JUMP JUMPDEST SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x6D2 JUMPI PUSH2 0x6CD CALLER DUP6 PUSH1 0x0 PUSH2 0xDF9 JUMP JUMPDEST PUSH2 0x6E6 JUMP JUMPDEST PUSH2 0x6E6 CALLER DUP6 PUSH2 0x6E1 DUP5 DUP8 PUSH2 0xDE3 JUMP JUMPDEST PUSH2 0xDF9 JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x6FD PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0x715 PUSH2 0x708 PUSH2 0xA1C JUMP JUMPDEST PUSH2 0x710 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x1369 JUMP JUMPDEST SWAP1 PUSH2 0x138D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0x764 PUSH2 0x749 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH1 0xCD PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x779 PUSH2 0x76F PUSH2 0x635 JUMP JUMPDEST DUP3 EQ PUSH2 0x1F4 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x783 PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0x78F DUP9 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x7A3 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x111A JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x7B3 DUP14 DUP5 PUSH2 0x16BB JUMP JUMPDEST PUSH2 0x7BD DUP3 DUP6 PUSH2 0x11E1 JUMP JUMPDEST PUSH2 0x7C7 DUP2 DUP6 PUSH2 0x11E1 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP POP POP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x82C SWAP3 SWAP2 SWAP1 PUSH2 0x44CB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x85A DUP7 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x68A DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x174E PUSH2 0x17CB PUSH2 0x1247 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x495 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4C0 JUMP JUMPDEST PUSH1 0x8 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x92E DUP6 PUSH1 0x20 ADD MLOAD PUSH2 0x182C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x93F DUP7 PUSH1 0x40 ADD MLOAD PUSH2 0x182C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x950 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x9B6 JUMPI PUSH2 0x963 DUP7 PUSH1 0x60 ADD MLOAD PUSH2 0x1B41 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x972 DUP6 DUP4 PUSH2 0x1B65 JUMP JUMPDEST SWAP5 POP PUSH2 0x97E DUP5 DUP3 PUSH2 0x1B65 JUMP JUMPDEST SWAP4 POP PUSH2 0x98E DUP7 PUSH1 0x60 ADD MLOAD DUP4 PUSH2 0x1B65 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x9A0 DUP8 DUP8 DUP8 PUSH2 0x1B71 JUMP JUMPDEST SWAP1 POP PUSH2 0x9AC DUP2 DUP4 PUSH2 0x1BAC JUMP JUMPDEST SWAP4 POP POP POP POP PUSH2 0x5A1 JUMP JUMPDEST PUSH2 0x9C0 DUP6 DUP4 PUSH2 0x1B65 JUMP JUMPDEST SWAP5 POP PUSH2 0x9CC DUP5 DUP3 PUSH2 0x1B65 JUMP JUMPDEST SWAP4 POP PUSH2 0x9DC DUP7 PUSH1 0x60 ADD MLOAD DUP3 PUSH2 0x1B65 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x9EE DUP8 DUP8 DUP8 PUSH2 0x1BB8 JUMP JUMPDEST SWAP1 POP PUSH2 0x9FA DUP2 DUP5 PUSH2 0x1BEB JUMP JUMPDEST SWAP1 POP PUSH2 0x9AC DUP2 PUSH2 0x1BF7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4D8 CALLER DUP5 DUP5 PUSH2 0xF75 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x1C0E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0xA28 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF94D4668 PUSH2 0xA3E PUSH2 0x635 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xA5A SWAP2 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA72 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xA86 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0xAAE SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x4028 JUMP JUMPDEST POP SWAP2 POP POP PUSH2 0xAC3 DUP2 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH2 0x165A JUMP JUMPDEST PUSH1 0x60 PUSH2 0xACD PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH2 0xAD9 DUP2 DUP4 PUSH2 0x1EE4 JUMP JUMPDEST SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH2 0xAEE DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD SWAP1 MLOAD SWAP1 SWAP3 SWAP2 PUSH2 0xB45 SWAP2 PUSH32 0x0 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP9 SWAP2 DUP14 SWAP2 ADD PUSH2 0x45A5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0xB68 DUP3 PUSH2 0x1F56 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xB8F SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4605 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBB1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0xBF3 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xBEB JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0xC1C DUP12 DUP12 DUP12 PUSH2 0xDF9 JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0xC38 PUSH2 0x749 PUSH2 0x893 JUMP JUMPDEST PUSH2 0xC43 PUSH2 0x76F PUSH2 0x635 JUMP JUMPDEST PUSH1 0x60 PUSH2 0xC4D PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0xC57 PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0xCFC JUMPI PUSH1 0x0 PUSH1 0x60 PUSH2 0xC6B DUP14 DUP14 DUP14 DUP11 PUSH2 0x1F72 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xC80 PUSH3 0xF4240 DUP4 LT ISZERO PUSH1 0xCC PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xC8E PUSH1 0x0 PUSH3 0xF4240 PUSH2 0x200D JUMP JUMPDEST PUSH2 0xC9D DUP12 PUSH3 0xF4240 DUP5 SUB PUSH2 0x200D JUMP JUMPDEST PUSH2 0xCA7 DUP2 DUP5 PUSH2 0x17CB JUMP JUMPDEST DUP1 PUSH2 0xCB0 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xCC5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xCEF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0x7CF JUMP JUMPDEST PUSH2 0xD06 DUP9 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0xD1A DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x174E JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xD2A DUP13 DUP5 PUSH2 0x200D JUMP JUMPDEST PUSH2 0xD34 DUP3 DUP6 PUSH2 0x17CB JUMP JUMPDEST PUSH2 0xD3E DUP2 DUP6 PUSH2 0x11E1 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP PUSH2 0x7CF SWAP2 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x4D8 SWAP2 DUP6 SWAP1 PUSH2 0x6E1 SWAP1 DUP7 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x5B7 PUSH2 0x1C88 JUMP JUMPDEST DUP1 PUSH2 0xDC0 DUP2 PUSH2 0x20A3 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xDC0 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x5A1 DUP5 DUP3 LT ISZERO DUP4 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xDF3 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0xF67 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP5 SWAP1 SSTORE MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0xE54 SWAP1 DUP6 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE78 PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x7F7 JUMP JUMPDEST SWAP1 POP PUSH2 0x4F3 PUSH2 0xE87 DUP3 CALLER PUSH2 0x211C JUMP JUMPDEST PUSH2 0x191 PUSH2 0xF67 JUMP JUMPDEST DUP1 ISZERO PUSH2 0xEAF JUMPI PUSH2 0xEAA PUSH2 0xEA0 PUSH2 0xF1F JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xEC4 JUMP JUMPDEST PUSH2 0xEC4 PUSH2 0xEBA PUSH2 0xF43 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x62A SWAP1 DUP4 SWAP1 PUSH2 0x455A JUMP JUMPDEST PUSH1 0x0 PUSH2 0xF0C PUSH2 0xF43 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x5B7 JUMPI POP POP PUSH1 0x6 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST DUP2 PUSH2 0xDC0 JUMPI PUSH2 0xDC0 DUP2 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0xF9D DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xFB4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xFE4 SWAP1 DUP4 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP7 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1036 SWAP1 DUP7 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x10B1 PUSH2 0x225F JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10C6 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x45D9 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x10F4 PUSH2 0x10EC PUSH2 0xF02 JUMP JUMPDEST PUSH2 0x192 PUSH2 0xF67 JUMP JUMPDEST JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x60 PUSH2 0x1129 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH2 0x1133 PUSH2 0xF02 JUMP JUMPDEST ISZERO PUSH2 0x116A JUMPI PUSH1 0x0 PUSH2 0x1144 DUP3 DUP11 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH2 0x1155 DUP10 DUP4 PUSH1 0x8 SLOAD DUP5 DUP12 PUSH2 0x2263 JUMP JUMPDEST SWAP3 POP PUSH2 0x1164 DUP10 DUP5 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST POP PUSH2 0x11B5 JUMP JUMPDEST PUSH2 0x1172 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1187 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x11B1 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP JUMPDEST PUSH2 0x11C0 DUP9 DUP3 DUP8 PUSH2 0x23DD JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP PUSH2 0x11D0 DUP9 DUP5 DUP4 PUSH2 0x244A JUMP JUMPDEST PUSH1 0x8 SSTORE POP SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x11EC PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x1223 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1202 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1216 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2463 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x122F JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x11E4 JUMP JUMPDEST POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x1305 JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x126B SWAP3 SWAP2 SWAP1 PUSH2 0x44E3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x12A8 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x12AD JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x12BC JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x43ADBAFB PUSH1 0xE0 SHL DUP2 EQ PUSH2 0x12E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x4 PUSH1 0x0 RETURNDATACOPY PUSH1 0x40 PUSH1 0x20 MSTORE PUSH1 0x24 RETURNDATASIZE SUB PUSH1 0x24 PUSH1 0x40 RETURNDATACOPY PUSH1 0x1C RETURNDATASIZE ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x130F PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0x131B DUP8 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1332 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x1345 DUP2 DUP5 DUP7 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP1 MLOAD PUSH1 0x1F NOT DUP3 ADD DUP4 SWAP1 MSTORE PUSH4 0x43ADBAFB PUSH1 0x3F NOT DUP4 ADD MSTORE PUSH1 0x20 MUL PUSH1 0x23 NOT DUP3 ADD PUSH1 0x44 DUP3 ADD DUP2 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x5A1 DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139C DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x13A9 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x13CC SWAP1 DUP6 DUP4 DUP2 PUSH2 0x13C3 JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0xF67 JUMP JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x13D5 JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x13EA PUSH2 0x10F6 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1404 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x142E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1465 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x147F JUMP JUMPDEST SWAP2 POP PUSH2 0x4C8 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x14B6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x14F9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x153C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0x157F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0x15C2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0x1605 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0x1648 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x1665 PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x169C DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x167B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x168F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1369 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x16A8 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x165D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x16E3 DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP3 DUP3 SUB SWAP1 SSTORE PUSH1 0x2 SLOAD PUSH2 0x170D SWAP1 DUP4 PUSH2 0xDE3 JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0xE54 SWAP1 DUP7 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x175B PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1765 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1773 DUP3 DUP11 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x1786 DUP11 DUP5 PUSH1 0x8 SLOAD DUP6 DUP13 PUSH2 0x2263 JUMP JUMPDEST SWAP1 POP PUSH2 0x1795 DUP11 DUP3 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x17A4 DUP13 DUP7 DUP12 PUSH2 0x2483 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x17B3 DUP13 DUP3 DUP8 PUSH2 0x24DD JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP1 SWAP15 SWAP1 SWAP14 POP SWAP1 SWAP12 POP SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x17D6 PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x180D DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x17EC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1800 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x24EC JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1819 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x17CE JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x188F JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x18F0 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1951 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x19B2 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1A13 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1A74 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1AD5 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B36 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH2 0x735 PUSH2 0x135 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1B59 PUSH1 0x7 SLOAD DUP5 PUSH2 0x251F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x5A1 DUP4 DUP3 PUSH2 0xDE3 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x1369 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B7B PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x1BA4 DUP4 PUSH2 0x1B8C DUP7 PUSH1 0x20 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP5 PUSH2 0x1B9A DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x286D JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x2463 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BC2 PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x1BA4 DUP4 PUSH2 0x1BD3 DUP7 PUSH1 0x20 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP5 PUSH2 0x1BE1 DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x28E8 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x24EC JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4DC PUSH2 0x1C07 PUSH1 0x7 SLOAD PUSH2 0x295E JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2984 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C18 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1C50 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1C64 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x5B7 SWAP2 SWAP1 PUSH2 0x424F JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x1C94 PUSH2 0x10F6 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1CAE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1CD8 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1D0F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x1 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x1D52 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x1D95 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x1DD8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0x1E1B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0x1E5E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0x1EA1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0x1648 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x1F46 JUMPI PUSH2 0x1F3C PUSH2 0x1F35 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F0B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x1F1F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x29C6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x1EF0 JUMP JUMPDEST POP PUSH2 0x4DC PUSH1 0x0 DUP3 GT PUSH2 0x137 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1F60 PUSH2 0x1044 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x82C SWAP3 SWAP2 SWAP1 PUSH2 0x44F3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1F7E PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1F89 DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FA4 PUSH1 0x0 DUP3 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1F9C JUMPI INVALID JUMPDEST EQ PUSH1 0xCE PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1FAF DUP6 PUSH2 0x2A57 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FC3 PUSH2 0x1FBC PUSH2 0x10F6 JUMP JUMPDEST DUP3 MLOAD PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x1FCF DUP2 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1FD9 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1FE7 DUP3 DUP5 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1FF7 DUP3 PUSH2 0x710 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x8 SWAP3 SWAP1 SWAP3 SSTORE POP SWAP10 SWAP2 SWAP9 POP SWAP1 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x2030 SWAP1 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x2 SLOAD PUSH2 0x2056 SWAP1 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x2097 SWAP1 DUP6 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH2 0x20B2 JUMPI PUSH2 0x4F3 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x20C1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x20E9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x2112 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH2 0xF67 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x20D2 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xBA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1B PUSH2 0x213B PUSH2 0x86F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x2156 JUMPI POP PUSH2 0x2156 DUP4 PUSH2 0x2A6D JUMP JUMPDEST ISZERO PUSH2 0x217E JUMPI PUSH2 0x2163 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2186 PUSH2 0x1C0E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x21B5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4586 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x21CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x21E1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2205 SWAP2 SWAP1 PUSH2 0x410F JUMP JUMPDEST SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x226E PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x22AD JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP3 PUSH2 0x22BC JUMPI SWAP1 POP PUSH2 0x2369 JUMP JUMPDEST PUSH2 0x232F DUP8 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x22EB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x231F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 DUP8 DUP8 PUSH2 0x2A87 JUMP JUMPDEST DUP2 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x235B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP1 POP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x237D PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x23D7 JUMPI PUSH2 0x23B8 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2393 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x23A7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x23C4 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x2375 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x23EC DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x23FC JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2417 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2AFF JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x2442 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2425 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2435 JUMPI PUSH2 0x240D DUP7 DUP6 PUSH2 0x2BDC JUMP JUMPDEST PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2C0E JUMP JUMPDEST POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2459 DUP5 DUP5 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST PUSH2 0x1BA4 DUP3 DUP6 PUSH2 0x1EE4 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2472 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x247B JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x2492 DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x24A2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x24B3 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2C79 JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x24C1 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x24D2 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2CD3 JUMP JUMPDEST PUSH2 0x2440 PUSH2 0x136 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2459 DUP5 DUP5 PUSH2 0xDD1 PUSH2 0x2372 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x24FB DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x2508 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x2514 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2539 DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST DUP1 PUSH2 0x2548 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x25C6 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x2627 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x2688 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x26E9 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x274A JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x27AB JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x280C JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B36 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x288F PUSH2 0x2884 DUP8 PUSH8 0x429D069189E0000 PUSH2 0x2A15 JUMP JUMPDEST DUP4 GT ISZERO PUSH2 0x130 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x289B DUP8 DUP5 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28A9 DUP9 DUP4 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28B7 DUP9 DUP8 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28C5 DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA PUSH2 0x28D3 DUP3 PUSH2 0x295E JUMP JUMPDEST DUP10 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290A PUSH2 0x28FF DUP6 PUSH8 0x429D069189E0000 PUSH2 0x2A15 JUMP JUMPDEST DUP4 GT ISZERO PUSH2 0x131 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2920 PUSH2 0x2919 DUP7 DUP6 PUSH2 0xDE3 JUMP JUMPDEST DUP7 SWAP1 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x292E DUP6 DUP9 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x293C DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2952 DUP3 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA DUP11 DUP3 PUSH2 0x251F JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 DUP3 LT PUSH2 0x2976 JUMPI PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2993 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x29A0 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x29BA SWAP1 DUP6 DUP4 DUP2 PUSH2 0x13C3 JUMPI INVALID JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x2557 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x29D3 DUP5 DUP5 PUSH2 0x2DA6 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29ED PUSH2 0x29E6 DUP4 PUSH2 0x2710 PUSH2 0x251F JUMP JUMPDEST PUSH1 0x1 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP DUP1 DUP3 LT ISZERO PUSH2 0x2A02 JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2A0C DUP3 DUP3 PUSH2 0xDE3 JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2A2F DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x4DC SWAP2 SWAP1 PUSH2 0x426B JUMP JUMPDEST PUSH1 0x60 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5A1 SWAP2 SWAP1 PUSH2 0x4330 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2A7F PUSH4 0x1C74C917 PUSH1 0xE1 SHL PUSH2 0x7F7 JUMP JUMPDEST SWAP1 SWAP2 EQ SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP4 GT PUSH2 0x2A98 JUMPI POP PUSH1 0x0 PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2AA4 DUP6 DUP6 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2ABA PUSH8 0xDE0B6B3A7640000 DUP9 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH2 0x2ACE DUP3 PUSH8 0x9B6E64A8EC60000 PUSH2 0x2EB1 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x2ADC DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2AF3 PUSH2 0x2AEC DUP4 PUSH2 0x295E JUMP JUMPDEST DUP12 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA DUP2 DUP8 PUSH2 0x2A15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2B0B PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2B17 DUP6 PUSH2 0x2EC8 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2B2F PUSH2 0x2B26 PUSH2 0x10F6 JUMP JUMPDEST DUP3 LT PUSH1 0x64 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2B39 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2B4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2B78 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2BB7 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2B8A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2B9E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH2 0x2BAF PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2EEA JUMP JUMPDEST DUP2 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2BC3 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP2 SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x2BEB DUP5 PUSH2 0x2FA7 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x2C01 DUP7 DUP4 PUSH2 0x2BFC PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0x2FBD JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2C1A PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2C27 DUP6 PUSH2 0x306E JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2C38 DUP3 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x2C44 DUP3 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C5C DUP9 DUP9 DUP6 PUSH2 0x2C54 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x3086 JUMP JUMPDEST SWAP1 POP PUSH2 0x2C6C DUP3 DUP3 GT ISZERO PUSH1 0xCF PUSH2 0xF67 JUMP JUMPDEST SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x2C89 DUP6 PUSH2 0x306E JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2C9F PUSH2 0x2C98 PUSH2 0x10F6 JUMP JUMPDEST DUP4 MLOAD PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x2CAB DUP3 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2CC3 DUP9 DUP9 DUP6 PUSH2 0x2CBB PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x32AA JUMP JUMPDEST SWAP1 POP PUSH2 0x2C6C DUP3 DUP3 LT ISZERO PUSH1 0xD0 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0x2CE3 DUP6 PUSH2 0x2EC8 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2CF2 PUSH2 0x2B26 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2CFC PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2D11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2D3B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2BB7 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2D4D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2D61 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH2 0x2D72 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x34BA JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2D87 DUP5 DUP5 PUSH2 0x2DA6 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2D9A PUSH2 0x29E6 DUP4 PUSH2 0x2710 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH2 0x2369 DUP3 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x2DBC JUMPI POP PUSH8 0xDE0B6B3A7640000 PUSH2 0x4DC JUMP JUMPDEST DUP3 PUSH2 0x2DC9 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2DDA PUSH1 0x1 PUSH1 0xFF SHL DUP5 LT PUSH1 0x6 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x2E00 PUSH24 0xBCE5086492111AEA88F4BB1CA6BCF584181EA8059F76532 DUP5 LT PUSH1 0x7 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH1 0x0 PUSH8 0xC7D713B49DA0000 DUP4 SGT DUP1 ISZERO PUSH2 0x2E21 JUMPI POP PUSH8 0xF43FC2C04EE0000 DUP4 SLT JUMPDEST ISZERO PUSH2 0x2E58 JUMPI PUSH1 0x0 PUSH2 0x2E31 DUP5 PUSH2 0x355C JUMP JUMPDEST SWAP1 POP PUSH8 0xDE0B6B3A7640000 DUP1 DUP3 SMOD DUP5 MUL SDIV DUP4 PUSH8 0xDE0B6B3A7640000 DUP4 SDIV MUL ADD SWAP2 POP POP PUSH2 0x2E66 JUMP JUMPDEST DUP2 PUSH2 0x2E62 DUP5 PUSH2 0x367A JUMP JUMPDEST MUL SWAP1 POP JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 SDIV PUSH2 0x2E9E PUSH9 0x238FD42C5CF03FFFF NOT DUP3 SLT DUP1 ISZERO SWAP1 PUSH2 0x2E97 JUMPI POP PUSH9 0x70C1CC73B00C80000 DUP3 SGT ISZERO JUMPDEST PUSH1 0x8 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x2EA7 DUP2 PUSH2 0x3A27 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT ISZERO PUSH2 0x2EC1 JUMPI DUP2 PUSH2 0x5A1 JUMP JUMPDEST POP SWAP1 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2EDF SWAP2 SWAP1 PUSH2 0x42FA JUMP JUMPDEST SWAP1 SWAP6 SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2F01 DUP5 PUSH2 0x2EFB DUP2 DUP9 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F1A PUSH8 0x9B6E64A8EC60000 DUP3 LT ISZERO PUSH2 0x132 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2F38 PUSH2 0x2F31 PUSH8 0xDE0B6B3A7640000 DUP10 PUSH2 0x138D JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F4F PUSH2 0x2F48 DUP4 PUSH2 0x295E JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F5C DUP10 PUSH2 0x295E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F6A DUP4 DUP4 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F78 DUP5 DUP4 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F97 PUSH2 0x2F90 PUSH2 0x2F89 DUP11 PUSH2 0x295E JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST DUP3 SWAP1 PUSH2 0xDD1 JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5A1 SWAP2 SWAP1 PUSH2 0x42CD JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2FCB DUP5 DUP5 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2FE6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3010 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0x3064 JUMPI PUSH2 0x3045 DUP4 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2A15 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3051 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x3016 JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2EDF SWAP2 SWAP1 PUSH2 0x4287 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x30A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x30CB JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x3190 JUMPI PUSH2 0x312B DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x30EA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2EFB DUP10 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3101 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xDE3 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3137 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x3186 PUSH2 0x317F DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3155 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3169 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x251F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 SWAP1 PUSH2 0xDD1 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x30D2 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x3289 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x31B4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 GT ISZERO PUSH2 0x320B JUMPI PUSH1 0x0 PUSH2 0x31DD PUSH2 0x31D1 DUP7 PUSH2 0x295E JUMP JUMPDEST DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x31F1 DUP3 DUP13 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x3202 PUSH2 0x317F PUSH2 0x1C07 DUP12 PUSH2 0x295E JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x3222 JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3217 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x324B DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3233 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP5 DUP16 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x327D PUSH2 0x3276 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x325F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x29C6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP4 POP POP POP PUSH1 0x1 ADD PUSH2 0x319D JUMP JUMPDEST POP PUSH2 0x329D PUSH2 0x3296 DUP3 PUSH2 0x295E JUMP JUMPDEST DUP8 SWAP1 PUSH2 0x251F JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x32C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x32EF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x3397 JUMPI PUSH2 0x334F DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x330E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP10 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3325 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3339 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xDD1 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x335B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x338D PUSH2 0x317F DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3379 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x32F6 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x3478 JUMPI PUSH1 0x0 DUP4 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x33BC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD GT ISZERO PUSH2 0x3418 JUMPI PUSH1 0x0 PUSH2 0x33E1 PUSH2 0x31D1 DUP7 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x33F5 DUP3 DUP13 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x340F PUSH2 0x317F PUSH2 0x1F35 PUSH8 0xDE0B6B3A7640000 DUP13 PUSH2 0xDE3 JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x342F JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3424 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x3458 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3440 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP5 DUP16 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3339 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x346C PUSH2 0x3276 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x325F JUMPI INVALID JUMPDEST SWAP4 POP POP POP PUSH1 0x1 ADD PUSH2 0x33A4 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 DUP2 LT PUSH2 0x34AE JUMPI PUSH2 0x34A4 PUSH2 0x349D DUP3 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST DUP8 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP4 POP POP POP POP PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 SWAP4 POP POP POP POP PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x34CB DUP5 PUSH2 0x2EFB DUP2 DUP9 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP PUSH2 0x34E4 PUSH8 0x29A2241AF62C0000 DUP3 GT ISZERO PUSH2 0x133 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x34FB PUSH2 0x2F31 PUSH8 0xDE0B6B3A7640000 DUP10 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x351B PUSH2 0x3514 DUP4 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3528 DUP10 PUSH2 0x295E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3536 DUP4 DUP4 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3544 DUP5 DUP4 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F97 PUSH2 0x2F90 PUSH2 0x3555 DUP11 PUSH2 0x295E JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x2984 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 MUL PUSH1 0x0 DUP1 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP1 DUP5 ADD SWAP1 PUSH15 0xC097CE7BC90715B34B9F0FFFFFFFFF NOT DUP6 ADD MUL DUP2 PUSH2 0x3597 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH1 0x0 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP1 MUL SDIV SWAP1 POP DUP2 DUP1 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 DUP5 MUL SDIV SWAP2 POP PUSH1 0x3 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x5 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x7 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x9 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xB DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xD DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xF DUP3 PUSH1 0x2 SWAP2 SWAP1 SDIV SWAP2 SWAP1 SWAP2 ADD MUL SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x368A PUSH1 0x0 DUP4 SGT PUSH1 0x64 PUSH2 0xF67 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP3 SLT ISZERO PUSH2 0x36C4 JUMPI PUSH2 0x36BA DUP3 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 PUSH2 0x36B4 JUMPI INVALID JUMPDEST SDIV PUSH2 0x367A JUMP JUMPDEST PUSH1 0x0 SUB SWAP1 POP PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH31 0x1600EF3172E58D2E933EC884FDE10064C63B5372D805E203C0000000000000 DUP4 SLT PUSH2 0x3715 JUMPI PUSH24 0x195E54C5DD42177F53A27172FA9EC630262827000000000 DUP4 SDIV SWAP3 POP PUSH9 0x6F05B59D3B2000000 ADD JUMPDEST PUSH20 0x11798004D755D3C8BC8E03204CF44619E000000 DUP4 SLT PUSH2 0x374D JUMPI PUSH12 0x1425982CF597CD205CEF7380 DUP4 SDIV SWAP3 POP PUSH9 0x3782DACE9D9000000 ADD JUMPDEST PUSH1 0x64 SWAP3 DUP4 MUL SWAP3 MUL PUSH15 0x1855144814A7FF805980FF0084000 DUP4 SLT PUSH2 0x3795 JUMPI PUSH15 0x1855144814A7FF805980FF0084000 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0xAD78EBC5AC62000000 ADD JUMPDEST PUSH12 0x2DF0AB5A80A22C61AB5A700 DUP4 SLT PUSH2 0x37D0 JUMPI PUSH12 0x2DF0AB5A80A22C61AB5A700 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x56BC75E2D631000000 ADD JUMPDEST PUSH10 0x3F1FCE3DA636EA5CF850 DUP4 SLT PUSH2 0x3807 JUMPI PUSH10 0x3F1FCE3DA636EA5CF850 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x2B5E3AF16B18800000 ADD JUMPDEST PUSH10 0x127FA27722CC06CC5E2 DUP4 SLT PUSH2 0x383E JUMPI PUSH10 0x127FA27722CC06CC5E2 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x15AF1D78B58C400000 ADD JUMPDEST PUSH9 0x280E60114EDB805D03 DUP4 SLT PUSH2 0x3873 JUMPI PUSH9 0x280E60114EDB805D03 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0xAD78EBC5AC6200000 ADD JUMPDEST PUSH9 0xEBC5FB41746121110 DUP4 SLT PUSH2 0x389E JUMPI PUSH9 0xEBC5FB41746121110 PUSH9 0x56BC75E2D63100000 SWAP4 DUP5 MUL SDIV SWAP3 ADD JUMPDEST PUSH9 0x8F00F760A4B2DB55D DUP4 SLT PUSH2 0x38D3 JUMPI PUSH9 0x8F00F760A4B2DB55D PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x2B5E3AF16B1880000 ADD JUMPDEST PUSH9 0x6F5F1775788937937 DUP4 SLT PUSH2 0x3908 JUMPI PUSH9 0x6F5F1775788937937 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x15AF1D78B58C40000 ADD JUMPDEST PUSH9 0x6248F33704B286603 DUP4 SLT PUSH2 0x393C JUMPI PUSH9 0x6248F33704B286603 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH8 0xAD78EBC5AC620000 ADD JUMPDEST PUSH9 0x5C548670B9510E7AC DUP4 SLT PUSH2 0x3970 JUMPI PUSH9 0x5C548670B9510E7AC PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH8 0x56BC75E2D6310000 ADD JUMPDEST PUSH1 0x0 PUSH9 0x56BC75E2D63100000 DUP5 ADD PUSH9 0x56BC75E2D63100000 DUP1 DUP7 SUB MUL DUP2 PUSH2 0x3993 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH1 0x0 PUSH9 0x56BC75E2D63100000 DUP3 DUP1 MUL SDIV SWAP1 POP DUP2 DUP1 PUSH9 0x56BC75E2D63100000 DUP2 DUP5 MUL SDIV SWAP2 POP PUSH1 0x3 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x5 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x7 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x9 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xB DUP3 SDIV ADD PUSH1 0x2 MUL PUSH1 0x64 DUP6 DUP3 ADD SDIV SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3A56 PUSH9 0x238FD42C5CF03FFFF NOT DUP4 SLT ISZERO DUP1 ISZERO PUSH2 0x3A4F JUMPI POP PUSH9 0x70C1CC73B00C80000 DUP4 SGT ISZERO JUMPDEST PUSH1 0x9 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 DUP3 SLT ISZERO PUSH2 0x3A89 JUMPI PUSH2 0x3A6B DUP3 PUSH1 0x0 SUB PUSH2 0x3A27 JUMP JUMPDEST PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 PUSH2 0x3A81 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH9 0x6F05B59D3B2000000 DUP4 SLT PUSH2 0x3AC9 JUMPI POP PUSH9 0x6F05B59D3B1FFFFFF NOT SWAP1 SWAP2 ADD SWAP1 PUSH24 0x195E54C5DD42177F53A27172FA9EC630262827000000000 PUSH2 0x3AFF JUMP JUMPDEST PUSH9 0x3782DACE9D9000000 DUP4 SLT PUSH2 0x3AFB JUMPI POP PUSH9 0x3782DACE9D8FFFFFF NOT SWAP1 SWAP2 ADD SWAP1 PUSH12 0x1425982CF597CD205CEF7380 PUSH2 0x3AFF JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST PUSH1 0x64 SWAP3 SWAP1 SWAP3 MUL SWAP2 PUSH9 0x56BC75E2D63100000 PUSH9 0xAD78EBC5AC62000000 DUP5 SLT PUSH2 0x3B4F JUMPI PUSH9 0xAD78EBC5AC61FFFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH15 0x1855144814A7FF805980FF0084000 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D631000000 DUP5 SLT PUSH2 0x3B8B JUMPI PUSH9 0x56BC75E2D630FFFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH12 0x2DF0AB5A80A22C61AB5A700 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x2B5E3AF16B18800000 DUP5 SLT PUSH2 0x3BC5 JUMPI PUSH9 0x2B5E3AF16B187FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH10 0x3F1FCE3DA636EA5CF850 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x15AF1D78B58C400000 DUP5 SLT PUSH2 0x3BFF JUMPI PUSH9 0x15AF1D78B58C3FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH10 0x127FA27722CC06CC5E2 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0xAD78EBC5AC6200000 DUP5 SLT PUSH2 0x3C38 JUMPI PUSH9 0xAD78EBC5AC61FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x280E60114EDB805D03 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D63100000 DUP5 SLT PUSH2 0x3C71 JUMPI PUSH9 0x56BC75E2D630FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0xEBC5FB41746121110 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x2B5E3AF16B1880000 DUP5 SLT PUSH2 0x3CAA JUMPI PUSH9 0x2B5E3AF16B187FFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x8F00F760A4B2DB55D DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x15AF1D78B58C40000 DUP5 SLT PUSH2 0x3CE3 JUMPI PUSH9 0x15AF1D78B58C3FFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x6F5F1775788937937 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D63100000 DUP5 DUP2 ADD SWAP1 DUP6 SWAP1 PUSH1 0x2 SWAP1 DUP3 DUP1 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x3 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x4 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x5 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x6 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x7 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x8 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x9 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xA PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xB PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xC PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x64 PUSH9 0x56BC75E2D63100000 DUP5 DUP5 MUL SDIV DUP6 MUL SDIV SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x4DC DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3E1F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x3E32 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST PUSH2 0x469D JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x3E53 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x3E72 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3E56 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3E8D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3EA2 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3EB5 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x469D JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x3ECC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x4DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3F05 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5A1 DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3F22 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x3F2D DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x3F3D DUP2 PUSH2 0x46E2 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x3F5C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x3F67 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x3F77 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3FA2 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH2 0x3FAD DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x3FBD DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x3FE0 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP7 SWAP10 SWAP6 SWAP9 POP SWAP4 SWAP7 SWAP3 SWAP6 SWAP5 PUSH1 0xA0 DUP5 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 SWAP1 SWAP4 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x400F JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x401A DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x403C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4052 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4065 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x4073 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x4093 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x40BE JUMPI DUP1 MLOAD PUSH2 0x40AA DUP2 PUSH2 0x46E2 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x4097 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x40D5 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x40E2 DUP7 DUP3 DUP8 ADD PUSH2 0x3E0F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4104 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5A1 DUP2 PUSH2 0x46F7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4120 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x46F7 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x4145 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP8 CALLDATALOAD SWAP7 POP PUSH1 0x20 DUP1 DUP10 ADD CALLDATALOAD PUSH2 0x4158 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP7 POP PUSH1 0x40 DUP10 ADD CALLDATALOAD PUSH2 0x4168 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP6 POP PUSH1 0x60 DUP10 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4183 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP12 ADD SWAP2 POP DUP12 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4196 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x41A4 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE DUP6 DUP3 ADD SWAP2 POP DUP6 DUP6 ADD DUP16 DUP8 DUP9 DUP7 MUL DUP9 ADD ADD GT ISZERO PUSH2 0x41C2 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x41E4 JUMPI DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH2 0x41C6 JUMP JUMPDEST POP SWAP9 POP POP POP PUSH1 0x80 DUP12 ADD CALLDATALOAD SWAP6 POP PUSH1 0xA0 DUP12 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD SWAP3 POP DUP1 DUP4 GT ISZERO PUSH2 0x420A JUMPI DUP4 DUP5 REVERT JUMPDEST POP POP PUSH2 0x4218 DUP11 DUP3 DUP12 ADD PUSH2 0x3E7D JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4238 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x5A1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4260 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x427C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x429B JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x42A6 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x42C1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x40E2 DUP7 DUP3 DUP8 ADD PUSH2 0x3E0F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x42DF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x42EA DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x430E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x4319 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD PUSH1 0x40 SWAP1 SWAP6 ADD MLOAD SWAP1 SWAP7 SWAP5 SWAP6 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x4342 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x434D DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x4368 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x4374 DUP6 DUP3 DUP7 ADD PUSH2 0x3E0F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x4392 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x43A8 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP PUSH2 0x120 DUP1 DUP4 DUP10 SUB SLT ISZERO PUSH2 0x43BE JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x43C7 DUP2 PUSH2 0x469D JUMP JUMPDEST SWAP1 POP PUSH2 0x43D3 DUP9 DUP5 PUSH2 0x3EE5 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x43E2 DUP9 PUSH1 0x20 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x43F4 DUP9 PUSH1 0x40 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x4424 DUP9 PUSH1 0xC0 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x4436 DUP9 PUSH1 0xE0 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 DUP1 DUP5 ADD CALLDATALOAD DUP4 DUP2 GT ISZERO PUSH2 0x444E JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH2 0x445A DUP11 DUP3 DUP8 ADD PUSH2 0x3E7D JUMP JUMPDEST SWAP2 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP8 PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP8 POP PUSH1 0x40 SWAP1 SWAP7 ADD CALLDATALOAD SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x448A JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x44C0 JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x44A4 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x5A1 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x4491 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x4548 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x4491 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x2369 DUP2 DUP6 PUSH2 0x4491 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP6 DUP7 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x20 DUP8 ADD MSTORE SWAP3 SWAP1 SWAP4 AND PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0x80 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x464F JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x4633 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x4660 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x1BA4 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x4491 JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x46BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x46D8 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x5DAE8954494FC239D6EDD2B70A6D1304F3CE003F1A0AD7 PUSH6 0x569325030008 DUP1 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER ",
              "sourceMap": "1242:21086:38:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4957:81:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2582:164;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;8645:89:29:-;;;;;;:::i;:::-;;:::i;:::-;;5222:98:26;;;:::i;:::-;;;;;;;:::i;3137:346:8:-;;;:::i;:::-;;;;;;;;;:::i;3511:649:26:-;;;;;;:::i;:::-;;:::i;5135:81::-;;;:::i;:::-;;;;;;;:::i;5495:113::-;;;:::i;8183:399:29:-;;;;;;:::i;:::-;;:::i;7825:82::-;;;:::i;8014:106::-;;;:::i;14467:904::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;2959:379:26:-;;;;;;:::i;:::-;;:::i;22099:227:38:-;;;:::i;2458:118:26:-;;;;;;:::i;:::-;;:::i;11118:1171:29:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;5326:110:26:-;;;;;;:::i;:::-;;:::i;2487:430:2:-;;;;;;:::i;:::-;;:::i;12942:902:29:-;;;;;;:::i;:::-;;:::i;1715:80:30:-;;;:::i;:::-;;;;;;;:::i;7740:79:29:-;;;:::i;5044:85:26:-;;;:::i;6446:98:38:-;;;:::i;1817:1781:28:-;;;;;;:::i;:::-;;:::i;3344:161:26:-;;;;;;:::i;:::-;;:::i;1801:101:30:-;;;:::i;6622:461:38:-;;;:::i;4166:760:26:-;;;;;;:::i;:::-;;:::i;8968:2144:29:-;;;;;;:::i;:::-;;:::i;2752:201:26:-;;;;;;:::i;:::-;;:::i;2310:142::-;;;;;;:::i;:::-;;:::i;7089:117:38:-;;;:::i;:::-;;;;;;;:::i;4957:81:26:-;5026:5;5019:12;;;;;;;;;;;;;-1:-1:-1;;5019:12:26;;;;;;;;;;;;;;;;;;;;;;;;;;4994:13;;5019:12;;5026:5;;5019:12;;;5026:5;5019:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4957:81;;:::o;2582:164::-;2659:4;2675:42;2689:10;2701:7;2710:6;2675:13;:42::i;:::-;-1:-1:-1;2735:4:26;2582:164;;;;;:::o;8645:89:29:-;2156:21:2;:19;:21::i;:::-;8709:18:29::1;8720:6;8709:10;:18::i;:::-;8645:89:::0;:::o;5222:98:26:-;5301:12;;5222:98;:::o;3137:346:8:-;3223:11;3248:26;3288:27;3350:14;:12;:14::i;:::-;3349:15;3340:24;;3395;:22;:24::i;:::-;3374:45;;3451:25;:23;:25::i;:::-;3429:47;;3137:346;;;:::o;3511:649:26:-;-1:-1:-1;;;;;3684:18:26;;3641:4;3684:18;;;-1:-1:-1;3684:18:26;;;;;;;;3703:10;3684:30;;;;;;;;3641:4;;3724:91;;3733:20;;:50;;;3777:6;3757:16;:26;;3733:50;6726:3:3;3724:8:26;:91::i;:::-;3826:32;3832:6;3840:9;3851:6;3826:5;:32::i;:::-;-1:-1:-1;;;;;3873:20:26;;:10;:20;;;;:55;;-1:-1:-1;;;3897:31:26;;;3873:55;3869:263;;;4061:60;4075:6;4083:10;4114:6;4095:16;:25;4061:13;:60::i;:::-;4149:4;4142:11;;;3511:649;;;;;;:::o;5135:81::-;1610:2;5135:81;:::o;5495:113::-;5555:7;5581:20;:18;:20::i;:::-;5574:27;;5495:113;:::o;8183:399:29:-;2156:21:2;:19;:21::i;:::-;2953:18:8::1;:16;:18::i;:::-;8294:87:29::2;2632:4;8303:17;:45;;5289:3:3;8294:8:29;:87::i;:::-;8391;2705:4;8400:17;:45;;5228:3:3;8391:8:29;:87::i;:::-;8489:18;:38:::0;;;8542:33:::2;::::0;::::2;::::0;::::2;::::0;8510:17;;8542:33:::2;:::i;:::-;;;;;;;;8183:399:::0;:::o;7825:82::-;7893:7;7825:82;:::o;8014:106::-;8095:18;;8014:106;:::o;14467:904::-;14727:13;14742:27;14781:71;14817:8;:15;14834:17;:15;:17::i;:::-;14781:35;:71::i;:::-;14863:255;14889:6;14909;14929:9;14952:8;14974:15;15003:25;15042:8;15064:11;15089:19;14863:12;:255::i;:::-;14467:904;;;;;;;;;;:::o;2959:379:26:-;3090:10;3036:4;3079:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3079:31:26;;;;;;;;;;3125:26;;;3121:189;;3167:37;3181:10;3193:7;3202:1;3167:13;:37::i;:::-;3121:189;;;3235:64;3249:10;3261:7;3270:28;:16;3291:6;3270:20;:28::i;:::-;3235:13;:64::i;:::-;-1:-1:-1;3327:4:26;;2959:379;-1:-1:-1;;;2959:379:26:o;22099:227:38:-;22139:7;22253:66;22305:13;:11;:13::i;:::-;22253:43;22262:14;:12;:14::i;:::-;22278:17;:15;:17::i;:::-;22253:8;:43::i;:::-;:51;;:66::i;2458:118:26:-;-1:-1:-1;;;;;2552:17:26;;2526:7;2552:17;;;;;;;;;;;2458:118;;;;:::o;11118:1171:29:-;11414:16;11432;11397:6;8811:68;8842:10;:8;:10::i;:::-;-1:-1:-1;;;;;8820:33:29;:10;:33;5392:3:3;8811:8:29;:68::i;:::-;8889:55;8908:11;:9;:11::i;:::-;8898:6;:21;7978:3:3;8889:8:29;:55::i;:::-;11460:31:::1;11494:17;:15;:17::i;:::-;11460:51;;11521:39;11535:8;11545:14;11521:13;:39::i;:::-;11572:19;11593:27;11622:38:::0;11664:196:::1;11689:6;11709;11729:9;11752:8;11774:15;11803:25;11842:8;11664:11;:196::i;:::-;11571:289;;;;;;11966:36;11982:6;11990:11;11966:15;:36::i;:::-;12114:47;12134:10;12146:14;12114:19;:47::i;:::-;12171:58;12191:21;12214:14;12171:19;:58::i;:::-;12248:10:::0;;-1:-1:-1;12260:21:29;-1:-1:-1;;;8954:1:29::1;11118:1171:::0;;;;;;;;;;;:::o;5326:110:26:-;-1:-1:-1;;;;;5415:14:26;5389:7;5415:14;;;:7;:14;;;;;;;5326:110::o;2487:430:2:-;2555:7;2876:22;2900:8;2859:50;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2849:61;;;;;;2842:68;;2487:430;;;:::o;12942:902:29:-;13202:14;13218:26;13256:71;13292:8;:15;13309:17;:15;:17::i;13256:71::-;13338:253;13364:6;13384;13404:9;13427:8;13449:15;13478:25;13517:8;13539:11;13564:17;13338:12;:253::i;1715:80:30:-;1782:6;1715:80;:::o;7740:79:29:-;7806:6;7740:79;:::o;5044:85:26:-;5115:7;5108:14;;;;;;;;;;;;;-1:-1:-1;;5108:14:26;;;;;;;;;;;;;;;;;;;;;;;;;;5083:13;;5108:14;;5115:7;;5108:14;;;5115:7;5108:14;;;;;;;;;;;;;;;;;;;;;;;;6446:98:38;6523:14;;6446:98;:::o;1817:1781:28:-;1980:7;1999:28;2030:31;2045:7;:15;;;2030:14;:31::i;:::-;1999:62;;2071:29;2103:32;2118:7;:16;;;2103:14;:32::i;:::-;2071:64;-1:-1:-1;2166:24:28;2150:12;;:40;;;;;;;;;2146:1446;;;2335:38;2358:7;:14;;;2335:22;:38::i;:::-;2318:14;;;:55;2452:46;2461:14;2477:20;2452:8;:46::i;:::-;2435:63;;2530:48;2539:15;2556:21;2530:8;:48::i;:::-;2512:66;;2609:46;2618:7;:14;;;2634:20;2609:8;:46::i;:::-;2592:14;;;:63;2670:17;2690:56;2592:7;2714:14;2730:15;2690:14;:56::i;:::-;2670:76;;2840:48;2855:9;2866:21;2840:14;:48::i;:::-;2833:55;;;;;;;2146:1446;2983:46;2992:14;3008:20;2983:8;:46::i;:::-;2966:63;;3061:48;3070:15;3087:21;3061:8;:48::i;:::-;3043:66;;3140:47;3149:7;:14;;;3165:21;3140:8;:47::i;:::-;3123:14;;;:64;3202:16;3221:57;3123:7;3246:14;3262:15;3221;:57::i;:::-;3202:76;;3374:44;3387:8;3397:20;3374:12;:44::i;:::-;3363:55;;3554:27;3572:8;3554:17;:27::i;3344:161:26:-;3424:4;3440:36;3446:10;3458:9;3469:6;3440:5;:36::i;1801:101:30:-;1849:11;1879:16;:14;:16::i;6622:461:38:-;6667:7;6689:25;6720:10;:8;:10::i;:::-;-1:-1:-1;;;;;6720:24:38;;6745:11;:9;:11::i;:::-;6720:37;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6720:37:38;;;;;;;;;;;;:::i;:::-;6686:71;;;;6888:42;6902:8;6912:17;:15;:17::i;:::-;6888:13;:42::i;:::-;6941:34;6978:20;:18;:20::i;:::-;6941:57;;7015:61;7048:17;7067:8;7015:32;:61::i;:::-;7008:68;;;;6622:461;:::o;4166:760:26:-;4428:60;4456:8;4437:15;:27;;5606:3:3;4428:8:26;:60::i;:::-;-1:-1:-1;;;;;4515:14:26;;4499:13;4515:14;;;:7;:14;;;;;;;;;4571:69;;4515:14;;4499:13;4571:69;;4582:17;;4515:14;;4608:7;;4617:5;;4515:14;;4631:8;;4571:69;;:::i;:::-;;;;;;;;;;;;;4561:80;;;;;;4540:101;;4652:12;4667:28;4684:10;4667:16;:28::i;:::-;4652:43;;4706:14;4723:24;4733:4;4739:1;4742;4745;4723:24;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4723:24:26;;-1:-1:-1;;4723:24:26;;;-1:-1:-1;4757:79:26;;-1:-1:-1;;;;;;4767:20:26;;;;;;4766:43;;-1:-1:-1;;;;;;4793:15:26;;;;;;;4766:43;8211:3:3;4757:8:26;:79::i;:::-;-1:-1:-1;;;;;4847:14:26;;;;;;:7;:14;;;;;-1:-1:-1;4864:9:26;;4847:26;;4883:36;4847:14;4904:7;4913:5;4883:13;:36::i;:::-;4166:760;;;;;;;;;;;:::o;8968:2144:29:-;9264:16;9282;9247:6;8811:68;8842:10;:8;:10::i;8811:68::-;8889:55;8908:11;:9;:11::i;8889:55::-;9310:31:::1;9344:17;:15;:17::i;:::-;9310:51;;9376:13;:11;:13::i;:::-;9372:1734;;9411:20;9433:26;9463:54;9481:6;9489;9497:9;9508:8;9463:17;:54::i;:::-;9410:107;;;;9812:58;2763:3;9821:12;:28;;5338:3:3;9812:8:29;:58::i;:::-;9884:41;9908:1;2763:3;9884:15;:41::i;:::-;9939:55;9955:9;2763:3;9966:12;:27;9939:15;:55::i;:::-;10081:44;10099:9;10110:14;10081:17;:44::i;:::-;10148:9;10173:17;:15;:17::i;:::-;-1:-1:-1::0;;;;;10159:32:29;::::1;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;10159:32:29::1;;10140:52;;;;;;;;;9372:1734;10223:39;10237:8;10247:14;10223:13;:39::i;:::-;10277:20;10299:26;10327:38:::0;10369:228:::1;10398:6;10422;10446:9;10473:8;10499:15;10532:25;10575:8;10369:11;:228::i;:::-;10276:321;;;;;;10711:40;10727:9;10738:12;10711:15;:40::i;:::-;10838:44;10856:9;10867:14;10838:17;:44::i;:::-;10981:58;11001:21;11024:14;10981:19;:58::i;:::-;11062:9:::0;;-1:-1:-1;11073:21:29;-1:-1:-1;11054:41:29::1;::::0;-1:-1:-1;;11054:41:29::1;2752:201:26::0;2859:10;2829:4;2880:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2880:31:26;;;;;;;;;;2829:4;;2845:79;;2880:31;;:43;;2916:6;2880:35;:43::i;2310:142::-;-1:-1:-1;;;;;2419:17:26;;;2393:7;2419:17;;;-1:-1:-1;2419:17:26;;;;;;;;:26;;;;;;;;;;;;;2310:142::o;7089:117:38:-;7144:16;7179:20;:18;:20::i;1460:274:6:-;1670:5;1694:33;1670:5;1694:19;:33::i;:::-;1460:274;;:::o;855:131::-;933:46;947:1;942;:6;5002:3:3;933:8:6;:46::i;1157:239:9:-;1215:7;1319:5;;;1334:37;1343:6;;;;1215:7;1334:8;:37::i;948:166:11:-;1006:7;1025:37;1039:1;1034;:6;;4370:1:3;1025:8:11;:37::i;:::-;-1:-1:-1;1084:5:11;;;948:166::o;6895:208:26:-;-1:-1:-1;;;;;7014:17:26;;;;;;;-1:-1:-1;7014:17:26;;;;;;;;:26;;;;;;;;;;;;;;:35;;;7064:32;;;;;7014:35;;7064:32;:::i;:::-;;;;;;;;6895:208;;;:::o;2300:181:2:-;2355:16;2374:20;-1:-1:-1;;;;;;2386:7:2;;;2374:11;:20::i;:::-;2355:39;;2404:70;2413:33;2425:8;2435:10;2413:11;:33::i;:::-;6379:3:3;2404:8:2;:70::i;3759:358:8:-;3815:6;3811:232;;;3837:81;3864:24;:22;:24::i;:::-;3846:15;:42;6481:3:3;3837:8:8;:81::i;:::-;3811:232;;;3949:83;3976:25;:23;:25::i;:::-;3958:15;:43;7911:3:3;3949:8:8;:83::i;:::-;4053:7;:16;;-1:-1:-1;;4053:16:8;;;;;;;4084:26;;;;;;4053:16;;4084:26;:::i;4510:237::-;4557:4;4703:25;:23;:25::i;:::-;4685:15;:43;:55;;;-1:-1:-1;;4733:7:8;;;;4732:8;;4510:237::o;4860:108::-;4942:19;4860:108;:::o;4974:110::-;5057:20;4974:110;:::o;866:101:3:-;935:9;930:34;;946:18;954:9;946:7;:18::i;6245:618:26:-;-1:-1:-1;;;;;6385:16:26;;6360:22;6385:16;;;;;;;;;;;6411:63;6420:24;;;;6666:3:3;6411:8:26;:63::i;:::-;6617:72;-1:-1:-1;;;;;6626:23:26;;;;6864:3:3;6617:8:26;:72::i;:::-;-1:-1:-1;;;;;6700:16:26;;;:8;:16;;;;;;;;;;;6719:23;;;6700:42;;6774:19;;;;;;;:31;;6719:23;6774;:31::i;:::-;-1:-1:-1;;;;;6752:19:26;;;:8;:19;;;;;;;;;;;;:53;;;;6821:35;;;;;;;;;;6849:6;;6821:35;:::i;:::-;;;;;;;;6245:618;;;;:::o;2386:188:15:-;2447:7;2494:10;2506:12;2520:15;2537:13;:11;:13::i;:::-;2560:4;2483:83;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2473:94;;;;;;2466:101;;2386:188;:::o;4186:98:8:-;4238:39;4247:14;:12;:14::i;:::-;6423:3:3;4238:8:8;:39::i;:::-;4186:98::o;7913:95:29:-;7989:12;7913:95;:::o;13702:2159:38:-;13986:19;14019:27;14060:38;14278:34;14315:20;:18;:20::i;:::-;14278:57;;14350:14;:12;:14::i;:::-;14346:1100;;;14686:27;14716:61;14749:17;14768:8;14716:32;:61::i;:::-;14686:91;;14815:212;14858:8;14884:17;14919:14;;14951:19;14988:25;14815;:212::i;:::-;14791:236;;15121:63;15136:8;15146:21;15169:14;15121;:63::i;:::-;14346:1100;;;;15417:17;:15;:17::i;:::-;-1:-1:-1;;;;;15403:32:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15403:32:38;;15379:56;;14346:1100;15484:46;15492:8;15502:17;15521:8;15484:7;:46::i;:::-;15456:74;;-1:-1:-1;15456:74:38;-1:-1:-1;15728:60:38;15748:8;15456:74;15770:17;15728:19;:60::i;:::-;15711:14;:77;-1:-1:-1;13702:2159:38;;;;;;;;;;;:::o;24068:247:29:-;24185:9;24180:129;24204:17;:15;:17::i;:::-;24200:1;:21;24180:129;;;24255:43;24268:7;24276:1;24268:10;;;;;;;;;;;;;;24280:14;24295:1;24280:17;;;;;;;;;;;;;;24255:12;:43::i;:::-;24242:7;24250:1;24242:10;;;;;;;;;;;;;;;;;:56;24223:3;;24180:129;;;;24068:247;;:::o;25583:6835::-;26264:10;26286:4;26264:27;26260:6152;;26578:28;;26560:12;;26586:4;;26578:28;;26560:12;;26597:8;;26578:28;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26559:47;;;26824:7;26857:1;26852:3336;;;;30348:9;26852:3336;27328:4;27325:1;27322;27307:26;27381:1;27375:8;-1:-1:-1;;;;;;27371:81:29;-1:-1:-1;;;27603:77:29;;27597:2;;27736:16;27733:1;27730;27715:38;27792:16;27789:1;27782:27;27597:2;;29203;29197:4;29194:1;29179:27;29400:2;29394:4;29387:16;29824:2;29806:16;29802:25;29796:4;29790;29775:53;30162:2;30144:16;30140:25;30137:1;30130:36;26690:3703;30423:31;30457:17;:15;:17::i;:::-;30423:51;;30488:39;30502:8;30512:14;30488:13;:39::i;:::-;30543:17;30562:29;30597:224;30622:6;30646;30670:9;30697:8;30723:15;30756:25;30799:8;30597:7;:224;;:::i;:::-;30542:279;;;;;30836:45;30852:12;30866:14;30836:15;:45;;:::i;:::-;31362:19;;-1:-1:-1;;31749:23:29;;31789:24;;;32035:66;-1:-1:-1;;32017:16:29;;32010:92;-1:-1:-1;31358:28:29;-1:-1:-1;;32128:16:29;;32384:2;32374:13;;32128:16;32360:28;1793:180:11;1851:7;1882:5;;;1897:51;1906:6;;;:20;;;1925:1;1920;1916;:5;;;;;;:10;1906:20;4467:1:3;1897:8:11;:51::i;2485:355:9:-;2547:7;2566:38;2575:6;;;4516:1:3;2566:8:9;:38::i;:::-;2619:6;2615:219;;-1:-1:-1;2648:1:9;2641:8;;2615:219;893:4;2700:7;;;;2721:51;;2700:1;:7;:1;2730:13;;;;;:20;4564:1:3;2721:8:9;:51::i;:::-;2822:1;2810:9;:13;;;;;;2803:20;;;;;21701:1122:29;21751:16;21779:19;21801:17;:15;:17::i;:::-;21779:39;-1:-1:-1;21828:31:29;21779:39;-1:-1:-1;;;;;21862:26:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21862:26:29;-1:-1:-1;21828:60:29;-1:-1:-1;21944:15:29;;21940:93;;21983:15;21963:14;21978:1;21963:17;;;;;;;;;;;;;:35;;;;;21940:93;;;22016:14;-1:-1:-1;22009:21:29;;-1:-1:-1;22009:21:29;21940:93;22064:1;22050:11;:15;22046:93;;;22089:15;22069:14;22084:1;22069:17;;;;;;;;;;;;;:35;;;;;22170:1;22156:11;:15;22152:93;;;22195:15;22175:14;22190:1;22175:17;;;;;;;;;;;;;:35;;;;;22276:1;22262:11;:15;22258:93;;;22301:15;22281:14;22296:1;22281:17;;;;;;;;;;;;;:35;;;;;22382:1;22368:11;:15;22364:93;;;22407:15;22387:14;22402:1;22387:17;;;;;;;;;;;;;:35;;;;;22488:1;22474:11;:15;22470:93;;;22513:15;22493:14;22508:1;22493:17;;;;;;;;;;;;;:35;;;;;22594:1;22580:11;:15;22576:93;;;22619:15;22599:14;22614:1;22599:17;;;;;;;;;;;;;:35;;;;;22700:1;22686:11;:15;22682:93;;;22725:15;22705:14;22720:1;22705:17;;;;;;;;;;;;;:35;;;;;22802:14;-1:-1:-1;;21701:1122:29;:::o;23298:237::-;23409:9;23404:125;23428:17;:15;:17::i;:::-;23424:1;:21;23404:125;;;23479:39;23488:7;23496:1;23488:10;;;;;;;;;;;;;;23500:14;23515:1;23500:17;;;;;;;;;;;;;;23479:8;:39::i;:::-;23466:7;23474:1;23466:10;;;;;;;;;;;;;;;;;:52;23447:3;;23404:125;;5889:350:26;-1:-1:-1;;;;;5990:16:26;;5965:22;5990:16;;;;;;;;;;;6016:63;6025:24;;;;6666:3:3;6016:8:26;:63::i;:::-;-1:-1:-1;;;;;6090:16:26;;:8;:16;;;;;;;;;;6109:23;;;6090:42;;6157:12;;:24;;6109:23;6157:16;:24::i;:::-;6142:12;:39;6196:36;;6221:1;;-1:-1:-1;;;;;6196:36:26;;;;;;;6225:6;;6196:36;:::i;9695:1744:38:-;10001:7;10022:16;10052;2953:18:8;:16;:18::i;:::-;10158:34:38::1;10195:20;:18;:20::i;:::-;10158:57;;10513:27;10543:61;10576:17;10595:8;10543:32;:61::i;:::-;10513:91;;10615:38;10656:188;10695:8;10717:17;10748:14;;10776:19;10809:25;10656;:188::i;:::-;10615:229;;10930:63;10945:8;10955:21;10978:14;10930;:63::i;:::-;11004:20;11026:26;11056:46;11064:8;11074:17;11093:8;11056:7;:46::i;:::-;11003:99;;;;11307:59;11327:8;11337:9;11348:17;11307:19;:59::i;:::-;11290:14;:76:::0;11385:12;;;;-1:-1:-1;11410:21:38;;-1:-1:-1;9695:1744:38;-1:-1:-1;;;;;;;;;;9695:1744:38:o;24840:243:29:-;24955:9;24950:127;24974:17;:15;:17::i;:::-;24970:1;:21;24950:127;;;25025:41;25036:7;25044:1;25036:10;;;;;;;;;;;;;;25048:14;25063:1;25048:17;;;;;;;;;;;;;;25025:10;:41::i;:::-;25012:7;25020:1;25012:10;;;;;;;;;;;;;;;;;:54;24993:3;;24950:127;;20828:671;20889:7;20948;-1:-1:-1;;;;;20939:16:29;;;;;;;20935:558;;;-1:-1:-1;20966:15:29;20959:22;;20935:558;21011:7;-1:-1:-1;;;;;21002:16:29;;;;;;;20998:495;;;-1:-1:-1;21029:15:29;21022:22;;20998:495;21074:7;-1:-1:-1;;;;;21065:16:29;;;;;;;21061:432;;;-1:-1:-1;21092:15:29;21085:22;;21061:432;21137:7;-1:-1:-1;;;;;21128:16:29;;;;;;;21124:369;;;-1:-1:-1;21155:15:29;21148:22;;21124:369;21200:7;-1:-1:-1;;;;;21191:16:29;;;;;;;21187:306;;;-1:-1:-1;21218:15:29;21211:22;;21187:306;21263:7;-1:-1:-1;;;;;21254:16:29;;;;;;;21250:243;;;-1:-1:-1;21281:15:29;21274:22;;21250:243;21326:7;-1:-1:-1;;;;;21317:16:29;;;;;;;21313:180;;;-1:-1:-1;21344:15:29;21337:22;;21313:180;21389:7;-1:-1:-1;;;;;21380:16:29;;;;;;;21376:117;;;-1:-1:-1;21407:15:29;21400:22;;21376:117;21453:29;6154:3:3;21453:7:29;:29::i;19810:279::-;19881:7;19992:17;20012:32;20025:18;;20012:6;:12;;:32;;;;:::i;:::-;19992:52;-1:-1:-1;20061:21:29;:6;19992:52;20061:10;:21::i;22985:144::-;23065:7;23091:31;23100:6;23108:13;23091:8;:31::i;7252:579:38:-;7455:7;2953:18:8;:16;:18::i;:::-;7554:270:38::1;7600:21;7639:38;7657:11;:19;;;7639:17;:38::i;:::-;7695:22;7735:39;7753:11;:20;;;7735:17;:39::i;:::-;7792:11;:18;;;7554:28;:270::i;:::-;7535:289:::0;7252:579;-1:-1:-1;;;;7252:579:38:o;23739:154:29:-;23825:7;23851:35;23864:6;23872:13;23851:12;:35::i;7837:580:38:-;8041:7;2953:18:8;:16;:18::i;:::-;8140:270:38::1;8186:21;8225:38;8243:11;:19;;;8225:17;:38::i;:::-;8281:22;8321:39;8339:11;:20;;;8321:17;:39::i;:::-;8378:11;:18;;;8140:28;:270::i;24517:150:29:-:0;24601:7;24627:33;24638:6;24646:13;24627:10;:33::i;19474:236::-;19540:7;19658:45;19671:31;:18;;:29;:31::i;:::-;19658:6;;:12;:45::i;25089:488::-;25147:11;25544:10;:8;:10::i;:::-;-1:-1:-1;;;;;25544:24:29;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5229:1211:38:-;5290:16;5318:19;5340:17;:15;:17::i;:::-;5318:39;-1:-1:-1;5367:34:38;5318:39;-1:-1:-1;;;;;5404:26:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5404:26:38;-1:-1:-1;5367:63:38;-1:-1:-1;5486:15:38;;5482:102;;5528:18;5505:17;5523:1;5505:20;;;;;;;;;;;;;:41;;;;;5615:1;5601:11;:15;5597:102;;;5643:18;5620:17;5638:1;5620:20;;;;;;;;;;;;;:41;;;;;5730:1;5716:11;:15;5712:102;;;5758:18;5735:17;5753:1;5735:20;;;;;;;;;;;;;:41;;;;;5845:1;5831:11;:15;5827:102;;;5873:18;5850:17;5868:1;5850:20;;;;;;;;;;;;;:41;;;;;5960:1;5946:11;:15;5942:102;;;5988:18;5965:17;5983:1;5965:20;;;;;;;;;;;;;:41;;;;;6075:1;6061:11;:15;6057:102;;;6103:18;6080:17;6098:1;6080:20;;;;;;;;;;;;;:41;;;;;6190:1;6176:11;:15;6172:102;;;6218:18;6195:17;6213:1;6195:20;;;;;;;;;;;;;:41;;;;;6305:1;6291:11;:15;6287:102;;;6333:18;6310:17;6328:1;6310:20;;;;;;;2398:1048:37;893:4:9;2537:17:37;3231:152;3255:17;:24;3251:1;:28;3231:152;;;3312:60;3330:41;3350:17;3368:1;3350:20;;;;;;;;;;;;;;3330:8;3339:1;3330:11;;;;;;;;;;;;;;:19;;:41;;;;:::i;:::-;3312:9;;:17;:60::i;:::-;3300:72;-1:-1:-1;3281:3:37;;3231:152;;;;3393:46;3414:1;3402:9;:13;6263:3:3;3393:8:37;:46::i;3199:183:15:-;3276:7;3341:20;:18;:20::i;:::-;3363:10;3312:62;;;;;;;;;:::i;8442:1234:38:-;8606:7;8615:16;2953:18:8;:16;:18::i;:::-;8798:26:38::1;8827:19;:8;:17;:19::i;:::-;8798:48:::0;-1:-1:-1;8856:66:38::1;8873:26;8865:4;:34;;;;;;;;;5443:3:3;8856:8:38;:66::i;:::-;8933:26;8962:27;:8;:25;:27::i;:::-;8933:56;;8999:72;9035:17;:15;:17::i;:::-;9054:9;:16;8999:35;:72::i;:::-;9081:43;9095:9;9106:17;:15;:17::i;9081:43::-;9135:34;9172:20;:18;:20::i;:::-;9135:57;;9203:26;9232:62;9265:17;9284:9;9232:32;:62::i;:::-;9203:91;;9510:20;9533:47;9542:18;9562:17;:15;:17::i;9533:47::-;9591:14;:35:::0;;;;-1:-1:-1;9591:35:38;9659:9;;-1:-1:-1;8442:1234:38;;-1:-1:-1;;;;;;;8442:1234:38:o;5641:242:26:-;-1:-1:-1;;;;;5742:19:26;;:8;:19;;;;;;;;;;;:31;;5766:6;5742:23;:31::i;:::-;-1:-1:-1;;;;;5720:19:26;;:8;:19;;;;;;;;;;:53;5798:12;;:24;;5815:6;5798:16;:24::i;:::-;5783:12;:39;5837;;-1:-1:-1;;;;;5837:39:26;;;5854:1;;5837:39;;;;5869:6;;5837:39;:::i;:::-;;;;;;;;5641:242;;:::o;1740:374:6:-;1836:1;1821:5;:12;:16;1817:53;;;1853:7;;1817:53;1880:16;1899:5;1905:1;1899:8;;;;;;;;;;;;;;1880:27;;1922:9;1934:1;1922:13;;1917:191;1941:5;:12;1937:1;:16;1917:191;;;1974:15;1992:5;1998:1;1992:8;;;;;;;;;;;;;;;;;;;-1:-1:-1;2014:51:6;-1:-1:-1;;;;;2023:18:6;;;;;;;4890:3:3;2014:8:6;:51::i;:::-;2090:7;-1:-1:-1;1955:3:6;;1917:191;;1908:544:30;1996:4;1602:42;2017:10;:8;:10::i;:::-;-1:-1:-1;;;;;2017:29:30;;;;;2016:63;;;2051:28;2070:8;2051:18;:28::i;:::-;2012:434;;;2211:10;:8;:10::i;:::-;-1:-1:-1;;;;;2197:24:30;:10;:24;;-1:-1:-1;2190:31:30;;2012:434;2374:16;:14;:16::i;:::-;:61;;-1:-1:-1;;;2374:61:30;;-1:-1:-1;;;;;2374:27:30;;;;;;;:61;;2402:8;;2412:7;;2429:4;;2374:61;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2367:68;;;;1074:3172:3;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2210:2;2243:18;;;2336;;;2383;;;2215:4;2379:29;;;3057:2;3053:17;2195:18;;;;2288;;;;2284:29;;;;3040:1;3036:14;3025:26;;;;3021:50;;;;2999:73;;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;3388:427:15;3790:9;;3765:44::o;19422:1158:38:-;19676:16;19737:38;19792:17;:15;:17::i;:::-;-1:-1:-1;;;;;19778:32:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19778:32:38;-1:-1:-1;19737:73:38;-1:-1:-1;19906:30:38;19902:89;;19959:21;-1:-1:-1;19952:28:38;;19902:89;20280:254;20341:8;20350:20;20341:30;;;;;;;;;;;;;;20385:17;20403:20;20385:39;;;;;;;;;;;;;;20438:17;20469:16;20499:25;20280:47;:254::i;:::-;20234:21;20256:20;20234:43;;;;;;;;;;;;;;;;;:300;20552:21;-1:-1:-1;19422:1158:38;;;;;;;;:::o;21591:320::-;21788:9;21783:122;21807:17;:15;:17::i;:::-;21803:1;:21;21783:122;;;21859:35;21868:8;21877:1;21868:11;;;;;;;;;;;;;;21881:9;21891:1;21881:12;;;;;;;;;;;;;;21859:8;:35;;:::i;:::-;21845:8;21854:1;21845:11;;;;;;;;;;;;;;;;;:49;21826:3;;21783:122;;;;21591:320;;;:::o;15867:685::-;16022:7;16031:16;16059:13;16075:19;:8;:17;:19::i;:::-;16059:35;-1:-1:-1;16117:39:38;16109:4;:47;;;;;;;;;16105:441;;;16179:65;16206:8;16216:17;16235:8;16179:26;:65::i;:::-;16172:72;;;;;;;16105:441;16273:36;16265:4;:44;;;;;;;;;16261:285;;;16332:47;16360:8;16370;16332:27;:47::i;16261:285::-;16469:66;16497:8;16507:17;16526:8;16469:27;:66::i;16261:285::-;15867:685;;;;;;;;:::o;21092:329::-;21265:7;21284:52;21299:8;21309:10;21321:14;21284;:52::i;:::-;21353:61;21386:17;21405:8;21353:32;:61::i;1979:148:11:-;2041:7;2060:38;2069:6;;;4516:1:3;2060:8:11;:38::i;:::-;2119:1;2115;:5;;;;;;;1979:148;-1:-1:-1;;;1979:148:11:o;11445:610:38:-;11600:7;11609:16;11637:13;11653:19;:8;:17;:19::i;:::-;11637:35;-1:-1:-1;11695:36:38;11687:4;:44;;;;;;;;;11683:366;;;11754:66;11782:8;11792:17;11811:8;11754:27;:66::i;11683:366::-;11849:35;11841:4;:43;;;;;;;;;11837:212;;;11907:65;11934:8;11944:17;11963:8;11907:26;:65::i;11837:212::-;12003:35;6211:3:3;12003:7:38;:35::i;20759:327::-;20931:7;20950:51;20965:8;20975:9;20986:14;20950;:51::i;2133:232:11:-;2193:7;2212:38;2221:6;;;4516:1:3;2212:8:11;:38::i;:::-;2265:6;2261:98;;-1:-1:-1;2294:1:11;2287:8;;2261:98;2347:1;2342;2338;:5;2337:11;;;;;;2333:1;:15;2326:22;;;;1862:617:9;1922:7;1959:5;;;1974:57;1983:6;;;:26;;;2008:1;2003;1993:7;:11;;;;1974:57;2046:12;2042:431;;2081:1;2074:8;;;;;2042:431;893:4;-1:-1:-1;;2439:11:9;;2438:19;;2461:1;2437:25;2430:32;;;;;4517:706:38;4589:7;4648;-1:-1:-1;;;;;4639:16:38;;;;;;;4635:582;;;-1:-1:-1;4666:18:38;4659:25;;4635:582;4714:7;-1:-1:-1;;;;;4705:16:38;;;;;;;4701:516;;;-1:-1:-1;4732:18:38;4725:25;;4701:516;4780:7;-1:-1:-1;;;;;4771:16:38;;;;;;;4767:450;;;-1:-1:-1;4798:18:38;4791:25;;4767:450;4846:7;-1:-1:-1;;;;;4837:16:38;;;;;;;4833:384;;;-1:-1:-1;4864:18:38;4857:25;;4833:384;4912:7;-1:-1:-1;;;;;4903:16:38;;;;;;;4899:318;;;-1:-1:-1;4930:18:38;4923:25;;4899:318;4978:7;-1:-1:-1;;;;;4969:16:38;;;;;;;4965:252;;;-1:-1:-1;4996:18:38;4989:25;;4965:252;5044:7;-1:-1:-1;;;;;5035:16:38;;;;;;;5031:186;;;-1:-1:-1;5062:18:38;5055:25;;5031:186;5110:7;-1:-1:-1;;;;;5101:16:38;;;;;;;5097:120;;;-1:-1:-1;5128:18:38;5121:25;;3582:1761:37;3770:7;4994:75;5015:32;:9;1707:6;5015:17;:32::i;:::-;5003:8;:44;;5863:3:3;4994:8:37;:75::i;:::-;5080:19;5102:23;:9;5116:8;5102:13;:23::i;:::-;5080:45;-1:-1:-1;5135:12:37;5150:28;:9;5080:45;5150:15;:28::i;:::-;5135:43;-1:-1:-1;5188:16:37;5207:27;:8;5224:9;5207:16;:27::i;:::-;5188:46;-1:-1:-1;5244:13:37;5260:20;:4;5188:46;5260:10;:20::i;:::-;5244:36;;5298:38;5317:18;:5;:16;:18::i;:::-;5298:10;;:18;:38::i;:::-;5291:45;3582:1761;-1:-1:-1;;;;;;;;;;3582:1761:37:o;5481:1920::-;5670:7;6875:79;6897:34;:10;1762:6;6897:18;:34::i;:::-;6884:9;:47;;5914:3:3;6875:8:37;:79::i;:::-;6965:12;6980:43;6997:25;:10;7012:9;6997:14;:25::i;:::-;6980:10;;:16;:43::i;:::-;6965:58;-1:-1:-1;7033:16:37;7052:25;:9;7068:8;7052:15;:25::i;:::-;7033:44;-1:-1:-1;7087:13:37;7103:20;:4;7033:44;7103:10;:20::i;:::-;7087:36;-1:-1:-1;7313:13:37;7329:25;7087:36;893:4:9;7329:9:37;:25::i;:::-;7313:41;-1:-1:-1;7372:22:37;:9;7313:41;7372:15;:22::i;4812:112:9:-;4866:7;893:4;4893:1;:7;4892:25;;4916:1;4892:25;;;-1:-1:-1;893:4:9;4905:7;;4812:112::o;2846:682::-;2906:7;2925:38;2934:6;;;4516:1:3;2925:8:9;:38::i;:::-;2978:6;2974:548;;-1:-1:-1;3007:1:9;3000:8;;2974:548;893:4;3059:7;;;;3080:51;;3059:1;:7;:1;3089:13;;;3080:51;3505:1;3500;3488:9;:13;3487:19;;;;3760:312;3822:7;3841:11;3855:20;3870:1;3873;3855:14;:20::i;:::-;3841:34;;3885:16;3904:42;3908:34;3914:3;975:5;3908;:34::i;:::-;3944:1;3904:3;:42::i;:::-;3885:61;;3967:8;3961:3;:14;3957:109;;;3998:1;3991:8;;;;;;3957:109;4037:18;4041:3;4046:8;4037:3;:18::i;:::-;4030:25;;;;;;1647:209;1709:7;1746:5;;;1761:57;1770:6;;;:26;;;1795:1;1790;1780:7;:11;;;;1761:57;893:4;1836:13;;;;-1:-1:-1;;;1647:209:9:o;830:148:40:-;890:21;941:4;930:41;;;;;;;;;;;;:::i;1152:181::-;1220:26;1285:4;1274:52;;;;;;;;;;;;:::i;2458:246:30:-;2526:4;2646:51;-1:-1:-1;;;2646:11:30;:51::i;:::-;2634:63;;;;2458:246;-1:-1:-1;2458:246:30:o;16972:1963:37:-;17216:7;17563:17;17543:16;:37;17539:312;;-1:-1:-1;17839:1:37;17832:8;;17539:312;18225:12;18240:41;:17;18264:16;18240:23;:41::i;:::-;18225:56;-1:-1:-1;18291:16:37;18310:40;893:4:9;18333:16:37;18310:22;:40::i;:::-;18291:59;;18687:53;18696:4;1144:6:9;18687:8:37;:53::i;:::-;18680:60;-1:-1:-1;18751:13:37;18767:20;18680:60;18778:8;18767:10;:20::i;:::-;18751:36;;18798:24;18825:35;18841:18;:5;:16;:18::i;:::-;18825:7;;:15;:35::i;:::-;18798:62;-1:-1:-1;18877:51:37;18798:62;18902:25;18877:24;:51::i;16558:1052:38:-;16746:7;16755:16;2953:18:8;:16;:18::i;:::-;16854:19:38::1;16875:18:::0;16897:32:::1;:8;:30;:32::i;:::-;16853:76;;;;17040:62;17062:17;:15;:17::i;:::-;17049:10;:30;4838:3:3;17040:8:38;:62::i;:::-;17190:27;17234:17;:15;:17::i;:::-;-1:-1:-1::0;;;;;17220:32:38;::::1;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;17220:32:38::1;;17190:62;;17348:212;17403:8;17412:10;17403:20;;;;;;;;;;;;;;17437:17;17455:10;17437:29;;;;;;;;;;;;;;17480:11;17505:13;:11;:13::i;:::-;17532:18;;17348:41;:212::i;:::-;17323:10;17334;17323:22;;;;;;;;;::::0;;::::1;::::0;;;;;:237;17579:11;;;;-1:-1:-1;16558:1052:38;;-1:-1:-1;;;;;16558:1052:38:o;17616:910::-;17749:7;17758:16;18201:19;18223:33;:8;:31;:33::i;:::-;18201:55;;18367:27;18397:80;18440:8;18450:11;18463:13;:11;:13::i;:::-;18397:42;:80::i;:::-;18495:11;;;;-1:-1:-1;17616:910:38;;-1:-1:-1;;;;17616:910:38:o;18532:868::-;18721:7;18730:16;2953:18:8;:16;:18::i;:::-;18829:27:38::1;18858:22;18884:33;:8;:31;:33::i;:::-;18828:89;;;;18927:73;18963:10;:17;18982;:15;:17::i;18927:73::-;19010:44;19024:10;19036:17;:15;:17::i;19010:44::-;19065:19;19087:188;19143:8;19165:17;19196:10;19220:13;:11;:13::i;:::-;19247:18;;19087:42;:188::i;:::-;19065:210;;19285:65;19309:14;19294:11;:29;;5498:3:3;19285:8:38;:65::i;:::-;19369:11:::0;19382:10;;-1:-1:-1;18532:868:38;;-1:-1:-1;;;;;18532:868:38:o;12061:787::-;12236:7;12245:16;12274:26;12302:23;12329:33;:8;:31;:33::i;:::-;12273:89;;;;12372:72;12408:17;:15;:17::i;:::-;12427:9;:16;12372:35;:72::i;:::-;12455:43;12469:9;12480:17;:15;:17::i;12455:43::-;12509:20;12532:187;12588:8;12610:17;12641:9;12664:13;:11;:13::i;:::-;12691:18;;12532:42;:187::i;:::-;12509:210;;12730:68;12755:15;12739:12;:31;;5554:3:3;12730:8:38;:68::i;12854:829::-;13028:7;13037:16;13066:20;13088:18;13110:32;:8;:30;:32::i;:::-;13065:77;;;;13252:62;13274:17;:15;:17::i;13252:62::-;13325:26;13368:17;:15;:17::i;:::-;-1:-1:-1;;;;;13354:32:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13354:32:38;;13325:61;;13420:213;13475:8;13484:10;13475:20;;;;;;;;;;;;;;13509:17;13527:10;13509:29;;;;;;;;;;;;;;13552:12;13578:13;:11;:13::i;:::-;13605:18;;13420:41;:213::i;4302:227:9:-;4362:7;4381:11;4395:20;4410:1;4413;4395:14;:20::i;:::-;4381:34;;4425:16;4444:42;4448:34;4454:3;975:5;4448;:34::i;4444:42::-;4425:61;;4504:18;4508:3;4513:8;4504:3;:18::i;4463:2190:10:-;4521:7;4544:6;4540:131;;-1:-1:-1;1533:4:10;4638:22;;4540:131;4685:6;4681:45;;-1:-1:-1;4714:1:10;4707:8;;4681:45;5096:44;-1:-1:-1;;;5105:10:10;;4615:1:3;5096:8:10;:44::i;:::-;5175:1;5531:57;2676:24;5540:23;;4666:1:3;5531:8:10;:57::i;:::-;5623:1;5598:15;2562:13;5669:28;-1:-1:-1;5669:60:10;;;;-1:-1:-1;2617:13:10;5701:28;;5669:60;5665:682;;;5745:14;5762:15;5768:8;5762:5;:15::i;:::-;5745:32;-1:-1:-1;1533:4:10;6228:16;;;6227:29;;6226:40;6215:8;1533:4;6195:7;:16;6194:29;:72;6178:89;;5665:682;;;;6328:8;6313:12;6316:8;6313:2;:12::i;:::-;:23;6298:38;;5665:682;1533:4;6356:22;;6452:150;-1:-1:-1;;;;6474:36:10;;;:76;;;2318:6;6514:12;:36;;6474:76;4723:1:3;6452:8:10;:150::i;:::-;6628:17;6632:12;6628:3;:17::i;:::-;6613:33;4463:2190;-1:-1:-1;;;;;;4463:2190:10:o;1495:105:11:-;1553:7;1584:1;1579;:6;;:14;;1592:1;1579:14;;;-1:-1:-1;1588:1:11;;1495:105;-1:-1:-1;1495:105:11:o;1853:220:40:-;1926:19;1947:18;2018:4;2007:59;;;;;;;;;;;;:::i;:::-;1977:89;;;;-1:-1:-1;1853:220:40;-1:-1:-1;;;1853:220:40:o;12979:2534:37:-;13191:7;;14334:53;14372:14;14334:31;14372:14;14353:11;14334:18;:31::i;:::-;:37;;:53::i;:::-;14309:78;;14397:81;2119:6;14406:14;:38;;5976:3:3;14397:8:37;:81::i;:::-;14580:20;14603:62;14624:40;893:4:9;14647:16:37;14624:22;:40::i;:::-;14603:14;;:20;:62::i;:::-;14580:85;;14784:27;14814:42;14830:25;:12;:23;:25::i;:::-;14814:7;;:15;:42::i;:::-;14784:72;;15012:25;15040:29;:16;:27;:29::i;:::-;15012:57;-1:-1:-1;15280:21:37;15304:44;:19;15012:57;15304:25;:44::i;:::-;15280:68;-1:-1:-1;15358:24:37;15385:38;:19;15280:68;15385:23;:38::i;:::-;15358:65;;15441;15462:43;15484:20;:7;:18;:20::i;:::-;15462:13;;:21;:43::i;:::-;15441:16;;:20;:65::i;:::-;15434:72;12979:2534;-1:-1:-1;;;;;;;;;;;;12979:2534:37:o;2079:180:40:-;2153:19;2213:4;2202:50;;;;;;;;;;;;:::i;15519:1447:37:-;15677:16;16687;16706:29;:11;16726:8;16706:19;:29::i;:::-;16790:15;;16687:48;;-1:-1:-1;16746:27:37;;-1:-1:-1;;;;;16776:30:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16776:30:37;;16746:60;;16821:9;16816:116;16840:8;:15;16836:1;:19;16816:116;;;16892:29;16912:8;16892;16901:1;16892:11;;;;;;;;;;;;;;:19;;:29;;;;:::i;:::-;16876:10;16887:1;16876:13;;;;;;;;;;;;;;;;;:45;16857:3;;16816:116;;;-1:-1:-1;16949:10:37;15519:1447;-1:-1:-1;;;;;15519:1447:37:o;2265:266:40:-;2363:27;2392:22;2474:4;2463:61;;;;;;;;;;;;:::i;11171:1802:37:-;11532:17;;11412:7;;11475:40;;-1:-1:-1;;;;;11518:32:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11518:32:37;;11475:75;;11560:33;11612:9;11607:306;11631:8;:15;11627:1;:19;11607:306;;;11696:49;11733:8;11742:1;11733:11;;;;;;;;;;;;;;11696:30;11712:10;11723:1;11712:13;;;;;;;;;;;;;;11696:8;11705:1;11696:11;;;;;;;;;;;;;;:15;;:30;;;;:::i;:49::-;11667:23;11691:1;11667:26;;;;;;;;;;;;;:78;;;;;11787:115;11834:54;11867:17;11885:1;11867:20;;;;;;;;;;;;;;11834:23;11858:1;11834:26;;;;;;;;;;;;;;:32;;:54;;;;:::i;:::-;11787:25;;:29;:115::i;:::-;11759:143;-1:-1:-1;11648:3:37;;11607:306;;;-1:-1:-1;893:4:9;11923:22:37;11972:928;11996:8;:15;11992:1;:19;11972:928;;;12234:24;12304:23;12328:1;12304:26;;;;;;;;;;;;;;12276:25;:54;12272:428;;;12350:24;12377:59;12397:38;:25;:36;:38::i;:::-;12377:8;12386:1;12377:11;;;;;;;:59;12350:86;;12454:21;12478:35;12496:16;12478:10;12489:1;12478:13;;;;;;;:35;12454:59;;12551:63;12572:41;12592:20;:7;:18;:20::i;12551:63::-;12532:82;;12272:428;;;;;12672:10;12683:1;12672:13;;;;;;;;;;;;;;12653:32;;12272:428;12714:20;12737:54;12779:8;12788:1;12779:11;;;;;;;;;;;;;;12737:33;12753:16;12737:8;12746:1;12737:11;;;;;;;:54;12714:77;;12823:66;12846:42;12867:17;12885:1;12867:20;;;;;;;;;;;;;;12846:12;:20;;:42;;;;:::i;:::-;12823:14;;:22;:66::i;:::-;12806:83;-1:-1:-1;;;12013:3:37;;11972:928;;;;12917:49;12938:27;:14;:25;:27::i;:::-;12917:14;;:20;:49::i;:::-;12910:56;11171:1802;-1:-1:-1;;;;;;;;;11171:1802:37:o;7407:1680::-;7767:16;;7647:7;;7713:37;;-1:-1:-1;;;;;7753:31:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7753:31:37;;7713:71;;7795:30;7844:9;7839:267;7863:8;:15;7859:1;:19;7839:267;;;7925:50;7963:8;7972:1;7963:11;;;;;;;;;;;;;;7925:29;7941:9;7951:1;7941:12;;;;;;;;;;;;;;7925:8;7934:1;7925:11;;;;;;;;;;;;;;:15;;:29;;;;:::i;:50::-;7899:20;7920:1;7899:23;;;;;;;;;;;;;:76;;;;;8014:81;8041:53;8073:17;8091:1;8073:20;;;;;;;;;;;;;;8041;8062:1;8041:23;;;;;;;8014:81;7989:106;-1:-1:-1;7880:3:37;;7839:267;;;-1:-1:-1;893:4:9;8116:22:37;8165:739;8189:8;:15;8185:1;:19;8165:739;;;8225:26;8296:22;8270:20;8291:1;8270:23;;;;;;;;;;;;;;:48;8266:436;;;8338:24;8365:63;8385:42;:22;893:4:9;8385:26:37;:42::i;8365:63::-;8338:90;;8446:21;8470:34;8487:16;8470:9;8480:1;8470:12;;;;;;;:34;8446:58;-1:-1:-1;8543:72:37;8564:50;8586:27;893:4:9;8605:7:37;8586:18;:27::i;8543:72::-;8522:93;;8266:436;;;;;8675:9;8685:1;8675:12;;;;;;;;;;;;;;8654:33;;8266:436;8716:20;8739:56;8783:8;8792:1;8783:11;;;;;;;;;;;;;;8739:35;8755:18;8739:8;8748:1;8739:11;;;;;;;:56;8716:79;;8827:66;8850:42;8871:17;8889:1;8871:20;;;;;;;8827:66;8810:83;-1:-1:-1;;;8206:3:37;;8165:739;;;;893:4:9;8918:14:37;:32;8914:167;;8973:58;8996:34;:14;893:4:9;8996:18:37;:34::i;:::-;8973:14;;:22;:58::i;:::-;8966:65;;;;;;;8914:167;9069:1;9062:8;;;;;;;9093:2072;9306:7;;10293:54;10332:14;10293:32;10332:14;10312:12;10293:18;:32::i;:54::-;10268:79;;10357:81;1942:4;10366:14;:38;;6038:3:3;10357:8:37;:81::i;:::-;10544:20;10567:60;10588:38;893:4:9;10609:16:37;10588:20;:38::i;10567:60::-;10544:83;-1:-1:-1;10638:26:37;10667:47;10681:32;10544:83;893:4:9;10681:16:37;:32::i;:::-;10667:7;;:13;:47::i;:::-;10638:76;;10869:25;10897:29;:16;:27;:29::i;:::-;10869:57;-1:-1:-1;10936:21:37;10960:43;:18;10869:57;10960:24;:43::i;:::-;10936:67;-1:-1:-1;11013:24:37;11040:37;:18;10936:67;11040:22;:37::i;:::-;11013:64;;11095:63;11116:41;11136:20;:7;:18;:20::i;:::-;11116:13;;:19;:41::i;18635:1713:10:-;1533:4;18904:11;18682:6;;-1:-1:-1;19314:10:10;;;;-1:-1:-1;;19289:10:10;;19288:21;19314:10;19287:38;;;;20340:1;19733;-1:-1:-1;19287:38:10;;;;19355:5;;;19354:16;;;19679:15;;;19678:26;;;19727:7;;;19714:20;;;19806:1;19752:15;;;19751:26;;;19800:7;;;19787:20;19879:1;19825:15;;;19824:26;;;19873:7;;;19860:20;19952:1;19898:15;;;19897:26;;;19946:7;;;19933:20;20025:2;19971:15;;;19970:26;;;20019:8;;;20006:21;20099:2;20045:15;;;20044:26;;;20093:8;;;20080:21;20173:2;20119:15;;;;20118:26;;;;20167:8;;;;20154:21;;;;20328:13;;;-1:-1:-1;;;18635:1713:10:o;12346:5089::-;12391:6;12492:37;12505:1;12501;:5;4838:3:3;12492:8:10;:37::i;:::-;1533:4;12544:1;:10;12540:381;;;12884:25;12907:1;-1:-1:-1;12907:1:10;12887:21;;;;;12884:2;:25::i;:::-;12883:26;;12875:35;;;;12540:381;14246:10;14279:11;14274:16;;14270:114;;2812:56;14306:7;;;-1:-1:-1;2756:21:10;14364:9;14270:114;14403:11;14398:16;;14394:114;;2975:28;14430:7;;;-1:-1:-1;2920:20:10;14488:9;14394:114;14646:3;14659:8;;;;14639:10;3141:34;14794:7;;14790:82;;3141:34;1723:4;14822:10;;14821:17;;-1:-1:-1;3084:22:10;14852:9;14790:82;3270:27;14886:1;:7;14882:82;;3270:27;1723:4;14914:10;;14913:17;;-1:-1:-1;3213:22:10;14944:9;14882:82;3391:24;14978:1;:7;14974:82;;3391:24;1723:4;15006:10;;15005:17;;-1:-1:-1;3335:21:10;15036:9;14974:82;3509:22;15070:1;:7;15066:82;;3509:22;1723:4;15098:10;;15097:17;;-1:-1:-1;3453:21:10;15128:9;15066:82;3625:21;15162:1;:7;15158:82;;3625:21;1723:4;15190:10;;15189:17;;-1:-1:-1;3569:21:10;15220:9;15158:82;3740:21;15254:1;:7;15250:82;;3740:21;1723:4;15282:10;;;15281:17;;15312:9;15250:82;3855:21;15346:1;:7;15342:82;;3855:21;1723:4;15374:10;;15373:17;;-1:-1:-1;3799:20:10;15404:9;15342:82;3970:21;15438:1;:7;15434:82;;3970:21;1723:4;15466:10;;15465:17;;-1:-1:-1;3914:20:10;15496:9;15434:82;4087:21;15530:1;:8;15526:85;;4087:21;1723:4;15559:10;;15558:18;;-1:-1:-1;4030:20:10;15590:10;15526:85;4204:21;15625:1;:8;15621:85;;4204:21;1723:4;15654:10;;15653:18;;-1:-1:-1;4148:19:10;15685:10;15621:85;16208:8;1723:4;16246:1;:10;1723:4;;16221:1;:10;16220:21;16219:38;;;;;;;-1:-1:-1;16267:16:10;1723:4;16287:5;;;16286:16;;-1:-1:-1;16396:1:10;;1723:4;16611:15;;;16610:26;;-1:-1:-1;16665:1:10;16610:26;16659:7;16646:20;1723:4;16684:15;;;16683:26;;-1:-1:-1;16738:1:10;16683:26;16732:7;16719:20;1723:4;16757:15;;;16756:26;;-1:-1:-1;16811:1:10;16756:26;16805:7;16792:20;1723:4;16830:15;;;16829:26;;-1:-1:-1;16884:1:10;16829:26;16878:7;16865:20;1723:4;16903:15;;;16902:26;;-1:-1:-1;16957:2:10;16902:26;16951:8;16938:21;17131:1;17118:14;17425:3;17406:15;;;17405:23;;12346:5089;-1:-1:-1;;;;;;;12346:5089:10:o;6866:5375::-;6912:6;6930:89;-1:-1:-1;;6939:25:10;;;;;:54;;;2318:6;6968:1;:25;;6939:54;4775:1:3;6930:8:10;:89::i;:::-;7038:1;7034;:5;7030:353;;;7364:7;7369:1;7368:2;;7364:3;:7::i;:::-;-1:-1:-1;7344:27:10;;;;;;7336:36;;;;7030:353;8684:14;2756:21;8712:1;:7;8708:220;;-1:-1:-1;;;8735:7:10;;;;2812:56;8708:220;;;2920:20;8789:1;:7;8785:143;;-1:-1:-1;;;8812:7:10;;;;2975:28;8785:143;;;-1:-1:-1;8886:1:10;8785:143;9083:3;9078:8;;;;;1723:4;3084:22;9336:7;;9332:92;;-1:-1:-1;;9359:7:10;;;;;1723:4;3141:34;9391:12;;;9390:23;9332:92;3213:22;9437:1;:7;9433:92;;-1:-1:-1;;9460:7:10;;;;;1723:4;3270:27;9492:12;;;9491:23;9433:92;3335:21;9538:1;:7;9534:92;;-1:-1:-1;;9561:7:10;;;;;1723:4;3391:24;9593:12;;;9592:23;9534:92;3453:21;9639:1;:7;9635:92;;-1:-1:-1;;9662:7:10;;;;;1723:4;3509:22;9694:12;;;9693:23;9635:92;3569:21;9740:1;:7;9736:92;;-1:-1:-1;;9763:7:10;;;;;1723:4;3625:21;9795:12;;;9794:23;9736:92;3684:21;9841:1;:7;9837:92;;-1:-1:-1;;9864:7:10;;;;;3684:21;3740;9896:12;;;9895:23;9837:92;3799:20;9942:1;:7;9938:92;;-1:-1:-1;;9965:7:10;;;;;1723:4;3855:21;9997:12;;;9996:23;9938:92;3914:20;10043:1;:7;10039:92;;-1:-1:-1;;10066:7:10;;;;;1723:4;3970:21;10098:12;;;10097:23;10039:92;1723:4;10663:17;;;;;;10948:1;;10926:8;;;10925:19;10924:25;10959:17;;;;10924:25;-1:-1:-1;11018:1:10;1723:4;10996:8;;;10995:19;10994:25;11029:17;;;;10994:25;-1:-1:-1;11088:1:10;1723:4;11066:8;;;11065:19;11064:25;11099:17;;;;11064:25;-1:-1:-1;11158:1:10;1723:4;11136:8;;;11135:19;11134:25;11169:17;;;;11134:25;-1:-1:-1;11228:1:10;1723:4;11206:8;;;11205:19;11204:25;11239:17;;;;11204:25;-1:-1:-1;11298:1:10;1723:4;11276:8;;;11275:19;11274:25;11309:17;;;;11274:25;-1:-1:-1;11368:1:10;1723:4;11346:8;;;11345:19;11344:25;11379:17;;;;11344:25;-1:-1:-1;11438:1:10;1723:4;11416:8;;;11415:19;11414:25;11449:17;;;;11414:25;-1:-1:-1;11508:2:10;1723:4;11486:8;;;11485:19;11484:26;11520:17;;;;11484:26;-1:-1:-1;11579:2:10;1723:4;11557:8;;;11556:19;11555:26;11591:17;;;;11555:26;-1:-1:-1;11650:2:10;1723:4;11628:8;;;11627:19;11626:26;11662:17;;;;11626:26;-1:-1:-1;12231:3:10;1723:4;12187:19;;;12186:30;12185:42;;12184:50;;6866:5375;-1:-1:-1;;;;;;6866:5375:10:o;5:130:-1:-;72:20;;97:33;72:20;97:33;:::i;1694:722::-;;1822:3;1815:4;1807:6;1803:17;1799:27;1789:2;;-1:-1;;1830:12;1789:2;1870:6;1864:13;1892:80;1907:64;1964:6;1907:64;:::i;:::-;1892:80;:::i;:::-;2000:21;;;1883:89;-1:-1;2044:4;2057:14;;;;2032:17;;;2146;;;2137:27;;;;2134:36;-1:-1;2131:2;;;2183:1;;2173:12;2131:2;2208:1;2193:217;2218:6;2215:1;2212:13;2193:217;;;6353:13;;2286:61;;2361:14;;;;2389;;;;2240:1;2233:9;2193:217;;;2197:14;;;;;1782:634;;;;:::o;2963:440::-;;3064:3;3057:4;3049:6;3045:17;3041:27;3031:2;;-1:-1;;3072:12;3031:2;3106:20;;-1:-1;;;;;29332:30;;29329:2;;;-1:-1;;29365:12;29329:2;3141:64;29506:4;-1:-1;;29438:9;29419:17;;29415:33;29496:15;3141:64;:::i;:::-;3132:73;;3225:6;3218:5;3211:21;3329:3;29506:4;3320:6;3253;3311:16;;3308:25;3305:2;;;3346:1;;3336:12;3305:2;32366:6;29506:4;3253:6;3249:17;29506:4;3287:5;3283:16;32343:30;32422:1;32404:16;;;29506:4;32404:16;32397:27;3287:5;3024:379;-1:-1;;3024:379::o;4270:158::-;4351:20;;34102:1;34092:12;;34082:2;;34118:1;;34108:12;6549:241;;6653:2;6641:9;6632:7;6628:23;6624:32;6621:2;;;-1:-1;;6659:12;6621:2;85:6;72:20;97:33;124:5;97:33;:::i;6797:366::-;;;6918:2;6906:9;6897:7;6893:23;6889:32;6886:2;;;-1:-1;;6924:12;6886:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;6976:63;-1:-1;7076:2;7115:22;;72:20;97:33;72:20;97:33;:::i;:::-;7084:63;;;;6880:283;;;;;:::o;7170:491::-;;;;7308:2;7296:9;7287:7;7283:23;7279:32;7276:2;;;-1:-1;;7314:12;7276:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;7366:63;-1:-1;7466:2;7505:22;;72:20;97:33;72:20;97:33;:::i;:::-;7270:391;;7474:63;;-1:-1;;;7574:2;7613:22;;;;6205:20;;7270:391::o;7668:991::-;;;;;;;;7872:3;7860:9;7851:7;7847:23;7843:33;7840:2;;;-1:-1;;7879:12;7840:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;7931:63;-1:-1;8031:2;8070:22;;72:20;97:33;72:20;97:33;:::i;:::-;8039:63;-1:-1;8139:2;8178:22;;6205:20;;-1:-1;8247:2;8286:22;;6205:20;;-1:-1;8355:3;8393:22;;6481:20;31670:4;31659:16;;34315:33;;34305:2;;-1:-1;;34352:12;34305:2;7834:825;;;;-1:-1;7834:825;;;;8364:61;8462:3;8502:22;;2757:20;;-1:-1;8571:3;8611:22;;;2757:20;;7834:825;-1:-1;;7834:825::o;8666:366::-;;;8787:2;8775:9;8766:7;8762:23;8758:32;8755:2;;;-1:-1;;8793:12;8755:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;8845:63;8945:2;8984:22;;;;6205:20;;-1:-1;;;8749:283::o;9039:823::-;;;;9253:2;9241:9;9232:7;9228:23;9224:32;9221:2;;;-1:-1;;9259:12;9221:2;9304:24;;-1:-1;;;;;9337:30;;;9334:2;;;-1:-1;;9370:12;9334:2;9487:6;9476:9;9472:22;;;311:3;304:4;296:6;292:17;288:27;278:2;;-1:-1;;319:12;278:2;359:6;353:13;381:95;396:79;468:6;396:79;:::i;381:95::-;482:16;518:6;511:5;504:21;548:4;;565:3;561:14;554:21;;548:4;540:6;536:17;670:3;548:4;;654:6;650:17;540:6;641:27;;638:36;635:2;;;-1:-1;;677:12;635:2;-1:-1;703:10;;697:232;722:6;719:1;716:13;697:232;;;3860:6;3854:13;3872:48;3914:5;3872:48;:::i;:::-;790:76;;744:1;737:9;;;;;880:14;;;;908;;697:232;;;-1:-1;9547:18;;9541:25;9390:114;;-1:-1;9541:25;-1:-1;;;9575:30;;;9572:2;;;-1:-1;;9608:12;9572:2;;9638:89;9719:7;9710:6;9699:9;9695:22;9638:89;:::i;:::-;9628:99;;;9764:2;9818:9;9814:22;6353:13;9772:74;;9215:647;;;;;:::o;9869:235::-;;9970:2;9958:9;9949:7;9945:23;9941:32;9938:2;;;-1:-1;;9976:12;9938:2;2501:6;2488:20;2513:30;2537:5;2513:30;:::i;10111:257::-;;10223:2;10211:9;10202:7;10198:23;10194:32;10191:2;;;-1:-1;;10229:12;10191:2;2636:6;2630:13;2648:30;2672:5;2648:30;:::i;10375:1235::-;;;;;;;;10615:3;10603:9;10594:7;10590:23;10586:33;10583:2;;;-1:-1;;10622:12;10583:2;2770:6;2757:20;10674:63;;10774:2;;10817:9;10813:22;72:20;97:33;124:5;97:33;:::i;:::-;10782:63;-1:-1;10882:2;10921:22;;72:20;97:33;72:20;97:33;:::i;:::-;10890:63;-1:-1;11018:2;11003:18;;10990:32;-1:-1;;;;;11031:30;;;11028:2;;;-1:-1;;11064:12;11028:2;11155:6;11144:9;11140:22;;;1078:3;1071:4;1063:6;1059:17;1055:27;1045:2;;-1:-1;;1086:12;1045:2;1133:6;1120:20;1155:80;1170:64;1227:6;1170:64;:::i;1155:80::-;1241:16;1277:6;1270:5;1263:21;10774:2;1324:3;1320:14;1313:21;;10774:2;1299:6;1295:17;1429:3;10774:2;;1413:6;1409:17;1299:6;1400:27;;1397:36;1394:2;;;-1:-1;;1436:12;1394:2;-1:-1;1462:10;;1456:206;1481:6;1478:1;1475:13;1456:206;;;6205:20;;1549:50;;1503:1;1496:9;;;;;1613:14;;;;1641;;1456:206;;;-1:-1;11084:88;-1:-1;;;11209:3;11249:22;;6205:20;;-1:-1;11318:3;11358:22;;6205:20;;-1:-1;11455:3;11440:19;;11427:33;;-1:-1;11469:30;;;11466:2;;;-1:-1;;11502:12;11466:2;;;11532:62;11586:7;11577:6;11566:9;11562:22;11532:62;:::i;:::-;11522:72;;;10577:1033;;;;;;;;;;:::o;11617:239::-;;11720:2;11708:9;11699:7;11695:23;11691:32;11688:2;;;-1:-1;;11726:12;11688:2;2893:20;;-1:-1;;;;;;31070:78;;33405:34;;33395:2;;-1:-1;;33443:12;11863:305;;11999:2;11987:9;11978:7;11974:23;11970:32;11967:2;;;-1:-1;;12005:12;11967:2;3516:6;3510:13;3528:54;3576:5;3528:54;:::i;12175:291::-;;12304:2;12292:9;12283:7;12279:23;12275:32;12272:2;;;-1:-1;;12310:12;12272:2;4030:6;4024:13;4042:47;4083:5;4042:47;:::i;12473:692::-;;;;12661:2;12649:9;12640:7;12636:23;12632:32;12629:2;;;-1:-1;;12667:12;12629:2;4030:6;4024:13;4042:47;4083:5;4042:47;:::i;:::-;12865:2;12850:18;;12844:25;12719:88;;-1:-1;;;;;;12878:30;;12875:2;;;-1:-1;;12911:12;12875:2;12941:89;13022:7;13013:6;13002:9;12998:22;12941:89;:::i;13172:427::-;;;13318:2;13306:9;13297:7;13293:23;13289:32;13286:2;;;-1:-1;;13324:12;13286:2;4030:6;4024:13;4042:47;4083:5;4042:47;:::i;:::-;13501:2;13551:22;;;;6353:13;13376:88;;6353:13;;-1:-1;;;13280:319::o;13606:563::-;;;;13769:2;13757:9;13748:7;13744:23;13740:32;13737:2;;;-1:-1;;13775:12;13737:2;4030:6;4024:13;4042:47;4083:5;4042:47;:::i;:::-;13952:2;14002:22;;6353:13;14071:2;14121:22;;;6353:13;13827:88;;6353:13;;-1:-1;6353:13;13731:438;-1:-1;;;13731:438::o;14474:556::-;;;14645:2;14633:9;14624:7;14620:23;14616:32;14613:2;;;-1:-1;;14651:12;14613:2;4030:6;4024:13;4042:47;4083:5;4042:47;:::i;:::-;14849:2;14834:18;;14828:25;14703:88;;-1:-1;;;;;;14862:30;;14859:2;;;-1:-1;;14895:12;14859:2;14925:89;15006:7;14997:6;14986:9;14982:22;14925:89;:::i;:::-;14915:99;;;14607:423;;;;;:::o;16306:637::-;;;;16474:2;16462:9;16453:7;16449:23;16445:32;16442:2;;;-1:-1;;16480:12;16442:2;16525:31;;-1:-1;;;;;16565:30;;;16562:2;;;-1:-1;;16598:12;16562:2;16694:6;16683:9;16679:22;;;4596:6;;4584:9;4579:3;4575:19;4571:32;4568:2;;;-1:-1;;4606:12;4568:2;4634:22;4596:6;4634:22;:::i;:::-;4625:31;;4738:63;4797:3;4773:22;4738:63;:::i;:::-;4720:16;4713:89;4899:64;4959:3;4866:2;4939:9;4935:22;4899:64;:::i;:::-;4866:2;4885:5;4881:16;4874:90;5062:64;5122:3;5029:2;5102:9;5098:22;5062:64;:::i;:::-;5029:2;5048:5;5044:16;5037:90;16474:2;5248:9;5244:22;6205:20;16474:2;5209:5;5205:16;5198:75;5336:3;5395:9;5391:22;2757:20;5336:3;5356:5;5352:16;5345:75;5492:3;5551:9;5547:22;6205:20;5492:3;5512:5;5508:16;5501:75;5671:49;5716:3;5637;5696:9;5692:22;5671:49;:::i;:::-;5637:3;5657:5;5653:16;5646:75;5814:49;5859:3;5780;5839:9;5835:22;5814:49;:::i;:::-;5780:3;5800:5;5796:16;5789:75;5957:3;;5946:9;5942:19;5929:33;16576:18;5974:6;5971:30;5968:2;;;-1:-1;;6004:12;5968:2;6051:58;6105:3;6096:6;6085:9;6081:22;6051:58;:::i;:::-;6031:18;;;6024:86;;;;-1:-1;6035:5;4866:2;16787:22;;6205:20;;-1:-1;5029:2;16895:22;;;6205:20;;16436:507;-1:-1;;;;;16436:507::o;16950:241::-;;17054:2;17042:9;17033:7;17029:23;17025:32;17022:2;;;-1:-1;;17060:12;17022:2;-1:-1;6205:20;;17016:175;-1:-1;17016:175::o;17531:690::-;;17724:5;29789:12;30205:6;30200:3;30193:19;30242:4;;30237:3;30233:14;17736:93;;30242:4;17900:5;29643:14;-1:-1;17939:260;17964:6;17961:1;17958:13;17939:260;;;18025:13;;18411:37;;17352:14;;;;30048;;;;17986:1;17979:9;17939:260;;;-1:-1;18205:10;;17655:566;-1:-1;;;;;17655:566::o;20560:387::-;18411:37;;;-1:-1;;;;;;31070:78;20811:2;20802:12;;18706:56;20911:11;;;20702:245::o;20954:291::-;;32366:6;32361:3;32356;32343:30;32404:16;;32397:27;;;32404:16;21098:147;-1:-1;21098:147::o;21252:659::-;-1:-1;;;20085:87;;20070:1;20191:11;;18411:37;;;;21763:12;;;18411:37;21874:12;;;21497:414::o;21918:222::-;-1:-1;;;;;31454:54;;;;17451:37;;22045:2;22030:18;;22016:124::o;22147:370::-;;22324:2;22345:17;22338:47;22399:108;22324:2;22313:9;22309:18;22493:6;22399:108;:::i;22524:629::-;;22779:2;22800:17;22793:47;22854:108;22779:2;22768:9;22764:18;22948:6;22854:108;:::i;:::-;23010:9;23004:4;23000:20;22995:2;22984:9;22980:18;22973:48;23035:108;23138:4;23129:6;23035:108;:::i;23160:210::-;30904:13;;30897:21;18294:34;;23281:2;23266:18;;23252:118::o;23377:432::-;30904:13;;30897:21;18294:34;;23712:2;23697:18;;18411:37;;;;23795:2;23780:18;;18411:37;23554:2;23539:18;;23525:284::o;23816:222::-;18411:37;;;23943:2;23928:18;;23914:124::o;24045:444::-;18411:37;;;-1:-1;;;;;31454:54;;;24392:2;24377:18;;17451:37;31454:54;24475:2;24460:18;;17451:37;24228:2;24213:18;;24199:290::o;24496:780::-;18411:37;;;-1:-1;;;;;31454:54;;;24928:2;24913:18;;17451:37;31454:54;;;;25011:2;24996:18;;17451:37;25094:2;25079:18;;18411:37;25177:3;25162:19;;18411:37;;;;-1:-1;25246:19;;18411:37;24763:3;24748:19;;24734:542::o;25283:668::-;18411:37;;;25687:2;25672:18;;18411:37;;;;25770:2;25755:18;;18411:37;;;;25853:2;25838:18;;18411:37;-1:-1;;;;;31454:54;25936:3;25921:19;;17451:37;-1:-1;25507:19;;25493:458::o;25958:548::-;18411:37;;;31670:4;31659:16;;;;26326:2;26311:18;;20513:35;26409:2;26394:18;;18411:37;26492:2;26477:18;;18411:37;26165:3;26150:19;;26136:370::o;27045:310::-;;27192:2;;27213:17;27206:47;19600:5;29789:12;30205:6;27192:2;27181:9;27177:18;30193:19;-1:-1;32511:101;32525:6;32522:1;32519:13;32511:101;;;32592:11;;;;;32586:18;32573:11;;;30233:14;32573:11;32566:39;32540:10;;32511:101;;;32627:6;32624:1;32621:13;32618:2;;;-1:-1;30233:14;32683:6;27181:9;32674:16;;32667:27;32618:2;-1:-1;29438:9;32944:14;-1:-1;;32940:28;19758:39;;;;30233:14;19758:39;;27163:192;-1:-1;;;27163:192::o;27591:481::-;;18441:5;18418:3;18411:37;27796:2;27914;27903:9;27899:18;27892:48;27954:108;27796:2;27785:9;27781:18;28048:6;27954:108;:::i;28079:214::-;31670:4;31659:16;;;;20513:35;;28202:2;28187:18;;28173:120::o;28300:256::-;28362:2;28356:9;28388:17;;;28484:22;;;-1:-1;;;;;28448:34;;28445:62;28442:2;;;28520:1;;28510:12;28442:2;28362;28529:22;28340:216;;-1:-1;28340:216::o;28563:319::-;;-1:-1;;;;;28726:30;;28723:2;;;-1:-1;;28759:12;28723:2;-1:-1;28804:4;28792:17;;;28857:15;;28660:222::o;32981:117::-;-1:-1;;;;;31454:54;;33040:35;;33030:2;;33089:1;;33079:12;33105:111;33186:5;30904:13;30897:21;33164:5;33161:32;33151:2;;33207:1;;33197:12;33789:108;33872:1;33865:5;33862:12;33852:2;;33888:1;;33878:12"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "3649600",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "DOMAIN_SEPARATOR()": "infinite",
                "allowance(address,address)": "infinite",
                "approve(address,uint256)": "22550",
                "balanceOf(address)": "1365",
                "decimals()": "330",
                "decreaseApproval(address,uint256)": "23609",
                "getActionId(bytes4)": "infinite",
                "getAuthorizer()": "infinite",
                "getInvariant()": "infinite",
                "getLastInvariant()": "1117",
                "getNormalizedWeights()": "infinite",
                "getOwner()": "infinite",
                "getPausedState()": "infinite",
                "getPoolId()": "infinite",
                "getRate()": "infinite",
                "getSwapFeePercentage()": "1118",
                "getVault()": "infinite",
                "increaseApproval(address,uint256)": "23626",
                "name()": "infinite",
                "nonces(address)": "1310",
                "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "infinite",
                "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "infinite",
                "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": "infinite",
                "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "infinite",
                "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": "infinite",
                "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": "infinite",
                "setPaused(bool)": "infinite",
                "setSwapFeePercentage(uint256)": "infinite",
                "symbol()": "infinite",
                "totalSupply()": "1141",
                "transfer(address,uint256)": "infinite",
                "transferFrom(address,address,uint256)": "infinite"
              },
              "internal": {
                "_doExit(uint256[] memory,uint256[] memory,bytes memory)": "infinite",
                "_doJoin(uint256[] memory,uint256[] memory,bytes memory)": "infinite",
                "_exitBPTInForExactTokensOut(uint256[] memory,uint256[] memory,bytes memory)": "infinite",
                "_exitExactBPTInForTokenOut(uint256[] memory,uint256[] memory,bytes memory)": "infinite",
                "_exitExactBPTInForTokensOut(uint256[] memory,bytes memory)": "infinite",
                "_getDueProtocolFeeAmounts(uint256[] memory,uint256[] memory,uint256,uint256,uint256)": "infinite",
                "_invariantAfterExit(uint256[] memory,uint256[] memory,uint256[] memory)": "infinite",
                "_invariantAfterJoin(uint256[] memory,uint256[] memory,uint256[] memory)": "infinite",
                "_joinExactTokensInForBPTOut(uint256[] memory,uint256[] memory,bytes memory)": "infinite",
                "_joinTokenInForExactBPTOut(uint256[] memory,uint256[] memory,bytes memory)": "infinite",
                "_mutateAmounts(uint256[] memory,uint256[] memory,function (uint256,uint256) pure returns (uint256))": "infinite",
                "_normalizedWeight(contract IERC20)": "infinite",
                "_normalizedWeights()": "infinite",
                "_onExitPool(bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory)": "infinite",
                "_onInitializePool(bytes32,address,address,bytes memory)": "infinite",
                "_onJoinPool(bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory)": "infinite",
                "_onSwapGivenIn(struct IPoolSwapStructs.SwapRequest memory,uint256,uint256)": "infinite",
                "_onSwapGivenOut(struct IPoolSwapStructs.SwapRequest memory,uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {
              "DOMAIN_SEPARATOR()": "3644e515",
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "decimals()": "313ce567",
              "decreaseApproval(address,uint256)": "66188463",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getInvariant()": "c0ff1a15",
              "getLastInvariant()": "9b02cdde",
              "getNormalizedWeights()": "f89f27ed",
              "getOwner()": "893d20e8",
              "getPausedState()": "1c0de051",
              "getPoolId()": "38fff2d0",
              "getRate()": "679aefce",
              "getSwapFeePercentage()": "55c67628",
              "getVault()": "8d928af8",
              "increaseApproval(address,uint256)": "d73dd623",
              "name()": "06fdde03",
              "nonces(address)": "7ecebe00",
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "74f3b009",
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "d5c096c4",
              "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": "9d2c110c",
              "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
              "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": "6028bfd4",
              "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": "87ec6817",
              "setPaused(bool)": "16c38b3c",
              "setSwapFeePercentage(uint256)": "38e9922e",
              "symbol()": "95d89b41",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVault\",\"name\":\"vault\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"normalizedWeights\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodDuration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"SwapFeeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInvariant\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastInvariant\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNormalizedWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapFeePercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onExitPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onJoinPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IPoolSwapStructs.SwapRequest\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"balanceTokenIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balanceTokenOut\",\"type\":\"uint256\"}],\"name\":\"onSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryExit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"queryJoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"bptOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"setSwapFeePercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\"},\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getInvariant()\":{\"details\":\"Returns the current value of the invariant.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getRate()\":{\"details\":\"This function returns the appreciation of one BPT relative to the underlying tokens. This starts at 1 when the pool is created and grows over time\"},\"nonces(address)\":{\"details\":\"Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.\"},\"onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares.\"},\"onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].\"},\"queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/weighted/WeightedPool.sol\":\"WeightedPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IMinimalSwapInfoPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IMinimalSwapInfoPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseMinimalSwapInfoPool is IMinimalSwapInfoPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            tokens.length == 2 ? IVault.PoolSpecialization.TWO_TOKEN : IVault.PoolSpecialization.MINIMAL_SWAP_INFO,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory request,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) external view virtual override returns (uint256) {\\n        uint256 scalingFactorTokenIn = _scalingFactor(request.tokenIn);\\n        uint256 scalingFactorTokenOut = _scalingFactor(request.tokenOut);\\n\\n        if (request.kind == IVault.SwapKind.GIVEN_IN) {\\n            // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n            request.amount = _subtractSwapFeeAmount(request.amount);\\n\\n            // All token amounts are upscaled.\\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\\n            request.amount = _upscale(request.amount, scalingFactorTokenIn);\\n\\n            uint256 amountOut = _onSwapGivenIn(request, balanceTokenIn, balanceTokenOut);\\n\\n            // amountOut tokens are exiting the Pool, so we round down.\\n            return _downscaleDown(amountOut, scalingFactorTokenOut);\\n        } else {\\n            // All token amounts are upscaled.\\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\\n            request.amount = _upscale(request.amount, scalingFactorTokenOut);\\n\\n            uint256 amountIn = _onSwapGivenOut(request, balanceTokenIn, balanceTokenOut);\\n\\n            // amountIn tokens are entering the Pool, so we round up.\\n            amountIn = _downscaleUp(amountIn, scalingFactorTokenIn);\\n\\n            // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n            return _addSwapFeeAmount(amountIn);\\n        }\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled. The swap fee has already\\n     * been deducted from `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x6a634f43159cd970522a2005d13934d1d56a85edaee4290ded729340761e19c3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\ncontract WeightedMath {\\n    using FixedPoint for uint256;\\n    // A minimum normalized weight imposes a maximum weight ratio. We need this due to limitations in the\\n    // implementation of the power function, as these ratios are often exponents.\\n    uint256 internal constant _MIN_WEIGHT = 0.01e18;\\n    // Having a minimum normalized weight imposes a limit on the maximum number of tokens;\\n    // i.e., the largest possible pool is one where all tokens have exactly the minimum weight.\\n    uint256 internal constant _MAX_WEIGHTED_TOKENS = 100;\\n\\n    // Pool limits that arise from limitations in the fixed point power function (and the imposed 1:100 maximum weight\\n    // ratio).\\n\\n    // Swap limits: amounts swapped may not be larger than this percentage of total balance.\\n    uint256 internal constant _MAX_IN_RATIO = 0.3e18;\\n    uint256 internal constant _MAX_OUT_RATIO = 0.3e18;\\n\\n    // Invariant growth limit: non-proportional joins cannot cause the invariant to increase by more than this ratio.\\n    uint256 internal constant _MAX_INVARIANT_RATIO = 3e18;\\n    // Invariant shrink limit: non-proportional exits cannot cause the invariant to decrease by less than this ratio.\\n    uint256 internal constant _MIN_INVARIANT_RATIO = 0.7e18;\\n\\n    // Invariant is used to collect protocol swap fees by comparing its value between two times.\\n    // So we can round always to the same direction. It is also used to initiate the BPT amount\\n    // and, because there is a minimum BPT, we round down the invariant.\\n    function _calculateInvariant(uint256[] memory normalizedWeights, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256 invariant)\\n    {\\n        /**********************************************************************************************\\n        // invariant               _____                                                             //\\n        // wi = weight index i      | |      wi                                                      //\\n        // bi = balance index i     | |  bi ^   = i                                                  //\\n        // i = invariant                                                                             //\\n        **********************************************************************************************/\\n\\n        invariant = FixedPoint.ONE;\\n        for (uint256 i = 0; i < normalizedWeights.length; i++) {\\n            invariant = invariant.mulDown(balances[i].powDown(normalizedWeights[i]));\\n        }\\n\\n        _require(invariant > 0, Errors.ZERO_INVARIANT);\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `amountIn` are sent, given the\\n    // current balances and weights.\\n    function _calcOutGivenIn(\\n        uint256 balanceIn,\\n        uint256 weightIn,\\n        uint256 balanceOut,\\n        uint256 weightOut,\\n        uint256 amountIn\\n    ) internal pure returns (uint256) {\\n        /**********************************************************************************************\\n        // outGivenIn                                                                                //\\n        // aO = amountOut                                                                            //\\n        // bO = balanceOut                                                                           //\\n        // bI = balanceIn              /      /            bI             \\\\    (wI / wO) \\\\           //\\n        // aI = amountIn    aO = bO * |  1 - | --------------------------  | ^            |          //\\n        // wI = weightIn               \\\\      \\\\       ( bI + aI )         /              /           //\\n        // wO = weightOut                                                                            //\\n        **********************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        // The multiplication rounds down, and the subtrahend (power) rounds up (so the base rounds up too).\\n        // Because bI / (bI + aI) <= 1, the exponent rounds down.\\n\\n        // Cannot exceed maximum in ratio\\n        _require(amountIn <= balanceIn.mulDown(_MAX_IN_RATIO), Errors.MAX_IN_RATIO);\\n\\n        uint256 denominator = balanceIn.add(amountIn);\\n        uint256 base = balanceIn.divUp(denominator);\\n        uint256 exponent = weightIn.divDown(weightOut);\\n        uint256 power = base.powUp(exponent);\\n\\n        return balanceOut.mulDown(power.complement());\\n    }\\n\\n    // Computes how many tokens must be sent to a pool in order to take `amountOut`, given the\\n    // current balances and weights.\\n    function _calcInGivenOut(\\n        uint256 balanceIn,\\n        uint256 weightIn,\\n        uint256 balanceOut,\\n        uint256 weightOut,\\n        uint256 amountOut\\n    ) internal pure returns (uint256) {\\n        /**********************************************************************************************\\n        // inGivenOut                                                                                //\\n        // aO = amountOut                                                                            //\\n        // bO = balanceOut                                                                           //\\n        // bI = balanceIn              /  /            bO             \\\\    (wO / wI)      \\\\          //\\n        // aI = amountIn    aI = bI * |  | --------------------------  | ^            - 1  |         //\\n        // wI = weightIn               \\\\  \\\\       ( bO - aO )         /                   /          //\\n        // wO = weightOut                                                                            //\\n        **********************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        // The multiplication rounds up, and the power rounds up (so the base rounds up too).\\n        // Because b0 / (b0 - a0) >= 1, the exponent rounds up.\\n\\n        // Cannot exceed maximum out ratio\\n        _require(amountOut <= balanceOut.mulDown(_MAX_OUT_RATIO), Errors.MAX_OUT_RATIO);\\n\\n        uint256 base = balanceOut.divUp(balanceOut.sub(amountOut));\\n        uint256 exponent = weightOut.divUp(weightIn);\\n        uint256 power = base.powUp(exponent);\\n\\n        // Because the base is larger than one (and the power rounds up), the power should always be larger than one, so\\n        // the following subtraction should never revert.\\n        uint256 ratio = power.sub(FixedPoint.ONE);\\n\\n        return balanceIn.mulUp(ratio);\\n    }\\n\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        uint256[] memory balanceRatiosWithFee = new uint256[](amountsIn.length);\\n\\n        uint256 invariantRatioWithFees = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            balanceRatiosWithFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            invariantRatioWithFees = invariantRatioWithFees.add(balanceRatiosWithFee[i].mulDown(normalizedWeights[i]));\\n        }\\n\\n        uint256 invariantRatio = FixedPoint.ONE;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 amountInWithoutFee;\\n\\n            if (balanceRatiosWithFee[i] > invariantRatioWithFees) {\\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithFees.sub(FixedPoint.ONE));\\n                uint256 taxableAmount = amountsIn[i].sub(nonTaxableAmount);\\n                amountInWithoutFee = nonTaxableAmount.add(taxableAmount.mulDown(FixedPoint.ONE.sub(swapFee)));\\n            } else {\\n                amountInWithoutFee = amountsIn[i];\\n            }\\n\\n            uint256 balanceRatio = balances[i].add(amountInWithoutFee).divDown(balances[i]);\\n\\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\\n        }\\n\\n        if (invariantRatio >= FixedPoint.ONE) {\\n            return bptTotalSupply.mulDown(invariantRatio.sub(FixedPoint.ONE));\\n        } else {\\n            return 0;\\n        }\\n    }\\n\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        /******************************************************************************************\\n        // tokenInForExactBPTOut                                                                 //\\n        // a = amountIn                                                                          //\\n        // b = balance                      /  /    totalBPT + bptOut      \\\\    (1 / w)       \\\\  //\\n        // bptOut = bptAmountOut   a = b * |  | --------------------------  | ^          - 1  |  //\\n        // bpt = totalBPT                   \\\\  \\\\       totalBPT            /                  /  //\\n        // w = weight                                                                            //\\n        ******************************************************************************************/\\n\\n        // Token in, so we round up overall.\\n\\n        // Calculate the factor by which the invariant will increase after minting BPTAmountOut\\n        uint256 invariantRatio = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply);\\n        _require(invariantRatio <= _MAX_INVARIANT_RATIO, Errors.MAX_OUT_BPT_FOR_TOKEN_IN);\\n\\n        // Calculate by how much the token balance has to increase to match the invariantRatio\\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divUp(normalizedWeight));\\n\\n        uint256 amountInWithoutFee = balance.mulUp(balanceRatio.sub(FixedPoint.ONE));\\n\\n        // We can now compute how much extra balance is being deposited and used in virtual swaps, and charge swap fees\\n        // accordingly.\\n        uint256 taxablePercentage = normalizedWeight.complement();\\n        uint256 taxableAmount = amountInWithoutFee.mulUp(taxablePercentage);\\n        uint256 nonTaxableAmount = amountInWithoutFee.sub(taxableAmount);\\n\\n        return nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\\n    }\\n\\n    function _calcBptInGivenExactTokensOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        uint256[] memory balanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 invariantRatioWithoutFees = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            balanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            invariantRatioWithoutFees = invariantRatioWithoutFees.add(\\n                balanceRatiosWithoutFee[i].mulUp(normalizedWeights[i])\\n            );\\n        }\\n\\n        uint256 invariantRatio = FixedPoint.ONE;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Swap fees are typically charged on 'token in', but there is no 'token in' here,\\n            // o we apply it to 'token out'.\\n            // This results in slightly larger price impact.\\n\\n            uint256 amountOutWithFee;\\n            if (invariantRatioWithoutFees > balanceRatiosWithoutFee[i]) {\\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithoutFees.complement());\\n                uint256 taxableAmount = amountsOut[i].sub(nonTaxableAmount);\\n\\n                amountOutWithFee = nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\\n            } else {\\n                amountOutWithFee = amountsOut[i];\\n            }\\n\\n            uint256 balanceRatio = balances[i].sub(amountOutWithFee).divDown(balances[i]);\\n\\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\\n        }\\n\\n        return bptTotalSupply.mulUp(invariantRatio.complement());\\n    }\\n\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        /*****************************************************************************************\\n        // exactBPTInForTokenOut                                                                //\\n        // a = amountOut                                                                        //\\n        // b = balance                     /      /    totalBPT - bptIn       \\\\    (1 / w)  \\\\   //\\n        // bptIn = bptAmountIn    a = b * |  1 - | --------------------------  | ^           |  //\\n        // bpt = totalBPT                  \\\\      \\\\       totalBPT            /             /   //\\n        // w = weight                                                                           //\\n        *****************************************************************************************/\\n\\n        // Token out, so we round down overall. The multiplication rounds down, but the power rounds up (so the base\\n        // rounds up). Because (totalBPT - bptIn) / totalBPT <= 1, the exponent rounds down.\\n\\n        // Calculate the factor by which the invariant will decrease after burning BPTAmountIn\\n        uint256 invariantRatio = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply);\\n        _require(invariantRatio >= _MIN_INVARIANT_RATIO, Errors.MIN_BPT_IN_FOR_TOKEN_OUT);\\n\\n        // Calculate by how much the token balance has to decrease to match invariantRatio\\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divDown(normalizedWeight));\\n\\n        // Because of rounding up, balanceRatio can be greater than one. Using complement prevents reverts.\\n        uint256 amountOutWithoutFee = balance.mulDown(balanceRatio.complement());\\n\\n        // We can now compute how much excess balance is being withdrawn as a result of the virtual swaps, which result\\n        // in swap fees.\\n        uint256 taxablePercentage = normalizedWeight.complement();\\n\\n        // Swap fees are typically charged on 'token in', but there is no 'token in' here, so we apply it\\n        // to 'token out'. This results in slightly larger price impact. Fees are rounded up.\\n        uint256 taxableAmount = amountOutWithoutFee.mulUp(taxablePercentage);\\n        uint256 nonTaxableAmount = amountOutWithoutFee.sub(taxableAmount);\\n\\n        return nonTaxableAmount.add(taxableAmount.mulDown(swapFee.complement()));\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 totalBPT\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = amountOut                  /        bptIn         \\\\                                  //\\n        // b = balance           a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\       totalBPT       /                                  //\\n        // bpt = totalBPT                                                                            //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(totalBPT);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 previousInvariant,\\n        uint256 currentInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /*********************************************************************************\\n        /*  protocolSwapFeePercentage * balanceToken * ( 1 - (previousInvariant / currentInvariant) ^ (1 / weightToken))\\n        *********************************************************************************/\\n\\n        if (currentInvariant <= previousInvariant) {\\n            // This shouldn't happen outside of rounding errors, but have this safeguard nonetheless to prevent the Pool\\n            // from entering a locked state in which joins and exits revert while computing accumulated swap fees.\\n            return 0;\\n        }\\n\\n        // We round down to prevent issues in the Pool's accounting, even if it means paying slightly less in protocol\\n        // fees to the Vault.\\n\\n        // Fee percentage and balance multiplications round down, while the subtrahend (power) rounds up (as does the\\n        // base). Because previousInvariant / currentInvariant <= 1, the exponent rounds down.\\n\\n        uint256 base = previousInvariant.divUp(currentInvariant);\\n        uint256 exponent = FixedPoint.ONE.divDown(normalizedWeight);\\n\\n        // Because the exponent is larger than one, the base of the power function has a lower bound. We cap to this\\n        // value to avoid numeric issues, which means in the extreme case (where the invariant growth is larger than\\n        // 1 / min exponent) the Pool will pay less in protocol fees than it should.\\n        base = Math.max(base, FixedPoint.MIN_POW_BASE_FREE_EXPONENT);\\n\\n        uint256 power = base.powUp(exponent);\\n\\n        uint256 tokenAccruedFees = balance.mulDown(power.complement());\\n        return tokenAccruedFees.mulDown(protocolSwapFeePercentage);\\n    }\\n}\\n\",\"keccak256\":\"0xb7b712312afa0000d491862a7e50e1d6814a18e92ca16897baaa412ef5aff138\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\nimport \\\"../BaseMinimalSwapInfoPool.sol\\\";\\n\\nimport \\\"./WeightedMath.sol\\\";\\nimport \\\"./WeightedPoolUserDataHelpers.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus total\\n// count, resulting in a large number of state variables.\\n\\ncontract WeightedPool is BaseMinimalSwapInfoPool, WeightedMath {\\n    using FixedPoint for uint256;\\n    using WeightedPoolUserDataHelpers for bytes;\\n\\n    // The protocol fees will always be charged using the token associated with the max weight in the pool.\\n    // Since these Pools will register tokens only once, we can assume this index will be constant.\\n    uint256 private immutable _maxWeightTokenIndex;\\n\\n    uint256 private immutable _normalizedWeight0;\\n    uint256 private immutable _normalizedWeight1;\\n    uint256 private immutable _normalizedWeight2;\\n    uint256 private immutable _normalizedWeight3;\\n    uint256 private immutable _normalizedWeight4;\\n    uint256 private immutable _normalizedWeight5;\\n    uint256 private immutable _normalizedWeight6;\\n    uint256 private immutable _normalizedWeight7;\\n\\n    uint256 private _lastInvariant;\\n\\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\\n\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256[] memory normalizedWeights,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BaseMinimalSwapInfoPool(\\n            vault,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        uint256 numTokens = tokens.length;\\n        InputHelpers.ensureInputLengthMatch(numTokens, normalizedWeights.length);\\n\\n        // Ensure  each normalized weight is above them minimum and find the token index of the maximum weight\\n        uint256 normalizedSum = 0;\\n        uint256 maxWeightTokenIndex = 0;\\n        uint256 maxNormalizedWeight = 0;\\n        for (uint8 i = 0; i < numTokens; i++) {\\n            uint256 normalizedWeight = normalizedWeights[i];\\n            _require(normalizedWeight >= _MIN_WEIGHT, Errors.MIN_WEIGHT);\\n\\n            normalizedSum = normalizedSum.add(normalizedWeight);\\n            if (normalizedWeight > maxNormalizedWeight) {\\n                maxWeightTokenIndex = i;\\n                maxNormalizedWeight = normalizedWeight;\\n            }\\n        }\\n        // Ensure that the normalized weights sum to ONE\\n        _require(normalizedSum == FixedPoint.ONE, Errors.NORMALIZED_WEIGHT_INVARIANT);\\n\\n        _maxWeightTokenIndex = maxWeightTokenIndex;\\n        _normalizedWeight0 = normalizedWeights.length > 0 ? normalizedWeights[0] : 0;\\n        _normalizedWeight1 = normalizedWeights.length > 1 ? normalizedWeights[1] : 0;\\n        _normalizedWeight2 = normalizedWeights.length > 2 ? normalizedWeights[2] : 0;\\n        _normalizedWeight3 = normalizedWeights.length > 3 ? normalizedWeights[3] : 0;\\n        _normalizedWeight4 = normalizedWeights.length > 4 ? normalizedWeights[4] : 0;\\n        _normalizedWeight5 = normalizedWeights.length > 5 ? normalizedWeights[5] : 0;\\n        _normalizedWeight6 = normalizedWeights.length > 6 ? normalizedWeights[6] : 0;\\n        _normalizedWeight7 = normalizedWeights.length > 7 ? normalizedWeights[7] : 0;\\n    }\\n\\n    function _normalizedWeight(IERC20 token) internal view virtual returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _normalizedWeight0; }\\n        else if (token == _token1) { return _normalizedWeight1; }\\n        else if (token == _token2) { return _normalizedWeight2; }\\n        else if (token == _token3) { return _normalizedWeight3; }\\n        else if (token == _token4) { return _normalizedWeight4; }\\n        else if (token == _token5) { return _normalizedWeight5; }\\n        else if (token == _token6) { return _normalizedWeight6; }\\n        else if (token == _token7) { return _normalizedWeight7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    function _normalizedWeights() internal view virtual returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory normalizedWeights = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { normalizedWeights[0] = _normalizedWeight0; } else { return normalizedWeights; }\\n            if (totalTokens > 1) { normalizedWeights[1] = _normalizedWeight1; } else { return normalizedWeights; }\\n            if (totalTokens > 2) { normalizedWeights[2] = _normalizedWeight2; } else { return normalizedWeights; }\\n            if (totalTokens > 3) { normalizedWeights[3] = _normalizedWeight3; } else { return normalizedWeights; }\\n            if (totalTokens > 4) { normalizedWeights[4] = _normalizedWeight4; } else { return normalizedWeights; }\\n            if (totalTokens > 5) { normalizedWeights[5] = _normalizedWeight5; } else { return normalizedWeights; }\\n            if (totalTokens > 6) { normalizedWeights[6] = _normalizedWeight6; } else { return normalizedWeights; }\\n            if (totalTokens > 7) { normalizedWeights[7] = _normalizedWeight7; } else { return normalizedWeights; }\\n        }\\n\\n        return normalizedWeights;\\n    }\\n\\n    function getLastInvariant() external view returns (uint256) {\\n        return _lastInvariant;\\n    }\\n\\n    /**\\n     * @dev Returns the current value of the invariant.\\n     */\\n    function getInvariant() public view returns (uint256) {\\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\\n\\n        // Since the Pool hooks always work with upscaled balances, we manually\\n        // upscale here for consistency\\n        _upscaleArray(balances, _scalingFactors());\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    function getNormalizedWeights() external view returns (uint256[] memory) {\\n        return _normalizedWeights();\\n    }\\n\\n    // Base Pool handlers\\n\\n    // Swap\\n\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        // Swaps are disabled while the contract is paused.\\n\\n        return\\n            WeightedMath._calcOutGivenIn(\\n                currentBalanceTokenIn,\\n                _normalizedWeight(swapRequest.tokenIn),\\n                currentBalanceTokenOut,\\n                _normalizedWeight(swapRequest.tokenOut),\\n                swapRequest.amount\\n            );\\n    }\\n\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        // Swaps are disabled while the contract is paused.\\n\\n        return\\n            WeightedMath._calcInGivenOut(\\n                currentBalanceTokenIn,\\n                _normalizedWeight(swapRequest.tokenIn),\\n                currentBalanceTokenOut,\\n                _normalizedWeight(swapRequest.tokenOut),\\n                swapRequest.amount\\n            );\\n    }\\n\\n    // Initialize\\n\\n    function _onInitializePool(\\n        bytes32,\\n        address,\\n        address,\\n        bytes memory userData\\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\\n        // It would be strange for the Pool to be paused before it is initialized, but for consistency we prevent\\n        // initialization in this case.\\n\\n        WeightedPool.JoinKind kind = userData.joinKind();\\n        _require(kind == WeightedPool.JoinKind.INIT, Errors.UNINITIALIZED);\\n\\n        uint256[] memory amountsIn = userData.initialAmountsIn();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        uint256 invariantAfterJoin = WeightedMath._calculateInvariant(normalizedWeights, amountsIn);\\n\\n        // Set the initial BPT to the value of the invariant times the number of tokens. This makes BPT supply more\\n        // consistent in Pools with similar compositions but different number of tokens.\\n        uint256 bptAmountOut = Math.mul(invariantAfterJoin, _getTotalTokens());\\n\\n        _lastInvariant = invariantAfterJoin;\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Join\\n\\n    function _onJoinPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        whenNotPaused\\n        returns (\\n            uint256,\\n            uint256[] memory,\\n            uint256[] memory\\n        )\\n    {\\n        // All joins are disabled while the contract is paused.\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas\\n        // computing them on each individual swap\\n        uint256 invariantBeforeJoin = WeightedMath._calculateInvariant(normalizedWeights, balances);\\n\\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n            balances,\\n            normalizedWeights,\\n            _lastInvariant,\\n            invariantBeforeJoin,\\n            protocolSwapFeePercentage\\n        );\\n\\n        // Update current balances by subtracting the protocol fee amounts\\n        _mutateAmounts(balances, dueProtocolFeeAmounts, FixedPoint.sub);\\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, normalizedWeights, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn, normalizedWeights);\\n\\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doJoin(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        JoinKind kind = userData.joinKind();\\n\\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\\n            return _joinExactTokensInForBPTOut(balances, normalizedWeights, userData);\\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\\n            return _joinTokenInForExactBPTOut(balances, normalizedWeights, userData);\\n        } else {\\n            _revert(Errors.UNHANDLED_JOIN_KIND);\\n        }\\n    }\\n\\n    function _joinExactTokensInForBPTOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 bptAmountOut = WeightedMath._calcBptOutGivenExactTokensIn(\\n            balances,\\n            normalizedWeights,\\n            amountsIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    function _joinTokenInForExactBPTOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\\n        // Note that there is no maximum amountIn parameter: this is handled by `IVault.joinPool`.\\n\\n        _require(tokenIndex < _getTotalTokens(), Errors.OUT_OF_BOUNDS);\\n\\n        uint256[] memory amountsIn = new uint256[](_getTotalTokens());\\n        amountsIn[tokenIndex] = WeightedMath._calcTokenInGivenExactBptOut(\\n            balances[tokenIndex],\\n            normalizedWeights[tokenIndex],\\n            bptAmountOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Exit\\n\\n    function _onExitPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        // Exits are not completely disabled while the contract is paused: proportional exits (exact BPT in for tokens\\n        // out) remain functional.\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        if (_isNotPaused()) {\\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\\n            // spending gas calculating the fees on each individual swap.\\n            uint256 invariantBeforeExit = WeightedMath._calculateInvariant(normalizedWeights, balances);\\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n                balances,\\n                normalizedWeights,\\n                _lastInvariant,\\n                invariantBeforeExit,\\n                protocolSwapFeePercentage\\n            );\\n\\n            // Update current balances by subtracting the protocol fee amounts\\n            _mutateAmounts(balances, dueProtocolFeeAmounts, FixedPoint.sub);\\n        } else {\\n            // If the contract is paused, swap protocol fee amounts are not charged to avoid extra calculations and\\n            // reduce the potential for errors.\\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n        }\\n\\n        (bptAmountIn, amountsOut) = _doExit(balances, normalizedWeights, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\\n        // protocol swap fees due in future joins and exits.\\n        _lastInvariant = _invariantAfterExit(balances, amountsOut, normalizedWeights);\\n\\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doExit(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        ExitKind kind = userData.exitKind();\\n\\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\\n            return _exitExactBPTInForTokenOut(balances, normalizedWeights, userData);\\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\\n            return _exitExactBPTInForTokensOut(balances, userData);\\n        } else {\\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\\n            return _exitBPTInForExactTokensOut(balances, normalizedWeights, userData);\\n        }\\n    }\\n\\n    function _exitExactBPTInForTokenOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view whenNotPaused returns (uint256, uint256[] memory) {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\\n        // Note that there is no minimum amountOut parameter: this is handled by `IVault.exitPool`.\\n\\n        _require(tokenIndex < _getTotalTokens(), Errors.OUT_OF_BOUNDS);\\n\\n        // We exit in a single token, so we initialize amountsOut with zeros\\n        uint256[] memory amountsOut = new uint256[](_getTotalTokens());\\n\\n        // And then assign the result to the selected token\\n        amountsOut[tokenIndex] = WeightedMath._calcTokenOutGivenExactBptIn(\\n            balances[tokenIndex],\\n            normalizedWeights[tokenIndex],\\n            bptAmountIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\\n        // This particular exit function is the only one that remains available because it is the simplest one, and\\n        // therefore the one with the lowest likelihood of errors.\\n\\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\\n        // Note that there is no minimum amountOut parameter: this is handled by `IVault.exitPool`.\\n\\n        uint256[] memory amountsOut = WeightedMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitBPTInForExactTokensOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view whenNotPaused returns (uint256, uint256[] memory) {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\\n        _upscaleArray(amountsOut, _scalingFactors());\\n\\n        uint256 bptAmountIn = WeightedMath._calcBptInGivenExactTokensOut(\\n            balances,\\n            normalizedWeights,\\n            amountsOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    // Helpers\\n\\n    function _getDueProtocolFeeAmounts(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256 previousInvariant,\\n        uint256 currentInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) private view returns (uint256[] memory) {\\n        // Initialize with zeros\\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n\\n        // Early return if the protocol swap fee percentage is zero, saving gas.\\n        if (protocolSwapFeePercentage == 0) {\\n            return dueProtocolFeeAmounts;\\n        }\\n\\n        // The protocol swap fees are always paid using the token with the largest weight in the Pool. As this is the\\n        // token that is expected to have the largest balance, using it to pay fees should not unbalance the Pool.\\n        dueProtocolFeeAmounts[_maxWeightTokenIndex] = WeightedMath._calcDueTokenProtocolSwapFeeAmount(\\n            balances[_maxWeightTokenIndex],\\n            normalizedWeights[_maxWeightTokenIndex],\\n            previousInvariant,\\n            currentInvariant,\\n            protocolSwapFeePercentage\\n        );\\n\\n        return dueProtocolFeeAmounts;\\n    }\\n\\n    /**\\n     * @dev Returns the value of the invariant given `balances`, assuming they are increased by `amountsIn`. All\\n     * amounts are expected to be upscaled.\\n     */\\n    function _invariantAfterJoin(\\n        uint256[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256[] memory normalizedWeights\\n    ) private view returns (uint256) {\\n        _mutateAmounts(balances, amountsIn, FixedPoint.add);\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    function _invariantAfterExit(\\n        uint256[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256[] memory normalizedWeights\\n    ) private view returns (uint256) {\\n        _mutateAmounts(balances, amountsOut, FixedPoint.sub);\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    /**\\n     * @dev Mutates `amounts` by applying `mutation` with each entry in `arguments`.\\n     *\\n     * Equivalent to `amounts = amounts.map(mutation)`.\\n     */\\n    function _mutateAmounts(\\n        uint256[] memory toMutate,\\n        uint256[] memory arguments,\\n        function(uint256, uint256) pure returns (uint256) mutation\\n    ) private view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            toMutate[i] = mutation(toMutate[i], arguments[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev This function returns the appreciation of one BPT relative to the\\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\\n     */\\n    function getRate() public view returns (uint256) {\\n        // The initial BPT supply is equal to the invariant times the number of tokens.\\n        return Math.mul(getInvariant(), _getTotalTokens()).divDown(totalSupply());\\n    }\\n}\\n\",\"keccak256\":\"0x4e73b22be8c4325be39cc05796926b173b867292d73fe051dcfa49aafd9fb9d7\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./WeightedPool.sol\\\";\\n\\nlibrary WeightedPoolUserDataHelpers {\\n    function joinKind(bytes memory self) internal pure returns (WeightedPool.JoinKind) {\\n        return abi.decode(self, (WeightedPool.JoinKind));\\n    }\\n\\n    function exitKind(bytes memory self) internal pure returns (WeightedPool.ExitKind) {\\n        return abi.decode(self, (WeightedPool.ExitKind));\\n    }\\n\\n    // Joins\\n\\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\\n        (, amountsIn) = abi.decode(self, (WeightedPool.JoinKind, uint256[]));\\n    }\\n\\n    function exactTokensInForBptOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountOut)\\n    {\\n        (, amountsIn, minBPTAmountOut) = abi.decode(self, (WeightedPool.JoinKind, uint256[], uint256));\\n    }\\n\\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (WeightedPool.JoinKind, uint256, uint256));\\n    }\\n\\n    // Exits\\n\\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (WeightedPool.ExitKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\\n        (, bptAmountIn) = abi.decode(self, (WeightedPool.ExitKind, uint256));\\n    }\\n\\n    function bptInForExactTokensOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\\n    {\\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (WeightedPool.ExitKind, uint256[], uint256));\\n    }\\n}\\n\",\"keccak256\":\"0x6a2f98e68608e65dd9c0de8c57c1fc2e1643789b18bcf75d7109d27cdf45d62f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\\n * to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IMinimalSwapInfoPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7469919e147c0db8b4f290d310ca3816dec5d3c6cc6b258cf6e0df820a20a179\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5412,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_balance",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 5418,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_allowance",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
              },
              {
                "astId": 5420,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_totalSupply",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              },
              {
                "astId": 5422,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_name",
                "offset": 0,
                "slot": "3",
                "type": "t_string_storage"
              },
              {
                "astId": 5424,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_symbol",
                "offset": 0,
                "slot": "4",
                "type": "t_string_storage"
              },
              {
                "astId": 5428,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_nonces",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_paused",
                "offset": 0,
                "slot": "6",
                "type": "t_bool"
              },
              {
                "astId": 6481,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_swapFeePercentage",
                "offset": 0,
                "slot": "7",
                "type": "t_uint256"
              },
              {
                "astId": 11690,
                "contract": "src.sol/amm/pools/weighted/WeightedPool.sol:WeightedPool",
                "label": "_lastInvariant",
                "offset": 0,
                "slot": "8",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_string_storage": {
                "encoding": "bytes",
                "label": "string",
                "numberOfBytes": "32"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/weighted/WeightedPoolFactory.sol": {
        "WeightedPoolFactory": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "contract IVault",
                  "name": "vault",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "pool",
                  "type": "address"
                }
              ],
              "name": "PoolCreated",
              "type": "event"
            },
            {
              "inputs": [
                {
                  "internalType": "string",
                  "name": "name",
                  "type": "string"
                },
                {
                  "internalType": "string",
                  "name": "symbol",
                  "type": "string"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "weights",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "swapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                }
              ],
              "name": "create",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPauseConfiguration",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "pauseWindowDuration",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodDuration",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getVault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "pool",
                  "type": "address"
                }
              ],
              "name": "isPoolFromFactory",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "create(string,string,address[],uint256[],uint256,address)": {
                "details": "Deploys a new `WeightedPool`."
              },
              "getPauseConfiguration()": {
                "details": "Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this factory. `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable."
              },
              "getVault()": {
                "details": "Returns the Vault's address."
              },
              "isPoolFromFactory(address)": {
                "details": "Returns true if `pool` was created by this factory."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60c060405234801561001057600080fd5b50604051615fcd380380615fcd83398101604081905261002f9161004d565b60601b6001600160601b0319166080526276a700420160a05261007b565b60006020828403121561005e578081fd5b81516001600160a01b0381168114610074578182fd5b9392505050565b60805160601c60a051615f286100a56000398060d6528061010052508061015c5250615f286000f3fe60806040523480156200001157600080fd5b5060043610620000525760003560e01c80632da47c4014620000575780636634b753146200007a5780638d928af814620000a0578063fbce039314620000b9575b600080fd5b62000061620000d0565b6040516200007192919062000637565b60405180910390f35b620000916200008b366004620003c0565b6200013c565b60405162000071919062000562565b620000aa6200015a565b6040516200007191906200054e565b620000aa620000ca366004620003e6565b6200017e565b600080427f00000000000000000000000000000000000000000000000000000000000000008110156200012e57807f000000000000000000000000000000000000000000000000000000000000000003925062278d00915062000137565b60009250600091505b509091565b6001600160a01b031660009081526020819052604090205460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000090565b60008060006200018d620000d0565b9150915060006200019d6200015a565b8a8a8a8a8a88888c604051620001b3906200024b565b620001c7999897969594939291906200056d565b604051809103906000f080158015620001e4573d6000803e3d6000fd5b509050620001f281620001ff565b9998505050505050505050565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc9190a250565b61583f80620006b483390190565b803562000266816200069a565b92915050565b600082601f8301126200027d578081fd5b8135620002946200028e826200066d565b62000645565b818152915060208083019084810181840286018201871015620002b657600080fd5b60005b84811015620002e2578135620002cf816200069a565b84529282019290820190600101620002b9565b505050505092915050565b600082601f830112620002fe578081fd5b81356200030f6200028e826200066d565b8181529150602080830190848101818402860182018710156200033157600080fd5b60005b84811015620002e25781358452928201929082019060010162000334565b600082601f83011262000363578081fd5b813567ffffffffffffffff8111156200037a578182fd5b6200038f601f8201601f191660200162000645565b9150808252836020828501011115620003a757600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215620003d2578081fd5b8135620003df816200069a565b9392505050565b60008060008060008060c08789031215620003ff578182fd5b863567ffffffffffffffff8082111562000417578384fd5b620004258a838b0162000352565b975060208901359150808211156200043b578384fd5b620004498a838b0162000352565b965060408901359150808211156200045f578384fd5b6200046d8a838b016200026c565b9550606089013591508082111562000483578384fd5b506200049289828a01620002ed565b93505060808701359150620004ab8860a0890162000259565b90509295509295509295565b6001600160a01b03169052565b6000815180845260208085019450808401835b83811015620004f557815187529582019590820190600101620004d7565b509495945050505050565b60008151808452815b81811015620005275760208185018101518683018201520162000509565b81811115620005395782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b901515815260200190565b6001600160a01b038a168152610120602080830182905260009190620005968483018d62000500565b91508382036040850152620005ac828c62000500565b84810360608601528a51808252828c01935090820190845b81811015620005ec57620005d985516200068e565b83529383019391830191600101620005c4565b5050848103608086015262000602818b620004c4565b93505050508560a08301528460c08301528360e083015262000629610100830184620004b7565b9a9950505050505050505050565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156200066557600080fd5b604052919050565b600067ffffffffffffffff82111562000684578081fd5b5060209081020190565b6001600160a01b031690565b6001600160a01b0381168114620006b057600080fd5b5056fe6105006040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b506040516200583f3803806200583f8339810160408190526200005a9162000caa565b88888888878787878785516002146200007557600162000078565b60025b6040805180820190915260018152603160f81b6020808301918252336080526001600160601b0319606087901b1660a0528b51908c0190812060c0529151902060e0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6101005289518a918a918a918a918a918a918a91849184918a918a9162000107916003919062000a73565b5080516200011d90600490602084019062000a73565b50620001359150506276a7008311156101946200088c565b6200014962278d008211156101956200088c565b42909101610140819052016101605284516200016b906002111560c86200088c565b6200018360088651111560c96200088c60201b60201c565b6200019985620008a160201b62000db61760201c565b620001ae64e8d4a5100085101560cb6200088c565b620001c667016345785d8a000085111560ca6200088c565b6040516309b2760f60e01b81526000906001600160a01b038b16906309b2760f90620001f7908c9060040162000e63565b602060405180830381600087803b1580156200021257600080fd5b505af115801562000227573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200024d919062000c91565b9050896001600160a01b03166366a9c7d2828889516001600160401b03811180156200027857600080fd5b50604051908082528060200260200182016040528015620002a3578160200160208202803683370190505b506040518463ffffffff1660e01b8152600401620002c49392919062000dc7565b600060405180830381600087803b158015620002df57600080fd5b505af1158015620002f4573d6000803e3d6000fd5b5050506001600160601b031960608c901b1661018052506101a0819052600785905585516101c05285516200032b57600062000342565b856000815181106200033957fe5b60200260200101515b60601b6001600160601b0319166101e0528551600110620003655760006200037c565b856001815181106200037357fe5b60200260200101515b60601b6001600160601b0319166102005285516002106200039f576000620003b6565b85600281518110620003ad57fe5b60200260200101515b60601b6001600160601b031916610220528551600310620003d9576000620003f0565b85600381518110620003e757fe5b60200260200101515b60601b6001600160601b031916610240528551600410620004135760006200042a565b856004815181106200042157fe5b60200260200101515b60601b6001600160601b0319166102605285516005106200044d57600062000464565b856005815181106200045b57fe5b60200260200101515b60601b6001600160601b031916610280528551600610620004875760006200049e565b856006815181106200049557fe5b60200260200101515b60601b6001600160601b0319166102a0528551600710620004c1576000620004d8565b85600781518110620004cf57fe5b60200260200101515b60601b6001600160601b0319166102c0528551620004f85760006200051e565b6200051e866000815181106200050a57fe5b6020026020010151620008ad60201b60201c565b6102e05285516001106200053457600062000546565b62000546866001815181106200050a57fe5b6103005285516002106200055c5760006200056e565b6200056e866002815181106200050a57fe5b6103205285516003106200058457600062000596565b62000596866003815181106200050a57fe5b610340528551600410620005ac576000620005be565b620005be866004815181106200050a57fe5b610360528551600510620005d4576000620005e6565b620005e6866005815181106200050a57fe5b610380528551600610620005fc5760006200060e565b6200060e866006815181106200050a57fe5b6103a05285516007106200062457600062000636565b62000636866007815181106200050a57fe5b6103c081815250505050505050505050505050505050505050506000865190506200066e8187516200094f60201b62000dc41760201c565b6000806000805b848160ff161015620006f45760008a8260ff16815181106200069357fe5b60200260200101519050620006bb662386f26fc1000082101561012e6200088c60201b60201c565b620006d581866200095e60201b62000dd11790919060201c565b945082811115620006ea578160ff1693508092505b5060010162000675565b506200070d670de0b6b3a764000084146101346200088c565b6103e082905288516200072257600062000739565b886000815181106200073057fe5b60200260200101515b6104005288516001106200074f57600062000766565b886001815181106200075d57fe5b60200260200101515b6104205288516002106200077c57600062000793565b886002815181106200078a57fe5b60200260200101515b610440528851600310620007a9576000620007c0565b88600381518110620007b757fe5b60200260200101515b610460528851600410620007d6576000620007ed565b88600481518110620007e457fe5b60200260200101515b610480528851600510620008035760006200081a565b886005815181106200081157fe5b60200260200101515b6104a05288516006106200083057600062000847565b886006815181106200083e57fe5b60200260200101515b6104c05288516007106200085d57600062000874565b886007815181106200086b57fe5b60200260200101515b6104e0525062000ee19b505050505050505050505050565b816200089d576200089d816200097b565b5050565b806200089d81620009ce565b600080826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015620008ea57600080fd5b505afa158015620008ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000925919062000da4565b60ff16905060006200094460128362000a5b60201b62000de31760201c565b600a0a949350505050565b6200089d82821460676200088c565b60008282016200097284821015836200088c565b90505b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b600281511015620009df5762000a58565b600081600081518110620009ef57fe5b602002602001015190506000600190505b825181101562000a5557600083828151811062000a1957fe5b6020026020010151905062000a4a816001600160a01b0316846001600160a01b03161060656200088c60201b60201c565b915060010162000a00565b50505b50565b600062000a6d8383111560016200088c565b50900390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000ab657805160ff191683800117855562000ae6565b8280016001018555821562000ae6579182015b8281111562000ae657825182559160200191906001019062000ac9565b5062000af492915062000af8565b5090565b5b8082111562000af4576000815560010162000af9565b8051620009758162000ecb565b600082601f83011262000b2d578081fd5b815162000b4462000b3e8262000e9f565b62000e78565b81815291506020808301908481018184028601820187101562000b6657600080fd5b60005b8481101562000b9257815162000b7f8162000ecb565b8452928201929082019060010162000b69565b505050505092915050565b600082601f83011262000bae578081fd5b815162000bbf62000b3e8262000e9f565b81815291506020808301908481018184028601820187101562000be157600080fd5b60005b8481101562000b925781518452928201929082019060010162000be4565b600082601f83011262000c13578081fd5b81516001600160401b0381111562000c29578182fd5b602062000c3f601f8301601f1916820162000e78565b9250818352848183860101111562000c5657600080fd5b60005b8281101562000c7657848101820151848201830152810162000c59565b8281111562000c885760008284860101525b50505092915050565b60006020828403121562000ca3578081fd5b5051919050565b60008060008060008060008060006101208a8c03121562000cc9578485fd5b62000cd58b8b62000b0f565b60208b01519099506001600160401b038082111562000cf2578687fd5b62000d008d838e0162000c02565b995060408c015191508082111562000d16578687fd5b62000d248d838e0162000c02565b985060608c015191508082111562000d3a578687fd5b62000d488d838e0162000b1c565b975060808c015191508082111562000d5e578687fd5b5062000d6d8c828d0162000b9d565b95505060a08a0151935060c08a0151925060e08a0151915062000d958b6101008c0162000b0f565b90509295985092959850929598565b60006020828403121562000db6578081fd5b815160ff8116811462000972578182fd5b60006060820185835260206060818501528186518084526080860191508288019350845b8181101562000e135762000e00855162000ebf565b8352938301939183019160010162000deb565b505084810360408601528551808252908201925081860190845b8181101562000e555762000e42835162000ebf565b8552938301939183019160010162000e2d565b509298975050505050505050565b602081016003831062000e7257fe5b91905290565b6040518181016001600160401b038111828210171562000e9757600080fd5b604052919050565b60006001600160401b0382111562000eb5578081fd5b5060209081020190565b6001600160a01b031690565b6001600160a01b038116811462000a5857600080fd5b60805160a05160601c60c05160e051610100516101205161014051610160516101805160601c6101a0516101c0516101e05160601c6102005160601c6102205160601c6102405160601c6102605160601c6102805160601c6102a05160601c6102c05160601c6102e05161030051610320516103405161036051610380516103a0516103c0516103e05161040051610420516104405161046051610480516104a0516104c0516104e051614748620010f760003980611eb85280612849525080611e7552806127e8525080611e325280612787525080611def5280612726525080611dac52806126c5525080611d695280612664525080611d265280612603525080611ce352806125a25250806122c252806122f6528061233252508061161c5280611b125250806115d95280611ab15250806115965280611a5052508061155352806119ef525080611510528061198e5250806114cd528061192d52508061148a52806118cc525080611439528061186b525080611ad7528061280e525080611a7652806127ad525080611a15528061274c5250806119b452806126eb525080611953528061268a5250806118f2528061262952508061189152806125c852508061183052806125675250806110f8525080610637525080610895525080610f45525080610f21525080610b1552508061104852508061108a5250806110695250806108715250806107fb52506147486000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80637ecebe001161010f578063a9059cbb116100a2578063d5c096c411610071578063d5c096c4146103e6578063d73dd623146103f9578063dd62ed3e1461040c578063f89f27ed1461041f576101f0565b8063a9059cbb146103b0578063aaabadc5146103c3578063c0ff1a15146103cb578063d505accf146103d3576101f0565b80638d928af8116100de5780638d928af81461038557806395d89b411461038d5780639b02cdde146103955780639d2c110c1461039d576101f0565b80637ecebe0014610337578063851c1bb31461034a57806387ec68171461035d578063893d20e814610370576101f0565b806338e9922e11610187578063661884631161015657806366188463146102e8578063679aefce146102fb57806370a082311461030357806374f3b00914610316576101f0565b806338e9922e146102a457806338fff2d0146102b757806355c67628146102bf5780636028bfd4146102c7576101f0565b80631c0de051116101c35780631c0de0511461025d57806323b872dd14610274578063313ce567146102875780633644e5151461029c576101f0565b806306fdde03146101f5578063095ea7b31461021357806316c38b3c1461023357806318160ddd14610248575b600080fd5b6101fd610434565b60405161020a9190614623565b60405180910390f35b610226610221366004613ffd565b6104cb565b60405161020a919061455a565b6102466102413660046140f3565b6104e2565b005b6102506104f6565b60405161020a919061457d565b6102656104fc565b60405161020a93929190614565565b610226610282366004613f48565b610525565b61028f6105a8565b60405161020a919061468f565b6102506105ad565b6102466102b2366004614479565b6105bc565b610250610635565b610250610659565b6102da6102d536600461412b565b61065f565b60405161020a929190614676565b6102266102f6366004613ffd565b610696565b6102506106f0565b610250610311366004613ef4565b61071b565b61032961032436600461412b565b61073a565b60405161020a929190614535565b610250610345366004613ef4565b6107dc565b610250610358366004614227565b6107f7565b6102da61036b36600461412b565b610849565b61037861086f565b60405161020a919061450e565b610378610893565b6101fd6108b7565b610250610918565b6102506103ab36600461437e565b61091e565b6102266103be366004613ffd565b610a05565b610378610a12565b610250610a1c565b6102466103e1366004613f88565b610ae0565b6103296103f436600461412b565b610c29565b610226610407366004613ffd565b610d4b565b61025061041a366004613f10565b610d81565b610427610dac565b60405161020a9190614522565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c05780601f10610495576101008083540402835291602001916104c0565b820191906000526020600020905b8154815290600101906020018083116104a357829003601f168201915b505050505090505b90565b60006104d8338484610df9565b5060015b92915050565b6104ea610e61565b6104f381610e8f565b50565b60025490565b6000806000610509610f02565b159250610514610f1f565b915061051e610f43565b9050909192565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261056391148061055b5750838210155b610197610f67565b61056e858585610f75565b336001600160a01b0386161480159061058957506000198114155b1561059b5761059b8533858403610df9565b60019150505b9392505050565b601290565b60006105b7611044565b905090565b6105c4610e61565b6105cc6110e1565b6105df64e8d4a5100082101560cb610f67565b6105f567016345785d8a000082111560ca610f67565b60078190556040517f9cabc14d438714dbcd9292df9b3f89c42f98acd93a675ad72cd6033777e9b8e79061062a90839061457d565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000090565b60075490565b6000606061067586516106706110f6565b610dc4565b61068a8989898989898961111a6111e1611247565b97509795505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106106d2576106cd33856000610df9565b6106e6565b6106e633856106e18487610de3565b610df9565b5060019392505050565b60006105b76106fd6104f6565b610715610708610a1c565b6107106110f6565b611369565b9061138d565b6001600160a01b0381166000908152602081905260409020545b919050565b60608088610764610749610893565b6001600160a01b0316336001600160a01b03161460cd610f67565b61077961076f610635565b82146101f4610f67565b60606107836113de565b905061078f888261165a565b60006060806107a38e8e8e8e8e8e8e61111a565b9250925092506107b38d846116bb565b6107bd82856111e1565b6107c781856111e1565b909550935050505b5097509795505050505050565b6001600160a01b031660009081526005602052604090205490565b60007f00000000000000000000000000000000000000000000000000000000000000008260405160200161082c9291906144cb565b604051602081830303815290604052805190602001209050919050565b6000606061085a86516106706110f6565b61068a8989898989898961174e6117cb611247565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c05780601f10610495576101008083540402835291602001916104c0565b60085490565b60008061092e856020015161182c565b9050600061093f866040015161182c565b905060008651600181111561095057fe5b14156109b6576109638660600151611b41565b60608701526109728583611b65565b945061097e8482611b65565b935061098e866060015183611b65565b606087015260006109a0878787611b71565b90506109ac8183611bac565b93505050506105a1565b6109c08583611b65565b94506109cc8482611b65565b93506109dc866060015182611b65565b606087015260006109ee878787611bb8565b90506109fa8184611beb565b90506109ac81611bf7565b60006104d8338484610f75565b60006105b7611c0e565b60006060610a28610893565b6001600160a01b031663f94d4668610a3e610635565b6040518263ffffffff1660e01b8152600401610a5a919061457d565b60006040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aae9190810190614028565b50915050610ac381610abe6113de565b61165a565b6060610acd611c88565b9050610ad98183611ee4565b9250505090565b610aee8442111560d1610f67565b6001600160a01b0387166000908152600560209081526040808320549051909291610b45917f0000000000000000000000000000000000000000000000000000000000000000918c918c918c9188918d91016145a5565b6040516020818303038152906040528051906020012090506000610b6882611f56565b9050600060018288888860405160008152602001604052604051610b8f9493929190614605565b6020604051602081039080840390855afa158015610bb1573d6000803e3d6000fd5b5050604051601f1901519150610bf390506001600160a01b03821615801590610beb57508b6001600160a01b0316826001600160a01b0316145b6101f8610f67565b6001600160a01b038b166000908152600560205260409020600185019055610c1c8b8b8b610df9565b5050505050505050505050565b60608088610c38610749610893565b610c4361076f610635565b6060610c4d6113de565b9050610c576104f6565b610cfc5760006060610c6b8d8d8d8a611f72565b91509150610c80620f424083101560cc610f67565b610c8e6000620f424061200d565b610c9d8b620f4240840361200d565b610ca781846117cb565b80610cb06110f6565b6001600160401b0381118015610cc557600080fd5b50604051908082528060200260200182016040528015610cef578160200160208202803683370190505b50955095505050506107cf565b610d06888261165a565b6000606080610d1a8e8e8e8e8e8e8e61174e565b925092509250610d2a8c8461200d565b610d3482856117cb565b610d3e81856111e1565b90955093506107cf915050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104d89185906106e19086610dd1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606105b7611c88565b80610dc0816120a3565b5050565b610dc08183146067610f67565b60008282016105a18482101583610f67565b6000610df3838311156001610f67565b50900390565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610e5490859061457d565b60405180910390a3505050565b6000610e786000356001600160e01b0319166107f7565b90506104f3610e87823361211c565b610191610f67565b8015610eaf57610eaa610ea0610f1f565b4210610193610f67565b610ec4565b610ec4610eba610f43565b42106101a9610f67565b6006805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be649061062a90839061455a565b6000610f0c610f43565b4211806105b757505060065460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b81610dc057610dc08161220c565b6001600160a01b038316600090815260208190526040902054610f9d82821015610196610f67565b610fb46001600160a01b0384161515610199610f67565b6001600160a01b03808516600090815260208190526040808220858503905591851681522054610fe49083610dd1565b6001600160a01b0380851660008181526020819052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061103690869061457d565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006110b161225f565b306040516020016110c69594939291906145d9565b60405160208183030381529060405280519060200120905090565b6110f46110ec610f02565b610192610f67565b565b7f000000000000000000000000000000000000000000000000000000000000000090565b60006060806060611129611c88565b9050611133610f02565b1561116a576000611144828a611ee4565b90506111558983600854848b612263565b92506111648984610de3612372565b506111b5565b6111726110f6565b6001600160401b038111801561118757600080fd5b506040519080825280602002602001820160405280156111b1578160200160208202803683370190505b5091505b6111c08882876123dd565b90945092506111d088848361244a565b600855509750975097945050505050565b60005b6111ec6110f6565b8110156112425761122383828151811061120257fe5b602002602001015183838151811061121657fe5b6020026020010151612463565b83828151811061122f57fe5b60209081029190910101526001016111e4565b505050565b333014611305576000306001600160a01b031660003660405161126b9291906144e3565b6000604051808303816000865af19150503d80600081146112a8576040519150601f19603f3d011682016040523d82523d6000602084013e6112ad565b606091505b5050905080600081146112bc57fe5b60046000803e6000516001600160e01b0319166343adbafb60e01b81146112e7573d6000803e3d6000fd5b506020600460003e604060205260243d03602460403e601c3d016000f35b606061130f6113de565b905061131b878261165a565b600060606113328c8c8c8c8c8c8c8c63ffffffff16565b509150915061134581848663ffffffff16565b8051601f1982018390526343adbafb603f1983015260200260231982016044820181fd5b60008282026105a184158061138657508385838161138357fe5b04145b6003610f67565b600061139c8215156004610f67565b826113a9575060006104dc565b670de0b6b3a7640000838102906113cc908583816113c357fe5b04146005610f67565b8281816113d557fe5b049150506104dc565b606060006113ea6110f6565b90506060816001600160401b038111801561140457600080fd5b5060405190808252806020026020018201604052801561142e578160200160208202803683370190505b5090508115611476577f00000000000000000000000000000000000000000000000000000000000000008160008151811061146557fe5b60200260200101818152505061147f565b91506104c89050565b6001821115611476577f0000000000000000000000000000000000000000000000000000000000000000816001815181106114b657fe5b6020026020010181815250506002821115611476577f0000000000000000000000000000000000000000000000000000000000000000816002815181106114f957fe5b6020026020010181815250506003821115611476577f00000000000000000000000000000000000000000000000000000000000000008160038151811061153c57fe5b6020026020010181815250506004821115611476577f00000000000000000000000000000000000000000000000000000000000000008160048151811061157f57fe5b6020026020010181815250506005821115611476577f0000000000000000000000000000000000000000000000000000000000000000816005815181106115c257fe5b6020026020010181815250506006821115611476577f00000000000000000000000000000000000000000000000000000000000000008160068151811061160557fe5b6020026020010181815250506007821115611476577f00000000000000000000000000000000000000000000000000000000000000008160078151811061164857fe5b60200260200101818152505091505090565b60005b6116656110f6565b8110156112425761169c83828151811061167b57fe5b602002602001015183838151811061168f57fe5b6020026020010151611369565b8382815181106116a857fe5b602090810291909101015260010161165d565b6001600160a01b0382166000908152602081905260409020546116e382821015610196610f67565b6001600160a01b0383166000908152602081905260409020828203905560025461170d9083610de3565b6002556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610e5490869061457d565b600060608061175b6110e1565b6060611765611c88565b90506000611773828a611ee4565b905060606117868a84600854858c612263565b90506117958a82610de3612372565b600060606117a48c868b612483565b915091506117b38c82876124dd565b600855909e909d50909b509950505050505050505050565b60005b6117d66110f6565b8110156112425761180d8382815181106117ec57fe5b602002602001015183838151811061180057fe5b60200260200101516124ec565b83828151811061181957fe5b60209081029190910101526001016117ce565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561188f57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156118f057507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561195157507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156119b257507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611a1357507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611a7457507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611ad557507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611b3657507f0000000000000000000000000000000000000000000000000000000000000000610735565b61073561013561220c565b600080611b596007548461251f90919063ffffffff16565b90506105a18382610de3565b60006105a18383611369565b6000611b7b6110e1565b611ba483611b8c8660200151612563565b84611b9a8860400151612563565b886060015161286d565b949350505050565b60006105a18383612463565b6000611bc26110e1565b611ba483611bd38660200151612563565b84611be18860400151612563565b88606001516128e8565b60006105a183836124ec565b60006104dc611c0760075461295e565b8390612984565b6000611c18610893565b6001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b7919061424f565b60606000611c946110f6565b90506060816001600160401b0381118015611cae57600080fd5b50604051908082528060200260200182016040528015611cd8578160200160208202803683370190505b5090508115611476577f000000000000000000000000000000000000000000000000000000000000000081600081518110611d0f57fe5b6020026020010181815250506001821115611476577f000000000000000000000000000000000000000000000000000000000000000081600181518110611d5257fe5b6020026020010181815250506002821115611476577f000000000000000000000000000000000000000000000000000000000000000081600281518110611d9557fe5b6020026020010181815250506003821115611476577f000000000000000000000000000000000000000000000000000000000000000081600381518110611dd857fe5b6020026020010181815250506004821115611476577f000000000000000000000000000000000000000000000000000000000000000081600481518110611e1b57fe5b6020026020010181815250506005821115611476577f000000000000000000000000000000000000000000000000000000000000000081600581518110611e5e57fe5b6020026020010181815250506006821115611476577f000000000000000000000000000000000000000000000000000000000000000081600681518110611ea157fe5b6020026020010181815250506007821115611476577f00000000000000000000000000000000000000000000000000000000000000008160078151811061164857fe5b670de0b6b3a764000060005b8351811015611f4657611f3c611f35858381518110611f0b57fe5b6020026020010151858481518110611f1f57fe5b60200260200101516129c690919063ffffffff16565b8390612a15565b9150600101611ef0565b506104dc60008211610137610f67565b6000611f60611044565b8260405160200161082c9291906144f3565b60006060611f7e6110e1565b6000611f8984612a41565b9050611fa46000826002811115611f9c57fe5b1460ce610f67565b6060611faf85612a57565b9050611fc3611fbc6110f6565b8251610dc4565b611fcf81610abe6113de565b6060611fd9611c88565b90506000611fe78284611ee4565b90506000611ff7826107106110f6565b6008929092555099919850909650505050505050565b6001600160a01b0382166000908152602081905260409020546120309082610dd1565b6001600160a01b0383166000908152602081905260409020556002546120569082610dd1565b6002556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061209790859061457d565b60405180910390a35050565b6002815110156120b2576104f3565b6000816000815181106120c157fe5b602002602001015190506000600190505b82518110156112425760008382815181106120e957fe5b60200260200101519050612112816001600160a01b0316846001600160a01b0316106065610f67565b91506001016120d2565b600073ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b61213b61086f565b6001600160a01b031614158015612156575061215683612a6d565b1561217e5761216361086f565b6001600160a01b0316336001600160a01b03161490506104dc565b612186611c0e565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b81526004016121b593929190614586565b60206040518083038186803b1580156121cd57600080fd5b505afa1580156121e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612205919061410f565b90506104dc565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b4690565b60608061226e6110f6565b6001600160401b038111801561228357600080fd5b506040519080825280602002602001820160405280156122ad578160200160208202803683370190505b509050826122bc579050612369565b61232f877f0000000000000000000000000000000000000000000000000000000000000000815181106122eb57fe5b6020026020010151877f00000000000000000000000000000000000000000000000000000000000000008151811061231f57fe5b6020026020010151878787612a87565b817f00000000000000000000000000000000000000000000000000000000000000008151811061235b57fe5b602090810291909101015290505b95945050505050565b60005b61237d6110f6565b8110156123d7576123b884828151811061239357fe5b60200260200101518483815181106123a757fe5b60200260200101518463ffffffff16565b8482815181106123c457fe5b6020908102919091010152600101612375565b50505050565b6000606060006123ec84612a41565b905060008160028111156123fc57fe5b14156124175761240d868686612aff565b9250925050612442565b600181600281111561242557fe5b14156124355761240d8685612bdc565b61240d868686612c0e565b505b935093915050565b60006124598484610de3612372565b611ba48285611ee4565b60006124728215156004610f67565b81838161247b57fe5b049392505050565b60006060600061249284612a41565b905060018160028111156124a257fe5b14156124b35761240d868686612c79565b60028160028111156124c157fe5b14156124d25761240d868686612cd3565b61244061013661220c565b60006124598484610dd1612372565b60006124fb8215156004610f67565b82612508575060006104dc565b81600184038161251457fe5b0460010190506104dc565b600082820261253984158061138657508385838161138357fe5b806125485760009150506104dc565b670de0b6b3a764000060001982015b046001019150506104dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156125c657507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561262757507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561268857507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156126e957507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561274a57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156127ab57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561280c57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611b3657507f0000000000000000000000000000000000000000000000000000000000000000610735565b600061288f61288487670429d069189e0000612a15565b831115610130610f67565b600061289b8784610dd1565b905060006128a98883612984565b905060006128b7888761138d565b905060006128c58383612d7a565b90506128da6128d38261295e565b8990612a15565b9a9950505050505050505050565b600061290a6128ff85670429d069189e0000612a15565b831115610131610f67565b60006129206129198685610de3565b8690612984565b9050600061292e8588612984565b9050600061293c8383612d7a565b9050600061295282670de0b6b3a7640000610de3565b90506128da8a8261251f565b6000670de0b6b3a764000082106129765760006104dc565b50670de0b6b3a76400000390565b60006129938215156004610f67565b826129a0575060006104dc565b670de0b6b3a7640000838102906129ba908583816113c357fe5b82600182038161255757fe5b6000806129d38484612da6565b905060006129ed6129e68361271061251f565b6001610dd1565b905080821015612a02576000925050506104dc565b612a0c8282610de3565b925050506104dc565b6000828202612a2f84158061138657508385838161138357fe5b670de0b6b3a764000090049392505050565b6000818060200190518101906104dc919061426b565b6060818060200190518101906105a19190614330565b6000612a7f631c74c91760e11b6107f7565b909114919050565b6000838311612a9857506000612369565b6000612aa48585612984565b90506000612aba670de0b6b3a76400008861138d565b9050612ace826709b6e64a8ec60000612eb1565b91506000612adc8383612d7a565b90506000612af3612aec8361295e565b8b90612a15565b90506128da8187612a15565b60006060612b0b6110e1565b600080612b1785612ec8565b91509150612b2f612b266110f6565b82106064610f67565b6060612b396110f6565b6001600160401b0381118015612b4e57600080fd5b50604051908082528060200260200182016040528015612b78578160200160208202803683370190505b509050612bb7888381518110612b8a57fe5b6020026020010151888481518110612b9e57fe5b602002602001015185612baf6104f6565b600754612eea565b818381518110612bc357fe5b6020908102919091010152919791965090945050505050565b600060606000612beb84612fa7565b90506060612c018683612bfc6104f6565b612fbd565b9196919550909350505050565b60006060612c1a6110e1565b60606000612c278561306e565b91509150612c3882516106706110f6565b612c4482610abe6113de565b6000612c5c888885612c546104f6565b600754613086565b9050612c6c8282111560cf610f67565b9791965090945050505050565b60006060806000612c898561306e565b91509150612c9f612c986110f6565b8351610dc4565b612cab82610abe6113de565b6000612cc3888885612cbb6104f6565b6007546132aa565b9050612c6c8282101560d0610f67565b60006060600080612ce385612ec8565b91509150612cf2612b266110f6565b6060612cfc6110f6565b6001600160401b0381118015612d1157600080fd5b50604051908082528060200260200182016040528015612d3b578160200160208202803683370190505b509050612bb7888381518110612d4d57fe5b6020026020010151888481518110612d6157fe5b602002602001015185612d726104f6565b6007546134ba565b600080612d878484612da6565b90506000612d9a6129e68361271061251f565b90506123698282610dd1565b600081612dbc5750670de0b6b3a76400006104dc565b82612dc9575060006104dc565b612dda600160ff1b84106006610f67565b82612e00770bce5086492111aea88f4bb1ca6bcf584181ea8059f7653284106007610f67565b826000670c7d713b49da000083138015612e215750670f43fc2c04ee000083125b15612e58576000612e318461355c565b9050670de0b6b3a764000080820784020583670de0b6b3a764000083050201915050612e66565b81612e628461367a565b0290505b670de0b6b3a76400009005612e9e680238fd42c5cf03ffff198212801590612e97575068070c1cc73b00c800008213155b6008610f67565b612ea781613a27565b9695505050505050565b600081831015612ec157816105a1565b5090919050565b60008082806020019051810190612edf91906142fa565b909590945092505050565b600080612f0184612efb8188610de3565b90612984565b9050612f1a6709b6e64a8ec60000821015610132610f67565b6000612f38612f31670de0b6b3a76400008961138d565b8390612d7a565b90506000612f4f612f488361295e565b8a90612a15565b90506000612f5c8961295e565b90506000612f6a838361251f565b90506000612f788483610de3565b9050612f97612f90612f898a61295e565b8490612a15565b8290610dd1565b9c9b505050505050505050505050565b6000818060200190518101906105a191906142cd565b60606000612fcb848461138d565b9050606085516001600160401b0381118015612fe657600080fd5b50604051908082528060200260200182016040528015613010578160200160208202803683370190505b50905060005b8651811015613064576130458388838151811061302f57fe5b6020026020010151612a1590919063ffffffff16565b82828151811061305157fe5b6020908102919091010152600101613016565b5095945050505050565b6060600082806020019051810190612edf9190614287565b6000606084516001600160401b03811180156130a157600080fd5b506040519080825280602002602001820160405280156130cb578160200160208202803683370190505b5090506000805b88518110156131905761312b8982815181106130ea57fe5b6020026020010151612efb89848151811061310157fe5b60200260200101518c858151811061311557fe5b6020026020010151610de390919063ffffffff16565b83828151811061313757fe5b60200260200101818152505061318661317f89838151811061315557fe5b602002602001015185848151811061316957fe5b602002602001015161251f90919063ffffffff16565b8390610dd1565b91506001016130d2565b50670de0b6b3a764000060005b89518110156132895760008482815181106131b457fe5b602002602001015184111561320b5760006131dd6131d18661295e565b8d858151811061302f57fe5b905060006131f1828c868151811061311557fe5b905061320261317f611c078b61295e565b92505050613222565b88828151811061321757fe5b602002602001015190505b600061324b8c848151811061323357fe5b6020026020010151610715848f878151811061311557fe5b905061327d6132768c858151811061325f57fe5b6020026020010151836129c690919063ffffffff16565b8590612a15565b9350505060010161319d565b5061329d6132968261295e565b879061251f565b9998505050505050505050565b6000606084516001600160401b03811180156132c557600080fd5b506040519080825280602002602001820160405280156132ef578160200160208202803683370190505b5090506000805b88518110156133975761334f89828151811061330e57fe5b602002602001015161071589848151811061332557fe5b60200260200101518c858151811061333957fe5b6020026020010151610dd190919063ffffffff16565b83828151811061335b57fe5b60200260200101818152505061338d61317f89838151811061337957fe5b602002602001015185848151811061302f57fe5b91506001016132f6565b50670de0b6b3a764000060005b8951811015613478576000838583815181106133bc57fe5b602002602001015111156134185760006133e16131d186670de0b6b3a7640000610de3565b905060006133f5828c868151811061311557fe5b905061340f61317f611f35670de0b6b3a76400008c610de3565b9250505061342f565b88828151811061342457fe5b602002602001015190505b60006134588c848151811061344057fe5b6020026020010151610715848f878151811061333957fe5b905061346c6132768c858151811061325f57fe5b935050506001016133a4565b50670de0b6b3a764000081106134ae576134a461349d82670de0b6b3a7640000610de3565b8790612a15565b9350505050612369565b60009350505050612369565b6000806134cb84612efb8188610dd1565b90506134e46729a2241af62c0000821115610133610f67565b60006134fb612f31670de0b6b3a764000089612984565b9050600061351b61351483670de0b6b3a7640000610de3565b8a9061251f565b905060006135288961295e565b90506000613536838361251f565b905060006135448483610de3565b9050612f97612f906135558a61295e565b8490612984565b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff198501028161359757fe5b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f826002919005919091010295945050505050565b600061368a600083136064610f67565b670de0b6b3a76400008212156136c4576136ba826a0c097ce7bc90715b34b9f160241b816136b457fe5b0561367a565b6000039050610735565b60007e1600ef3172e58d2e933ec884fde10064c63b5372d805e203c0000000000000831261371557770195e54c5dd42177f53a27172fa9ec630262827000000000830592506806f05b59d3b2000000015b73011798004d755d3c8bc8e03204cf44619e000000831261374d576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312613795576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a70083126137d0576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf850831261380757693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e2831261383e57690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d0383126138735768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261389e57680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d83126138d3576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f17757889379378312613908576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b286603831261393c576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac8312613970576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d63100000808603028161399357fe5b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6000613a56680238fd42c5cf03ffff198312158015613a4f575068070c1cc73b00c800008313155b6009610f67565b6000821215613a8957613a6b82600003613a27565b6a0c097ce7bc90715b34b9f160241b81613a8157fe5b059050610735565b60006806f05b59d3b20000008312613ac957506806f05b59d3b1ffffff1990910190770195e54c5dd42177f53a27172fa9ec630262827000000000613aff565b6803782dace9d90000008312613afb57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380613aff565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412613b4f5768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412613b8b576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412613bc557682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412613bff576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412613c3857680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412613c715768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412613caa576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412613ce35768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b80356104dc816146e2565b600082601f830112613e1f578081fd5b8151613e32613e2d826146c3565b61469d565b818152915060208083019084810181840286018201871015613e5357600080fd5b60005b84811015613e7257815184529282019290820190600101613e56565b505050505092915050565b600082601f830112613e8d578081fd5b81356001600160401b03811115613ea2578182fd5b613eb5601f8201601f191660200161469d565b9150808252836020828501011115613ecc57600080fd5b8060208401602084013760009082016020015292915050565b8035600281106104dc57600080fd5b600060208284031215613f05578081fd5b81356105a1816146e2565b60008060408385031215613f22578081fd5b8235613f2d816146e2565b91506020830135613f3d816146e2565b809150509250929050565b600080600060608486031215613f5c578081fd5b8335613f67816146e2565b92506020840135613f77816146e2565b929592945050506040919091013590565b600080600080600080600060e0888a031215613fa2578283fd5b8735613fad816146e2565b96506020880135613fbd816146e2565b95506040880135945060608801359350608088013560ff81168114613fe0578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561400f578182fd5b823561401a816146e2565b946020939093013593505050565b60008060006060848603121561403c578081fd5b83516001600160401b0380821115614052578283fd5b818601915086601f830112614065578283fd5b8151614073613e2d826146c3565b80828252602080830192508086018b828387028901011115614093578788fd5b8796505b848710156140be5780516140aa816146e2565b845260019690960195928101928101614097565b5089015190975093505050808211156140d5578283fd5b506140e286828701613e0f565b925050604084015190509250925092565b600060208284031215614104578081fd5b81356105a1816146f7565b600060208284031215614120578081fd5b81516105a1816146f7565b600080600080600080600060e0888a031215614145578081fd5b87359650602080890135614158816146e2565b96506040890135614168816146e2565b955060608901356001600160401b0380821115614183578384fd5b818b0191508b601f830112614196578384fd5b81356141a4613e2d826146c3565b8082825285820191508585018f8788860288010111156141c2578788fd5b8795505b838610156141e45780358352600195909501949186019186016141c6565b509850505060808b0135955060a08b0135945060c08b013592508083111561420a578384fd5b50506142188a828b01613e7d565b91505092959891949750929550565b600060208284031215614238578081fd5b81356001600160e01b0319811681146105a1578182fd5b600060208284031215614260578081fd5b81516105a1816146e2565b60006020828403121561427c578081fd5b81516105a181614705565b60008060006060848603121561429b578081fd5b83516142a681614705565b60208501519093506001600160401b038111156142c1578182fd5b6140e286828701613e0f565b600080604083850312156142df578182fd5b82516142ea81614705565b6020939093015192949293505050565b60008060006060848603121561430e578081fd5b835161431981614705565b602085015160409095015190969495509392505050565b60008060408385031215614342578182fd5b825161434d81614705565b60208401519092506001600160401b03811115614368578182fd5b61437485828601613e0f565b9150509250929050565b600080600060608486031215614392578081fd5b83356001600160401b03808211156143a8578283fd5b81860191506101208083890312156143be578384fd5b6143c78161469d565b90506143d38884613ee5565b81526143e28860208501613e04565b60208201526143f48860408501613e04565b6040820152606083013560608201526080830135608082015260a083013560a08201526144248860c08501613e04565b60c08201526144368860e08501613e04565b60e0820152610100808401358381111561444e578586fd5b61445a8a828701613e7d565b9183019190915250976020870135975060409096013595945050505050565b60006020828403121561448a578081fd5b5035919050565b6000815180845260208085019450808401835b838110156144c0578151875295820195908201906001016144a4565b509495945050505050565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6000602082526105a16020830184614491565b6000604082526145486040830185614491565b82810360208401526123698185614491565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b8181101561464f57858101830151858201604001528201614633565b818111156146605783604083870101525b50601f01601f1916929092016040019392505050565b600083825260406020830152611ba46040830184614491565b60ff91909116815260200190565b6040518181016001600160401b03811182821017156146bb57600080fd5b604052919050565b60006001600160401b038211156146d8578081fd5b5060209081020190565b6001600160a01b03811681146104f357600080fd5b80151581146104f357600080fd5b600381106104f357600080fdfea2646970667358221220765dae8954494fc239d6edd2b70a6d1304f3ce003f1a0ad7655693250300088064736f6c63430007010033a26469706673582212207087a0883d288c32f045814d0391a26a36e753a880d3c96a46919e14f50cc40d64736f6c63430007010033",
              "opcodes": "PUSH1 0xC0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x5FCD CODESIZE SUB DUP1 PUSH2 0x5FCD DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x4D JUMP JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0x80 MSTORE PUSH3 0x76A700 TIMESTAMP ADD PUSH1 0xA0 MSTORE PUSH2 0x7B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x74 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH1 0xA0 MLOAD PUSH2 0x5F28 PUSH2 0xA5 PUSH1 0x0 CODECOPY DUP1 PUSH1 0xD6 MSTORE DUP1 PUSH2 0x100 MSTORE POP DUP1 PUSH2 0x15C MSTORE POP PUSH2 0x5F28 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH3 0x52 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2DA47C40 EQ PUSH3 0x57 JUMPI DUP1 PUSH4 0x6634B753 EQ PUSH3 0x7A JUMPI DUP1 PUSH4 0x8D928AF8 EQ PUSH3 0xA0 JUMPI DUP1 PUSH4 0xFBCE0393 EQ PUSH3 0xB9 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH3 0x61 PUSH3 0xD0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP3 SWAP2 SWAP1 PUSH3 0x637 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH3 0x91 PUSH3 0x8B CALLDATASIZE PUSH1 0x4 PUSH3 0x3C0 JUMP JUMPDEST PUSH3 0x13C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP2 SWAP1 PUSH3 0x562 JUMP JUMPDEST PUSH3 0xAA PUSH3 0x15A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP2 SWAP1 PUSH3 0x54E JUMP JUMPDEST PUSH3 0xAA PUSH3 0xCA CALLDATASIZE PUSH1 0x4 PUSH3 0x3E6 JUMP JUMPDEST PUSH3 0x17E JUMP JUMPDEST PUSH1 0x0 DUP1 TIMESTAMP PUSH32 0x0 DUP2 LT ISZERO PUSH3 0x12E JUMPI DUP1 PUSH32 0x0 SUB SWAP3 POP PUSH3 0x278D00 SWAP2 POP PUSH3 0x137 JUMP JUMPDEST PUSH1 0x0 SWAP3 POP PUSH1 0x0 SWAP2 POP JUMPDEST POP SWAP1 SWAP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH3 0x18D PUSH3 0xD0 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH3 0x19D PUSH3 0x15A JUMP JUMPDEST DUP11 DUP11 DUP11 DUP11 DUP11 DUP9 DUP9 DUP13 PUSH1 0x40 MLOAD PUSH3 0x1B3 SWAP1 PUSH3 0x24B JUMP JUMPDEST PUSH3 0x1C7 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0x56D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH3 0x1E4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP1 POP PUSH3 0x1F2 DUP2 PUSH3 0x1FF JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE MLOAD PUSH32 0x83A48FBCFC991335314E74D0496AAB6A1987E992DDC85DDDBCC4D6DD6EF2E9FC SWAP2 SWAP1 LOG2 POP JUMP JUMPDEST PUSH2 0x583F DUP1 PUSH3 0x6B4 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH3 0x266 DUP2 PUSH3 0x69A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x27D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH3 0x294 PUSH3 0x28E DUP3 PUSH3 0x66D JUMP JUMPDEST PUSH3 0x645 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0x2B6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0x2E2 JUMPI DUP2 CALLDATALOAD PUSH3 0x2CF DUP2 PUSH3 0x69A JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0x2B9 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x2FE JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH3 0x30F PUSH3 0x28E DUP3 PUSH3 0x66D JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0x331 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0x2E2 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0x334 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x363 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH3 0x37A JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH3 0x38F PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH3 0x645 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH3 0x3A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0x3D2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH3 0x3DF DUP2 PUSH3 0x69A JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH3 0x3FF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP7 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH3 0x417 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH3 0x425 DUP11 DUP4 DUP12 ADD PUSH3 0x352 JUMP JUMPDEST SWAP8 POP PUSH1 0x20 DUP10 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0x43B JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH3 0x449 DUP11 DUP4 DUP12 ADD PUSH3 0x352 JUMP JUMPDEST SWAP7 POP PUSH1 0x40 DUP10 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0x45F JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH3 0x46D DUP11 DUP4 DUP12 ADD PUSH3 0x26C JUMP JUMPDEST SWAP6 POP PUSH1 0x60 DUP10 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0x483 JUMPI DUP4 DUP5 REVERT JUMPDEST POP PUSH3 0x492 DUP10 DUP3 DUP11 ADD PUSH3 0x2ED JUMP JUMPDEST SWAP4 POP POP PUSH1 0x80 DUP8 ADD CALLDATALOAD SWAP2 POP PUSH3 0x4AB DUP9 PUSH1 0xA0 DUP10 ADD PUSH3 0x259 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH3 0x4F5 JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0x4D7 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x527 JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH3 0x509 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH3 0x539 JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP11 AND DUP2 MSTORE PUSH2 0x120 PUSH1 0x20 DUP1 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 PUSH3 0x596 DUP5 DUP4 ADD DUP14 PUSH3 0x500 JUMP JUMPDEST SWAP2 POP DUP4 DUP3 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH3 0x5AC DUP3 DUP13 PUSH3 0x500 JUMP JUMPDEST DUP5 DUP2 SUB PUSH1 0x60 DUP7 ADD MSTORE DUP11 MLOAD DUP1 DUP3 MSTORE DUP3 DUP13 ADD SWAP4 POP SWAP1 DUP3 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x5EC JUMPI PUSH3 0x5D9 DUP6 MLOAD PUSH3 0x68E JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0x5C4 JUMP JUMPDEST POP POP DUP5 DUP2 SUB PUSH1 0x80 DUP7 ADD MSTORE PUSH3 0x602 DUP2 DUP12 PUSH3 0x4C4 JUMP JUMPDEST SWAP4 POP POP POP POP DUP6 PUSH1 0xA0 DUP4 ADD MSTORE DUP5 PUSH1 0xC0 DUP4 ADD MSTORE DUP4 PUSH1 0xE0 DUP4 ADD MSTORE PUSH3 0x629 PUSH2 0x100 DUP4 ADD DUP5 PUSH3 0x4B7 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0x665 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH3 0x684 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x6B0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID PUSH2 0x500 PUSH1 0x40 MSTORE PUSH32 0x6E71EDAE12B1B97F4D1F60370FEF10105FA2FAAE0126114A169C64845D6126C9 PUSH2 0x120 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x583F CODESIZE SUB DUP1 PUSH3 0x583F DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x5A SWAP2 PUSH3 0xCAA JUMP JUMPDEST DUP9 DUP9 DUP9 DUP9 DUP8 DUP8 DUP8 DUP8 DUP8 DUP6 MLOAD PUSH1 0x2 EQ PUSH3 0x75 JUMPI PUSH1 0x1 PUSH3 0x78 JUMP JUMPDEST PUSH1 0x2 JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 DUP3 MSTORE CALLER PUSH1 0x80 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP8 SWAP1 SHL AND PUSH1 0xA0 MSTORE DUP12 MLOAD SWAP1 DUP13 ADD SWAP1 DUP2 KECCAK256 PUSH1 0xC0 MSTORE SWAP2 MLOAD SWAP1 KECCAK256 PUSH1 0xE0 MSTORE PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH2 0x100 MSTORE DUP10 MLOAD DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP5 SWAP2 DUP5 SWAP2 DUP11 SWAP2 DUP11 SWAP2 PUSH3 0x107 SWAP2 PUSH1 0x3 SWAP2 SWAP1 PUSH3 0xA73 JUMP JUMPDEST POP DUP1 MLOAD PUSH3 0x11D SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0xA73 JUMP JUMPDEST POP PUSH3 0x135 SWAP2 POP POP PUSH3 0x76A700 DUP4 GT ISZERO PUSH2 0x194 PUSH3 0x88C JUMP JUMPDEST PUSH3 0x149 PUSH3 0x278D00 DUP3 GT ISZERO PUSH2 0x195 PUSH3 0x88C JUMP JUMPDEST TIMESTAMP SWAP1 SWAP2 ADD PUSH2 0x140 DUP2 SWAP1 MSTORE ADD PUSH2 0x160 MSTORE DUP5 MLOAD PUSH3 0x16B SWAP1 PUSH1 0x2 GT ISZERO PUSH1 0xC8 PUSH3 0x88C JUMP JUMPDEST PUSH3 0x183 PUSH1 0x8 DUP7 MLOAD GT ISZERO PUSH1 0xC9 PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x199 DUP6 PUSH3 0x8A1 PUSH1 0x20 SHL PUSH3 0xDB6 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x1AE PUSH5 0xE8D4A51000 DUP6 LT ISZERO PUSH1 0xCB PUSH3 0x88C JUMP JUMPDEST PUSH3 0x1C6 PUSH8 0x16345785D8A0000 DUP6 GT ISZERO PUSH1 0xCA PUSH3 0x88C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x9B2760F PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND SWAP1 PUSH4 0x9B2760F SWAP1 PUSH3 0x1F7 SWAP1 DUP13 SWAP1 PUSH1 0x4 ADD PUSH3 0xE63 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x212 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x227 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x24D SWAP2 SWAP1 PUSH3 0xC91 JUMP JUMPDEST SWAP1 POP DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x66A9C7D2 DUP3 DUP9 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH3 0x278 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH3 0x2A3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH3 0x2C4 SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0xDC7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x2DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x2F4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP13 SWAP1 SHL AND PUSH2 0x180 MSTORE POP PUSH2 0x1A0 DUP2 SWAP1 MSTORE PUSH1 0x7 DUP6 SWAP1 SSTORE DUP6 MLOAD PUSH2 0x1C0 MSTORE DUP6 MLOAD PUSH3 0x32B JUMPI PUSH1 0x0 PUSH3 0x342 JUMP JUMPDEST DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x339 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x1E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x365 JUMPI PUSH1 0x0 PUSH3 0x37C JUMP JUMPDEST DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x373 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x200 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x39F JUMPI PUSH1 0x0 PUSH3 0x3B6 JUMP JUMPDEST DUP6 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x3AD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x220 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x3D9 JUMPI PUSH1 0x0 PUSH3 0x3F0 JUMP JUMPDEST DUP6 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x3E7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x240 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x413 JUMPI PUSH1 0x0 PUSH3 0x42A JUMP JUMPDEST DUP6 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x421 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x260 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x44D JUMPI PUSH1 0x0 PUSH3 0x464 JUMP JUMPDEST DUP6 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x45B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x280 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x487 JUMPI PUSH1 0x0 PUSH3 0x49E JUMP JUMPDEST DUP6 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x495 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x4C1 JUMPI PUSH1 0x0 PUSH3 0x4D8 JUMP JUMPDEST DUP6 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x4CF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2C0 MSTORE DUP6 MLOAD PUSH3 0x4F8 JUMPI PUSH1 0x0 PUSH3 0x51E JUMP JUMPDEST PUSH3 0x51E DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH3 0x8AD PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH2 0x2E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x534 JUMPI PUSH1 0x0 PUSH3 0x546 JUMP JUMPDEST PUSH3 0x546 DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x300 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x55C JUMPI PUSH1 0x0 PUSH3 0x56E JUMP JUMPDEST PUSH3 0x56E DUP7 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x320 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x584 JUMPI PUSH1 0x0 PUSH3 0x596 JUMP JUMPDEST PUSH3 0x596 DUP7 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x340 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x5AC JUMPI PUSH1 0x0 PUSH3 0x5BE JUMP JUMPDEST PUSH3 0x5BE DUP7 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x360 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x5D4 JUMPI PUSH1 0x0 PUSH3 0x5E6 JUMP JUMPDEST PUSH3 0x5E6 DUP7 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x380 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x5FC JUMPI PUSH1 0x0 PUSH3 0x60E JUMP JUMPDEST PUSH3 0x60E DUP7 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x3A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x624 JUMPI PUSH1 0x0 PUSH3 0x636 JUMP JUMPDEST PUSH3 0x636 DUP7 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x3C0 DUP2 DUP2 MSTORE POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP PUSH1 0x0 DUP7 MLOAD SWAP1 POP PUSH3 0x66E DUP2 DUP8 MLOAD PUSH3 0x94F PUSH1 0x20 SHL PUSH3 0xDC4 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 JUMPDEST DUP5 DUP2 PUSH1 0xFF AND LT ISZERO PUSH3 0x6F4 JUMPI PUSH1 0x0 DUP11 DUP3 PUSH1 0xFF AND DUP2 MLOAD DUP2 LT PUSH3 0x693 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0x6BB PUSH7 0x2386F26FC10000 DUP3 LT ISZERO PUSH2 0x12E PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x6D5 DUP2 DUP7 PUSH3 0x95E PUSH1 0x20 SHL PUSH3 0xDD1 OR SWAP1 SWAP2 SWAP1 PUSH1 0x20 SHR JUMP JUMPDEST SWAP5 POP DUP3 DUP2 GT ISZERO PUSH3 0x6EA JUMPI DUP2 PUSH1 0xFF AND SWAP4 POP DUP1 SWAP3 POP JUMPDEST POP PUSH1 0x1 ADD PUSH3 0x675 JUMP JUMPDEST POP PUSH3 0x70D PUSH8 0xDE0B6B3A7640000 DUP5 EQ PUSH2 0x134 PUSH3 0x88C JUMP JUMPDEST PUSH2 0x3E0 DUP3 SWAP1 MSTORE DUP9 MLOAD PUSH3 0x722 JUMPI PUSH1 0x0 PUSH3 0x739 JUMP JUMPDEST DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x730 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x400 MSTORE DUP9 MLOAD PUSH1 0x1 LT PUSH3 0x74F JUMPI PUSH1 0x0 PUSH3 0x766 JUMP JUMPDEST DUP9 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x75D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x420 MSTORE DUP9 MLOAD PUSH1 0x2 LT PUSH3 0x77C JUMPI PUSH1 0x0 PUSH3 0x793 JUMP JUMPDEST DUP9 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x78A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x440 MSTORE DUP9 MLOAD PUSH1 0x3 LT PUSH3 0x7A9 JUMPI PUSH1 0x0 PUSH3 0x7C0 JUMP JUMPDEST DUP9 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x7B7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x460 MSTORE DUP9 MLOAD PUSH1 0x4 LT PUSH3 0x7D6 JUMPI PUSH1 0x0 PUSH3 0x7ED JUMP JUMPDEST DUP9 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x7E4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x480 MSTORE DUP9 MLOAD PUSH1 0x5 LT PUSH3 0x803 JUMPI PUSH1 0x0 PUSH3 0x81A JUMP JUMPDEST DUP9 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x811 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4A0 MSTORE DUP9 MLOAD PUSH1 0x6 LT PUSH3 0x830 JUMPI PUSH1 0x0 PUSH3 0x847 JUMP JUMPDEST DUP9 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x83E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4C0 MSTORE DUP9 MLOAD PUSH1 0x7 LT PUSH3 0x85D JUMPI PUSH1 0x0 PUSH3 0x874 JUMP JUMPDEST DUP9 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x86B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4E0 MSTORE POP PUSH3 0xEE1 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP2 PUSH3 0x89D JUMPI PUSH3 0x89D DUP2 PUSH3 0x97B JUMP JUMPDEST POP POP JUMP JUMPDEST DUP1 PUSH3 0x89D DUP2 PUSH3 0x9CE JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x313CE567 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x8EA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH3 0x8FF JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x925 SWAP2 SWAP1 PUSH3 0xDA4 JUMP JUMPDEST PUSH1 0xFF AND SWAP1 POP PUSH1 0x0 PUSH3 0x944 PUSH1 0x12 DUP4 PUSH3 0xA5B PUSH1 0x20 SHL PUSH3 0xDE3 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0xA EXP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH3 0x89D DUP3 DUP3 EQ PUSH1 0x67 PUSH3 0x88C JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH3 0x972 DUP5 DUP3 LT ISZERO DUP4 PUSH3 0x88C JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH3 0x9DF JUMPI PUSH3 0xA58 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x9EF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH3 0xA55 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH3 0xA19 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0xA4A DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH3 0xA00 JUMP JUMPDEST POP POP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0xA6D DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH3 0x88C JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0xAB6 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0xAE6 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0xAE6 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xAE6 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0xAC9 JUMP JUMPDEST POP PUSH3 0xAF4 SWAP3 SWAP2 POP PUSH3 0xAF8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0xAF4 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0xAF9 JUMP JUMPDEST DUP1 MLOAD PUSH3 0x975 DUP2 PUSH3 0xECB JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xB2D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH3 0xB44 PUSH3 0xB3E DUP3 PUSH3 0xE9F JUMP JUMPDEST PUSH3 0xE78 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0xB66 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0xB92 JUMPI DUP2 MLOAD PUSH3 0xB7F DUP2 PUSH3 0xECB JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0xB69 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xBAE JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH3 0xBBF PUSH3 0xB3E DUP3 PUSH3 0xE9F JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0xBE1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0xB92 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0xBE4 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xC13 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0xC29 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH3 0xC3F PUSH1 0x1F DUP4 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH3 0xE78 JUMP JUMPDEST SWAP3 POP DUP2 DUP4 MSTORE DUP5 DUP2 DUP4 DUP7 ADD ADD GT ISZERO PUSH3 0xC56 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH3 0xC76 JUMPI DUP5 DUP2 ADD DUP3 ADD MLOAD DUP5 DUP3 ADD DUP4 ADD MSTORE DUP2 ADD PUSH3 0xC59 JUMP JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xC88 JUMPI PUSH1 0x0 DUP3 DUP5 DUP7 ADD ADD MSTORE JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xCA3 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH3 0xCC9 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH3 0xCD5 DUP12 DUP12 PUSH3 0xB0F JUMP JUMPDEST PUSH1 0x20 DUP12 ADD MLOAD SWAP1 SWAP10 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH3 0xCF2 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD00 DUP14 DUP4 DUP15 ADD PUSH3 0xC02 JUMP JUMPDEST SWAP10 POP PUSH1 0x40 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD16 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD24 DUP14 DUP4 DUP15 ADD PUSH3 0xC02 JUMP JUMPDEST SWAP9 POP PUSH1 0x60 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD3A JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD48 DUP14 DUP4 DUP15 ADD PUSH3 0xB1C JUMP JUMPDEST SWAP8 POP PUSH1 0x80 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD5E JUMPI DUP7 DUP8 REVERT JUMPDEST POP PUSH3 0xD6D DUP13 DUP3 DUP14 ADD PUSH3 0xB9D JUMP JUMPDEST SWAP6 POP POP PUSH1 0xA0 DUP11 ADD MLOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD MLOAD SWAP3 POP PUSH1 0xE0 DUP11 ADD MLOAD SWAP2 POP PUSH3 0xD95 DUP12 PUSH2 0x100 DUP13 ADD PUSH3 0xB0F JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xDB6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH3 0x972 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 ADD DUP6 DUP4 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP6 ADD MSTORE DUP2 DUP7 MLOAD DUP1 DUP5 MSTORE PUSH1 0x80 DUP7 ADD SWAP2 POP DUP3 DUP9 ADD SWAP4 POP DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xE13 JUMPI PUSH3 0xE00 DUP6 MLOAD PUSH3 0xEBF JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xDEB JUMP JUMPDEST POP POP DUP5 DUP2 SUB PUSH1 0x40 DUP7 ADD MSTORE DUP6 MLOAD DUP1 DUP3 MSTORE SWAP1 DUP3 ADD SWAP3 POP DUP2 DUP7 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xE55 JUMPI PUSH3 0xE42 DUP4 MLOAD PUSH3 0xEBF JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xE2D JUMP JUMPDEST POP SWAP3 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP2 ADD PUSH1 0x3 DUP4 LT PUSH3 0xE72 JUMPI INVALID JUMPDEST SWAP2 SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0xE97 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH3 0xEB5 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0xA58 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x180 MLOAD PUSH1 0x60 SHR PUSH2 0x1A0 MLOAD PUSH2 0x1C0 MLOAD PUSH2 0x1E0 MLOAD PUSH1 0x60 SHR PUSH2 0x200 MLOAD PUSH1 0x60 SHR PUSH2 0x220 MLOAD PUSH1 0x60 SHR PUSH2 0x240 MLOAD PUSH1 0x60 SHR PUSH2 0x260 MLOAD PUSH1 0x60 SHR PUSH2 0x280 MLOAD PUSH1 0x60 SHR PUSH2 0x2A0 MLOAD PUSH1 0x60 SHR PUSH2 0x2C0 MLOAD PUSH1 0x60 SHR PUSH2 0x2E0 MLOAD PUSH2 0x300 MLOAD PUSH2 0x320 MLOAD PUSH2 0x340 MLOAD PUSH2 0x360 MLOAD PUSH2 0x380 MLOAD PUSH2 0x3A0 MLOAD PUSH2 0x3C0 MLOAD PUSH2 0x3E0 MLOAD PUSH2 0x400 MLOAD PUSH2 0x420 MLOAD PUSH2 0x440 MLOAD PUSH2 0x460 MLOAD PUSH2 0x480 MLOAD PUSH2 0x4A0 MLOAD PUSH2 0x4C0 MLOAD PUSH2 0x4E0 MLOAD PUSH2 0x4748 PUSH3 0x10F7 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x1EB8 MSTORE DUP1 PUSH2 0x2849 MSTORE POP DUP1 PUSH2 0x1E75 MSTORE DUP1 PUSH2 0x27E8 MSTORE POP DUP1 PUSH2 0x1E32 MSTORE DUP1 PUSH2 0x2787 MSTORE POP DUP1 PUSH2 0x1DEF MSTORE DUP1 PUSH2 0x2726 MSTORE POP DUP1 PUSH2 0x1DAC MSTORE DUP1 PUSH2 0x26C5 MSTORE POP DUP1 PUSH2 0x1D69 MSTORE DUP1 PUSH2 0x2664 MSTORE POP DUP1 PUSH2 0x1D26 MSTORE DUP1 PUSH2 0x2603 MSTORE POP DUP1 PUSH2 0x1CE3 MSTORE DUP1 PUSH2 0x25A2 MSTORE POP DUP1 PUSH2 0x22C2 MSTORE DUP1 PUSH2 0x22F6 MSTORE DUP1 PUSH2 0x2332 MSTORE POP DUP1 PUSH2 0x161C MSTORE DUP1 PUSH2 0x1B12 MSTORE POP DUP1 PUSH2 0x15D9 MSTORE DUP1 PUSH2 0x1AB1 MSTORE POP DUP1 PUSH2 0x1596 MSTORE DUP1 PUSH2 0x1A50 MSTORE POP DUP1 PUSH2 0x1553 MSTORE DUP1 PUSH2 0x19EF MSTORE POP DUP1 PUSH2 0x1510 MSTORE DUP1 PUSH2 0x198E MSTORE POP DUP1 PUSH2 0x14CD MSTORE DUP1 PUSH2 0x192D MSTORE POP DUP1 PUSH2 0x148A MSTORE DUP1 PUSH2 0x18CC MSTORE POP DUP1 PUSH2 0x1439 MSTORE DUP1 PUSH2 0x186B MSTORE POP DUP1 PUSH2 0x1AD7 MSTORE DUP1 PUSH2 0x280E MSTORE POP DUP1 PUSH2 0x1A76 MSTORE DUP1 PUSH2 0x27AD MSTORE POP DUP1 PUSH2 0x1A15 MSTORE DUP1 PUSH2 0x274C MSTORE POP DUP1 PUSH2 0x19B4 MSTORE DUP1 PUSH2 0x26EB MSTORE POP DUP1 PUSH2 0x1953 MSTORE DUP1 PUSH2 0x268A MSTORE POP DUP1 PUSH2 0x18F2 MSTORE DUP1 PUSH2 0x2629 MSTORE POP DUP1 PUSH2 0x1891 MSTORE DUP1 PUSH2 0x25C8 MSTORE POP DUP1 PUSH2 0x1830 MSTORE DUP1 PUSH2 0x2567 MSTORE POP DUP1 PUSH2 0x10F8 MSTORE POP DUP1 PUSH2 0x637 MSTORE POP DUP1 PUSH2 0x895 MSTORE POP DUP1 PUSH2 0xF45 MSTORE POP DUP1 PUSH2 0xF21 MSTORE POP DUP1 PUSH2 0xB15 MSTORE POP DUP1 PUSH2 0x1048 MSTORE POP DUP1 PUSH2 0x108A MSTORE POP DUP1 PUSH2 0x1069 MSTORE POP DUP1 PUSH2 0x871 MSTORE POP DUP1 PUSH2 0x7FB MSTORE POP PUSH2 0x4748 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1F0 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7ECEBE00 GT PUSH2 0x10F JUMPI DUP1 PUSH4 0xA9059CBB GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD5C096C4 GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD5C096C4 EQ PUSH2 0x3E6 JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x3F9 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x40C JUMPI DUP1 PUSH4 0xF89F27ED EQ PUSH2 0x41F JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x3B0 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x3C3 JUMPI DUP1 PUSH4 0xC0FF1A15 EQ PUSH2 0x3CB JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x3D3 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x8D928AF8 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8D928AF8 EQ PUSH2 0x385 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x38D JUMPI DUP1 PUSH4 0x9B02CDDE EQ PUSH2 0x395 JUMPI DUP1 PUSH4 0x9D2C110C EQ PUSH2 0x39D JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x337 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x34A JUMPI DUP1 PUSH4 0x87EC6817 EQ PUSH2 0x35D JUMPI DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x370 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E GT PUSH2 0x187 JUMPI DUP1 PUSH4 0x66188463 GT PUSH2 0x156 JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x2E8 JUMPI DUP1 PUSH4 0x679AEFCE EQ PUSH2 0x2FB JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x303 JUMPI DUP1 PUSH4 0x74F3B009 EQ PUSH2 0x316 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E EQ PUSH2 0x2A4 JUMPI DUP1 PUSH4 0x38FFF2D0 EQ PUSH2 0x2B7 JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0x2BF JUMPI DUP1 PUSH4 0x6028BFD4 EQ PUSH2 0x2C7 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x1C0DE051 GT PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x25D JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x274 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x287 JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x29C JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x1F5 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x213 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x233 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x248 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FD PUSH2 0x434 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x4623 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x226 PUSH2 0x221 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0x4CB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x455A JUMP JUMPDEST PUSH2 0x246 PUSH2 0x241 CALLDATASIZE PUSH1 0x4 PUSH2 0x40F3 JUMP JUMPDEST PUSH2 0x4E2 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x250 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH2 0x265 PUSH2 0x4FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4565 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x282 CALLDATASIZE PUSH1 0x4 PUSH2 0x3F48 JUMP JUMPDEST PUSH2 0x525 JUMP JUMPDEST PUSH2 0x28F PUSH2 0x5A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x468F JUMP JUMPDEST PUSH2 0x250 PUSH2 0x5AD JUMP JUMPDEST PUSH2 0x246 PUSH2 0x2B2 CALLDATASIZE PUSH1 0x4 PUSH2 0x4479 JUMP JUMPDEST PUSH2 0x5BC JUMP JUMPDEST PUSH2 0x250 PUSH2 0x635 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x659 JUMP JUMPDEST PUSH2 0x2DA PUSH2 0x2D5 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x65F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP3 SWAP2 SWAP1 PUSH2 0x4676 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x2F6 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0x696 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x6F0 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x311 CALLDATASIZE PUSH1 0x4 PUSH2 0x3EF4 JUMP JUMPDEST PUSH2 0x71B JUMP JUMPDEST PUSH2 0x329 PUSH2 0x324 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x73A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP3 SWAP2 SWAP1 PUSH2 0x4535 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x345 CALLDATASIZE PUSH1 0x4 PUSH2 0x3EF4 JUMP JUMPDEST PUSH2 0x7DC JUMP JUMPDEST PUSH2 0x250 PUSH2 0x358 CALLDATASIZE PUSH1 0x4 PUSH2 0x4227 JUMP JUMPDEST PUSH2 0x7F7 JUMP JUMPDEST PUSH2 0x2DA PUSH2 0x36B CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x849 JUMP JUMPDEST PUSH2 0x378 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x450E JUMP JUMPDEST PUSH2 0x378 PUSH2 0x893 JUMP JUMPDEST PUSH2 0x1FD PUSH2 0x8B7 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x918 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x3AB CALLDATASIZE PUSH1 0x4 PUSH2 0x437E JUMP JUMPDEST PUSH2 0x91E JUMP JUMPDEST PUSH2 0x226 PUSH2 0x3BE CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0xA05 JUMP JUMPDEST PUSH2 0x378 PUSH2 0xA12 JUMP JUMPDEST PUSH2 0x250 PUSH2 0xA1C JUMP JUMPDEST PUSH2 0x246 PUSH2 0x3E1 CALLDATASIZE PUSH1 0x4 PUSH2 0x3F88 JUMP JUMPDEST PUSH2 0xAE0 JUMP JUMPDEST PUSH2 0x329 PUSH2 0x3F4 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0xC29 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x407 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0xD4B JUMP JUMPDEST PUSH2 0x250 PUSH2 0x41A CALLDATASIZE PUSH1 0x4 PUSH2 0x3F10 JUMP JUMPDEST PUSH2 0xD81 JUMP JUMPDEST PUSH2 0x427 PUSH2 0xDAC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x4522 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x495 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4C0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4A3 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4D8 CALLER DUP5 DUP5 PUSH2 0xDF9 JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x4EA PUSH2 0xE61 JUMP JUMPDEST PUSH2 0x4F3 DUP2 PUSH2 0xE8F JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x509 PUSH2 0xF02 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x514 PUSH2 0xF1F JUMP JUMPDEST SWAP2 POP PUSH2 0x51E PUSH2 0xF43 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x563 SWAP2 EQ DUP1 PUSH2 0x55B JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x56E DUP6 DUP6 DUP6 PUSH2 0xF75 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x589 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x59B JUMPI PUSH2 0x59B DUP6 CALLER DUP6 DUP5 SUB PUSH2 0xDF9 JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x1044 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x5C4 PUSH2 0xE61 JUMP JUMPDEST PUSH2 0x5CC PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x5DF PUSH5 0xE8D4A51000 DUP3 LT ISZERO PUSH1 0xCB PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x5F5 PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH1 0xCA PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x7 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9CABC14D438714DBCD9292DF9B3F89C42F98ACD93A675AD72CD6033777E9B8E7 SWAP1 PUSH2 0x62A SWAP1 DUP4 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x675 DUP7 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x68A DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x111A PUSH2 0x11E1 PUSH2 0x1247 JUMP JUMPDEST SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x6D2 JUMPI PUSH2 0x6CD CALLER DUP6 PUSH1 0x0 PUSH2 0xDF9 JUMP JUMPDEST PUSH2 0x6E6 JUMP JUMPDEST PUSH2 0x6E6 CALLER DUP6 PUSH2 0x6E1 DUP5 DUP8 PUSH2 0xDE3 JUMP JUMPDEST PUSH2 0xDF9 JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x6FD PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0x715 PUSH2 0x708 PUSH2 0xA1C JUMP JUMPDEST PUSH2 0x710 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x1369 JUMP JUMPDEST SWAP1 PUSH2 0x138D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0x764 PUSH2 0x749 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH1 0xCD PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x779 PUSH2 0x76F PUSH2 0x635 JUMP JUMPDEST DUP3 EQ PUSH2 0x1F4 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x783 PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0x78F DUP9 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x7A3 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x111A JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x7B3 DUP14 DUP5 PUSH2 0x16BB JUMP JUMPDEST PUSH2 0x7BD DUP3 DUP6 PUSH2 0x11E1 JUMP JUMPDEST PUSH2 0x7C7 DUP2 DUP6 PUSH2 0x11E1 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP POP POP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x82C SWAP3 SWAP2 SWAP1 PUSH2 0x44CB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x85A DUP7 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x68A DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x174E PUSH2 0x17CB PUSH2 0x1247 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x495 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4C0 JUMP JUMPDEST PUSH1 0x8 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x92E DUP6 PUSH1 0x20 ADD MLOAD PUSH2 0x182C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x93F DUP7 PUSH1 0x40 ADD MLOAD PUSH2 0x182C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x950 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x9B6 JUMPI PUSH2 0x963 DUP7 PUSH1 0x60 ADD MLOAD PUSH2 0x1B41 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x972 DUP6 DUP4 PUSH2 0x1B65 JUMP JUMPDEST SWAP5 POP PUSH2 0x97E DUP5 DUP3 PUSH2 0x1B65 JUMP JUMPDEST SWAP4 POP PUSH2 0x98E DUP7 PUSH1 0x60 ADD MLOAD DUP4 PUSH2 0x1B65 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x9A0 DUP8 DUP8 DUP8 PUSH2 0x1B71 JUMP JUMPDEST SWAP1 POP PUSH2 0x9AC DUP2 DUP4 PUSH2 0x1BAC JUMP JUMPDEST SWAP4 POP POP POP POP PUSH2 0x5A1 JUMP JUMPDEST PUSH2 0x9C0 DUP6 DUP4 PUSH2 0x1B65 JUMP JUMPDEST SWAP5 POP PUSH2 0x9CC DUP5 DUP3 PUSH2 0x1B65 JUMP JUMPDEST SWAP4 POP PUSH2 0x9DC DUP7 PUSH1 0x60 ADD MLOAD DUP3 PUSH2 0x1B65 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x9EE DUP8 DUP8 DUP8 PUSH2 0x1BB8 JUMP JUMPDEST SWAP1 POP PUSH2 0x9FA DUP2 DUP5 PUSH2 0x1BEB JUMP JUMPDEST SWAP1 POP PUSH2 0x9AC DUP2 PUSH2 0x1BF7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4D8 CALLER DUP5 DUP5 PUSH2 0xF75 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x1C0E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0xA28 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF94D4668 PUSH2 0xA3E PUSH2 0x635 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xA5A SWAP2 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA72 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xA86 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0xAAE SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x4028 JUMP JUMPDEST POP SWAP2 POP POP PUSH2 0xAC3 DUP2 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH2 0x165A JUMP JUMPDEST PUSH1 0x60 PUSH2 0xACD PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH2 0xAD9 DUP2 DUP4 PUSH2 0x1EE4 JUMP JUMPDEST SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH2 0xAEE DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD SWAP1 MLOAD SWAP1 SWAP3 SWAP2 PUSH2 0xB45 SWAP2 PUSH32 0x0 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP9 SWAP2 DUP14 SWAP2 ADD PUSH2 0x45A5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0xB68 DUP3 PUSH2 0x1F56 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xB8F SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4605 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBB1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0xBF3 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xBEB JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0xC1C DUP12 DUP12 DUP12 PUSH2 0xDF9 JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0xC38 PUSH2 0x749 PUSH2 0x893 JUMP JUMPDEST PUSH2 0xC43 PUSH2 0x76F PUSH2 0x635 JUMP JUMPDEST PUSH1 0x60 PUSH2 0xC4D PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0xC57 PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0xCFC JUMPI PUSH1 0x0 PUSH1 0x60 PUSH2 0xC6B DUP14 DUP14 DUP14 DUP11 PUSH2 0x1F72 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xC80 PUSH3 0xF4240 DUP4 LT ISZERO PUSH1 0xCC PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xC8E PUSH1 0x0 PUSH3 0xF4240 PUSH2 0x200D JUMP JUMPDEST PUSH2 0xC9D DUP12 PUSH3 0xF4240 DUP5 SUB PUSH2 0x200D JUMP JUMPDEST PUSH2 0xCA7 DUP2 DUP5 PUSH2 0x17CB JUMP JUMPDEST DUP1 PUSH2 0xCB0 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xCC5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xCEF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0x7CF JUMP JUMPDEST PUSH2 0xD06 DUP9 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0xD1A DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x174E JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xD2A DUP13 DUP5 PUSH2 0x200D JUMP JUMPDEST PUSH2 0xD34 DUP3 DUP6 PUSH2 0x17CB JUMP JUMPDEST PUSH2 0xD3E DUP2 DUP6 PUSH2 0x11E1 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP PUSH2 0x7CF SWAP2 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x4D8 SWAP2 DUP6 SWAP1 PUSH2 0x6E1 SWAP1 DUP7 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x5B7 PUSH2 0x1C88 JUMP JUMPDEST DUP1 PUSH2 0xDC0 DUP2 PUSH2 0x20A3 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xDC0 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x5A1 DUP5 DUP3 LT ISZERO DUP4 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xDF3 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0xF67 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP5 SWAP1 SSTORE MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0xE54 SWAP1 DUP6 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE78 PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x7F7 JUMP JUMPDEST SWAP1 POP PUSH2 0x4F3 PUSH2 0xE87 DUP3 CALLER PUSH2 0x211C JUMP JUMPDEST PUSH2 0x191 PUSH2 0xF67 JUMP JUMPDEST DUP1 ISZERO PUSH2 0xEAF JUMPI PUSH2 0xEAA PUSH2 0xEA0 PUSH2 0xF1F JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xEC4 JUMP JUMPDEST PUSH2 0xEC4 PUSH2 0xEBA PUSH2 0xF43 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x62A SWAP1 DUP4 SWAP1 PUSH2 0x455A JUMP JUMPDEST PUSH1 0x0 PUSH2 0xF0C PUSH2 0xF43 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x5B7 JUMPI POP POP PUSH1 0x6 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST DUP2 PUSH2 0xDC0 JUMPI PUSH2 0xDC0 DUP2 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0xF9D DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xFB4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xFE4 SWAP1 DUP4 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP7 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1036 SWAP1 DUP7 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x10B1 PUSH2 0x225F JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10C6 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x45D9 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x10F4 PUSH2 0x10EC PUSH2 0xF02 JUMP JUMPDEST PUSH2 0x192 PUSH2 0xF67 JUMP JUMPDEST JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x60 PUSH2 0x1129 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH2 0x1133 PUSH2 0xF02 JUMP JUMPDEST ISZERO PUSH2 0x116A JUMPI PUSH1 0x0 PUSH2 0x1144 DUP3 DUP11 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH2 0x1155 DUP10 DUP4 PUSH1 0x8 SLOAD DUP5 DUP12 PUSH2 0x2263 JUMP JUMPDEST SWAP3 POP PUSH2 0x1164 DUP10 DUP5 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST POP PUSH2 0x11B5 JUMP JUMPDEST PUSH2 0x1172 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1187 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x11B1 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP JUMPDEST PUSH2 0x11C0 DUP9 DUP3 DUP8 PUSH2 0x23DD JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP PUSH2 0x11D0 DUP9 DUP5 DUP4 PUSH2 0x244A JUMP JUMPDEST PUSH1 0x8 SSTORE POP SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x11EC PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x1223 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1202 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1216 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2463 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x122F JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x11E4 JUMP JUMPDEST POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x1305 JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x126B SWAP3 SWAP2 SWAP1 PUSH2 0x44E3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x12A8 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x12AD JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x12BC JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x43ADBAFB PUSH1 0xE0 SHL DUP2 EQ PUSH2 0x12E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x4 PUSH1 0x0 RETURNDATACOPY PUSH1 0x40 PUSH1 0x20 MSTORE PUSH1 0x24 RETURNDATASIZE SUB PUSH1 0x24 PUSH1 0x40 RETURNDATACOPY PUSH1 0x1C RETURNDATASIZE ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x130F PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0x131B DUP8 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1332 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x1345 DUP2 DUP5 DUP7 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP1 MLOAD PUSH1 0x1F NOT DUP3 ADD DUP4 SWAP1 MSTORE PUSH4 0x43ADBAFB PUSH1 0x3F NOT DUP4 ADD MSTORE PUSH1 0x20 MUL PUSH1 0x23 NOT DUP3 ADD PUSH1 0x44 DUP3 ADD DUP2 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x5A1 DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139C DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x13A9 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x13CC SWAP1 DUP6 DUP4 DUP2 PUSH2 0x13C3 JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0xF67 JUMP JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x13D5 JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x13EA PUSH2 0x10F6 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1404 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x142E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1465 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x147F JUMP JUMPDEST SWAP2 POP PUSH2 0x4C8 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x14B6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x14F9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x153C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0x157F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0x15C2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0x1605 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0x1648 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x1665 PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x169C DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x167B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x168F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1369 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x16A8 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x165D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x16E3 DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP3 DUP3 SUB SWAP1 SSTORE PUSH1 0x2 SLOAD PUSH2 0x170D SWAP1 DUP4 PUSH2 0xDE3 JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0xE54 SWAP1 DUP7 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x175B PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1765 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1773 DUP3 DUP11 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x1786 DUP11 DUP5 PUSH1 0x8 SLOAD DUP6 DUP13 PUSH2 0x2263 JUMP JUMPDEST SWAP1 POP PUSH2 0x1795 DUP11 DUP3 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x17A4 DUP13 DUP7 DUP12 PUSH2 0x2483 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x17B3 DUP13 DUP3 DUP8 PUSH2 0x24DD JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP1 SWAP15 SWAP1 SWAP14 POP SWAP1 SWAP12 POP SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x17D6 PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x180D DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x17EC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1800 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x24EC JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1819 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x17CE JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x188F JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x18F0 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1951 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x19B2 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1A13 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1A74 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1AD5 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B36 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH2 0x735 PUSH2 0x135 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1B59 PUSH1 0x7 SLOAD DUP5 PUSH2 0x251F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x5A1 DUP4 DUP3 PUSH2 0xDE3 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x1369 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B7B PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x1BA4 DUP4 PUSH2 0x1B8C DUP7 PUSH1 0x20 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP5 PUSH2 0x1B9A DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x286D JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x2463 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BC2 PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x1BA4 DUP4 PUSH2 0x1BD3 DUP7 PUSH1 0x20 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP5 PUSH2 0x1BE1 DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x28E8 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x24EC JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4DC PUSH2 0x1C07 PUSH1 0x7 SLOAD PUSH2 0x295E JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2984 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C18 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1C50 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1C64 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x5B7 SWAP2 SWAP1 PUSH2 0x424F JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x1C94 PUSH2 0x10F6 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1CAE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1CD8 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1D0F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x1 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x1D52 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x1D95 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x1DD8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0x1E1B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0x1E5E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0x1EA1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0x1648 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x1F46 JUMPI PUSH2 0x1F3C PUSH2 0x1F35 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F0B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x1F1F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x29C6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x1EF0 JUMP JUMPDEST POP PUSH2 0x4DC PUSH1 0x0 DUP3 GT PUSH2 0x137 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1F60 PUSH2 0x1044 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x82C SWAP3 SWAP2 SWAP1 PUSH2 0x44F3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1F7E PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1F89 DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FA4 PUSH1 0x0 DUP3 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1F9C JUMPI INVALID JUMPDEST EQ PUSH1 0xCE PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1FAF DUP6 PUSH2 0x2A57 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FC3 PUSH2 0x1FBC PUSH2 0x10F6 JUMP JUMPDEST DUP3 MLOAD PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x1FCF DUP2 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1FD9 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1FE7 DUP3 DUP5 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1FF7 DUP3 PUSH2 0x710 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x8 SWAP3 SWAP1 SWAP3 SSTORE POP SWAP10 SWAP2 SWAP9 POP SWAP1 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x2030 SWAP1 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x2 SLOAD PUSH2 0x2056 SWAP1 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x2097 SWAP1 DUP6 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH2 0x20B2 JUMPI PUSH2 0x4F3 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x20C1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x20E9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x2112 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH2 0xF67 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x20D2 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xBA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1B PUSH2 0x213B PUSH2 0x86F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x2156 JUMPI POP PUSH2 0x2156 DUP4 PUSH2 0x2A6D JUMP JUMPDEST ISZERO PUSH2 0x217E JUMPI PUSH2 0x2163 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2186 PUSH2 0x1C0E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x21B5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4586 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x21CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x21E1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2205 SWAP2 SWAP1 PUSH2 0x410F JUMP JUMPDEST SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x226E PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x22AD JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP3 PUSH2 0x22BC JUMPI SWAP1 POP PUSH2 0x2369 JUMP JUMPDEST PUSH2 0x232F DUP8 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x22EB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x231F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 DUP8 DUP8 PUSH2 0x2A87 JUMP JUMPDEST DUP2 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x235B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP1 POP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x237D PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x23D7 JUMPI PUSH2 0x23B8 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2393 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x23A7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x23C4 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x2375 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x23EC DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x23FC JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2417 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2AFF JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x2442 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2425 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2435 JUMPI PUSH2 0x240D DUP7 DUP6 PUSH2 0x2BDC JUMP JUMPDEST PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2C0E JUMP JUMPDEST POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2459 DUP5 DUP5 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST PUSH2 0x1BA4 DUP3 DUP6 PUSH2 0x1EE4 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2472 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x247B JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x2492 DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x24A2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x24B3 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2C79 JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x24C1 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x24D2 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2CD3 JUMP JUMPDEST PUSH2 0x2440 PUSH2 0x136 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2459 DUP5 DUP5 PUSH2 0xDD1 PUSH2 0x2372 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x24FB DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x2508 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x2514 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2539 DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST DUP1 PUSH2 0x2548 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x25C6 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x2627 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x2688 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x26E9 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x274A JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x27AB JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x280C JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B36 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x288F PUSH2 0x2884 DUP8 PUSH8 0x429D069189E0000 PUSH2 0x2A15 JUMP JUMPDEST DUP4 GT ISZERO PUSH2 0x130 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x289B DUP8 DUP5 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28A9 DUP9 DUP4 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28B7 DUP9 DUP8 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28C5 DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA PUSH2 0x28D3 DUP3 PUSH2 0x295E JUMP JUMPDEST DUP10 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290A PUSH2 0x28FF DUP6 PUSH8 0x429D069189E0000 PUSH2 0x2A15 JUMP JUMPDEST DUP4 GT ISZERO PUSH2 0x131 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2920 PUSH2 0x2919 DUP7 DUP6 PUSH2 0xDE3 JUMP JUMPDEST DUP7 SWAP1 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x292E DUP6 DUP9 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x293C DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2952 DUP3 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA DUP11 DUP3 PUSH2 0x251F JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 DUP3 LT PUSH2 0x2976 JUMPI PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2993 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x29A0 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x29BA SWAP1 DUP6 DUP4 DUP2 PUSH2 0x13C3 JUMPI INVALID JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x2557 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x29D3 DUP5 DUP5 PUSH2 0x2DA6 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29ED PUSH2 0x29E6 DUP4 PUSH2 0x2710 PUSH2 0x251F JUMP JUMPDEST PUSH1 0x1 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP DUP1 DUP3 LT ISZERO PUSH2 0x2A02 JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2A0C DUP3 DUP3 PUSH2 0xDE3 JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2A2F DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x4DC SWAP2 SWAP1 PUSH2 0x426B JUMP JUMPDEST PUSH1 0x60 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5A1 SWAP2 SWAP1 PUSH2 0x4330 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2A7F PUSH4 0x1C74C917 PUSH1 0xE1 SHL PUSH2 0x7F7 JUMP JUMPDEST SWAP1 SWAP2 EQ SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP4 GT PUSH2 0x2A98 JUMPI POP PUSH1 0x0 PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2AA4 DUP6 DUP6 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2ABA PUSH8 0xDE0B6B3A7640000 DUP9 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH2 0x2ACE DUP3 PUSH8 0x9B6E64A8EC60000 PUSH2 0x2EB1 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x2ADC DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2AF3 PUSH2 0x2AEC DUP4 PUSH2 0x295E JUMP JUMPDEST DUP12 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA DUP2 DUP8 PUSH2 0x2A15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2B0B PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2B17 DUP6 PUSH2 0x2EC8 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2B2F PUSH2 0x2B26 PUSH2 0x10F6 JUMP JUMPDEST DUP3 LT PUSH1 0x64 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2B39 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2B4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2B78 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2BB7 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2B8A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2B9E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH2 0x2BAF PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2EEA JUMP JUMPDEST DUP2 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2BC3 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP2 SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x2BEB DUP5 PUSH2 0x2FA7 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x2C01 DUP7 DUP4 PUSH2 0x2BFC PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0x2FBD JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2C1A PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2C27 DUP6 PUSH2 0x306E JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2C38 DUP3 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x2C44 DUP3 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C5C DUP9 DUP9 DUP6 PUSH2 0x2C54 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x3086 JUMP JUMPDEST SWAP1 POP PUSH2 0x2C6C DUP3 DUP3 GT ISZERO PUSH1 0xCF PUSH2 0xF67 JUMP JUMPDEST SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x2C89 DUP6 PUSH2 0x306E JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2C9F PUSH2 0x2C98 PUSH2 0x10F6 JUMP JUMPDEST DUP4 MLOAD PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x2CAB DUP3 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2CC3 DUP9 DUP9 DUP6 PUSH2 0x2CBB PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x32AA JUMP JUMPDEST SWAP1 POP PUSH2 0x2C6C DUP3 DUP3 LT ISZERO PUSH1 0xD0 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0x2CE3 DUP6 PUSH2 0x2EC8 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2CF2 PUSH2 0x2B26 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2CFC PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2D11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2D3B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2BB7 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2D4D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2D61 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH2 0x2D72 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x34BA JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2D87 DUP5 DUP5 PUSH2 0x2DA6 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2D9A PUSH2 0x29E6 DUP4 PUSH2 0x2710 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH2 0x2369 DUP3 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x2DBC JUMPI POP PUSH8 0xDE0B6B3A7640000 PUSH2 0x4DC JUMP JUMPDEST DUP3 PUSH2 0x2DC9 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2DDA PUSH1 0x1 PUSH1 0xFF SHL DUP5 LT PUSH1 0x6 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x2E00 PUSH24 0xBCE5086492111AEA88F4BB1CA6BCF584181EA8059F76532 DUP5 LT PUSH1 0x7 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH1 0x0 PUSH8 0xC7D713B49DA0000 DUP4 SGT DUP1 ISZERO PUSH2 0x2E21 JUMPI POP PUSH8 0xF43FC2C04EE0000 DUP4 SLT JUMPDEST ISZERO PUSH2 0x2E58 JUMPI PUSH1 0x0 PUSH2 0x2E31 DUP5 PUSH2 0x355C JUMP JUMPDEST SWAP1 POP PUSH8 0xDE0B6B3A7640000 DUP1 DUP3 SMOD DUP5 MUL SDIV DUP4 PUSH8 0xDE0B6B3A7640000 DUP4 SDIV MUL ADD SWAP2 POP POP PUSH2 0x2E66 JUMP JUMPDEST DUP2 PUSH2 0x2E62 DUP5 PUSH2 0x367A JUMP JUMPDEST MUL SWAP1 POP JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 SDIV PUSH2 0x2E9E PUSH9 0x238FD42C5CF03FFFF NOT DUP3 SLT DUP1 ISZERO SWAP1 PUSH2 0x2E97 JUMPI POP PUSH9 0x70C1CC73B00C80000 DUP3 SGT ISZERO JUMPDEST PUSH1 0x8 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x2EA7 DUP2 PUSH2 0x3A27 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT ISZERO PUSH2 0x2EC1 JUMPI DUP2 PUSH2 0x5A1 JUMP JUMPDEST POP SWAP1 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2EDF SWAP2 SWAP1 PUSH2 0x42FA JUMP JUMPDEST SWAP1 SWAP6 SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2F01 DUP5 PUSH2 0x2EFB DUP2 DUP9 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F1A PUSH8 0x9B6E64A8EC60000 DUP3 LT ISZERO PUSH2 0x132 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2F38 PUSH2 0x2F31 PUSH8 0xDE0B6B3A7640000 DUP10 PUSH2 0x138D JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F4F PUSH2 0x2F48 DUP4 PUSH2 0x295E JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F5C DUP10 PUSH2 0x295E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F6A DUP4 DUP4 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F78 DUP5 DUP4 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F97 PUSH2 0x2F90 PUSH2 0x2F89 DUP11 PUSH2 0x295E JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST DUP3 SWAP1 PUSH2 0xDD1 JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5A1 SWAP2 SWAP1 PUSH2 0x42CD JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2FCB DUP5 DUP5 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2FE6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3010 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0x3064 JUMPI PUSH2 0x3045 DUP4 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2A15 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3051 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x3016 JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2EDF SWAP2 SWAP1 PUSH2 0x4287 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x30A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x30CB JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x3190 JUMPI PUSH2 0x312B DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x30EA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2EFB DUP10 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3101 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xDE3 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3137 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x3186 PUSH2 0x317F DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3155 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3169 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x251F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 SWAP1 PUSH2 0xDD1 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x30D2 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x3289 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x31B4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 GT ISZERO PUSH2 0x320B JUMPI PUSH1 0x0 PUSH2 0x31DD PUSH2 0x31D1 DUP7 PUSH2 0x295E JUMP JUMPDEST DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x31F1 DUP3 DUP13 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x3202 PUSH2 0x317F PUSH2 0x1C07 DUP12 PUSH2 0x295E JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x3222 JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3217 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x324B DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3233 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP5 DUP16 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x327D PUSH2 0x3276 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x325F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x29C6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP4 POP POP POP PUSH1 0x1 ADD PUSH2 0x319D JUMP JUMPDEST POP PUSH2 0x329D PUSH2 0x3296 DUP3 PUSH2 0x295E JUMP JUMPDEST DUP8 SWAP1 PUSH2 0x251F JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x32C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x32EF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x3397 JUMPI PUSH2 0x334F DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x330E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP10 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3325 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3339 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xDD1 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x335B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x338D PUSH2 0x317F DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3379 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x32F6 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x3478 JUMPI PUSH1 0x0 DUP4 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x33BC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD GT ISZERO PUSH2 0x3418 JUMPI PUSH1 0x0 PUSH2 0x33E1 PUSH2 0x31D1 DUP7 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x33F5 DUP3 DUP13 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x340F PUSH2 0x317F PUSH2 0x1F35 PUSH8 0xDE0B6B3A7640000 DUP13 PUSH2 0xDE3 JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x342F JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3424 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x3458 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3440 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP5 DUP16 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3339 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x346C PUSH2 0x3276 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x325F JUMPI INVALID JUMPDEST SWAP4 POP POP POP PUSH1 0x1 ADD PUSH2 0x33A4 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 DUP2 LT PUSH2 0x34AE JUMPI PUSH2 0x34A4 PUSH2 0x349D DUP3 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST DUP8 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP4 POP POP POP POP PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 SWAP4 POP POP POP POP PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x34CB DUP5 PUSH2 0x2EFB DUP2 DUP9 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP PUSH2 0x34E4 PUSH8 0x29A2241AF62C0000 DUP3 GT ISZERO PUSH2 0x133 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x34FB PUSH2 0x2F31 PUSH8 0xDE0B6B3A7640000 DUP10 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x351B PUSH2 0x3514 DUP4 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3528 DUP10 PUSH2 0x295E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3536 DUP4 DUP4 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3544 DUP5 DUP4 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F97 PUSH2 0x2F90 PUSH2 0x3555 DUP11 PUSH2 0x295E JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x2984 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 MUL PUSH1 0x0 DUP1 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP1 DUP5 ADD SWAP1 PUSH15 0xC097CE7BC90715B34B9F0FFFFFFFFF NOT DUP6 ADD MUL DUP2 PUSH2 0x3597 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH1 0x0 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP1 MUL SDIV SWAP1 POP DUP2 DUP1 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 DUP5 MUL SDIV SWAP2 POP PUSH1 0x3 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x5 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x7 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x9 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xB DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xD DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xF DUP3 PUSH1 0x2 SWAP2 SWAP1 SDIV SWAP2 SWAP1 SWAP2 ADD MUL SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x368A PUSH1 0x0 DUP4 SGT PUSH1 0x64 PUSH2 0xF67 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP3 SLT ISZERO PUSH2 0x36C4 JUMPI PUSH2 0x36BA DUP3 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 PUSH2 0x36B4 JUMPI INVALID JUMPDEST SDIV PUSH2 0x367A JUMP JUMPDEST PUSH1 0x0 SUB SWAP1 POP PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH31 0x1600EF3172E58D2E933EC884FDE10064C63B5372D805E203C0000000000000 DUP4 SLT PUSH2 0x3715 JUMPI PUSH24 0x195E54C5DD42177F53A27172FA9EC630262827000000000 DUP4 SDIV SWAP3 POP PUSH9 0x6F05B59D3B2000000 ADD JUMPDEST PUSH20 0x11798004D755D3C8BC8E03204CF44619E000000 DUP4 SLT PUSH2 0x374D JUMPI PUSH12 0x1425982CF597CD205CEF7380 DUP4 SDIV SWAP3 POP PUSH9 0x3782DACE9D9000000 ADD JUMPDEST PUSH1 0x64 SWAP3 DUP4 MUL SWAP3 MUL PUSH15 0x1855144814A7FF805980FF0084000 DUP4 SLT PUSH2 0x3795 JUMPI PUSH15 0x1855144814A7FF805980FF0084000 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0xAD78EBC5AC62000000 ADD JUMPDEST PUSH12 0x2DF0AB5A80A22C61AB5A700 DUP4 SLT PUSH2 0x37D0 JUMPI PUSH12 0x2DF0AB5A80A22C61AB5A700 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x56BC75E2D631000000 ADD JUMPDEST PUSH10 0x3F1FCE3DA636EA5CF850 DUP4 SLT PUSH2 0x3807 JUMPI PUSH10 0x3F1FCE3DA636EA5CF850 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x2B5E3AF16B18800000 ADD JUMPDEST PUSH10 0x127FA27722CC06CC5E2 DUP4 SLT PUSH2 0x383E JUMPI PUSH10 0x127FA27722CC06CC5E2 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x15AF1D78B58C400000 ADD JUMPDEST PUSH9 0x280E60114EDB805D03 DUP4 SLT PUSH2 0x3873 JUMPI PUSH9 0x280E60114EDB805D03 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0xAD78EBC5AC6200000 ADD JUMPDEST PUSH9 0xEBC5FB41746121110 DUP4 SLT PUSH2 0x389E JUMPI PUSH9 0xEBC5FB41746121110 PUSH9 0x56BC75E2D63100000 SWAP4 DUP5 MUL SDIV SWAP3 ADD JUMPDEST PUSH9 0x8F00F760A4B2DB55D DUP4 SLT PUSH2 0x38D3 JUMPI PUSH9 0x8F00F760A4B2DB55D PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x2B5E3AF16B1880000 ADD JUMPDEST PUSH9 0x6F5F1775788937937 DUP4 SLT PUSH2 0x3908 JUMPI PUSH9 0x6F5F1775788937937 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x15AF1D78B58C40000 ADD JUMPDEST PUSH9 0x6248F33704B286603 DUP4 SLT PUSH2 0x393C JUMPI PUSH9 0x6248F33704B286603 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH8 0xAD78EBC5AC620000 ADD JUMPDEST PUSH9 0x5C548670B9510E7AC DUP4 SLT PUSH2 0x3970 JUMPI PUSH9 0x5C548670B9510E7AC PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH8 0x56BC75E2D6310000 ADD JUMPDEST PUSH1 0x0 PUSH9 0x56BC75E2D63100000 DUP5 ADD PUSH9 0x56BC75E2D63100000 DUP1 DUP7 SUB MUL DUP2 PUSH2 0x3993 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH1 0x0 PUSH9 0x56BC75E2D63100000 DUP3 DUP1 MUL SDIV SWAP1 POP DUP2 DUP1 PUSH9 0x56BC75E2D63100000 DUP2 DUP5 MUL SDIV SWAP2 POP PUSH1 0x3 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x5 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x7 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x9 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xB DUP3 SDIV ADD PUSH1 0x2 MUL PUSH1 0x64 DUP6 DUP3 ADD SDIV SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3A56 PUSH9 0x238FD42C5CF03FFFF NOT DUP4 SLT ISZERO DUP1 ISZERO PUSH2 0x3A4F JUMPI POP PUSH9 0x70C1CC73B00C80000 DUP4 SGT ISZERO JUMPDEST PUSH1 0x9 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 DUP3 SLT ISZERO PUSH2 0x3A89 JUMPI PUSH2 0x3A6B DUP3 PUSH1 0x0 SUB PUSH2 0x3A27 JUMP JUMPDEST PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 PUSH2 0x3A81 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH9 0x6F05B59D3B2000000 DUP4 SLT PUSH2 0x3AC9 JUMPI POP PUSH9 0x6F05B59D3B1FFFFFF NOT SWAP1 SWAP2 ADD SWAP1 PUSH24 0x195E54C5DD42177F53A27172FA9EC630262827000000000 PUSH2 0x3AFF JUMP JUMPDEST PUSH9 0x3782DACE9D9000000 DUP4 SLT PUSH2 0x3AFB JUMPI POP PUSH9 0x3782DACE9D8FFFFFF NOT SWAP1 SWAP2 ADD SWAP1 PUSH12 0x1425982CF597CD205CEF7380 PUSH2 0x3AFF JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST PUSH1 0x64 SWAP3 SWAP1 SWAP3 MUL SWAP2 PUSH9 0x56BC75E2D63100000 PUSH9 0xAD78EBC5AC62000000 DUP5 SLT PUSH2 0x3B4F JUMPI PUSH9 0xAD78EBC5AC61FFFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH15 0x1855144814A7FF805980FF0084000 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D631000000 DUP5 SLT PUSH2 0x3B8B JUMPI PUSH9 0x56BC75E2D630FFFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH12 0x2DF0AB5A80A22C61AB5A700 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x2B5E3AF16B18800000 DUP5 SLT PUSH2 0x3BC5 JUMPI PUSH9 0x2B5E3AF16B187FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH10 0x3F1FCE3DA636EA5CF850 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x15AF1D78B58C400000 DUP5 SLT PUSH2 0x3BFF JUMPI PUSH9 0x15AF1D78B58C3FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH10 0x127FA27722CC06CC5E2 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0xAD78EBC5AC6200000 DUP5 SLT PUSH2 0x3C38 JUMPI PUSH9 0xAD78EBC5AC61FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x280E60114EDB805D03 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D63100000 DUP5 SLT PUSH2 0x3C71 JUMPI PUSH9 0x56BC75E2D630FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0xEBC5FB41746121110 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x2B5E3AF16B1880000 DUP5 SLT PUSH2 0x3CAA JUMPI PUSH9 0x2B5E3AF16B187FFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x8F00F760A4B2DB55D DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x15AF1D78B58C40000 DUP5 SLT PUSH2 0x3CE3 JUMPI PUSH9 0x15AF1D78B58C3FFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x6F5F1775788937937 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D63100000 DUP5 DUP2 ADD SWAP1 DUP6 SWAP1 PUSH1 0x2 SWAP1 DUP3 DUP1 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x3 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x4 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x5 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x6 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x7 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x8 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x9 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xA PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xB PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xC PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x64 PUSH9 0x56BC75E2D63100000 DUP5 DUP5 MUL SDIV DUP6 MUL SDIV SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x4DC DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3E1F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x3E32 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST PUSH2 0x469D JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x3E53 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x3E72 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3E56 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3E8D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3EA2 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3EB5 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x469D JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x3ECC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x4DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3F05 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5A1 DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3F22 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x3F2D DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x3F3D DUP2 PUSH2 0x46E2 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x3F5C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x3F67 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x3F77 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3FA2 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH2 0x3FAD DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x3FBD DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x3FE0 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP7 SWAP10 SWAP6 SWAP9 POP SWAP4 SWAP7 SWAP3 SWAP6 SWAP5 PUSH1 0xA0 DUP5 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 SWAP1 SWAP4 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x400F JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x401A DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x403C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4052 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4065 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x4073 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x4093 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x40BE JUMPI DUP1 MLOAD PUSH2 0x40AA DUP2 PUSH2 0x46E2 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x4097 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x40D5 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x40E2 DUP7 DUP3 DUP8 ADD PUSH2 0x3E0F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4104 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5A1 DUP2 PUSH2 0x46F7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4120 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x46F7 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x4145 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP8 CALLDATALOAD SWAP7 POP PUSH1 0x20 DUP1 DUP10 ADD CALLDATALOAD PUSH2 0x4158 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP7 POP PUSH1 0x40 DUP10 ADD CALLDATALOAD PUSH2 0x4168 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP6 POP PUSH1 0x60 DUP10 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4183 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP12 ADD SWAP2 POP DUP12 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4196 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x41A4 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE DUP6 DUP3 ADD SWAP2 POP DUP6 DUP6 ADD DUP16 DUP8 DUP9 DUP7 MUL DUP9 ADD ADD GT ISZERO PUSH2 0x41C2 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x41E4 JUMPI DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH2 0x41C6 JUMP JUMPDEST POP SWAP9 POP POP POP PUSH1 0x80 DUP12 ADD CALLDATALOAD SWAP6 POP PUSH1 0xA0 DUP12 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD SWAP3 POP DUP1 DUP4 GT ISZERO PUSH2 0x420A JUMPI DUP4 DUP5 REVERT JUMPDEST POP POP PUSH2 0x4218 DUP11 DUP3 DUP12 ADD PUSH2 0x3E7D JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4238 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x5A1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4260 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x427C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x429B JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x42A6 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x42C1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x40E2 DUP7 DUP3 DUP8 ADD PUSH2 0x3E0F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x42DF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x42EA DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x430E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x4319 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD PUSH1 0x40 SWAP1 SWAP6 ADD MLOAD SWAP1 SWAP7 SWAP5 SWAP6 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x4342 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x434D DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x4368 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x4374 DUP6 DUP3 DUP7 ADD PUSH2 0x3E0F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x4392 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x43A8 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP PUSH2 0x120 DUP1 DUP4 DUP10 SUB SLT ISZERO PUSH2 0x43BE JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x43C7 DUP2 PUSH2 0x469D JUMP JUMPDEST SWAP1 POP PUSH2 0x43D3 DUP9 DUP5 PUSH2 0x3EE5 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x43E2 DUP9 PUSH1 0x20 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x43F4 DUP9 PUSH1 0x40 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x4424 DUP9 PUSH1 0xC0 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x4436 DUP9 PUSH1 0xE0 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 DUP1 DUP5 ADD CALLDATALOAD DUP4 DUP2 GT ISZERO PUSH2 0x444E JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH2 0x445A DUP11 DUP3 DUP8 ADD PUSH2 0x3E7D JUMP JUMPDEST SWAP2 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP8 PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP8 POP PUSH1 0x40 SWAP1 SWAP7 ADD CALLDATALOAD SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x448A JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x44C0 JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x44A4 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x5A1 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x4491 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x4548 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x4491 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x2369 DUP2 DUP6 PUSH2 0x4491 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP6 DUP7 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x20 DUP8 ADD MSTORE SWAP3 SWAP1 SWAP4 AND PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0x80 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x464F JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x4633 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x4660 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x1BA4 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x4491 JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x46BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x46D8 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x5DAE8954494FC239D6EDD2B70A6D1304F3CE003F1A0AD7 PUSH6 0x569325030008 DUP1 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH17 0x87A0883D288C32F045814D0391A26A36E7 MSTORE8 0xA8 DUP1 0xD3 0xC9 PUSH11 0x46919E14F50CC40D64736F PUSH13 0x63430007010033000000000000 ",
              "sourceMap": "916:979:39:-:0;;;994:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1377:14:31;;-1:-1:-1;;;;;;1377:14:31;;;1337:7:32;1652:15;:48;1625:75;;916:979:39;;178:295:-1;;309:2;297:9;288:7;284:23;280:32;277:2;;;-1:-1;;315:12;277:2;99:13;;-1:-1;;;;;754:54;;895:51;;885:2;;-1:-1;;950:12;885:2;367:90;271:202;-1:-1;;;271:202::o;:::-;916:979:39;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "8038": [
                  {
                    "length": 32,
                    "start": 348
                  }
                ],
                "8108": [
                  {
                    "length": 32,
                    "start": 214
                  },
                  {
                    "length": 32,
                    "start": 256
                  }
                ]
              },
              "linkReferences": {},
              "object": "60806040523480156200001157600080fd5b5060043610620000525760003560e01c80632da47c4014620000575780636634b753146200007a5780638d928af814620000a0578063fbce039314620000b9575b600080fd5b62000061620000d0565b6040516200007192919062000637565b60405180910390f35b620000916200008b366004620003c0565b6200013c565b60405162000071919062000562565b620000aa6200015a565b6040516200007191906200054e565b620000aa620000ca366004620003e6565b6200017e565b600080427f00000000000000000000000000000000000000000000000000000000000000008110156200012e57807f000000000000000000000000000000000000000000000000000000000000000003925062278d00915062000137565b60009250600091505b509091565b6001600160a01b031660009081526020819052604090205460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000090565b60008060006200018d620000d0565b9150915060006200019d6200015a565b8a8a8a8a8a88888c604051620001b3906200024b565b620001c7999897969594939291906200056d565b604051809103906000f080158015620001e4573d6000803e3d6000fd5b509050620001f281620001ff565b9998505050505050505050565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc9190a250565b61583f80620006b483390190565b803562000266816200069a565b92915050565b600082601f8301126200027d578081fd5b8135620002946200028e826200066d565b62000645565b818152915060208083019084810181840286018201871015620002b657600080fd5b60005b84811015620002e2578135620002cf816200069a565b84529282019290820190600101620002b9565b505050505092915050565b600082601f830112620002fe578081fd5b81356200030f6200028e826200066d565b8181529150602080830190848101818402860182018710156200033157600080fd5b60005b84811015620002e25781358452928201929082019060010162000334565b600082601f83011262000363578081fd5b813567ffffffffffffffff8111156200037a578182fd5b6200038f601f8201601f191660200162000645565b9150808252836020828501011115620003a757600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215620003d2578081fd5b8135620003df816200069a565b9392505050565b60008060008060008060c08789031215620003ff578182fd5b863567ffffffffffffffff8082111562000417578384fd5b620004258a838b0162000352565b975060208901359150808211156200043b578384fd5b620004498a838b0162000352565b965060408901359150808211156200045f578384fd5b6200046d8a838b016200026c565b9550606089013591508082111562000483578384fd5b506200049289828a01620002ed565b93505060808701359150620004ab8860a0890162000259565b90509295509295509295565b6001600160a01b03169052565b6000815180845260208085019450808401835b83811015620004f557815187529582019590820190600101620004d7565b509495945050505050565b60008151808452815b81811015620005275760208185018101518683018201520162000509565b81811115620005395782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b901515815260200190565b6001600160a01b038a168152610120602080830182905260009190620005968483018d62000500565b91508382036040850152620005ac828c62000500565b84810360608601528a51808252828c01935090820190845b81811015620005ec57620005d985516200068e565b83529383019391830191600101620005c4565b5050848103608086015262000602818b620004c4565b93505050508560a08301528460c08301528360e083015262000629610100830184620004b7565b9a9950505050505050505050565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156200066557600080fd5b604052919050565b600067ffffffffffffffff82111562000684578081fd5b5060209081020190565b6001600160a01b031690565b6001600160a01b0381168114620006b057600080fd5b5056fe6105006040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b506040516200583f3803806200583f8339810160408190526200005a9162000caa565b88888888878787878785516002146200007557600162000078565b60025b6040805180820190915260018152603160f81b6020808301918252336080526001600160601b0319606087901b1660a0528b51908c0190812060c0529151902060e0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6101005289518a918a918a918a918a918a918a91849184918a918a9162000107916003919062000a73565b5080516200011d90600490602084019062000a73565b50620001359150506276a7008311156101946200088c565b6200014962278d008211156101956200088c565b42909101610140819052016101605284516200016b906002111560c86200088c565b6200018360088651111560c96200088c60201b60201c565b6200019985620008a160201b62000db61760201c565b620001ae64e8d4a5100085101560cb6200088c565b620001c667016345785d8a000085111560ca6200088c565b6040516309b2760f60e01b81526000906001600160a01b038b16906309b2760f90620001f7908c9060040162000e63565b602060405180830381600087803b1580156200021257600080fd5b505af115801562000227573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200024d919062000c91565b9050896001600160a01b03166366a9c7d2828889516001600160401b03811180156200027857600080fd5b50604051908082528060200260200182016040528015620002a3578160200160208202803683370190505b506040518463ffffffff1660e01b8152600401620002c49392919062000dc7565b600060405180830381600087803b158015620002df57600080fd5b505af1158015620002f4573d6000803e3d6000fd5b5050506001600160601b031960608c901b1661018052506101a0819052600785905585516101c05285516200032b57600062000342565b856000815181106200033957fe5b60200260200101515b60601b6001600160601b0319166101e0528551600110620003655760006200037c565b856001815181106200037357fe5b60200260200101515b60601b6001600160601b0319166102005285516002106200039f576000620003b6565b85600281518110620003ad57fe5b60200260200101515b60601b6001600160601b031916610220528551600310620003d9576000620003f0565b85600381518110620003e757fe5b60200260200101515b60601b6001600160601b031916610240528551600410620004135760006200042a565b856004815181106200042157fe5b60200260200101515b60601b6001600160601b0319166102605285516005106200044d57600062000464565b856005815181106200045b57fe5b60200260200101515b60601b6001600160601b031916610280528551600610620004875760006200049e565b856006815181106200049557fe5b60200260200101515b60601b6001600160601b0319166102a0528551600710620004c1576000620004d8565b85600781518110620004cf57fe5b60200260200101515b60601b6001600160601b0319166102c0528551620004f85760006200051e565b6200051e866000815181106200050a57fe5b6020026020010151620008ad60201b60201c565b6102e05285516001106200053457600062000546565b62000546866001815181106200050a57fe5b6103005285516002106200055c5760006200056e565b6200056e866002815181106200050a57fe5b6103205285516003106200058457600062000596565b62000596866003815181106200050a57fe5b610340528551600410620005ac576000620005be565b620005be866004815181106200050a57fe5b610360528551600510620005d4576000620005e6565b620005e6866005815181106200050a57fe5b610380528551600610620005fc5760006200060e565b6200060e866006815181106200050a57fe5b6103a05285516007106200062457600062000636565b62000636866007815181106200050a57fe5b6103c081815250505050505050505050505050505050505050506000865190506200066e8187516200094f60201b62000dc41760201c565b6000806000805b848160ff161015620006f45760008a8260ff16815181106200069357fe5b60200260200101519050620006bb662386f26fc1000082101561012e6200088c60201b60201c565b620006d581866200095e60201b62000dd11790919060201c565b945082811115620006ea578160ff1693508092505b5060010162000675565b506200070d670de0b6b3a764000084146101346200088c565b6103e082905288516200072257600062000739565b886000815181106200073057fe5b60200260200101515b6104005288516001106200074f57600062000766565b886001815181106200075d57fe5b60200260200101515b6104205288516002106200077c57600062000793565b886002815181106200078a57fe5b60200260200101515b610440528851600310620007a9576000620007c0565b88600381518110620007b757fe5b60200260200101515b610460528851600410620007d6576000620007ed565b88600481518110620007e457fe5b60200260200101515b610480528851600510620008035760006200081a565b886005815181106200081157fe5b60200260200101515b6104a05288516006106200083057600062000847565b886006815181106200083e57fe5b60200260200101515b6104c05288516007106200085d57600062000874565b886007815181106200086b57fe5b60200260200101515b6104e0525062000ee19b505050505050505050505050565b816200089d576200089d816200097b565b5050565b806200089d81620009ce565b600080826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015620008ea57600080fd5b505afa158015620008ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000925919062000da4565b60ff16905060006200094460128362000a5b60201b62000de31760201c565b600a0a949350505050565b6200089d82821460676200088c565b60008282016200097284821015836200088c565b90505b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b600281511015620009df5762000a58565b600081600081518110620009ef57fe5b602002602001015190506000600190505b825181101562000a5557600083828151811062000a1957fe5b6020026020010151905062000a4a816001600160a01b0316846001600160a01b03161060656200088c60201b60201c565b915060010162000a00565b50505b50565b600062000a6d8383111560016200088c565b50900390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000ab657805160ff191683800117855562000ae6565b8280016001018555821562000ae6579182015b8281111562000ae657825182559160200191906001019062000ac9565b5062000af492915062000af8565b5090565b5b8082111562000af4576000815560010162000af9565b8051620009758162000ecb565b600082601f83011262000b2d578081fd5b815162000b4462000b3e8262000e9f565b62000e78565b81815291506020808301908481018184028601820187101562000b6657600080fd5b60005b8481101562000b9257815162000b7f8162000ecb565b8452928201929082019060010162000b69565b505050505092915050565b600082601f83011262000bae578081fd5b815162000bbf62000b3e8262000e9f565b81815291506020808301908481018184028601820187101562000be157600080fd5b60005b8481101562000b925781518452928201929082019060010162000be4565b600082601f83011262000c13578081fd5b81516001600160401b0381111562000c29578182fd5b602062000c3f601f8301601f1916820162000e78565b9250818352848183860101111562000c5657600080fd5b60005b8281101562000c7657848101820151848201830152810162000c59565b8281111562000c885760008284860101525b50505092915050565b60006020828403121562000ca3578081fd5b5051919050565b60008060008060008060008060006101208a8c03121562000cc9578485fd5b62000cd58b8b62000b0f565b60208b01519099506001600160401b038082111562000cf2578687fd5b62000d008d838e0162000c02565b995060408c015191508082111562000d16578687fd5b62000d248d838e0162000c02565b985060608c015191508082111562000d3a578687fd5b62000d488d838e0162000b1c565b975060808c015191508082111562000d5e578687fd5b5062000d6d8c828d0162000b9d565b95505060a08a0151935060c08a0151925060e08a0151915062000d958b6101008c0162000b0f565b90509295985092959850929598565b60006020828403121562000db6578081fd5b815160ff8116811462000972578182fd5b60006060820185835260206060818501528186518084526080860191508288019350845b8181101562000e135762000e00855162000ebf565b8352938301939183019160010162000deb565b505084810360408601528551808252908201925081860190845b8181101562000e555762000e42835162000ebf565b8552938301939183019160010162000e2d565b509298975050505050505050565b602081016003831062000e7257fe5b91905290565b6040518181016001600160401b038111828210171562000e9757600080fd5b604052919050565b60006001600160401b0382111562000eb5578081fd5b5060209081020190565b6001600160a01b031690565b6001600160a01b038116811462000a5857600080fd5b60805160a05160601c60c05160e051610100516101205161014051610160516101805160601c6101a0516101c0516101e05160601c6102005160601c6102205160601c6102405160601c6102605160601c6102805160601c6102a05160601c6102c05160601c6102e05161030051610320516103405161036051610380516103a0516103c0516103e05161040051610420516104405161046051610480516104a0516104c0516104e051614748620010f760003980611eb85280612849525080611e7552806127e8525080611e325280612787525080611def5280612726525080611dac52806126c5525080611d695280612664525080611d265280612603525080611ce352806125a25250806122c252806122f6528061233252508061161c5280611b125250806115d95280611ab15250806115965280611a5052508061155352806119ef525080611510528061198e5250806114cd528061192d52508061148a52806118cc525080611439528061186b525080611ad7528061280e525080611a7652806127ad525080611a15528061274c5250806119b452806126eb525080611953528061268a5250806118f2528061262952508061189152806125c852508061183052806125675250806110f8525080610637525080610895525080610f45525080610f21525080610b1552508061104852508061108a5250806110695250806108715250806107fb52506147486000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80637ecebe001161010f578063a9059cbb116100a2578063d5c096c411610071578063d5c096c4146103e6578063d73dd623146103f9578063dd62ed3e1461040c578063f89f27ed1461041f576101f0565b8063a9059cbb146103b0578063aaabadc5146103c3578063c0ff1a15146103cb578063d505accf146103d3576101f0565b80638d928af8116100de5780638d928af81461038557806395d89b411461038d5780639b02cdde146103955780639d2c110c1461039d576101f0565b80637ecebe0014610337578063851c1bb31461034a57806387ec68171461035d578063893d20e814610370576101f0565b806338e9922e11610187578063661884631161015657806366188463146102e8578063679aefce146102fb57806370a082311461030357806374f3b00914610316576101f0565b806338e9922e146102a457806338fff2d0146102b757806355c67628146102bf5780636028bfd4146102c7576101f0565b80631c0de051116101c35780631c0de0511461025d57806323b872dd14610274578063313ce567146102875780633644e5151461029c576101f0565b806306fdde03146101f5578063095ea7b31461021357806316c38b3c1461023357806318160ddd14610248575b600080fd5b6101fd610434565b60405161020a9190614623565b60405180910390f35b610226610221366004613ffd565b6104cb565b60405161020a919061455a565b6102466102413660046140f3565b6104e2565b005b6102506104f6565b60405161020a919061457d565b6102656104fc565b60405161020a93929190614565565b610226610282366004613f48565b610525565b61028f6105a8565b60405161020a919061468f565b6102506105ad565b6102466102b2366004614479565b6105bc565b610250610635565b610250610659565b6102da6102d536600461412b565b61065f565b60405161020a929190614676565b6102266102f6366004613ffd565b610696565b6102506106f0565b610250610311366004613ef4565b61071b565b61032961032436600461412b565b61073a565b60405161020a929190614535565b610250610345366004613ef4565b6107dc565b610250610358366004614227565b6107f7565b6102da61036b36600461412b565b610849565b61037861086f565b60405161020a919061450e565b610378610893565b6101fd6108b7565b610250610918565b6102506103ab36600461437e565b61091e565b6102266103be366004613ffd565b610a05565b610378610a12565b610250610a1c565b6102466103e1366004613f88565b610ae0565b6103296103f436600461412b565b610c29565b610226610407366004613ffd565b610d4b565b61025061041a366004613f10565b610d81565b610427610dac565b60405161020a9190614522565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c05780601f10610495576101008083540402835291602001916104c0565b820191906000526020600020905b8154815290600101906020018083116104a357829003601f168201915b505050505090505b90565b60006104d8338484610df9565b5060015b92915050565b6104ea610e61565b6104f381610e8f565b50565b60025490565b6000806000610509610f02565b159250610514610f1f565b915061051e610f43565b9050909192565b6001600160a01b0383166000818152600160209081526040808320338085529252822054919261056391148061055b5750838210155b610197610f67565b61056e858585610f75565b336001600160a01b0386161480159061058957506000198114155b1561059b5761059b8533858403610df9565b60019150505b9392505050565b601290565b60006105b7611044565b905090565b6105c4610e61565b6105cc6110e1565b6105df64e8d4a5100082101560cb610f67565b6105f567016345785d8a000082111560ca610f67565b60078190556040517f9cabc14d438714dbcd9292df9b3f89c42f98acd93a675ad72cd6033777e9b8e79061062a90839061457d565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000090565b60075490565b6000606061067586516106706110f6565b610dc4565b61068a8989898989898961111a6111e1611247565b97509795505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548083106106d2576106cd33856000610df9565b6106e6565b6106e633856106e18487610de3565b610df9565b5060019392505050565b60006105b76106fd6104f6565b610715610708610a1c565b6107106110f6565b611369565b9061138d565b6001600160a01b0381166000908152602081905260409020545b919050565b60608088610764610749610893565b6001600160a01b0316336001600160a01b03161460cd610f67565b61077961076f610635565b82146101f4610f67565b60606107836113de565b905061078f888261165a565b60006060806107a38e8e8e8e8e8e8e61111a565b9250925092506107b38d846116bb565b6107bd82856111e1565b6107c781856111e1565b909550935050505b5097509795505050505050565b6001600160a01b031660009081526005602052604090205490565b60007f00000000000000000000000000000000000000000000000000000000000000008260405160200161082c9291906144cb565b604051602081830303815290604052805190602001209050919050565b6000606061085a86516106706110f6565b61068a8989898989898961174e6117cb611247565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c05780601f10610495576101008083540402835291602001916104c0565b60085490565b60008061092e856020015161182c565b9050600061093f866040015161182c565b905060008651600181111561095057fe5b14156109b6576109638660600151611b41565b60608701526109728583611b65565b945061097e8482611b65565b935061098e866060015183611b65565b606087015260006109a0878787611b71565b90506109ac8183611bac565b93505050506105a1565b6109c08583611b65565b94506109cc8482611b65565b93506109dc866060015182611b65565b606087015260006109ee878787611bb8565b90506109fa8184611beb565b90506109ac81611bf7565b60006104d8338484610f75565b60006105b7611c0e565b60006060610a28610893565b6001600160a01b031663f94d4668610a3e610635565b6040518263ffffffff1660e01b8152600401610a5a919061457d565b60006040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aae9190810190614028565b50915050610ac381610abe6113de565b61165a565b6060610acd611c88565b9050610ad98183611ee4565b9250505090565b610aee8442111560d1610f67565b6001600160a01b0387166000908152600560209081526040808320549051909291610b45917f0000000000000000000000000000000000000000000000000000000000000000918c918c918c9188918d91016145a5565b6040516020818303038152906040528051906020012090506000610b6882611f56565b9050600060018288888860405160008152602001604052604051610b8f9493929190614605565b6020604051602081039080840390855afa158015610bb1573d6000803e3d6000fd5b5050604051601f1901519150610bf390506001600160a01b03821615801590610beb57508b6001600160a01b0316826001600160a01b0316145b6101f8610f67565b6001600160a01b038b166000908152600560205260409020600185019055610c1c8b8b8b610df9565b5050505050505050505050565b60608088610c38610749610893565b610c4361076f610635565b6060610c4d6113de565b9050610c576104f6565b610cfc5760006060610c6b8d8d8d8a611f72565b91509150610c80620f424083101560cc610f67565b610c8e6000620f424061200d565b610c9d8b620f4240840361200d565b610ca781846117cb565b80610cb06110f6565b6001600160401b0381118015610cc557600080fd5b50604051908082528060200260200182016040528015610cef578160200160208202803683370190505b50955095505050506107cf565b610d06888261165a565b6000606080610d1a8e8e8e8e8e8e8e61174e565b925092509250610d2a8c8461200d565b610d3482856117cb565b610d3e81856111e1565b90955093506107cf915050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104d89185906106e19086610dd1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60606105b7611c88565b80610dc0816120a3565b5050565b610dc08183146067610f67565b60008282016105a18482101583610f67565b6000610df3838311156001610f67565b50900390565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610e5490859061457d565b60405180910390a3505050565b6000610e786000356001600160e01b0319166107f7565b90506104f3610e87823361211c565b610191610f67565b8015610eaf57610eaa610ea0610f1f565b4210610193610f67565b610ec4565b610ec4610eba610f43565b42106101a9610f67565b6006805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be649061062a90839061455a565b6000610f0c610f43565b4211806105b757505060065460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b81610dc057610dc08161220c565b6001600160a01b038316600090815260208190526040902054610f9d82821015610196610f67565b610fb46001600160a01b0384161515610199610f67565b6001600160a01b03808516600090815260208190526040808220858503905591851681522054610fe49083610dd1565b6001600160a01b0380851660008181526020819052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061103690869061457d565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006110b161225f565b306040516020016110c69594939291906145d9565b60405160208183030381529060405280519060200120905090565b6110f46110ec610f02565b610192610f67565b565b7f000000000000000000000000000000000000000000000000000000000000000090565b60006060806060611129611c88565b9050611133610f02565b1561116a576000611144828a611ee4565b90506111558983600854848b612263565b92506111648984610de3612372565b506111b5565b6111726110f6565b6001600160401b038111801561118757600080fd5b506040519080825280602002602001820160405280156111b1578160200160208202803683370190505b5091505b6111c08882876123dd565b90945092506111d088848361244a565b600855509750975097945050505050565b60005b6111ec6110f6565b8110156112425761122383828151811061120257fe5b602002602001015183838151811061121657fe5b6020026020010151612463565b83828151811061122f57fe5b60209081029190910101526001016111e4565b505050565b333014611305576000306001600160a01b031660003660405161126b9291906144e3565b6000604051808303816000865af19150503d80600081146112a8576040519150601f19603f3d011682016040523d82523d6000602084013e6112ad565b606091505b5050905080600081146112bc57fe5b60046000803e6000516001600160e01b0319166343adbafb60e01b81146112e7573d6000803e3d6000fd5b506020600460003e604060205260243d03602460403e601c3d016000f35b606061130f6113de565b905061131b878261165a565b600060606113328c8c8c8c8c8c8c8c63ffffffff16565b509150915061134581848663ffffffff16565b8051601f1982018390526343adbafb603f1983015260200260231982016044820181fd5b60008282026105a184158061138657508385838161138357fe5b04145b6003610f67565b600061139c8215156004610f67565b826113a9575060006104dc565b670de0b6b3a7640000838102906113cc908583816113c357fe5b04146005610f67565b8281816113d557fe5b049150506104dc565b606060006113ea6110f6565b90506060816001600160401b038111801561140457600080fd5b5060405190808252806020026020018201604052801561142e578160200160208202803683370190505b5090508115611476577f00000000000000000000000000000000000000000000000000000000000000008160008151811061146557fe5b60200260200101818152505061147f565b91506104c89050565b6001821115611476577f0000000000000000000000000000000000000000000000000000000000000000816001815181106114b657fe5b6020026020010181815250506002821115611476577f0000000000000000000000000000000000000000000000000000000000000000816002815181106114f957fe5b6020026020010181815250506003821115611476577f00000000000000000000000000000000000000000000000000000000000000008160038151811061153c57fe5b6020026020010181815250506004821115611476577f00000000000000000000000000000000000000000000000000000000000000008160048151811061157f57fe5b6020026020010181815250506005821115611476577f0000000000000000000000000000000000000000000000000000000000000000816005815181106115c257fe5b6020026020010181815250506006821115611476577f00000000000000000000000000000000000000000000000000000000000000008160068151811061160557fe5b6020026020010181815250506007821115611476577f00000000000000000000000000000000000000000000000000000000000000008160078151811061164857fe5b60200260200101818152505091505090565b60005b6116656110f6565b8110156112425761169c83828151811061167b57fe5b602002602001015183838151811061168f57fe5b6020026020010151611369565b8382815181106116a857fe5b602090810291909101015260010161165d565b6001600160a01b0382166000908152602081905260409020546116e382821015610196610f67565b6001600160a01b0383166000908152602081905260409020828203905560025461170d9083610de3565b6002556040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610e5490869061457d565b600060608061175b6110e1565b6060611765611c88565b90506000611773828a611ee4565b905060606117868a84600854858c612263565b90506117958a82610de3612372565b600060606117a48c868b612483565b915091506117b38c82876124dd565b600855909e909d50909b509950505050505050505050565b60005b6117d66110f6565b8110156112425761180d8382815181106117ec57fe5b602002602001015183838151811061180057fe5b60200260200101516124ec565b83828151811061181957fe5b60209081029190910101526001016117ce565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561188f57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156118f057507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561195157507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156119b257507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611a1357507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611a7457507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611ad557507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611b3657507f0000000000000000000000000000000000000000000000000000000000000000610735565b61073561013561220c565b600080611b596007548461251f90919063ffffffff16565b90506105a18382610de3565b60006105a18383611369565b6000611b7b6110e1565b611ba483611b8c8660200151612563565b84611b9a8860400151612563565b886060015161286d565b949350505050565b60006105a18383612463565b6000611bc26110e1565b611ba483611bd38660200151612563565b84611be18860400151612563565b88606001516128e8565b60006105a183836124ec565b60006104dc611c0760075461295e565b8390612984565b6000611c18610893565b6001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b7919061424f565b60606000611c946110f6565b90506060816001600160401b0381118015611cae57600080fd5b50604051908082528060200260200182016040528015611cd8578160200160208202803683370190505b5090508115611476577f000000000000000000000000000000000000000000000000000000000000000081600081518110611d0f57fe5b6020026020010181815250506001821115611476577f000000000000000000000000000000000000000000000000000000000000000081600181518110611d5257fe5b6020026020010181815250506002821115611476577f000000000000000000000000000000000000000000000000000000000000000081600281518110611d9557fe5b6020026020010181815250506003821115611476577f000000000000000000000000000000000000000000000000000000000000000081600381518110611dd857fe5b6020026020010181815250506004821115611476577f000000000000000000000000000000000000000000000000000000000000000081600481518110611e1b57fe5b6020026020010181815250506005821115611476577f000000000000000000000000000000000000000000000000000000000000000081600581518110611e5e57fe5b6020026020010181815250506006821115611476577f000000000000000000000000000000000000000000000000000000000000000081600681518110611ea157fe5b6020026020010181815250506007821115611476577f00000000000000000000000000000000000000000000000000000000000000008160078151811061164857fe5b670de0b6b3a764000060005b8351811015611f4657611f3c611f35858381518110611f0b57fe5b6020026020010151858481518110611f1f57fe5b60200260200101516129c690919063ffffffff16565b8390612a15565b9150600101611ef0565b506104dc60008211610137610f67565b6000611f60611044565b8260405160200161082c9291906144f3565b60006060611f7e6110e1565b6000611f8984612a41565b9050611fa46000826002811115611f9c57fe5b1460ce610f67565b6060611faf85612a57565b9050611fc3611fbc6110f6565b8251610dc4565b611fcf81610abe6113de565b6060611fd9611c88565b90506000611fe78284611ee4565b90506000611ff7826107106110f6565b6008929092555099919850909650505050505050565b6001600160a01b0382166000908152602081905260409020546120309082610dd1565b6001600160a01b0383166000908152602081905260409020556002546120569082610dd1565b6002556040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061209790859061457d565b60405180910390a35050565b6002815110156120b2576104f3565b6000816000815181106120c157fe5b602002602001015190506000600190505b82518110156112425760008382815181106120e957fe5b60200260200101519050612112816001600160a01b0316846001600160a01b0316106065610f67565b91506001016120d2565b600073ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b61213b61086f565b6001600160a01b031614158015612156575061215683612a6d565b1561217e5761216361086f565b6001600160a01b0316336001600160a01b03161490506104dc565b612186611c0e565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b81526004016121b593929190614586565b60206040518083038186803b1580156121cd57600080fd5b505afa1580156121e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612205919061410f565b90506104dc565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b4690565b60608061226e6110f6565b6001600160401b038111801561228357600080fd5b506040519080825280602002602001820160405280156122ad578160200160208202803683370190505b509050826122bc579050612369565b61232f877f0000000000000000000000000000000000000000000000000000000000000000815181106122eb57fe5b6020026020010151877f00000000000000000000000000000000000000000000000000000000000000008151811061231f57fe5b6020026020010151878787612a87565b817f00000000000000000000000000000000000000000000000000000000000000008151811061235b57fe5b602090810291909101015290505b95945050505050565b60005b61237d6110f6565b8110156123d7576123b884828151811061239357fe5b60200260200101518483815181106123a757fe5b60200260200101518463ffffffff16565b8482815181106123c457fe5b6020908102919091010152600101612375565b50505050565b6000606060006123ec84612a41565b905060008160028111156123fc57fe5b14156124175761240d868686612aff565b9250925050612442565b600181600281111561242557fe5b14156124355761240d8685612bdc565b61240d868686612c0e565b505b935093915050565b60006124598484610de3612372565b611ba48285611ee4565b60006124728215156004610f67565b81838161247b57fe5b049392505050565b60006060600061249284612a41565b905060018160028111156124a257fe5b14156124b35761240d868686612c79565b60028160028111156124c157fe5b14156124d25761240d868686612cd3565b61244061013661220c565b60006124598484610dd1612372565b60006124fb8215156004610f67565b82612508575060006104dc565b81600184038161251457fe5b0460010190506104dc565b600082820261253984158061138657508385838161138357fe5b806125485760009150506104dc565b670de0b6b3a764000060001982015b046001019150506104dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156125c657507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561262757507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561268857507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156126e957507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561274a57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156127ab57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561280c57507f0000000000000000000000000000000000000000000000000000000000000000610735565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611b3657507f0000000000000000000000000000000000000000000000000000000000000000610735565b600061288f61288487670429d069189e0000612a15565b831115610130610f67565b600061289b8784610dd1565b905060006128a98883612984565b905060006128b7888761138d565b905060006128c58383612d7a565b90506128da6128d38261295e565b8990612a15565b9a9950505050505050505050565b600061290a6128ff85670429d069189e0000612a15565b831115610131610f67565b60006129206129198685610de3565b8690612984565b9050600061292e8588612984565b9050600061293c8383612d7a565b9050600061295282670de0b6b3a7640000610de3565b90506128da8a8261251f565b6000670de0b6b3a764000082106129765760006104dc565b50670de0b6b3a76400000390565b60006129938215156004610f67565b826129a0575060006104dc565b670de0b6b3a7640000838102906129ba908583816113c357fe5b82600182038161255757fe5b6000806129d38484612da6565b905060006129ed6129e68361271061251f565b6001610dd1565b905080821015612a02576000925050506104dc565b612a0c8282610de3565b925050506104dc565b6000828202612a2f84158061138657508385838161138357fe5b670de0b6b3a764000090049392505050565b6000818060200190518101906104dc919061426b565b6060818060200190518101906105a19190614330565b6000612a7f631c74c91760e11b6107f7565b909114919050565b6000838311612a9857506000612369565b6000612aa48585612984565b90506000612aba670de0b6b3a76400008861138d565b9050612ace826709b6e64a8ec60000612eb1565b91506000612adc8383612d7a565b90506000612af3612aec8361295e565b8b90612a15565b90506128da8187612a15565b60006060612b0b6110e1565b600080612b1785612ec8565b91509150612b2f612b266110f6565b82106064610f67565b6060612b396110f6565b6001600160401b0381118015612b4e57600080fd5b50604051908082528060200260200182016040528015612b78578160200160208202803683370190505b509050612bb7888381518110612b8a57fe5b6020026020010151888481518110612b9e57fe5b602002602001015185612baf6104f6565b600754612eea565b818381518110612bc357fe5b6020908102919091010152919791965090945050505050565b600060606000612beb84612fa7565b90506060612c018683612bfc6104f6565b612fbd565b9196919550909350505050565b60006060612c1a6110e1565b60606000612c278561306e565b91509150612c3882516106706110f6565b612c4482610abe6113de565b6000612c5c888885612c546104f6565b600754613086565b9050612c6c8282111560cf610f67565b9791965090945050505050565b60006060806000612c898561306e565b91509150612c9f612c986110f6565b8351610dc4565b612cab82610abe6113de565b6000612cc3888885612cbb6104f6565b6007546132aa565b9050612c6c8282101560d0610f67565b60006060600080612ce385612ec8565b91509150612cf2612b266110f6565b6060612cfc6110f6565b6001600160401b0381118015612d1157600080fd5b50604051908082528060200260200182016040528015612d3b578160200160208202803683370190505b509050612bb7888381518110612d4d57fe5b6020026020010151888481518110612d6157fe5b602002602001015185612d726104f6565b6007546134ba565b600080612d878484612da6565b90506000612d9a6129e68361271061251f565b90506123698282610dd1565b600081612dbc5750670de0b6b3a76400006104dc565b82612dc9575060006104dc565b612dda600160ff1b84106006610f67565b82612e00770bce5086492111aea88f4bb1ca6bcf584181ea8059f7653284106007610f67565b826000670c7d713b49da000083138015612e215750670f43fc2c04ee000083125b15612e58576000612e318461355c565b9050670de0b6b3a764000080820784020583670de0b6b3a764000083050201915050612e66565b81612e628461367a565b0290505b670de0b6b3a76400009005612e9e680238fd42c5cf03ffff198212801590612e97575068070c1cc73b00c800008213155b6008610f67565b612ea781613a27565b9695505050505050565b600081831015612ec157816105a1565b5090919050565b60008082806020019051810190612edf91906142fa565b909590945092505050565b600080612f0184612efb8188610de3565b90612984565b9050612f1a6709b6e64a8ec60000821015610132610f67565b6000612f38612f31670de0b6b3a76400008961138d565b8390612d7a565b90506000612f4f612f488361295e565b8a90612a15565b90506000612f5c8961295e565b90506000612f6a838361251f565b90506000612f788483610de3565b9050612f97612f90612f898a61295e565b8490612a15565b8290610dd1565b9c9b505050505050505050505050565b6000818060200190518101906105a191906142cd565b60606000612fcb848461138d565b9050606085516001600160401b0381118015612fe657600080fd5b50604051908082528060200260200182016040528015613010578160200160208202803683370190505b50905060005b8651811015613064576130458388838151811061302f57fe5b6020026020010151612a1590919063ffffffff16565b82828151811061305157fe5b6020908102919091010152600101613016565b5095945050505050565b6060600082806020019051810190612edf9190614287565b6000606084516001600160401b03811180156130a157600080fd5b506040519080825280602002602001820160405280156130cb578160200160208202803683370190505b5090506000805b88518110156131905761312b8982815181106130ea57fe5b6020026020010151612efb89848151811061310157fe5b60200260200101518c858151811061311557fe5b6020026020010151610de390919063ffffffff16565b83828151811061313757fe5b60200260200101818152505061318661317f89838151811061315557fe5b602002602001015185848151811061316957fe5b602002602001015161251f90919063ffffffff16565b8390610dd1565b91506001016130d2565b50670de0b6b3a764000060005b89518110156132895760008482815181106131b457fe5b602002602001015184111561320b5760006131dd6131d18661295e565b8d858151811061302f57fe5b905060006131f1828c868151811061311557fe5b905061320261317f611c078b61295e565b92505050613222565b88828151811061321757fe5b602002602001015190505b600061324b8c848151811061323357fe5b6020026020010151610715848f878151811061311557fe5b905061327d6132768c858151811061325f57fe5b6020026020010151836129c690919063ffffffff16565b8590612a15565b9350505060010161319d565b5061329d6132968261295e565b879061251f565b9998505050505050505050565b6000606084516001600160401b03811180156132c557600080fd5b506040519080825280602002602001820160405280156132ef578160200160208202803683370190505b5090506000805b88518110156133975761334f89828151811061330e57fe5b602002602001015161071589848151811061332557fe5b60200260200101518c858151811061333957fe5b6020026020010151610dd190919063ffffffff16565b83828151811061335b57fe5b60200260200101818152505061338d61317f89838151811061337957fe5b602002602001015185848151811061302f57fe5b91506001016132f6565b50670de0b6b3a764000060005b8951811015613478576000838583815181106133bc57fe5b602002602001015111156134185760006133e16131d186670de0b6b3a7640000610de3565b905060006133f5828c868151811061311557fe5b905061340f61317f611f35670de0b6b3a76400008c610de3565b9250505061342f565b88828151811061342457fe5b602002602001015190505b60006134588c848151811061344057fe5b6020026020010151610715848f878151811061333957fe5b905061346c6132768c858151811061325f57fe5b935050506001016133a4565b50670de0b6b3a764000081106134ae576134a461349d82670de0b6b3a7640000610de3565b8790612a15565b9350505050612369565b60009350505050612369565b6000806134cb84612efb8188610dd1565b90506134e46729a2241af62c0000821115610133610f67565b60006134fb612f31670de0b6b3a764000089612984565b9050600061351b61351483670de0b6b3a7640000610de3565b8a9061251f565b905060006135288961295e565b90506000613536838361251f565b905060006135448483610de3565b9050612f97612f906135558a61295e565b8490612984565b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff198501028161359757fe5b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f826002919005919091010295945050505050565b600061368a600083136064610f67565b670de0b6b3a76400008212156136c4576136ba826a0c097ce7bc90715b34b9f160241b816136b457fe5b0561367a565b6000039050610735565b60007e1600ef3172e58d2e933ec884fde10064c63b5372d805e203c0000000000000831261371557770195e54c5dd42177f53a27172fa9ec630262827000000000830592506806f05b59d3b2000000015b73011798004d755d3c8bc8e03204cf44619e000000831261374d576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312613795576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a70083126137d0576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf850831261380757693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e2831261383e57690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d0383126138735768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261389e57680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d83126138d3576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f17757889379378312613908576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b286603831261393c576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac8312613970576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d63100000808603028161399357fe5b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6000613a56680238fd42c5cf03ffff198312158015613a4f575068070c1cc73b00c800008313155b6009610f67565b6000821215613a8957613a6b82600003613a27565b6a0c097ce7bc90715b34b9f160241b81613a8157fe5b059050610735565b60006806f05b59d3b20000008312613ac957506806f05b59d3b1ffffff1990910190770195e54c5dd42177f53a27172fa9ec630262827000000000613aff565b6803782dace9d90000008312613afb57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380613aff565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412613b4f5768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412613b8b576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412613bc557682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412613bff576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412613c3857680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412613c715768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412613caa576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412613ce35768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b80356104dc816146e2565b600082601f830112613e1f578081fd5b8151613e32613e2d826146c3565b61469d565b818152915060208083019084810181840286018201871015613e5357600080fd5b60005b84811015613e7257815184529282019290820190600101613e56565b505050505092915050565b600082601f830112613e8d578081fd5b81356001600160401b03811115613ea2578182fd5b613eb5601f8201601f191660200161469d565b9150808252836020828501011115613ecc57600080fd5b8060208401602084013760009082016020015292915050565b8035600281106104dc57600080fd5b600060208284031215613f05578081fd5b81356105a1816146e2565b60008060408385031215613f22578081fd5b8235613f2d816146e2565b91506020830135613f3d816146e2565b809150509250929050565b600080600060608486031215613f5c578081fd5b8335613f67816146e2565b92506020840135613f77816146e2565b929592945050506040919091013590565b600080600080600080600060e0888a031215613fa2578283fd5b8735613fad816146e2565b96506020880135613fbd816146e2565b95506040880135945060608801359350608088013560ff81168114613fe0578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561400f578182fd5b823561401a816146e2565b946020939093013593505050565b60008060006060848603121561403c578081fd5b83516001600160401b0380821115614052578283fd5b818601915086601f830112614065578283fd5b8151614073613e2d826146c3565b80828252602080830192508086018b828387028901011115614093578788fd5b8796505b848710156140be5780516140aa816146e2565b845260019690960195928101928101614097565b5089015190975093505050808211156140d5578283fd5b506140e286828701613e0f565b925050604084015190509250925092565b600060208284031215614104578081fd5b81356105a1816146f7565b600060208284031215614120578081fd5b81516105a1816146f7565b600080600080600080600060e0888a031215614145578081fd5b87359650602080890135614158816146e2565b96506040890135614168816146e2565b955060608901356001600160401b0380821115614183578384fd5b818b0191508b601f830112614196578384fd5b81356141a4613e2d826146c3565b8082825285820191508585018f8788860288010111156141c2578788fd5b8795505b838610156141e45780358352600195909501949186019186016141c6565b509850505060808b0135955060a08b0135945060c08b013592508083111561420a578384fd5b50506142188a828b01613e7d565b91505092959891949750929550565b600060208284031215614238578081fd5b81356001600160e01b0319811681146105a1578182fd5b600060208284031215614260578081fd5b81516105a1816146e2565b60006020828403121561427c578081fd5b81516105a181614705565b60008060006060848603121561429b578081fd5b83516142a681614705565b60208501519093506001600160401b038111156142c1578182fd5b6140e286828701613e0f565b600080604083850312156142df578182fd5b82516142ea81614705565b6020939093015192949293505050565b60008060006060848603121561430e578081fd5b835161431981614705565b602085015160409095015190969495509392505050565b60008060408385031215614342578182fd5b825161434d81614705565b60208401519092506001600160401b03811115614368578182fd5b61437485828601613e0f565b9150509250929050565b600080600060608486031215614392578081fd5b83356001600160401b03808211156143a8578283fd5b81860191506101208083890312156143be578384fd5b6143c78161469d565b90506143d38884613ee5565b81526143e28860208501613e04565b60208201526143f48860408501613e04565b6040820152606083013560608201526080830135608082015260a083013560a08201526144248860c08501613e04565b60c08201526144368860e08501613e04565b60e0820152610100808401358381111561444e578586fd5b61445a8a828701613e7d565b9183019190915250976020870135975060409096013595945050505050565b60006020828403121561448a578081fd5b5035919050565b6000815180845260208085019450808401835b838110156144c0578151875295820195908201906001016144a4565b509495945050505050565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6000602082526105a16020830184614491565b6000604082526145486040830185614491565b82810360208401526123698185614491565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b8181101561464f57858101830151858201604001528201614633565b818111156146605783604083870101525b50601f01601f1916929092016040019392505050565b600083825260406020830152611ba46040830184614491565b60ff91909116815260200190565b6040518181016001600160401b03811182821017156146bb57600080fd5b604052919050565b60006001600160401b038211156146d8578081fd5b5060209081020190565b6001600160a01b03811681146104f357600080fd5b80151581146104f357600080fd5b600381106104f357600080fdfea2646970667358221220765dae8954494fc239d6edd2b70a6d1304f3ce003f1a0ad7655693250300088064736f6c63430007010033a26469706673582212207087a0883d288c32f045814d0391a26a36e753a880d3c96a46919e14f50cc40d64736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH3 0x52 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2DA47C40 EQ PUSH3 0x57 JUMPI DUP1 PUSH4 0x6634B753 EQ PUSH3 0x7A JUMPI DUP1 PUSH4 0x8D928AF8 EQ PUSH3 0xA0 JUMPI DUP1 PUSH4 0xFBCE0393 EQ PUSH3 0xB9 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH3 0x61 PUSH3 0xD0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP3 SWAP2 SWAP1 PUSH3 0x637 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH3 0x91 PUSH3 0x8B CALLDATASIZE PUSH1 0x4 PUSH3 0x3C0 JUMP JUMPDEST PUSH3 0x13C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP2 SWAP1 PUSH3 0x562 JUMP JUMPDEST PUSH3 0xAA PUSH3 0x15A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH3 0x71 SWAP2 SWAP1 PUSH3 0x54E JUMP JUMPDEST PUSH3 0xAA PUSH3 0xCA CALLDATASIZE PUSH1 0x4 PUSH3 0x3E6 JUMP JUMPDEST PUSH3 0x17E JUMP JUMPDEST PUSH1 0x0 DUP1 TIMESTAMP PUSH32 0x0 DUP2 LT ISZERO PUSH3 0x12E JUMPI DUP1 PUSH32 0x0 SUB SWAP3 POP PUSH3 0x278D00 SWAP2 POP PUSH3 0x137 JUMP JUMPDEST PUSH1 0x0 SWAP3 POP PUSH1 0x0 SWAP2 POP JUMPDEST POP SWAP1 SWAP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH3 0x18D PUSH3 0xD0 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH3 0x19D PUSH3 0x15A JUMP JUMPDEST DUP11 DUP11 DUP11 DUP11 DUP11 DUP9 DUP9 DUP13 PUSH1 0x40 MLOAD PUSH3 0x1B3 SWAP1 PUSH3 0x24B JUMP JUMPDEST PUSH3 0x1C7 SWAP10 SWAP9 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0x56D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH3 0x1E4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP SWAP1 POP PUSH3 0x1F2 DUP2 PUSH3 0x1FF JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE MLOAD PUSH32 0x83A48FBCFC991335314E74D0496AAB6A1987E992DDC85DDDBCC4D6DD6EF2E9FC SWAP2 SWAP1 LOG2 POP JUMP JUMPDEST PUSH2 0x583F DUP1 PUSH3 0x6B4 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH3 0x266 DUP2 PUSH3 0x69A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x27D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH3 0x294 PUSH3 0x28E DUP3 PUSH3 0x66D JUMP JUMPDEST PUSH3 0x645 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0x2B6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0x2E2 JUMPI DUP2 CALLDATALOAD PUSH3 0x2CF DUP2 PUSH3 0x69A JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0x2B9 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x2FE JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH3 0x30F PUSH3 0x28E DUP3 PUSH3 0x66D JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0x331 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0x2E2 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0x334 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0x363 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH3 0x37A JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH3 0x38F PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH3 0x645 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH3 0x3A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0x3D2 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH3 0x3DF DUP2 PUSH3 0x69A JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xC0 DUP8 DUP10 SUB SLT ISZERO PUSH3 0x3FF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP7 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH3 0x417 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH3 0x425 DUP11 DUP4 DUP12 ADD PUSH3 0x352 JUMP JUMPDEST SWAP8 POP PUSH1 0x20 DUP10 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0x43B JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH3 0x449 DUP11 DUP4 DUP12 ADD PUSH3 0x352 JUMP JUMPDEST SWAP7 POP PUSH1 0x40 DUP10 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0x45F JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH3 0x46D DUP11 DUP4 DUP12 ADD PUSH3 0x26C JUMP JUMPDEST SWAP6 POP PUSH1 0x60 DUP10 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0x483 JUMPI DUP4 DUP5 REVERT JUMPDEST POP PUSH3 0x492 DUP10 DUP3 DUP11 ADD PUSH3 0x2ED JUMP JUMPDEST SWAP4 POP POP PUSH1 0x80 DUP8 ADD CALLDATALOAD SWAP2 POP PUSH3 0x4AB DUP9 PUSH1 0xA0 DUP10 ADD PUSH3 0x259 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH3 0x4F5 JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0x4D7 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x527 JUMPI PUSH1 0x20 DUP2 DUP6 ADD DUP2 ADD MLOAD DUP7 DUP4 ADD DUP3 ADD MSTORE ADD PUSH3 0x509 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH3 0x539 JUMPI DUP3 PUSH1 0x20 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP11 AND DUP2 MSTORE PUSH2 0x120 PUSH1 0x20 DUP1 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 PUSH3 0x596 DUP5 DUP4 ADD DUP14 PUSH3 0x500 JUMP JUMPDEST SWAP2 POP DUP4 DUP3 SUB PUSH1 0x40 DUP6 ADD MSTORE PUSH3 0x5AC DUP3 DUP13 PUSH3 0x500 JUMP JUMPDEST DUP5 DUP2 SUB PUSH1 0x60 DUP7 ADD MSTORE DUP11 MLOAD DUP1 DUP3 MSTORE DUP3 DUP13 ADD SWAP4 POP SWAP1 DUP3 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0x5EC JUMPI PUSH3 0x5D9 DUP6 MLOAD PUSH3 0x68E JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0x5C4 JUMP JUMPDEST POP POP DUP5 DUP2 SUB PUSH1 0x80 DUP7 ADD MSTORE PUSH3 0x602 DUP2 DUP12 PUSH3 0x4C4 JUMP JUMPDEST SWAP4 POP POP POP POP DUP6 PUSH1 0xA0 DUP4 ADD MSTORE DUP5 PUSH1 0xC0 DUP4 ADD MSTORE DUP4 PUSH1 0xE0 DUP4 ADD MSTORE PUSH3 0x629 PUSH2 0x100 DUP4 ADD DUP5 PUSH3 0x4B7 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0x665 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH3 0x684 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x6B0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID PUSH2 0x500 PUSH1 0x40 MSTORE PUSH32 0x6E71EDAE12B1B97F4D1F60370FEF10105FA2FAAE0126114A169C64845D6126C9 PUSH2 0x120 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x583F CODESIZE SUB DUP1 PUSH3 0x583F DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x5A SWAP2 PUSH3 0xCAA JUMP JUMPDEST DUP9 DUP9 DUP9 DUP9 DUP8 DUP8 DUP8 DUP8 DUP8 DUP6 MLOAD PUSH1 0x2 EQ PUSH3 0x75 JUMPI PUSH1 0x1 PUSH3 0x78 JUMP JUMPDEST PUSH1 0x2 JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1 DUP2 MSTORE PUSH1 0x31 PUSH1 0xF8 SHL PUSH1 0x20 DUP1 DUP4 ADD SWAP2 DUP3 MSTORE CALLER PUSH1 0x80 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP8 SWAP1 SHL AND PUSH1 0xA0 MSTORE DUP12 MLOAD SWAP1 DUP13 ADD SWAP1 DUP2 KECCAK256 PUSH1 0xC0 MSTORE SWAP2 MLOAD SWAP1 KECCAK256 PUSH1 0xE0 MSTORE PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH2 0x100 MSTORE DUP10 MLOAD DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP11 SWAP2 DUP5 SWAP2 DUP5 SWAP2 DUP11 SWAP2 DUP11 SWAP2 PUSH3 0x107 SWAP2 PUSH1 0x3 SWAP2 SWAP1 PUSH3 0xA73 JUMP JUMPDEST POP DUP1 MLOAD PUSH3 0x11D SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH3 0xA73 JUMP JUMPDEST POP PUSH3 0x135 SWAP2 POP POP PUSH3 0x76A700 DUP4 GT ISZERO PUSH2 0x194 PUSH3 0x88C JUMP JUMPDEST PUSH3 0x149 PUSH3 0x278D00 DUP3 GT ISZERO PUSH2 0x195 PUSH3 0x88C JUMP JUMPDEST TIMESTAMP SWAP1 SWAP2 ADD PUSH2 0x140 DUP2 SWAP1 MSTORE ADD PUSH2 0x160 MSTORE DUP5 MLOAD PUSH3 0x16B SWAP1 PUSH1 0x2 GT ISZERO PUSH1 0xC8 PUSH3 0x88C JUMP JUMPDEST PUSH3 0x183 PUSH1 0x8 DUP7 MLOAD GT ISZERO PUSH1 0xC9 PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x199 DUP6 PUSH3 0x8A1 PUSH1 0x20 SHL PUSH3 0xDB6 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x1AE PUSH5 0xE8D4A51000 DUP6 LT ISZERO PUSH1 0xCB PUSH3 0x88C JUMP JUMPDEST PUSH3 0x1C6 PUSH8 0x16345785D8A0000 DUP6 GT ISZERO PUSH1 0xCA PUSH3 0x88C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH4 0x9B2760F PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND SWAP1 PUSH4 0x9B2760F SWAP1 PUSH3 0x1F7 SWAP1 DUP13 SWAP1 PUSH1 0x4 ADD PUSH3 0xE63 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x212 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x227 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x24D SWAP2 SWAP1 PUSH3 0xC91 JUMP JUMPDEST SWAP1 POP DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x66A9C7D2 DUP3 DUP9 DUP10 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH3 0x278 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH3 0x2A3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH3 0x2C4 SWAP4 SWAP3 SWAP2 SWAP1 PUSH3 0xDC7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x2DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH3 0x2F4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT PUSH1 0x60 DUP13 SWAP1 SHL AND PUSH2 0x180 MSTORE POP PUSH2 0x1A0 DUP2 SWAP1 MSTORE PUSH1 0x7 DUP6 SWAP1 SSTORE DUP6 MLOAD PUSH2 0x1C0 MSTORE DUP6 MLOAD PUSH3 0x32B JUMPI PUSH1 0x0 PUSH3 0x342 JUMP JUMPDEST DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x339 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x1E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x365 JUMPI PUSH1 0x0 PUSH3 0x37C JUMP JUMPDEST DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x373 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x200 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x39F JUMPI PUSH1 0x0 PUSH3 0x3B6 JUMP JUMPDEST DUP6 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x3AD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x220 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x3D9 JUMPI PUSH1 0x0 PUSH3 0x3F0 JUMP JUMPDEST DUP6 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x3E7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x240 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x413 JUMPI PUSH1 0x0 PUSH3 0x42A JUMP JUMPDEST DUP6 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x421 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x260 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x44D JUMPI PUSH1 0x0 PUSH3 0x464 JUMP JUMPDEST DUP6 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x45B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x280 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x487 JUMPI PUSH1 0x0 PUSH3 0x49E JUMP JUMPDEST DUP6 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x495 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x4C1 JUMPI PUSH1 0x0 PUSH3 0x4D8 JUMP JUMPDEST DUP6 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x4CF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH2 0x2C0 MSTORE DUP6 MLOAD PUSH3 0x4F8 JUMPI PUSH1 0x0 PUSH3 0x51E JUMP JUMPDEST PUSH3 0x51E DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH3 0x8AD PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH2 0x2E0 MSTORE DUP6 MLOAD PUSH1 0x1 LT PUSH3 0x534 JUMPI PUSH1 0x0 PUSH3 0x546 JUMP JUMPDEST PUSH3 0x546 DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x300 MSTORE DUP6 MLOAD PUSH1 0x2 LT PUSH3 0x55C JUMPI PUSH1 0x0 PUSH3 0x56E JUMP JUMPDEST PUSH3 0x56E DUP7 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x320 MSTORE DUP6 MLOAD PUSH1 0x3 LT PUSH3 0x584 JUMPI PUSH1 0x0 PUSH3 0x596 JUMP JUMPDEST PUSH3 0x596 DUP7 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x340 MSTORE DUP6 MLOAD PUSH1 0x4 LT PUSH3 0x5AC JUMPI PUSH1 0x0 PUSH3 0x5BE JUMP JUMPDEST PUSH3 0x5BE DUP7 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x360 MSTORE DUP6 MLOAD PUSH1 0x5 LT PUSH3 0x5D4 JUMPI PUSH1 0x0 PUSH3 0x5E6 JUMP JUMPDEST PUSH3 0x5E6 DUP7 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x380 MSTORE DUP6 MLOAD PUSH1 0x6 LT PUSH3 0x5FC JUMPI PUSH1 0x0 PUSH3 0x60E JUMP JUMPDEST PUSH3 0x60E DUP7 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x3A0 MSTORE DUP6 MLOAD PUSH1 0x7 LT PUSH3 0x624 JUMPI PUSH1 0x0 PUSH3 0x636 JUMP JUMPDEST PUSH3 0x636 DUP7 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x50A JUMPI INVALID JUMPDEST PUSH2 0x3C0 DUP2 DUP2 MSTORE POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP POP PUSH1 0x0 DUP7 MLOAD SWAP1 POP PUSH3 0x66E DUP2 DUP8 MLOAD PUSH3 0x94F PUSH1 0x20 SHL PUSH3 0xDC4 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 JUMPDEST DUP5 DUP2 PUSH1 0xFF AND LT ISZERO PUSH3 0x6F4 JUMPI PUSH1 0x0 DUP11 DUP3 PUSH1 0xFF AND DUP2 MLOAD DUP2 LT PUSH3 0x693 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0x6BB PUSH7 0x2386F26FC10000 DUP3 LT ISZERO PUSH2 0x12E PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST PUSH3 0x6D5 DUP2 DUP7 PUSH3 0x95E PUSH1 0x20 SHL PUSH3 0xDD1 OR SWAP1 SWAP2 SWAP1 PUSH1 0x20 SHR JUMP JUMPDEST SWAP5 POP DUP3 DUP2 GT ISZERO PUSH3 0x6EA JUMPI DUP2 PUSH1 0xFF AND SWAP4 POP DUP1 SWAP3 POP JUMPDEST POP PUSH1 0x1 ADD PUSH3 0x675 JUMP JUMPDEST POP PUSH3 0x70D PUSH8 0xDE0B6B3A7640000 DUP5 EQ PUSH2 0x134 PUSH3 0x88C JUMP JUMPDEST PUSH2 0x3E0 DUP3 SWAP1 MSTORE DUP9 MLOAD PUSH3 0x722 JUMPI PUSH1 0x0 PUSH3 0x739 JUMP JUMPDEST DUP9 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x730 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x400 MSTORE DUP9 MLOAD PUSH1 0x1 LT PUSH3 0x74F JUMPI PUSH1 0x0 PUSH3 0x766 JUMP JUMPDEST DUP9 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH3 0x75D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x420 MSTORE DUP9 MLOAD PUSH1 0x2 LT PUSH3 0x77C JUMPI PUSH1 0x0 PUSH3 0x793 JUMP JUMPDEST DUP9 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH3 0x78A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x440 MSTORE DUP9 MLOAD PUSH1 0x3 LT PUSH3 0x7A9 JUMPI PUSH1 0x0 PUSH3 0x7C0 JUMP JUMPDEST DUP9 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH3 0x7B7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x460 MSTORE DUP9 MLOAD PUSH1 0x4 LT PUSH3 0x7D6 JUMPI PUSH1 0x0 PUSH3 0x7ED JUMP JUMPDEST DUP9 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH3 0x7E4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x480 MSTORE DUP9 MLOAD PUSH1 0x5 LT PUSH3 0x803 JUMPI PUSH1 0x0 PUSH3 0x81A JUMP JUMPDEST DUP9 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH3 0x811 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4A0 MSTORE DUP9 MLOAD PUSH1 0x6 LT PUSH3 0x830 JUMPI PUSH1 0x0 PUSH3 0x847 JUMP JUMPDEST DUP9 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH3 0x83E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4C0 MSTORE DUP9 MLOAD PUSH1 0x7 LT PUSH3 0x85D JUMPI PUSH1 0x0 PUSH3 0x874 JUMP JUMPDEST DUP9 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH3 0x86B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST PUSH2 0x4E0 MSTORE POP PUSH3 0xEE1 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST DUP2 PUSH3 0x89D JUMPI PUSH3 0x89D DUP2 PUSH3 0x97B JUMP JUMPDEST POP POP JUMP JUMPDEST DUP1 PUSH3 0x89D DUP2 PUSH3 0x9CE JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x313CE567 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH3 0x8EA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH3 0x8FF JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH3 0x925 SWAP2 SWAP1 PUSH3 0xDA4 JUMP JUMPDEST PUSH1 0xFF AND SWAP1 POP PUSH1 0x0 PUSH3 0x944 PUSH1 0x12 DUP4 PUSH3 0xA5B PUSH1 0x20 SHL PUSH3 0xDE3 OR PUSH1 0x20 SHR JUMP JUMPDEST PUSH1 0xA EXP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH3 0x89D DUP3 DUP3 EQ PUSH1 0x67 PUSH3 0x88C JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH3 0x972 DUP5 DUP3 LT ISZERO DUP4 PUSH3 0x88C JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH3 0x9DF JUMPI PUSH3 0xA58 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH3 0x9EF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH3 0xA55 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH3 0xA19 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH3 0xA4A DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH3 0x88C PUSH1 0x20 SHL PUSH1 0x20 SHR JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH3 0xA00 JUMP JUMPDEST POP POP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH3 0xA6D DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH3 0x88C JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0xAB6 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0xAE6 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0xAE6 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xAE6 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0xAC9 JUMP JUMPDEST POP PUSH3 0xAF4 SWAP3 SWAP2 POP PUSH3 0xAF8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0xAF4 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0xAF9 JUMP JUMPDEST DUP1 MLOAD PUSH3 0x975 DUP2 PUSH3 0xECB JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xB2D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH3 0xB44 PUSH3 0xB3E DUP3 PUSH3 0xE9F JUMP JUMPDEST PUSH3 0xE78 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0xB66 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0xB92 JUMPI DUP2 MLOAD PUSH3 0xB7F DUP2 PUSH3 0xECB JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0xB69 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xBAE JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH3 0xBBF PUSH3 0xB3E DUP3 PUSH3 0xE9F JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH3 0xBE1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH3 0xB92 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH3 0xBE4 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH3 0xC13 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH3 0xC29 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 PUSH3 0xC3F PUSH1 0x1F DUP4 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH3 0xE78 JUMP JUMPDEST SWAP3 POP DUP2 DUP4 MSTORE DUP5 DUP2 DUP4 DUP7 ADD ADD GT ISZERO PUSH3 0xC56 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH3 0xC76 JUMPI DUP5 DUP2 ADD DUP3 ADD MLOAD DUP5 DUP3 ADD DUP4 ADD MSTORE DUP2 ADD PUSH3 0xC59 JUMP JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0xC88 JUMPI PUSH1 0x0 DUP3 DUP5 DUP7 ADD ADD MSTORE JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xCA3 JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x120 DUP11 DUP13 SUB SLT ISZERO PUSH3 0xCC9 JUMPI DUP5 DUP6 REVERT JUMPDEST PUSH3 0xCD5 DUP12 DUP12 PUSH3 0xB0F JUMP JUMPDEST PUSH1 0x20 DUP12 ADD MLOAD SWAP1 SWAP10 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH3 0xCF2 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD00 DUP14 DUP4 DUP15 ADD PUSH3 0xC02 JUMP JUMPDEST SWAP10 POP PUSH1 0x40 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD16 JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD24 DUP14 DUP4 DUP15 ADD PUSH3 0xC02 JUMP JUMPDEST SWAP9 POP PUSH1 0x60 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD3A JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH3 0xD48 DUP14 DUP4 DUP15 ADD PUSH3 0xB1C JUMP JUMPDEST SWAP8 POP PUSH1 0x80 DUP13 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH3 0xD5E JUMPI DUP7 DUP8 REVERT JUMPDEST POP PUSH3 0xD6D DUP13 DUP3 DUP14 ADD PUSH3 0xB9D JUMP JUMPDEST SWAP6 POP POP PUSH1 0xA0 DUP11 ADD MLOAD SWAP4 POP PUSH1 0xC0 DUP11 ADD MLOAD SWAP3 POP PUSH1 0xE0 DUP11 ADD MLOAD SWAP2 POP PUSH3 0xD95 DUP12 PUSH2 0x100 DUP13 ADD PUSH3 0xB0F JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 POP SWAP3 SWAP6 SWAP9 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH3 0xDB6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH3 0x972 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 ADD DUP6 DUP4 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP6 ADD MSTORE DUP2 DUP7 MLOAD DUP1 DUP5 MSTORE PUSH1 0x80 DUP7 ADD SWAP2 POP DUP3 DUP9 ADD SWAP4 POP DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xE13 JUMPI PUSH3 0xE00 DUP6 MLOAD PUSH3 0xEBF JUMP JUMPDEST DUP4 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xDEB JUMP JUMPDEST POP POP DUP5 DUP2 SUB PUSH1 0x40 DUP7 ADD MSTORE DUP6 MLOAD DUP1 DUP3 MSTORE SWAP1 DUP3 ADD SWAP3 POP DUP2 DUP7 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH3 0xE55 JUMPI PUSH3 0xE42 DUP4 MLOAD PUSH3 0xEBF JUMP JUMPDEST DUP6 MSTORE SWAP4 DUP4 ADD SWAP4 SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 ADD PUSH3 0xE2D JUMP JUMPDEST POP SWAP3 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP2 ADD PUSH1 0x3 DUP4 LT PUSH3 0xE72 JUMPI INVALID JUMPDEST SWAP2 SWAP1 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH3 0xE97 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH3 0xEB5 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0xA58 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x180 MLOAD PUSH1 0x60 SHR PUSH2 0x1A0 MLOAD PUSH2 0x1C0 MLOAD PUSH2 0x1E0 MLOAD PUSH1 0x60 SHR PUSH2 0x200 MLOAD PUSH1 0x60 SHR PUSH2 0x220 MLOAD PUSH1 0x60 SHR PUSH2 0x240 MLOAD PUSH1 0x60 SHR PUSH2 0x260 MLOAD PUSH1 0x60 SHR PUSH2 0x280 MLOAD PUSH1 0x60 SHR PUSH2 0x2A0 MLOAD PUSH1 0x60 SHR PUSH2 0x2C0 MLOAD PUSH1 0x60 SHR PUSH2 0x2E0 MLOAD PUSH2 0x300 MLOAD PUSH2 0x320 MLOAD PUSH2 0x340 MLOAD PUSH2 0x360 MLOAD PUSH2 0x380 MLOAD PUSH2 0x3A0 MLOAD PUSH2 0x3C0 MLOAD PUSH2 0x3E0 MLOAD PUSH2 0x400 MLOAD PUSH2 0x420 MLOAD PUSH2 0x440 MLOAD PUSH2 0x460 MLOAD PUSH2 0x480 MLOAD PUSH2 0x4A0 MLOAD PUSH2 0x4C0 MLOAD PUSH2 0x4E0 MLOAD PUSH2 0x4748 PUSH3 0x10F7 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x1EB8 MSTORE DUP1 PUSH2 0x2849 MSTORE POP DUP1 PUSH2 0x1E75 MSTORE DUP1 PUSH2 0x27E8 MSTORE POP DUP1 PUSH2 0x1E32 MSTORE DUP1 PUSH2 0x2787 MSTORE POP DUP1 PUSH2 0x1DEF MSTORE DUP1 PUSH2 0x2726 MSTORE POP DUP1 PUSH2 0x1DAC MSTORE DUP1 PUSH2 0x26C5 MSTORE POP DUP1 PUSH2 0x1D69 MSTORE DUP1 PUSH2 0x2664 MSTORE POP DUP1 PUSH2 0x1D26 MSTORE DUP1 PUSH2 0x2603 MSTORE POP DUP1 PUSH2 0x1CE3 MSTORE DUP1 PUSH2 0x25A2 MSTORE POP DUP1 PUSH2 0x22C2 MSTORE DUP1 PUSH2 0x22F6 MSTORE DUP1 PUSH2 0x2332 MSTORE POP DUP1 PUSH2 0x161C MSTORE DUP1 PUSH2 0x1B12 MSTORE POP DUP1 PUSH2 0x15D9 MSTORE DUP1 PUSH2 0x1AB1 MSTORE POP DUP1 PUSH2 0x1596 MSTORE DUP1 PUSH2 0x1A50 MSTORE POP DUP1 PUSH2 0x1553 MSTORE DUP1 PUSH2 0x19EF MSTORE POP DUP1 PUSH2 0x1510 MSTORE DUP1 PUSH2 0x198E MSTORE POP DUP1 PUSH2 0x14CD MSTORE DUP1 PUSH2 0x192D MSTORE POP DUP1 PUSH2 0x148A MSTORE DUP1 PUSH2 0x18CC MSTORE POP DUP1 PUSH2 0x1439 MSTORE DUP1 PUSH2 0x186B MSTORE POP DUP1 PUSH2 0x1AD7 MSTORE DUP1 PUSH2 0x280E MSTORE POP DUP1 PUSH2 0x1A76 MSTORE DUP1 PUSH2 0x27AD MSTORE POP DUP1 PUSH2 0x1A15 MSTORE DUP1 PUSH2 0x274C MSTORE POP DUP1 PUSH2 0x19B4 MSTORE DUP1 PUSH2 0x26EB MSTORE POP DUP1 PUSH2 0x1953 MSTORE DUP1 PUSH2 0x268A MSTORE POP DUP1 PUSH2 0x18F2 MSTORE DUP1 PUSH2 0x2629 MSTORE POP DUP1 PUSH2 0x1891 MSTORE DUP1 PUSH2 0x25C8 MSTORE POP DUP1 PUSH2 0x1830 MSTORE DUP1 PUSH2 0x2567 MSTORE POP DUP1 PUSH2 0x10F8 MSTORE POP DUP1 PUSH2 0x637 MSTORE POP DUP1 PUSH2 0x895 MSTORE POP DUP1 PUSH2 0xF45 MSTORE POP DUP1 PUSH2 0xF21 MSTORE POP DUP1 PUSH2 0xB15 MSTORE POP DUP1 PUSH2 0x1048 MSTORE POP DUP1 PUSH2 0x108A MSTORE POP DUP1 PUSH2 0x1069 MSTORE POP DUP1 PUSH2 0x871 MSTORE POP DUP1 PUSH2 0x7FB MSTORE POP PUSH2 0x4748 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1F0 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x7ECEBE00 GT PUSH2 0x10F JUMPI DUP1 PUSH4 0xA9059CBB GT PUSH2 0xA2 JUMPI DUP1 PUSH4 0xD5C096C4 GT PUSH2 0x71 JUMPI DUP1 PUSH4 0xD5C096C4 EQ PUSH2 0x3E6 JUMPI DUP1 PUSH4 0xD73DD623 EQ PUSH2 0x3F9 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x40C JUMPI DUP1 PUSH4 0xF89F27ED EQ PUSH2 0x41F JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x3B0 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x3C3 JUMPI DUP1 PUSH4 0xC0FF1A15 EQ PUSH2 0x3CB JUMPI DUP1 PUSH4 0xD505ACCF EQ PUSH2 0x3D3 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x8D928AF8 GT PUSH2 0xDE JUMPI DUP1 PUSH4 0x8D928AF8 EQ PUSH2 0x385 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x38D JUMPI DUP1 PUSH4 0x9B02CDDE EQ PUSH2 0x395 JUMPI DUP1 PUSH4 0x9D2C110C EQ PUSH2 0x39D JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x7ECEBE00 EQ PUSH2 0x337 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x34A JUMPI DUP1 PUSH4 0x87EC6817 EQ PUSH2 0x35D JUMPI DUP1 PUSH4 0x893D20E8 EQ PUSH2 0x370 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E GT PUSH2 0x187 JUMPI DUP1 PUSH4 0x66188463 GT PUSH2 0x156 JUMPI DUP1 PUSH4 0x66188463 EQ PUSH2 0x2E8 JUMPI DUP1 PUSH4 0x679AEFCE EQ PUSH2 0x2FB JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x303 JUMPI DUP1 PUSH4 0x74F3B009 EQ PUSH2 0x316 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E EQ PUSH2 0x2A4 JUMPI DUP1 PUSH4 0x38FFF2D0 EQ PUSH2 0x2B7 JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0x2BF JUMPI DUP1 PUSH4 0x6028BFD4 EQ PUSH2 0x2C7 JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x1C0DE051 GT PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x25D JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x274 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x287 JUMPI DUP1 PUSH4 0x3644E515 EQ PUSH2 0x29C JUMPI PUSH2 0x1F0 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x1F5 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x213 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x233 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x248 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FD PUSH2 0x434 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x4623 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x226 PUSH2 0x221 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0x4CB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x455A JUMP JUMPDEST PUSH2 0x246 PUSH2 0x241 CALLDATASIZE PUSH1 0x4 PUSH2 0x40F3 JUMP JUMPDEST PUSH2 0x4E2 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x250 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH2 0x265 PUSH2 0x4FC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4565 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x282 CALLDATASIZE PUSH1 0x4 PUSH2 0x3F48 JUMP JUMPDEST PUSH2 0x525 JUMP JUMPDEST PUSH2 0x28F PUSH2 0x5A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x468F JUMP JUMPDEST PUSH2 0x250 PUSH2 0x5AD JUMP JUMPDEST PUSH2 0x246 PUSH2 0x2B2 CALLDATASIZE PUSH1 0x4 PUSH2 0x4479 JUMP JUMPDEST PUSH2 0x5BC JUMP JUMPDEST PUSH2 0x250 PUSH2 0x635 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x659 JUMP JUMPDEST PUSH2 0x2DA PUSH2 0x2D5 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x65F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP3 SWAP2 SWAP1 PUSH2 0x4676 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x2F6 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0x696 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x6F0 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x311 CALLDATASIZE PUSH1 0x4 PUSH2 0x3EF4 JUMP JUMPDEST PUSH2 0x71B JUMP JUMPDEST PUSH2 0x329 PUSH2 0x324 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x73A JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP3 SWAP2 SWAP1 PUSH2 0x4535 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x345 CALLDATASIZE PUSH1 0x4 PUSH2 0x3EF4 JUMP JUMPDEST PUSH2 0x7DC JUMP JUMPDEST PUSH2 0x250 PUSH2 0x358 CALLDATASIZE PUSH1 0x4 PUSH2 0x4227 JUMP JUMPDEST PUSH2 0x7F7 JUMP JUMPDEST PUSH2 0x2DA PUSH2 0x36B CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0x849 JUMP JUMPDEST PUSH2 0x378 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x450E JUMP JUMPDEST PUSH2 0x378 PUSH2 0x893 JUMP JUMPDEST PUSH2 0x1FD PUSH2 0x8B7 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x918 JUMP JUMPDEST PUSH2 0x250 PUSH2 0x3AB CALLDATASIZE PUSH1 0x4 PUSH2 0x437E JUMP JUMPDEST PUSH2 0x91E JUMP JUMPDEST PUSH2 0x226 PUSH2 0x3BE CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0xA05 JUMP JUMPDEST PUSH2 0x378 PUSH2 0xA12 JUMP JUMPDEST PUSH2 0x250 PUSH2 0xA1C JUMP JUMPDEST PUSH2 0x246 PUSH2 0x3E1 CALLDATASIZE PUSH1 0x4 PUSH2 0x3F88 JUMP JUMPDEST PUSH2 0xAE0 JUMP JUMPDEST PUSH2 0x329 PUSH2 0x3F4 CALLDATASIZE PUSH1 0x4 PUSH2 0x412B JUMP JUMPDEST PUSH2 0xC29 JUMP JUMPDEST PUSH2 0x226 PUSH2 0x407 CALLDATASIZE PUSH1 0x4 PUSH2 0x3FFD JUMP JUMPDEST PUSH2 0xD4B JUMP JUMPDEST PUSH2 0x250 PUSH2 0x41A CALLDATASIZE PUSH1 0x4 PUSH2 0x3F10 JUMP JUMPDEST PUSH2 0xD81 JUMP JUMPDEST PUSH2 0x427 PUSH2 0xDAC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x20A SWAP2 SWAP1 PUSH2 0x4522 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x495 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4C0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x4A3 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4D8 CALLER DUP5 DUP5 PUSH2 0xDF9 JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x4EA PUSH2 0xE61 JUMP JUMPDEST PUSH2 0x4F3 DUP2 PUSH2 0xE8F JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x509 PUSH2 0xF02 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x514 PUSH2 0xF1F JUMP JUMPDEST SWAP2 POP PUSH2 0x51E PUSH2 0xF43 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP3 KECCAK256 SLOAD SWAP2 SWAP3 PUSH2 0x563 SWAP2 EQ DUP1 PUSH2 0x55B JUMPI POP DUP4 DUP3 LT ISZERO JUMPDEST PUSH2 0x197 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x56E DUP6 DUP6 DUP6 PUSH2 0xF75 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND EQ DUP1 ISZERO SWAP1 PUSH2 0x589 JUMPI POP PUSH1 0x0 NOT DUP2 EQ ISZERO JUMPDEST ISZERO PUSH2 0x59B JUMPI PUSH2 0x59B DUP6 CALLER DUP6 DUP5 SUB PUSH2 0xDF9 JUMP JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x1044 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x5C4 PUSH2 0xE61 JUMP JUMPDEST PUSH2 0x5CC PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x5DF PUSH5 0xE8D4A51000 DUP3 LT ISZERO PUSH1 0xCB PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x5F5 PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH1 0xCA PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x7 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9CABC14D438714DBCD9292DF9B3F89C42F98ACD93A675AD72CD6033777E9B8E7 SWAP1 PUSH2 0x62A SWAP1 DUP4 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x675 DUP7 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x68A DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x111A PUSH2 0x11E1 PUSH2 0x1247 JUMP JUMPDEST SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP1 DUP4 LT PUSH2 0x6D2 JUMPI PUSH2 0x6CD CALLER DUP6 PUSH1 0x0 PUSH2 0xDF9 JUMP JUMPDEST PUSH2 0x6E6 JUMP JUMPDEST PUSH2 0x6E6 CALLER DUP6 PUSH2 0x6E1 DUP5 DUP8 PUSH2 0xDE3 JUMP JUMPDEST PUSH2 0xDF9 JUMP JUMPDEST POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x6FD PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0x715 PUSH2 0x708 PUSH2 0xA1C JUMP JUMPDEST PUSH2 0x710 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x1369 JUMP JUMPDEST SWAP1 PUSH2 0x138D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0x764 PUSH2 0x749 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH1 0xCD PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x779 PUSH2 0x76F PUSH2 0x635 JUMP JUMPDEST DUP3 EQ PUSH2 0x1F4 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x783 PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0x78F DUP9 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x7A3 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x111A JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x7B3 DUP14 DUP5 PUSH2 0x16BB JUMP JUMPDEST PUSH2 0x7BD DUP3 DUP6 PUSH2 0x11E1 JUMP JUMPDEST PUSH2 0x7C7 DUP2 DUP6 PUSH2 0x11E1 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP POP POP JUMPDEST POP SWAP8 POP SWAP8 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x82C SWAP3 SWAP2 SWAP1 PUSH2 0x44CB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x85A DUP7 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x68A DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 DUP10 PUSH2 0x174E PUSH2 0x17CB PUSH2 0x1247 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x4C0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x495 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x4C0 JUMP JUMPDEST PUSH1 0x8 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x92E DUP6 PUSH1 0x20 ADD MLOAD PUSH2 0x182C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x93F DUP7 PUSH1 0x40 ADD MLOAD PUSH2 0x182C JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP7 MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x950 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x9B6 JUMPI PUSH2 0x963 DUP7 PUSH1 0x60 ADD MLOAD PUSH2 0x1B41 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH2 0x972 DUP6 DUP4 PUSH2 0x1B65 JUMP JUMPDEST SWAP5 POP PUSH2 0x97E DUP5 DUP3 PUSH2 0x1B65 JUMP JUMPDEST SWAP4 POP PUSH2 0x98E DUP7 PUSH1 0x60 ADD MLOAD DUP4 PUSH2 0x1B65 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x9A0 DUP8 DUP8 DUP8 PUSH2 0x1B71 JUMP JUMPDEST SWAP1 POP PUSH2 0x9AC DUP2 DUP4 PUSH2 0x1BAC JUMP JUMPDEST SWAP4 POP POP POP POP PUSH2 0x5A1 JUMP JUMPDEST PUSH2 0x9C0 DUP6 DUP4 PUSH2 0x1B65 JUMP JUMPDEST SWAP5 POP PUSH2 0x9CC DUP5 DUP3 PUSH2 0x1B65 JUMP JUMPDEST SWAP4 POP PUSH2 0x9DC DUP7 PUSH1 0x60 ADD MLOAD DUP3 PUSH2 0x1B65 JUMP JUMPDEST PUSH1 0x60 DUP8 ADD MSTORE PUSH1 0x0 PUSH2 0x9EE DUP8 DUP8 DUP8 PUSH2 0x1BB8 JUMP JUMPDEST SWAP1 POP PUSH2 0x9FA DUP2 DUP5 PUSH2 0x1BEB JUMP JUMPDEST SWAP1 POP PUSH2 0x9AC DUP2 PUSH2 0x1BF7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4D8 CALLER DUP5 DUP5 PUSH2 0xF75 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5B7 PUSH2 0x1C0E JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0xA28 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xF94D4668 PUSH2 0xA3E PUSH2 0x635 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xA5A SWAP2 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA72 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xA86 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0xAAE SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x4028 JUMP JUMPDEST POP SWAP2 POP POP PUSH2 0xAC3 DUP2 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH2 0x165A JUMP JUMPDEST PUSH1 0x60 PUSH2 0xACD PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH2 0xAD9 DUP2 DUP4 PUSH2 0x1EE4 JUMP JUMPDEST SWAP3 POP POP POP SWAP1 JUMP JUMPDEST PUSH2 0xAEE DUP5 TIMESTAMP GT ISZERO PUSH1 0xD1 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SLOAD SWAP1 MLOAD SWAP1 SWAP3 SWAP2 PUSH2 0xB45 SWAP2 PUSH32 0x0 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP13 SWAP2 DUP9 SWAP2 DUP14 SWAP2 ADD PUSH2 0x45A5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0xB68 DUP3 PUSH2 0x1F56 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH1 0x1 DUP3 DUP9 DUP9 DUP9 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0xB8F SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4605 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBB1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP PUSH2 0xBF3 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0xBEB JUMPI POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST PUSH2 0x1F8 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x1 DUP6 ADD SWAP1 SSTORE PUSH2 0xC1C DUP12 DUP12 DUP12 PUSH2 0xDF9 JUMP JUMPDEST POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 DUP9 PUSH2 0xC38 PUSH2 0x749 PUSH2 0x893 JUMP JUMPDEST PUSH2 0xC43 PUSH2 0x76F PUSH2 0x635 JUMP JUMPDEST PUSH1 0x60 PUSH2 0xC4D PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0xC57 PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0xCFC JUMPI PUSH1 0x0 PUSH1 0x60 PUSH2 0xC6B DUP14 DUP14 DUP14 DUP11 PUSH2 0x1F72 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xC80 PUSH3 0xF4240 DUP4 LT ISZERO PUSH1 0xCC PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xC8E PUSH1 0x0 PUSH3 0xF4240 PUSH2 0x200D JUMP JUMPDEST PUSH2 0xC9D DUP12 PUSH3 0xF4240 DUP5 SUB PUSH2 0x200D JUMP JUMPDEST PUSH2 0xCA7 DUP2 DUP5 PUSH2 0x17CB JUMP JUMPDEST DUP1 PUSH2 0xCB0 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xCC5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xCEF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP6 POP SWAP6 POP POP POP POP PUSH2 0x7CF JUMP JUMPDEST PUSH2 0xD06 DUP9 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0xD1A DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 DUP15 PUSH2 0x174E JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0xD2A DUP13 DUP5 PUSH2 0x200D JUMP JUMPDEST PUSH2 0xD34 DUP3 DUP6 PUSH2 0x17CB JUMP JUMPDEST PUSH2 0xD3E DUP2 DUP6 PUSH2 0x11E1 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP4 POP PUSH2 0x7CF SWAP2 POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD SWAP1 SWAP2 PUSH2 0x4D8 SWAP2 DUP6 SWAP1 PUSH2 0x6E1 SWAP1 DUP7 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x5B7 PUSH2 0x1C88 JUMP JUMPDEST DUP1 PUSH2 0xDC0 DUP2 PUSH2 0x20A3 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0xDC0 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x5A1 DUP5 DUP3 LT ISZERO DUP4 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xDF3 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0xF67 JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP5 SWAP1 SSTORE MLOAD PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP1 PUSH2 0xE54 SWAP1 DUP6 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE78 PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x7F7 JUMP JUMPDEST SWAP1 POP PUSH2 0x4F3 PUSH2 0xE87 DUP3 CALLER PUSH2 0x211C JUMP JUMPDEST PUSH2 0x191 PUSH2 0xF67 JUMP JUMPDEST DUP1 ISZERO PUSH2 0xEAF JUMPI PUSH2 0xEAA PUSH2 0xEA0 PUSH2 0xF1F JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xEC4 JUMP JUMPDEST PUSH2 0xEC4 PUSH2 0xEBA PUSH2 0xF43 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x62A SWAP1 DUP4 SWAP1 PUSH2 0x455A JUMP JUMPDEST PUSH1 0x0 PUSH2 0xF0C PUSH2 0xF43 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x5B7 JUMPI POP POP PUSH1 0x6 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST DUP2 PUSH2 0xDC0 JUMPI PUSH2 0xDC0 DUP2 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0xF9D DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0xFB4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO ISZERO PUSH2 0x199 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP6 DUP6 SUB SWAP1 SSTORE SWAP2 DUP6 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xFE4 SWAP1 DUP4 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 DUP7 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x1036 SWAP1 DUP7 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x10B1 PUSH2 0x225F JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10C6 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x45D9 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH2 0x10F4 PUSH2 0x10EC PUSH2 0xF02 JUMP JUMPDEST PUSH2 0x192 PUSH2 0xF67 JUMP JUMPDEST JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x60 PUSH2 0x1129 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH2 0x1133 PUSH2 0xF02 JUMP JUMPDEST ISZERO PUSH2 0x116A JUMPI PUSH1 0x0 PUSH2 0x1144 DUP3 DUP11 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH2 0x1155 DUP10 DUP4 PUSH1 0x8 SLOAD DUP5 DUP12 PUSH2 0x2263 JUMP JUMPDEST SWAP3 POP PUSH2 0x1164 DUP10 DUP5 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST POP PUSH2 0x11B5 JUMP JUMPDEST PUSH2 0x1172 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1187 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x11B1 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP JUMPDEST PUSH2 0x11C0 DUP9 DUP3 DUP8 PUSH2 0x23DD JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP PUSH2 0x11D0 DUP9 DUP5 DUP4 PUSH2 0x244A JUMP JUMPDEST PUSH1 0x8 SSTORE POP SWAP8 POP SWAP8 POP SWAP8 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x11EC PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x1223 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1202 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1216 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2463 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x122F JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x11E4 JUMP JUMPDEST POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x1305 JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x126B SWAP3 SWAP2 SWAP1 PUSH2 0x44E3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x12A8 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x12AD JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x12BC JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x43ADBAFB PUSH1 0xE0 SHL DUP2 EQ PUSH2 0x12E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x4 PUSH1 0x0 RETURNDATACOPY PUSH1 0x40 PUSH1 0x20 MSTORE PUSH1 0x24 RETURNDATASIZE SUB PUSH1 0x24 PUSH1 0x40 RETURNDATACOPY PUSH1 0x1C RETURNDATASIZE ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x130F PUSH2 0x13DE JUMP JUMPDEST SWAP1 POP PUSH2 0x131B DUP8 DUP3 PUSH2 0x165A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1332 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 DUP13 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH2 0x1345 DUP2 DUP5 DUP7 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP1 MLOAD PUSH1 0x1F NOT DUP3 ADD DUP4 SWAP1 MSTORE PUSH4 0x43ADBAFB PUSH1 0x3F NOT DUP4 ADD MSTORE PUSH1 0x20 MUL PUSH1 0x23 NOT DUP3 ADD PUSH1 0x44 DUP3 ADD DUP2 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x5A1 DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x139C DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x13A9 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x13CC SWAP1 DUP6 DUP4 DUP2 PUSH2 0x13C3 JUMPI INVALID JUMPDEST DIV EQ PUSH1 0x5 PUSH2 0xF67 JUMP JUMPDEST DUP3 DUP2 DUP2 PUSH2 0x13D5 JUMPI INVALID JUMPDEST DIV SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x13EA PUSH2 0x10F6 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1404 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x142E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1465 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x147F JUMP JUMPDEST SWAP2 POP PUSH2 0x4C8 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x14B6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x14F9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x153C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0x157F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0x15C2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0x1605 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0x1648 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x1665 PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x169C DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x167B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x168F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1369 JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x16A8 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x165D JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x16E3 DUP3 DUP3 LT ISZERO PUSH2 0x196 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP3 DUP3 SUB SWAP1 SSTORE PUSH1 0x2 SLOAD PUSH2 0x170D SWAP1 DUP4 PUSH2 0xDE3 JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0xE54 SWAP1 DUP7 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH2 0x175B PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1765 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1773 DUP3 DUP11 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x1786 DUP11 DUP5 PUSH1 0x8 SLOAD DUP6 DUP13 PUSH2 0x2263 JUMP JUMPDEST SWAP1 POP PUSH2 0x1795 DUP11 DUP3 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x17A4 DUP13 DUP7 DUP12 PUSH2 0x2483 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x17B3 DUP13 DUP3 DUP8 PUSH2 0x24DD JUMP JUMPDEST PUSH1 0x8 SSTORE SWAP1 SWAP15 SWAP1 SWAP14 POP SWAP1 SWAP12 POP SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x17D6 PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH2 0x180D DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x17EC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1800 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x24EC JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x1819 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x17CE JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x188F JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x18F0 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1951 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x19B2 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1A13 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1A74 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1AD5 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B36 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH2 0x735 PUSH2 0x135 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1B59 PUSH1 0x7 SLOAD DUP5 PUSH2 0x251F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x5A1 DUP4 DUP3 PUSH2 0xDE3 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x1369 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1B7B PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x1BA4 DUP4 PUSH2 0x1B8C DUP7 PUSH1 0x20 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP5 PUSH2 0x1B9A DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x286D JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x2463 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1BC2 PUSH2 0x10E1 JUMP JUMPDEST PUSH2 0x1BA4 DUP4 PUSH2 0x1BD3 DUP7 PUSH1 0x20 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP5 PUSH2 0x1BE1 DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x2563 JUMP JUMPDEST DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x28E8 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5A1 DUP4 DUP4 PUSH2 0x24EC JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4DC PUSH2 0x1C07 PUSH1 0x7 SLOAD PUSH2 0x295E JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2984 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C18 PUSH2 0x893 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1C50 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1C64 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x5B7 SWAP2 SWAP1 PUSH2 0x424F JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x1C94 PUSH2 0x10F6 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x1CAE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1CD8 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP2 ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x1D0F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x1 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x1D52 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x2 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x2 DUP2 MLOAD DUP2 LT PUSH2 0x1D95 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x3 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x3 DUP2 MLOAD DUP2 LT PUSH2 0x1DD8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x4 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x4 DUP2 MLOAD DUP2 LT PUSH2 0x1E1B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x5 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x5 DUP2 MLOAD DUP2 LT PUSH2 0x1E5E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x6 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x6 DUP2 MLOAD DUP2 LT PUSH2 0x1EA1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH1 0x7 DUP3 GT ISZERO PUSH2 0x1476 JUMPI PUSH32 0x0 DUP2 PUSH1 0x7 DUP2 MLOAD DUP2 LT PUSH2 0x1648 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x1F46 JUMPI PUSH2 0x1F3C PUSH2 0x1F35 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F0B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x1F1F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x29C6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x1EF0 JUMP JUMPDEST POP PUSH2 0x4DC PUSH1 0x0 DUP3 GT PUSH2 0x137 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1F60 PUSH2 0x1044 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x82C SWAP3 SWAP2 SWAP1 PUSH2 0x44F3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x1F7E PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1F89 DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FA4 PUSH1 0x0 DUP3 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1F9C JUMPI INVALID JUMPDEST EQ PUSH1 0xCE PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1FAF DUP6 PUSH2 0x2A57 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FC3 PUSH2 0x1FBC PUSH2 0x10F6 JUMP JUMPDEST DUP3 MLOAD PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x1FCF DUP2 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1FD9 PUSH2 0x1C88 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1FE7 DUP3 DUP5 PUSH2 0x1EE4 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1FF7 DUP3 PUSH2 0x710 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x8 SWAP3 SWAP1 SWAP3 SSTORE POP SWAP10 SWAP2 SWAP9 POP SWAP1 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x2030 SWAP1 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SSTORE PUSH1 0x2 SLOAD PUSH2 0x2056 SWAP1 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 PUSH1 0x0 SWAP1 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP1 PUSH2 0x2097 SWAP1 DUP6 SWAP1 PUSH2 0x457D JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x2 DUP2 MLOAD LT ISZERO PUSH2 0x20B2 JUMPI PUSH2 0x4F3 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x20C1 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH1 0x1 SWAP1 POP JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x1242 JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x20E9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x2112 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x65 PUSH2 0xF67 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x20D2 JUMP JUMPDEST PUSH1 0x0 PUSH20 0xBA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1BA1B PUSH2 0x213B PUSH2 0x86F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO DUP1 ISZERO PUSH2 0x2156 JUMPI POP PUSH2 0x2156 DUP4 PUSH2 0x2A6D JUMP JUMPDEST ISZERO PUSH2 0x217E JUMPI PUSH2 0x2163 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2186 PUSH2 0x1C0E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x21B5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x4586 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x21CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x21E1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2205 SWAP2 SWAP1 PUSH2 0x410F JUMP JUMPDEST SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH2 0x226E PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x22AD JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP DUP3 PUSH2 0x22BC JUMPI SWAP1 POP PUSH2 0x2369 JUMP JUMPDEST PUSH2 0x232F DUP8 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x22EB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x231F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP8 DUP8 DUP8 PUSH2 0x2A87 JUMP JUMPDEST DUP2 PUSH32 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x235B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP1 POP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST PUSH2 0x237D PUSH2 0x10F6 JUMP JUMPDEST DUP2 LT ISZERO PUSH2 0x23D7 JUMPI PUSH2 0x23B8 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2393 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x23A7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x23C4 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x2375 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x23EC DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x23FC JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2417 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2AFF JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x2442 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2425 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2435 JUMPI PUSH2 0x240D DUP7 DUP6 PUSH2 0x2BDC JUMP JUMPDEST PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2C0E JUMP JUMPDEST POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2459 DUP5 DUP5 PUSH2 0xDE3 PUSH2 0x2372 JUMP JUMPDEST PUSH2 0x1BA4 DUP3 DUP6 PUSH2 0x1EE4 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2472 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP2 DUP4 DUP2 PUSH2 0x247B JUMPI INVALID JUMPDEST DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x2492 DUP5 PUSH2 0x2A41 JUMP JUMPDEST SWAP1 POP PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x24A2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x24B3 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2C79 JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x24C1 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x24D2 JUMPI PUSH2 0x240D DUP7 DUP7 DUP7 PUSH2 0x2CD3 JUMP JUMPDEST PUSH2 0x2440 PUSH2 0x136 PUSH2 0x220C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2459 DUP5 DUP5 PUSH2 0xDD1 PUSH2 0x2372 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x24FB DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x2508 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST DUP2 PUSH1 0x1 DUP5 SUB DUP2 PUSH2 0x2514 JUMPI INVALID JUMPDEST DIV PUSH1 0x1 ADD SWAP1 POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2539 DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST DUP1 PUSH2 0x2548 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD JUMPDEST DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x25C6 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x2627 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x2688 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x26E9 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x274A JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x27AB JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x280C JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1B36 JUMPI POP PUSH32 0x0 PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x288F PUSH2 0x2884 DUP8 PUSH8 0x429D069189E0000 PUSH2 0x2A15 JUMP JUMPDEST DUP4 GT ISZERO PUSH2 0x130 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x289B DUP8 DUP5 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28A9 DUP9 DUP4 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28B7 DUP9 DUP8 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x28C5 DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA PUSH2 0x28D3 DUP3 PUSH2 0x295E JUMP JUMPDEST DUP10 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x290A PUSH2 0x28FF DUP6 PUSH8 0x429D069189E0000 PUSH2 0x2A15 JUMP JUMPDEST DUP4 GT ISZERO PUSH2 0x131 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2920 PUSH2 0x2919 DUP7 DUP6 PUSH2 0xDE3 JUMP JUMPDEST DUP7 SWAP1 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x292E DUP6 DUP9 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x293C DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2952 DUP3 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA DUP11 DUP3 PUSH2 0x251F JUMP JUMPDEST PUSH1 0x0 PUSH8 0xDE0B6B3A7640000 DUP3 LT PUSH2 0x2976 JUMPI PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2993 DUP3 ISZERO ISZERO PUSH1 0x4 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x29A0 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP4 DUP2 MUL SWAP1 PUSH2 0x29BA SWAP1 DUP6 DUP4 DUP2 PUSH2 0x13C3 JUMPI INVALID JUMPDEST DUP3 PUSH1 0x1 DUP3 SUB DUP2 PUSH2 0x2557 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x29D3 DUP5 DUP5 PUSH2 0x2DA6 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29ED PUSH2 0x29E6 DUP4 PUSH2 0x2710 PUSH2 0x251F JUMP JUMPDEST PUSH1 0x1 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP DUP1 DUP3 LT ISZERO PUSH2 0x2A02 JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2A0C DUP3 DUP3 PUSH2 0xDE3 JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x4DC JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2A2F DUP5 ISZERO DUP1 PUSH2 0x1386 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x1383 JUMPI INVALID JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 DIV SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x4DC SWAP2 SWAP1 PUSH2 0x426B JUMP JUMPDEST PUSH1 0x60 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5A1 SWAP2 SWAP1 PUSH2 0x4330 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2A7F PUSH4 0x1C74C917 PUSH1 0xE1 SHL PUSH2 0x7F7 JUMP JUMPDEST SWAP1 SWAP2 EQ SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP4 GT PUSH2 0x2A98 JUMPI POP PUSH1 0x0 PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2AA4 DUP6 DUP6 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2ABA PUSH8 0xDE0B6B3A7640000 DUP9 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH2 0x2ACE DUP3 PUSH8 0x9B6E64A8EC60000 PUSH2 0x2EB1 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 PUSH2 0x2ADC DUP4 DUP4 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2AF3 PUSH2 0x2AEC DUP4 PUSH2 0x295E JUMP JUMPDEST DUP12 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP1 POP PUSH2 0x28DA DUP2 DUP8 PUSH2 0x2A15 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2B0B PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2B17 DUP6 PUSH2 0x2EC8 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2B2F PUSH2 0x2B26 PUSH2 0x10F6 JUMP JUMPDEST DUP3 LT PUSH1 0x64 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2B39 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2B4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2B78 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2BB7 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2B8A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2B9E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH2 0x2BAF PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x2EEA JUMP JUMPDEST DUP2 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2BC3 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE SWAP2 SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 PUSH2 0x2BEB DUP5 PUSH2 0x2FA7 JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x2C01 DUP7 DUP4 PUSH2 0x2BFC PUSH2 0x4F6 JUMP JUMPDEST PUSH2 0x2FBD JUMP JUMPDEST SWAP2 SWAP7 SWAP2 SWAP6 POP SWAP1 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH2 0x2C1A PUSH2 0x10E1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2C27 DUP6 PUSH2 0x306E JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2C38 DUP3 MLOAD PUSH2 0x670 PUSH2 0x10F6 JUMP JUMPDEST PUSH2 0x2C44 DUP3 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2C5C DUP9 DUP9 DUP6 PUSH2 0x2C54 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x3086 JUMP JUMPDEST SWAP1 POP PUSH2 0x2C6C DUP3 DUP3 GT ISZERO PUSH1 0xCF PUSH2 0xF67 JUMP JUMPDEST SWAP8 SWAP2 SWAP7 POP SWAP1 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x2C89 DUP6 PUSH2 0x306E JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2C9F PUSH2 0x2C98 PUSH2 0x10F6 JUMP JUMPDEST DUP4 MLOAD PUSH2 0xDC4 JUMP JUMPDEST PUSH2 0x2CAB DUP3 PUSH2 0xABE PUSH2 0x13DE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2CC3 DUP9 DUP9 DUP6 PUSH2 0x2CBB PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x32AA JUMP JUMPDEST SWAP1 POP PUSH2 0x2C6C DUP3 DUP3 LT ISZERO PUSH1 0xD0 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0x2CE3 DUP6 PUSH2 0x2EC8 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x2CF2 PUSH2 0x2B26 PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x2CFC PUSH2 0x10F6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2D11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2D3B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2BB7 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2D4D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x2D61 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH2 0x2D72 PUSH2 0x4F6 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x34BA JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2D87 DUP5 DUP5 PUSH2 0x2DA6 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2D9A PUSH2 0x29E6 DUP4 PUSH2 0x2710 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH2 0x2369 DUP3 DUP3 PUSH2 0xDD1 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x2DBC JUMPI POP PUSH8 0xDE0B6B3A7640000 PUSH2 0x4DC JUMP JUMPDEST DUP3 PUSH2 0x2DC9 JUMPI POP PUSH1 0x0 PUSH2 0x4DC JUMP JUMPDEST PUSH2 0x2DDA PUSH1 0x1 PUSH1 0xFF SHL DUP5 LT PUSH1 0x6 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH2 0x2E00 PUSH24 0xBCE5086492111AEA88F4BB1CA6BCF584181EA8059F76532 DUP5 LT PUSH1 0x7 PUSH2 0xF67 JUMP JUMPDEST DUP3 PUSH1 0x0 PUSH8 0xC7D713B49DA0000 DUP4 SGT DUP1 ISZERO PUSH2 0x2E21 JUMPI POP PUSH8 0xF43FC2C04EE0000 DUP4 SLT JUMPDEST ISZERO PUSH2 0x2E58 JUMPI PUSH1 0x0 PUSH2 0x2E31 DUP5 PUSH2 0x355C JUMP JUMPDEST SWAP1 POP PUSH8 0xDE0B6B3A7640000 DUP1 DUP3 SMOD DUP5 MUL SDIV DUP4 PUSH8 0xDE0B6B3A7640000 DUP4 SDIV MUL ADD SWAP2 POP POP PUSH2 0x2E66 JUMP JUMPDEST DUP2 PUSH2 0x2E62 DUP5 PUSH2 0x367A JUMP JUMPDEST MUL SWAP1 POP JUMPDEST PUSH8 0xDE0B6B3A7640000 SWAP1 SDIV PUSH2 0x2E9E PUSH9 0x238FD42C5CF03FFFF NOT DUP3 SLT DUP1 ISZERO SWAP1 PUSH2 0x2E97 JUMPI POP PUSH9 0x70C1CC73B00C80000 DUP3 SGT ISZERO JUMPDEST PUSH1 0x8 PUSH2 0xF67 JUMP JUMPDEST PUSH2 0x2EA7 DUP2 PUSH2 0x3A27 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT ISZERO PUSH2 0x2EC1 JUMPI DUP2 PUSH2 0x5A1 JUMP JUMPDEST POP SWAP1 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2EDF SWAP2 SWAP1 PUSH2 0x42FA JUMP JUMPDEST SWAP1 SWAP6 SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2F01 DUP5 PUSH2 0x2EFB DUP2 DUP9 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F1A PUSH8 0x9B6E64A8EC60000 DUP3 LT ISZERO PUSH2 0x132 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2F38 PUSH2 0x2F31 PUSH8 0xDE0B6B3A7640000 DUP10 PUSH2 0x138D JUMP JUMPDEST DUP4 SWAP1 PUSH2 0x2D7A JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F4F PUSH2 0x2F48 DUP4 PUSH2 0x295E JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F5C DUP10 PUSH2 0x295E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F6A DUP4 DUP4 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2F78 DUP5 DUP4 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F97 PUSH2 0x2F90 PUSH2 0x2F89 DUP11 PUSH2 0x295E JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST DUP3 SWAP1 PUSH2 0xDD1 JUMP JUMPDEST SWAP13 SWAP12 POP POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x5A1 SWAP2 SWAP1 PUSH2 0x42CD JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0x2FCB DUP5 DUP5 PUSH2 0x138D JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP6 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2FE6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3010 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0x3064 JUMPI PUSH2 0x3045 DUP4 DUP9 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2A15 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3051 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x3016 JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2EDF SWAP2 SWAP1 PUSH2 0x4287 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x30A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x30CB JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x3190 JUMPI PUSH2 0x312B DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x30EA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x2EFB DUP10 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3101 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xDE3 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3137 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x3186 PUSH2 0x317F DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3155 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3169 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x251F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 SWAP1 PUSH2 0xDD1 JUMP JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x30D2 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x3289 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x31B4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 GT ISZERO PUSH2 0x320B JUMPI PUSH1 0x0 PUSH2 0x31DD PUSH2 0x31D1 DUP7 PUSH2 0x295E JUMP JUMPDEST DUP14 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x31F1 DUP3 DUP13 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x3202 PUSH2 0x317F PUSH2 0x1C07 DUP12 PUSH2 0x295E JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x3222 JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3217 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x324B DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3233 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP5 DUP16 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x327D PUSH2 0x3276 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x325F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x29C6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP6 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP4 POP POP POP PUSH1 0x1 ADD PUSH2 0x319D JUMP JUMPDEST POP PUSH2 0x329D PUSH2 0x3296 DUP3 PUSH2 0x295E JUMP JUMPDEST DUP8 SWAP1 PUSH2 0x251F JUMP JUMPDEST SWAP10 SWAP9 POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x32C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x32EF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP9 MLOAD DUP2 LT ISZERO PUSH2 0x3397 JUMPI PUSH2 0x334F DUP10 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x330E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP10 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3325 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x3339 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0xDD1 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x335B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x338D PUSH2 0x317F DUP10 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3379 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x302F JUMPI INVALID JUMPDEST SWAP2 POP PUSH1 0x1 ADD PUSH2 0x32F6 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x3478 JUMPI PUSH1 0x0 DUP4 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x33BC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD GT ISZERO PUSH2 0x3418 JUMPI PUSH1 0x0 PUSH2 0x33E1 PUSH2 0x31D1 DUP7 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x33F5 DUP3 DUP13 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x3115 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x340F PUSH2 0x317F PUSH2 0x1F35 PUSH8 0xDE0B6B3A7640000 DUP13 PUSH2 0xDE3 JUMP JUMPDEST SWAP3 POP POP POP PUSH2 0x342F JUMP JUMPDEST DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3424 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP JUMPDEST PUSH1 0x0 PUSH2 0x3458 DUP13 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3440 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x715 DUP5 DUP16 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x3339 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x346C PUSH2 0x3276 DUP13 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x325F JUMPI INVALID JUMPDEST SWAP4 POP POP POP PUSH1 0x1 ADD PUSH2 0x33A4 JUMP JUMPDEST POP PUSH8 0xDE0B6B3A7640000 DUP2 LT PUSH2 0x34AE JUMPI PUSH2 0x34A4 PUSH2 0x349D DUP3 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST DUP8 SWAP1 PUSH2 0x2A15 JUMP JUMPDEST SWAP4 POP POP POP POP PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 SWAP4 POP POP POP POP PUSH2 0x2369 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x34CB DUP5 PUSH2 0x2EFB DUP2 DUP9 PUSH2 0xDD1 JUMP JUMPDEST SWAP1 POP PUSH2 0x34E4 PUSH8 0x29A2241AF62C0000 DUP3 GT ISZERO PUSH2 0x133 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x34FB PUSH2 0x2F31 PUSH8 0xDE0B6B3A7640000 DUP10 PUSH2 0x2984 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x351B PUSH2 0x3514 DUP4 PUSH8 0xDE0B6B3A7640000 PUSH2 0xDE3 JUMP JUMPDEST DUP11 SWAP1 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3528 DUP10 PUSH2 0x295E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3536 DUP4 DUP4 PUSH2 0x251F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x3544 DUP5 DUP4 PUSH2 0xDE3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2F97 PUSH2 0x2F90 PUSH2 0x3555 DUP11 PUSH2 0x295E JUMP JUMPDEST DUP5 SWAP1 PUSH2 0x2984 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 MUL PUSH1 0x0 DUP1 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP1 DUP5 ADD SWAP1 PUSH15 0xC097CE7BC90715B34B9F0FFFFFFFFF NOT DUP6 ADD MUL DUP2 PUSH2 0x3597 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH1 0x0 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP1 MUL SDIV SWAP1 POP DUP2 DUP1 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 DUP5 MUL SDIV SWAP2 POP PUSH1 0x3 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x5 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x7 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x9 DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xB DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xD DUP3 SDIV ADD PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xF DUP3 PUSH1 0x2 SWAP2 SWAP1 SDIV SWAP2 SWAP1 SWAP2 ADD MUL SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x368A PUSH1 0x0 DUP4 SGT PUSH1 0x64 PUSH2 0xF67 JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP3 SLT ISZERO PUSH2 0x36C4 JUMPI PUSH2 0x36BA DUP3 PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 PUSH2 0x36B4 JUMPI INVALID JUMPDEST SDIV PUSH2 0x367A JUMP JUMPDEST PUSH1 0x0 SUB SWAP1 POP PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH31 0x1600EF3172E58D2E933EC884FDE10064C63B5372D805E203C0000000000000 DUP4 SLT PUSH2 0x3715 JUMPI PUSH24 0x195E54C5DD42177F53A27172FA9EC630262827000000000 DUP4 SDIV SWAP3 POP PUSH9 0x6F05B59D3B2000000 ADD JUMPDEST PUSH20 0x11798004D755D3C8BC8E03204CF44619E000000 DUP4 SLT PUSH2 0x374D JUMPI PUSH12 0x1425982CF597CD205CEF7380 DUP4 SDIV SWAP3 POP PUSH9 0x3782DACE9D9000000 ADD JUMPDEST PUSH1 0x64 SWAP3 DUP4 MUL SWAP3 MUL PUSH15 0x1855144814A7FF805980FF0084000 DUP4 SLT PUSH2 0x3795 JUMPI PUSH15 0x1855144814A7FF805980FF0084000 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0xAD78EBC5AC62000000 ADD JUMPDEST PUSH12 0x2DF0AB5A80A22C61AB5A700 DUP4 SLT PUSH2 0x37D0 JUMPI PUSH12 0x2DF0AB5A80A22C61AB5A700 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x56BC75E2D631000000 ADD JUMPDEST PUSH10 0x3F1FCE3DA636EA5CF850 DUP4 SLT PUSH2 0x3807 JUMPI PUSH10 0x3F1FCE3DA636EA5CF850 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x2B5E3AF16B18800000 ADD JUMPDEST PUSH10 0x127FA27722CC06CC5E2 DUP4 SLT PUSH2 0x383E JUMPI PUSH10 0x127FA27722CC06CC5E2 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x15AF1D78B58C400000 ADD JUMPDEST PUSH9 0x280E60114EDB805D03 DUP4 SLT PUSH2 0x3873 JUMPI PUSH9 0x280E60114EDB805D03 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0xAD78EBC5AC6200000 ADD JUMPDEST PUSH9 0xEBC5FB41746121110 DUP4 SLT PUSH2 0x389E JUMPI PUSH9 0xEBC5FB41746121110 PUSH9 0x56BC75E2D63100000 SWAP4 DUP5 MUL SDIV SWAP3 ADD JUMPDEST PUSH9 0x8F00F760A4B2DB55D DUP4 SLT PUSH2 0x38D3 JUMPI PUSH9 0x8F00F760A4B2DB55D PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x2B5E3AF16B1880000 ADD JUMPDEST PUSH9 0x6F5F1775788937937 DUP4 SLT PUSH2 0x3908 JUMPI PUSH9 0x6F5F1775788937937 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH9 0x15AF1D78B58C40000 ADD JUMPDEST PUSH9 0x6248F33704B286603 DUP4 SLT PUSH2 0x393C JUMPI PUSH9 0x6248F33704B286603 PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH8 0xAD78EBC5AC620000 ADD JUMPDEST PUSH9 0x5C548670B9510E7AC DUP4 SLT PUSH2 0x3970 JUMPI PUSH9 0x5C548670B9510E7AC PUSH9 0x56BC75E2D63100000 DUP5 MUL SDIV SWAP3 POP PUSH8 0x56BC75E2D6310000 ADD JUMPDEST PUSH1 0x0 PUSH9 0x56BC75E2D63100000 DUP5 ADD PUSH9 0x56BC75E2D63100000 DUP1 DUP7 SUB MUL DUP2 PUSH2 0x3993 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH1 0x0 PUSH9 0x56BC75E2D63100000 DUP3 DUP1 MUL SDIV SWAP1 POP DUP2 DUP1 PUSH9 0x56BC75E2D63100000 DUP2 DUP5 MUL SDIV SWAP2 POP PUSH1 0x3 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x5 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x7 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0x9 DUP3 SDIV ADD PUSH9 0x56BC75E2D63100000 DUP3 DUP5 MUL SDIV SWAP2 POP PUSH1 0xB DUP3 SDIV ADD PUSH1 0x2 MUL PUSH1 0x64 DUP6 DUP3 ADD SDIV SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3A56 PUSH9 0x238FD42C5CF03FFFF NOT DUP4 SLT ISZERO DUP1 ISZERO PUSH2 0x3A4F JUMPI POP PUSH9 0x70C1CC73B00C80000 DUP4 SGT ISZERO JUMPDEST PUSH1 0x9 PUSH2 0xF67 JUMP JUMPDEST PUSH1 0x0 DUP3 SLT ISZERO PUSH2 0x3A89 JUMPI PUSH2 0x3A6B DUP3 PUSH1 0x0 SUB PUSH2 0x3A27 JUMP JUMPDEST PUSH11 0xC097CE7BC90715B34B9F1 PUSH1 0x24 SHL DUP2 PUSH2 0x3A81 JUMPI INVALID JUMPDEST SDIV SWAP1 POP PUSH2 0x735 JUMP JUMPDEST PUSH1 0x0 PUSH9 0x6F05B59D3B2000000 DUP4 SLT PUSH2 0x3AC9 JUMPI POP PUSH9 0x6F05B59D3B1FFFFFF NOT SWAP1 SWAP2 ADD SWAP1 PUSH24 0x195E54C5DD42177F53A27172FA9EC630262827000000000 PUSH2 0x3AFF JUMP JUMPDEST PUSH9 0x3782DACE9D9000000 DUP4 SLT PUSH2 0x3AFB JUMPI POP PUSH9 0x3782DACE9D8FFFFFF NOT SWAP1 SWAP2 ADD SWAP1 PUSH12 0x1425982CF597CD205CEF7380 PUSH2 0x3AFF JUMP JUMPDEST POP PUSH1 0x1 JUMPDEST PUSH1 0x64 SWAP3 SWAP1 SWAP3 MUL SWAP2 PUSH9 0x56BC75E2D63100000 PUSH9 0xAD78EBC5AC62000000 DUP5 SLT PUSH2 0x3B4F JUMPI PUSH9 0xAD78EBC5AC61FFFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH15 0x1855144814A7FF805980FF0084000 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D631000000 DUP5 SLT PUSH2 0x3B8B JUMPI PUSH9 0x56BC75E2D630FFFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH12 0x2DF0AB5A80A22C61AB5A700 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x2B5E3AF16B18800000 DUP5 SLT PUSH2 0x3BC5 JUMPI PUSH9 0x2B5E3AF16B187FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH10 0x3F1FCE3DA636EA5CF850 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x15AF1D78B58C400000 DUP5 SLT PUSH2 0x3BFF JUMPI PUSH9 0x15AF1D78B58C3FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH10 0x127FA27722CC06CC5E2 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0xAD78EBC5AC6200000 DUP5 SLT PUSH2 0x3C38 JUMPI PUSH9 0xAD78EBC5AC61FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x280E60114EDB805D03 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D63100000 DUP5 SLT PUSH2 0x3C71 JUMPI PUSH9 0x56BC75E2D630FFFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0xEBC5FB41746121110 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x2B5E3AF16B1880000 DUP5 SLT PUSH2 0x3CAA JUMPI PUSH9 0x2B5E3AF16B187FFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x8F00F760A4B2DB55D DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x15AF1D78B58C40000 DUP5 SLT PUSH2 0x3CE3 JUMPI PUSH9 0x15AF1D78B58C3FFFF NOT SWAP1 SWAP4 ADD SWAP3 PUSH9 0x56BC75E2D63100000 PUSH9 0x6F5F1775788937937 DUP3 MUL SDIV SWAP1 POP JUMPDEST PUSH9 0x56BC75E2D63100000 DUP5 DUP2 ADD SWAP1 DUP6 SWAP1 PUSH1 0x2 SWAP1 DUP3 DUP1 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x3 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x4 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x5 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x6 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x7 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x8 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x9 PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xA PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xB PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0xC PUSH9 0x56BC75E2D63100000 DUP8 DUP4 MUL SDIV SDIV SWAP2 DUP3 ADD SWAP2 SWAP1 POP PUSH1 0x64 PUSH9 0x56BC75E2D63100000 DUP5 DUP5 MUL SDIV DUP6 MUL SDIV SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x4DC DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3E1F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x3E32 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST PUSH2 0x469D JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x3E53 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x3E72 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x3E56 JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x3E8D JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x3EA2 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x3EB5 PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x469D JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x3ECC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x4DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x3F05 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5A1 DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x3F22 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x3F2D DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x3F3D DUP2 PUSH2 0x46E2 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x3F5C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x3F67 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x3F77 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP3 SWAP6 SWAP3 SWAP5 POP POP POP PUSH1 0x40 SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x3FA2 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP8 CALLDATALOAD PUSH2 0x3FAD DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP7 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD PUSH2 0x3FBD DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP6 POP PUSH1 0x40 DUP9 ADD CALLDATALOAD SWAP5 POP PUSH1 0x60 DUP9 ADD CALLDATALOAD SWAP4 POP PUSH1 0x80 DUP9 ADD CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x3FE0 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP7 SWAP10 SWAP6 SWAP9 POP SWAP4 SWAP7 SWAP3 SWAP6 SWAP5 PUSH1 0xA0 DUP5 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 SWAP1 SWAP4 ADD CALLDATALOAD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x400F JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x401A DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP5 PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD CALLDATALOAD SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x403C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4052 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4065 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x4073 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD SWAP3 POP DUP1 DUP7 ADD DUP12 DUP3 DUP4 DUP8 MUL DUP10 ADD ADD GT ISZERO PUSH2 0x4093 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP7 POP JUMPDEST DUP5 DUP8 LT ISZERO PUSH2 0x40BE JUMPI DUP1 MLOAD PUSH2 0x40AA DUP2 PUSH2 0x46E2 JUMP JUMPDEST DUP5 MSTORE PUSH1 0x1 SWAP7 SWAP1 SWAP7 ADD SWAP6 SWAP3 DUP2 ADD SWAP3 DUP2 ADD PUSH2 0x4097 JUMP JUMPDEST POP DUP10 ADD MLOAD SWAP1 SWAP8 POP SWAP4 POP POP POP DUP1 DUP3 GT ISZERO PUSH2 0x40D5 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x40E2 DUP7 DUP3 DUP8 ADD PUSH2 0x3E0F JUMP JUMPDEST SWAP3 POP POP PUSH1 0x40 DUP5 ADD MLOAD SWAP1 POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4104 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x5A1 DUP2 PUSH2 0x46F7 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4120 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x46F7 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0xE0 DUP9 DUP11 SUB SLT ISZERO PUSH2 0x4145 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP8 CALLDATALOAD SWAP7 POP PUSH1 0x20 DUP1 DUP10 ADD CALLDATALOAD PUSH2 0x4158 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP7 POP PUSH1 0x40 DUP10 ADD CALLDATALOAD PUSH2 0x4168 DUP2 PUSH2 0x46E2 JUMP JUMPDEST SWAP6 POP PUSH1 0x60 DUP10 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4183 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP12 ADD SWAP2 POP DUP12 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4196 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x41A4 PUSH2 0x3E2D DUP3 PUSH2 0x46C3 JUMP JUMPDEST DUP1 DUP3 DUP3 MSTORE DUP6 DUP3 ADD SWAP2 POP DUP6 DUP6 ADD DUP16 DUP8 DUP9 DUP7 MUL DUP9 ADD ADD GT ISZERO PUSH2 0x41C2 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x41E4 JUMPI DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH2 0x41C6 JUMP JUMPDEST POP SWAP9 POP POP POP PUSH1 0x80 DUP12 ADD CALLDATALOAD SWAP6 POP PUSH1 0xA0 DUP12 ADD CALLDATALOAD SWAP5 POP PUSH1 0xC0 DUP12 ADD CALLDATALOAD SWAP3 POP DUP1 DUP4 GT ISZERO PUSH2 0x420A JUMPI DUP4 DUP5 REVERT JUMPDEST POP POP PUSH2 0x4218 DUP11 DUP3 DUP12 ADD PUSH2 0x3E7D JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP9 SWAP2 SWAP5 SWAP8 POP SWAP3 SWAP6 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4238 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x5A1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4260 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x46E2 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x427C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x5A1 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x429B JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x42A6 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD SWAP1 SWAP4 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x42C1 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x40E2 DUP7 DUP3 DUP8 ADD PUSH2 0x3E0F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x42DF JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x42EA DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 SWAP4 SWAP1 SWAP4 ADD MLOAD SWAP3 SWAP5 SWAP3 SWAP4 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x430E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 MLOAD PUSH2 0x4319 DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP6 ADD MLOAD PUSH1 0x40 SWAP1 SWAP6 ADD MLOAD SWAP1 SWAP7 SWAP5 SWAP6 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x4342 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH2 0x434D DUP2 PUSH2 0x4705 JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MLOAD SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x4368 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x4374 DUP6 DUP3 DUP7 ADD PUSH2 0x3E0F JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x4392 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x43A8 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP PUSH2 0x120 DUP1 DUP4 DUP10 SUB SLT ISZERO PUSH2 0x43BE JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x43C7 DUP2 PUSH2 0x469D JUMP JUMPDEST SWAP1 POP PUSH2 0x43D3 DUP9 DUP5 PUSH2 0x3EE5 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x43E2 DUP9 PUSH1 0x20 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH2 0x43F4 DUP9 PUSH1 0x40 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP4 ADD CALLDATALOAD PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD PUSH1 0xA0 DUP3 ADD MSTORE PUSH2 0x4424 DUP9 PUSH1 0xC0 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD MSTORE PUSH2 0x4436 DUP9 PUSH1 0xE0 DUP6 ADD PUSH2 0x3E04 JUMP JUMPDEST PUSH1 0xE0 DUP3 ADD MSTORE PUSH2 0x100 DUP1 DUP5 ADD CALLDATALOAD DUP4 DUP2 GT ISZERO PUSH2 0x444E JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH2 0x445A DUP11 DUP3 DUP8 ADD PUSH2 0x3E7D JUMP JUMPDEST SWAP2 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP8 PUSH1 0x20 DUP8 ADD CALLDATALOAD SWAP8 POP PUSH1 0x40 SWAP1 SWAP7 ADD CALLDATALOAD SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x448A JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x44C0 JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x44A4 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x5A1 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x4491 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 MSTORE PUSH2 0x4548 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x4491 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x2369 DUP2 DUP6 PUSH2 0x4491 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP6 DUP7 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND PUSH1 0x20 DUP8 ADD MSTORE SWAP3 SWAP1 SWAP4 AND PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0x80 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0xC0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 MSTORE DUP4 MLOAD DUP1 DUP3 DUP6 ADD MSTORE DUP3 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x464F JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x40 ADD MSTORE DUP3 ADD PUSH2 0x4633 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x4660 JUMPI DUP4 PUSH1 0x40 DUP4 DUP8 ADD ADD MSTORE JUMPDEST POP PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x40 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0x1BA4 PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x4491 JUMP JUMPDEST PUSH1 0xFF SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x46BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x46D8 JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x4F3 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH23 0x5DAE8954494FC239D6EDD2B70A6D1304F3CE003F1A0AD7 PUSH6 0x569325030008 DUP1 PUSH5 0x736F6C6343 STOP SMOD ADD STOP CALLER LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH17 0x87A0883D288C32F045814D0391A26A36E7 MSTORE8 0xA8 DUP1 0xD3 0xC9 PUSH11 0x46919E14F50CC40D64736F PUSH13 0x63430007010033000000000000 ",
              "sourceMap": "916:979:39:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2066:887:32;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;1626:118:31;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1461:79::-;;;:::i;:::-;;;;;;;:::i;1171:722:39:-;;;;;;:::i;:::-;;:::i;2066:887:32:-;2120:27;;2211:15;2254:24;2240:38;;2236:711;;;2577:11;2550:24;:38;2528:60;;1401:7;2637:46;;2236:711;;;2897:1;2875:23;;2935:1;2912:24;;2236:711;2066:887;;;:::o;1626:118:31:-;-1:-1:-1;;;;;1713:24:31;1690:4;1713:24;;;;;;;;;;;;;;1626:118::o;1461:79::-;1527:6;1461:79;:::o;1171:722:39:-;1393:7;1413:27;1442:28;1474:23;:21;:23::i;:::-;1412:85;;;;1508:12;1578:10;:8;:10::i;:::-;1606:4;1628:6;1652;1676:7;1701:17;1736:19;1773:20;1811:5;1544:286;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1508:332;;1850:15;1860:4;1850:9;:15::i;:::-;1882:4;1171:722;-1:-1:-1;;;;;;;;;1171:722:39:o;1851:122:31:-;-1:-1:-1;;;;;1903:24:31;;:18;:24;;;;;;;;;;;:31;;-1:-1:-1;;1903:31:31;1930:4;1903:31;;;1949:17;;;1903:18;1949:17;1851:122;:::o;-1:-1:-1:-;;;;;;;;:::o;5:130::-;72:20;;97:33;72:20;97:33;:::i;:::-;57:78;;;;:::o;168:752::-;;300:3;293:4;285:6;281:17;277:27;267:2;;-1:-1;;308:12;267:2;355:6;342:20;377:95;392:79;464:6;392:79;:::i;:::-;377:95;:::i;:::-;500:21;;;368:104;-1:-1;544:4;557:14;;;;532:17;;;646;;;637:27;;;;634:36;-1:-1;631:2;;;683:1;;673:12;631:2;708:1;693:221;718:6;715:1;712:13;693:221;;;1756:6;1743:20;1768:48;1810:5;1768:48;:::i;:::-;786:65;;865:14;;;;893;;;;740:1;733:9;693:221;;;697:14;;;;;260:660;;;;:::o;946:707::-;;1063:3;1056:4;1048:6;1044:17;1040:27;1030:2;;-1:-1;;1071:12;1030:2;1118:6;1105:20;1140:80;1155:64;1212:6;1155:64;:::i;1140:80::-;1248:21;;;1131:89;-1:-1;1292:4;1305:14;;;;1280:17;;;1394;;;1385:27;;;;1382:36;-1:-1;1379:2;;;1431:1;;1421:12;1379:2;1456:1;1441:206;1466:6;1463:1;1460:13;1441:206;;;2346:20;;1534:50;;1598:14;;;;1626;;;;1488:1;1481:9;1441:206;;1829:442;;1931:3;1924:4;1916:6;1912:17;1908:27;1898:2;;-1:-1;;1939:12;1898:2;1986:6;1973:20;10870:18;10862:6;10859:30;10856:2;;;-1:-1;;10892:12;10856:2;2008:65;10965:9;10946:17;;-1:-1;;10942:33;11033:4;11023:15;2008:65;:::i;:::-;1999:74;;2093:6;2086:5;2079:21;2197:3;11033:4;2188:6;2121;2179:16;;2176:25;2173:2;;;2214:1;;2204:12;2173:2;13780:6;11033:4;2121:6;2117:17;11033:4;2155:5;2151:16;13757:30;13836:1;13818:16;;;11033:4;13818:16;13811:27;2155:5;1891:380;-1:-1;;1891:380::o;2416:241::-;;2520:2;2508:9;2499:7;2495:23;2491:32;2488:2;;;-1:-1;;2526:12;2488:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;2578:63;2482:175;-1:-1;;;2482:175::o;2664:1383::-;;;;;;;2938:3;2926:9;2917:7;2913:23;2909:33;2906:2;;;-1:-1;;2945:12;2906:2;3003:17;2990:31;3041:18;;3033:6;3030:30;3027:2;;;-1:-1;;3063:12;3027:2;3093:63;3148:7;3139:6;3128:9;3124:22;3093:63;:::i;:::-;3083:73;;3221:2;3210:9;3206:18;3193:32;3179:46;;3041:18;3237:6;3234:30;3231:2;;;-1:-1;;3267:12;3231:2;3297:63;3352:7;3343:6;3332:9;3328:22;3297:63;:::i;:::-;3287:73;;3425:2;3414:9;3410:18;3397:32;3383:46;;3041:18;3441:6;3438:30;3435:2;;;-1:-1;;3471:12;3435:2;3501:93;3586:7;3577:6;3566:9;3562:22;3501:93;:::i;:::-;3491:103;;3659:2;3648:9;3644:18;3631:32;3617:46;;3041:18;3675:6;3672:30;3669:2;;;-1:-1;;3705:12;3669:2;;3735:78;3805:7;3796:6;3785:9;3781:22;3735:78;:::i;:::-;3725:88;;;3850:3;3894:9;3890:22;2346:20;3859:63;;3978:53;4023:7;3959:3;4003:9;3999:22;3978:53;:::i;:::-;3968:63;;2900:1147;;;;;;;;:::o;4448:113::-;-1:-1;;;;;12974:54;4519:37;;4513:48::o;5411:690::-;;5604:5;11504:12;12194:6;12189:3;12182:19;12231:4;;12226:3;12222:14;5616:93;;12231:4;5780:5;11185:14;-1:-1;5819:260;5844:6;5841:1;5838:13;5819:260;;;5905:13;;6953:37;;4420:14;;;;11922;;;;5866:1;5859:9;5819:260;;;-1:-1;6085:10;;5535:566;-1:-1;;;;;5535:566::o;6538:347::-;;6683:5;11504:12;12194:6;12189:3;12182:19;-1:-1;13925:101;13939:6;13936:1;13933:13;13925:101;;;12231:4;14006:11;;;;;14000:18;13987:11;;;;;13980:39;13954:10;13925:101;;;14041:6;14038:1;14035:13;14032:2;;;-1:-1;12231:4;14097:6;12226:3;14088:16;;14081:27;14032:2;-1:-1;10965:9;14197:14;-1:-1;;14193:28;6841:39;;;;12231:4;6841:39;;6630:255;-1:-1;;6630:255::o;7122:222::-;-1:-1;;;;;12974:54;;;;4519:37;;7249:2;7234:18;;7220:124::o;7351:210::-;12773:13;;12766:21;6174:34;;7472:2;7457:18;;7443:118::o;7829:1650::-;-1:-1;;;;;12974:54;;6296:65;;8351:3;8486:2;8471:18;;;8464:48;;;7829:1650;;8351:3;8526:78;8336:19;;;8590:6;8526:78;:::i;:::-;8518:86;;8652:9;8646:4;8642:20;8637:2;8626:9;8622:18;8615:48;8677:78;8750:4;8741:6;8677:78;:::i;:::-;8793:20;;;8788:2;8773:18;;8766:48;11504:12;;12182:19;;;11185:14;;;;-1:-1;12222:14;;;;-1:-1;5060:290;5085:6;5082:1;5079:13;5060:290;;;13213:52;5152:6;5146:13;13213:52;:::i;:::-;6296:65;;11922:14;;;;4238;;;;5107:1;5100:9;5060:290;;;5064:14;;9000:9;8994:4;8990:20;8984:3;8973:9;8969:19;8962:49;9025:108;9128:4;9119:6;9025:108;:::i;:::-;9017:116;;;;;6983:5;9212:3;9201:9;9197:19;6953:37;6983:5;9296:3;9285:9;9281:19;6953:37;6983:5;9380:3;9369:9;9365:19;6953:37;9396:73;9464:3;9453:9;9449:19;9440:6;9396:73;:::i;:::-;8322:1157;;;;;;;;;;;;:::o;9486:333::-;6953:37;;;9805:2;9790:18;;6953:37;9641:2;9626:18;;9612:207::o;9826:256::-;9888:2;9882:9;9914:17;;;9989:18;9974:34;;10010:22;;;9971:62;9968:2;;;10046:1;;10036:12;9968:2;9888;10055:22;9866:216;;-1:-1;9866:216::o;10089:319::-;;10263:18;10255:6;10252:30;10249:2;;;-1:-1;;10285:12;10249:2;-1:-1;10330:4;10318:17;;;10383:15;;10186:222::o;12609:91::-;-1:-1;;;;;12974:54;;12654:46::o;14234:117::-;-1:-1;;;;;12974:54;;14293:35;;14283:2;;14342:1;;14332:12;14283:2;14277:74;:::o"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "4872000",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "create(string,string,address[],uint256[],uint256,address)": "infinite",
                "getPauseConfiguration()": "infinite",
                "getVault()": "infinite",
                "isPoolFromFactory(address)": "1279"
              }
            },
            "methodIdentifiers": {
              "create(string,string,address[],uint256[],uint256,address)": "fbce0393",
              "getPauseConfiguration()": "2da47c40",
              "getVault()": "8d928af8",
              "isPoolFromFactory(address)": "6634b753"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVault\",\"name\":\"vault\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"PoolCreated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"weights\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"swapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"create\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPauseConfiguration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pauseWindowDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"isPoolFromFactory\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"create(string,string,address[],uint256[],uint256,address)\":{\"details\":\"Deploys a new `WeightedPool`.\"},\"getPauseConfiguration()\":{\"details\":\"Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this factory. `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable.\"},\"getVault()\":{\"details\":\"Returns the Vault's address.\"},\"isPoolFromFactory(address)\":{\"details\":\"Returns true if `pool` was created by this factory.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/weighted/WeightedPoolFactory.sol\":\"WeightedPoolFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IMinimalSwapInfoPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IMinimalSwapInfoPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseMinimalSwapInfoPool is IMinimalSwapInfoPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            tokens.length == 2 ? IVault.PoolSpecialization.TWO_TOKEN : IVault.PoolSpecialization.MINIMAL_SWAP_INFO,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory request,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) external view virtual override returns (uint256) {\\n        uint256 scalingFactorTokenIn = _scalingFactor(request.tokenIn);\\n        uint256 scalingFactorTokenOut = _scalingFactor(request.tokenOut);\\n\\n        if (request.kind == IVault.SwapKind.GIVEN_IN) {\\n            // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n            request.amount = _subtractSwapFeeAmount(request.amount);\\n\\n            // All token amounts are upscaled.\\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\\n            request.amount = _upscale(request.amount, scalingFactorTokenIn);\\n\\n            uint256 amountOut = _onSwapGivenIn(request, balanceTokenIn, balanceTokenOut);\\n\\n            // amountOut tokens are exiting the Pool, so we round down.\\n            return _downscaleDown(amountOut, scalingFactorTokenOut);\\n        } else {\\n            // All token amounts are upscaled.\\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\\n            request.amount = _upscale(request.amount, scalingFactorTokenOut);\\n\\n            uint256 amountIn = _onSwapGivenOut(request, balanceTokenIn, balanceTokenOut);\\n\\n            // amountIn tokens are entering the Pool, so we round up.\\n            amountIn = _downscaleUp(amountIn, scalingFactorTokenIn);\\n\\n            // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n            return _addSwapFeeAmount(amountIn);\\n        }\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled. The swap fee has already\\n     * been deducted from `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x6a634f43159cd970522a2005d13934d1d56a85edaee4290ded729340761e19c3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/factories/BasePoolFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../vault/interfaces/IVault.sol\\\";\\nimport \\\"../../vault/interfaces/IBasePool.sol\\\";\\n\\n/**\\n * @dev Base contract for Pool factories.\\n *\\n * Pools are deployed from factories to allow third parties to reason about them. Unknown Pools may have arbitrary\\n * logic: being able to assert that a Pool's behavior follows certain rules (those imposed by the contracts created by\\n * the factory) is very powerful.\\n */\\nabstract contract BasePoolFactory {\\n    IVault private immutable _vault;\\n    mapping(address => bool) private _isPoolFromFactory;\\n\\n    event PoolCreated(address indexed pool);\\n\\n    constructor(IVault vault) {\\n        _vault = vault;\\n    }\\n\\n    /**\\n     * @dev Returns the Vault's address.\\n     */\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    /**\\n     * @dev Returns true if `pool` was created by this factory.\\n     */\\n    function isPoolFromFactory(address pool) external view returns (bool) {\\n        return _isPoolFromFactory[pool];\\n    }\\n\\n    /**\\n     * @dev Registers a new created pool.\\n     *\\n     * Emits a `PoolCreated` event.\\n     */\\n    function _register(address pool) internal {\\n        _isPoolFromFactory[pool] = true;\\n        emit PoolCreated(pool);\\n    }\\n}\\n\",\"keccak256\":\"0xed4f6356224bb6c41649e51d8b6af0f826d487c1ff5380f6d51f128202a3a3cf\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/factories/FactoryWidePauseWindow.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @dev Utility to create Pool factories for Pools that use the `TemporarilyPausable` contract.\\n *\\n * By calling `TemporarilyPausable`'s constructor with the result of `getPauseConfiguration`, all Pools created by this\\n * factory will share the same Pause Window end time, after which both old and new Pools will not be pausable.\\n */\\ncontract FactoryWidePauseWindow {\\n    // This contract relies on timestamps in a similar way as `TemporarilyPausable` does - the same caveats apply.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _INITIAL_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _BUFFER_PERIOD_DURATION = 30 days;\\n\\n    // Time when the pause window for all created Pools expires, and the pause window duration of new Pools becomes\\n    // zero.\\n    uint256 private immutable _poolsPauseWindowEndTime;\\n\\n    constructor() {\\n        _poolsPauseWindowEndTime = block.timestamp + _INITIAL_PAUSE_WINDOW_DURATION;\\n    }\\n\\n    /**\\n     * @dev Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this\\n     * factory.\\n     *\\n     * `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and\\n     * `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable.\\n     */\\n    function getPauseConfiguration() public view returns (uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        uint256 currentTime = block.timestamp;\\n        if (currentTime < _poolsPauseWindowEndTime) {\\n            // The buffer period is always the same since its duration is related to how much time is needed to respond\\n            // to a potential emergency. The Pause Window duration however decreases as the end time approaches.\\n\\n            pauseWindowDuration = _poolsPauseWindowEndTime - currentTime; // No need for checked arithmetic.\\n            bufferPeriodDuration = _BUFFER_PERIOD_DURATION;\\n        } else {\\n            // After the end time, newly created Pools have no Pause Window, nor Buffer Period (since they are not\\n            // pausable in the first place).\\n\\n            pauseWindowDuration = 0;\\n            bufferPeriodDuration = 0;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x7d764b70fdb9f4d2b07f2914ff5deec66f1bc193741017afef2fa14be57dc4ef\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\ncontract WeightedMath {\\n    using FixedPoint for uint256;\\n    // A minimum normalized weight imposes a maximum weight ratio. We need this due to limitations in the\\n    // implementation of the power function, as these ratios are often exponents.\\n    uint256 internal constant _MIN_WEIGHT = 0.01e18;\\n    // Having a minimum normalized weight imposes a limit on the maximum number of tokens;\\n    // i.e., the largest possible pool is one where all tokens have exactly the minimum weight.\\n    uint256 internal constant _MAX_WEIGHTED_TOKENS = 100;\\n\\n    // Pool limits that arise from limitations in the fixed point power function (and the imposed 1:100 maximum weight\\n    // ratio).\\n\\n    // Swap limits: amounts swapped may not be larger than this percentage of total balance.\\n    uint256 internal constant _MAX_IN_RATIO = 0.3e18;\\n    uint256 internal constant _MAX_OUT_RATIO = 0.3e18;\\n\\n    // Invariant growth limit: non-proportional joins cannot cause the invariant to increase by more than this ratio.\\n    uint256 internal constant _MAX_INVARIANT_RATIO = 3e18;\\n    // Invariant shrink limit: non-proportional exits cannot cause the invariant to decrease by less than this ratio.\\n    uint256 internal constant _MIN_INVARIANT_RATIO = 0.7e18;\\n\\n    // Invariant is used to collect protocol swap fees by comparing its value between two times.\\n    // So we can round always to the same direction. It is also used to initiate the BPT amount\\n    // and, because there is a minimum BPT, we round down the invariant.\\n    function _calculateInvariant(uint256[] memory normalizedWeights, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256 invariant)\\n    {\\n        /**********************************************************************************************\\n        // invariant               _____                                                             //\\n        // wi = weight index i      | |      wi                                                      //\\n        // bi = balance index i     | |  bi ^   = i                                                  //\\n        // i = invariant                                                                             //\\n        **********************************************************************************************/\\n\\n        invariant = FixedPoint.ONE;\\n        for (uint256 i = 0; i < normalizedWeights.length; i++) {\\n            invariant = invariant.mulDown(balances[i].powDown(normalizedWeights[i]));\\n        }\\n\\n        _require(invariant > 0, Errors.ZERO_INVARIANT);\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `amountIn` are sent, given the\\n    // current balances and weights.\\n    function _calcOutGivenIn(\\n        uint256 balanceIn,\\n        uint256 weightIn,\\n        uint256 balanceOut,\\n        uint256 weightOut,\\n        uint256 amountIn\\n    ) internal pure returns (uint256) {\\n        /**********************************************************************************************\\n        // outGivenIn                                                                                //\\n        // aO = amountOut                                                                            //\\n        // bO = balanceOut                                                                           //\\n        // bI = balanceIn              /      /            bI             \\\\    (wI / wO) \\\\           //\\n        // aI = amountIn    aO = bO * |  1 - | --------------------------  | ^            |          //\\n        // wI = weightIn               \\\\      \\\\       ( bI + aI )         /              /           //\\n        // wO = weightOut                                                                            //\\n        **********************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        // The multiplication rounds down, and the subtrahend (power) rounds up (so the base rounds up too).\\n        // Because bI / (bI + aI) <= 1, the exponent rounds down.\\n\\n        // Cannot exceed maximum in ratio\\n        _require(amountIn <= balanceIn.mulDown(_MAX_IN_RATIO), Errors.MAX_IN_RATIO);\\n\\n        uint256 denominator = balanceIn.add(amountIn);\\n        uint256 base = balanceIn.divUp(denominator);\\n        uint256 exponent = weightIn.divDown(weightOut);\\n        uint256 power = base.powUp(exponent);\\n\\n        return balanceOut.mulDown(power.complement());\\n    }\\n\\n    // Computes how many tokens must be sent to a pool in order to take `amountOut`, given the\\n    // current balances and weights.\\n    function _calcInGivenOut(\\n        uint256 balanceIn,\\n        uint256 weightIn,\\n        uint256 balanceOut,\\n        uint256 weightOut,\\n        uint256 amountOut\\n    ) internal pure returns (uint256) {\\n        /**********************************************************************************************\\n        // inGivenOut                                                                                //\\n        // aO = amountOut                                                                            //\\n        // bO = balanceOut                                                                           //\\n        // bI = balanceIn              /  /            bO             \\\\    (wO / wI)      \\\\          //\\n        // aI = amountIn    aI = bI * |  | --------------------------  | ^            - 1  |         //\\n        // wI = weightIn               \\\\  \\\\       ( bO - aO )         /                   /          //\\n        // wO = weightOut                                                                            //\\n        **********************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        // The multiplication rounds up, and the power rounds up (so the base rounds up too).\\n        // Because b0 / (b0 - a0) >= 1, the exponent rounds up.\\n\\n        // Cannot exceed maximum out ratio\\n        _require(amountOut <= balanceOut.mulDown(_MAX_OUT_RATIO), Errors.MAX_OUT_RATIO);\\n\\n        uint256 base = balanceOut.divUp(balanceOut.sub(amountOut));\\n        uint256 exponent = weightOut.divUp(weightIn);\\n        uint256 power = base.powUp(exponent);\\n\\n        // Because the base is larger than one (and the power rounds up), the power should always be larger than one, so\\n        // the following subtraction should never revert.\\n        uint256 ratio = power.sub(FixedPoint.ONE);\\n\\n        return balanceIn.mulUp(ratio);\\n    }\\n\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        uint256[] memory balanceRatiosWithFee = new uint256[](amountsIn.length);\\n\\n        uint256 invariantRatioWithFees = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            balanceRatiosWithFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            invariantRatioWithFees = invariantRatioWithFees.add(balanceRatiosWithFee[i].mulDown(normalizedWeights[i]));\\n        }\\n\\n        uint256 invariantRatio = FixedPoint.ONE;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 amountInWithoutFee;\\n\\n            if (balanceRatiosWithFee[i] > invariantRatioWithFees) {\\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithFees.sub(FixedPoint.ONE));\\n                uint256 taxableAmount = amountsIn[i].sub(nonTaxableAmount);\\n                amountInWithoutFee = nonTaxableAmount.add(taxableAmount.mulDown(FixedPoint.ONE.sub(swapFee)));\\n            } else {\\n                amountInWithoutFee = amountsIn[i];\\n            }\\n\\n            uint256 balanceRatio = balances[i].add(amountInWithoutFee).divDown(balances[i]);\\n\\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\\n        }\\n\\n        if (invariantRatio >= FixedPoint.ONE) {\\n            return bptTotalSupply.mulDown(invariantRatio.sub(FixedPoint.ONE));\\n        } else {\\n            return 0;\\n        }\\n    }\\n\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        /******************************************************************************************\\n        // tokenInForExactBPTOut                                                                 //\\n        // a = amountIn                                                                          //\\n        // b = balance                      /  /    totalBPT + bptOut      \\\\    (1 / w)       \\\\  //\\n        // bptOut = bptAmountOut   a = b * |  | --------------------------  | ^          - 1  |  //\\n        // bpt = totalBPT                   \\\\  \\\\       totalBPT            /                  /  //\\n        // w = weight                                                                            //\\n        ******************************************************************************************/\\n\\n        // Token in, so we round up overall.\\n\\n        // Calculate the factor by which the invariant will increase after minting BPTAmountOut\\n        uint256 invariantRatio = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply);\\n        _require(invariantRatio <= _MAX_INVARIANT_RATIO, Errors.MAX_OUT_BPT_FOR_TOKEN_IN);\\n\\n        // Calculate by how much the token balance has to increase to match the invariantRatio\\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divUp(normalizedWeight));\\n\\n        uint256 amountInWithoutFee = balance.mulUp(balanceRatio.sub(FixedPoint.ONE));\\n\\n        // We can now compute how much extra balance is being deposited and used in virtual swaps, and charge swap fees\\n        // accordingly.\\n        uint256 taxablePercentage = normalizedWeight.complement();\\n        uint256 taxableAmount = amountInWithoutFee.mulUp(taxablePercentage);\\n        uint256 nonTaxableAmount = amountInWithoutFee.sub(taxableAmount);\\n\\n        return nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\\n    }\\n\\n    function _calcBptInGivenExactTokensOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        uint256[] memory balanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 invariantRatioWithoutFees = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            balanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            invariantRatioWithoutFees = invariantRatioWithoutFees.add(\\n                balanceRatiosWithoutFee[i].mulUp(normalizedWeights[i])\\n            );\\n        }\\n\\n        uint256 invariantRatio = FixedPoint.ONE;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Swap fees are typically charged on 'token in', but there is no 'token in' here,\\n            // o we apply it to 'token out'.\\n            // This results in slightly larger price impact.\\n\\n            uint256 amountOutWithFee;\\n            if (invariantRatioWithoutFees > balanceRatiosWithoutFee[i]) {\\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithoutFees.complement());\\n                uint256 taxableAmount = amountsOut[i].sub(nonTaxableAmount);\\n\\n                amountOutWithFee = nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\\n            } else {\\n                amountOutWithFee = amountsOut[i];\\n            }\\n\\n            uint256 balanceRatio = balances[i].sub(amountOutWithFee).divDown(balances[i]);\\n\\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\\n        }\\n\\n        return bptTotalSupply.mulUp(invariantRatio.complement());\\n    }\\n\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        /*****************************************************************************************\\n        // exactBPTInForTokenOut                                                                //\\n        // a = amountOut                                                                        //\\n        // b = balance                     /      /    totalBPT - bptIn       \\\\    (1 / w)  \\\\   //\\n        // bptIn = bptAmountIn    a = b * |  1 - | --------------------------  | ^           |  //\\n        // bpt = totalBPT                  \\\\      \\\\       totalBPT            /             /   //\\n        // w = weight                                                                           //\\n        *****************************************************************************************/\\n\\n        // Token out, so we round down overall. The multiplication rounds down, but the power rounds up (so the base\\n        // rounds up). Because (totalBPT - bptIn) / totalBPT <= 1, the exponent rounds down.\\n\\n        // Calculate the factor by which the invariant will decrease after burning BPTAmountIn\\n        uint256 invariantRatio = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply);\\n        _require(invariantRatio >= _MIN_INVARIANT_RATIO, Errors.MIN_BPT_IN_FOR_TOKEN_OUT);\\n\\n        // Calculate by how much the token balance has to decrease to match invariantRatio\\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divDown(normalizedWeight));\\n\\n        // Because of rounding up, balanceRatio can be greater than one. Using complement prevents reverts.\\n        uint256 amountOutWithoutFee = balance.mulDown(balanceRatio.complement());\\n\\n        // We can now compute how much excess balance is being withdrawn as a result of the virtual swaps, which result\\n        // in swap fees.\\n        uint256 taxablePercentage = normalizedWeight.complement();\\n\\n        // Swap fees are typically charged on 'token in', but there is no 'token in' here, so we apply it\\n        // to 'token out'. This results in slightly larger price impact. Fees are rounded up.\\n        uint256 taxableAmount = amountOutWithoutFee.mulUp(taxablePercentage);\\n        uint256 nonTaxableAmount = amountOutWithoutFee.sub(taxableAmount);\\n\\n        return nonTaxableAmount.add(taxableAmount.mulDown(swapFee.complement()));\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 totalBPT\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = amountOut                  /        bptIn         \\\\                                  //\\n        // b = balance           a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\       totalBPT       /                                  //\\n        // bpt = totalBPT                                                                            //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(totalBPT);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 previousInvariant,\\n        uint256 currentInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /*********************************************************************************\\n        /*  protocolSwapFeePercentage * balanceToken * ( 1 - (previousInvariant / currentInvariant) ^ (1 / weightToken))\\n        *********************************************************************************/\\n\\n        if (currentInvariant <= previousInvariant) {\\n            // This shouldn't happen outside of rounding errors, but have this safeguard nonetheless to prevent the Pool\\n            // from entering a locked state in which joins and exits revert while computing accumulated swap fees.\\n            return 0;\\n        }\\n\\n        // We round down to prevent issues in the Pool's accounting, even if it means paying slightly less in protocol\\n        // fees to the Vault.\\n\\n        // Fee percentage and balance multiplications round down, while the subtrahend (power) rounds up (as does the\\n        // base). Because previousInvariant / currentInvariant <= 1, the exponent rounds down.\\n\\n        uint256 base = previousInvariant.divUp(currentInvariant);\\n        uint256 exponent = FixedPoint.ONE.divDown(normalizedWeight);\\n\\n        // Because the exponent is larger than one, the base of the power function has a lower bound. We cap to this\\n        // value to avoid numeric issues, which means in the extreme case (where the invariant growth is larger than\\n        // 1 / min exponent) the Pool will pay less in protocol fees than it should.\\n        base = Math.max(base, FixedPoint.MIN_POW_BASE_FREE_EXPONENT);\\n\\n        uint256 power = base.powUp(exponent);\\n\\n        uint256 tokenAccruedFees = balance.mulDown(power.complement());\\n        return tokenAccruedFees.mulDown(protocolSwapFeePercentage);\\n    }\\n}\\n\",\"keccak256\":\"0xb7b712312afa0000d491862a7e50e1d6814a18e92ca16897baaa412ef5aff138\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\nimport \\\"../BaseMinimalSwapInfoPool.sol\\\";\\n\\nimport \\\"./WeightedMath.sol\\\";\\nimport \\\"./WeightedPoolUserDataHelpers.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus total\\n// count, resulting in a large number of state variables.\\n\\ncontract WeightedPool is BaseMinimalSwapInfoPool, WeightedMath {\\n    using FixedPoint for uint256;\\n    using WeightedPoolUserDataHelpers for bytes;\\n\\n    // The protocol fees will always be charged using the token associated with the max weight in the pool.\\n    // Since these Pools will register tokens only once, we can assume this index will be constant.\\n    uint256 private immutable _maxWeightTokenIndex;\\n\\n    uint256 private immutable _normalizedWeight0;\\n    uint256 private immutable _normalizedWeight1;\\n    uint256 private immutable _normalizedWeight2;\\n    uint256 private immutable _normalizedWeight3;\\n    uint256 private immutable _normalizedWeight4;\\n    uint256 private immutable _normalizedWeight5;\\n    uint256 private immutable _normalizedWeight6;\\n    uint256 private immutable _normalizedWeight7;\\n\\n    uint256 private _lastInvariant;\\n\\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\\n\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256[] memory normalizedWeights,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BaseMinimalSwapInfoPool(\\n            vault,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        uint256 numTokens = tokens.length;\\n        InputHelpers.ensureInputLengthMatch(numTokens, normalizedWeights.length);\\n\\n        // Ensure  each normalized weight is above them minimum and find the token index of the maximum weight\\n        uint256 normalizedSum = 0;\\n        uint256 maxWeightTokenIndex = 0;\\n        uint256 maxNormalizedWeight = 0;\\n        for (uint8 i = 0; i < numTokens; i++) {\\n            uint256 normalizedWeight = normalizedWeights[i];\\n            _require(normalizedWeight >= _MIN_WEIGHT, Errors.MIN_WEIGHT);\\n\\n            normalizedSum = normalizedSum.add(normalizedWeight);\\n            if (normalizedWeight > maxNormalizedWeight) {\\n                maxWeightTokenIndex = i;\\n                maxNormalizedWeight = normalizedWeight;\\n            }\\n        }\\n        // Ensure that the normalized weights sum to ONE\\n        _require(normalizedSum == FixedPoint.ONE, Errors.NORMALIZED_WEIGHT_INVARIANT);\\n\\n        _maxWeightTokenIndex = maxWeightTokenIndex;\\n        _normalizedWeight0 = normalizedWeights.length > 0 ? normalizedWeights[0] : 0;\\n        _normalizedWeight1 = normalizedWeights.length > 1 ? normalizedWeights[1] : 0;\\n        _normalizedWeight2 = normalizedWeights.length > 2 ? normalizedWeights[2] : 0;\\n        _normalizedWeight3 = normalizedWeights.length > 3 ? normalizedWeights[3] : 0;\\n        _normalizedWeight4 = normalizedWeights.length > 4 ? normalizedWeights[4] : 0;\\n        _normalizedWeight5 = normalizedWeights.length > 5 ? normalizedWeights[5] : 0;\\n        _normalizedWeight6 = normalizedWeights.length > 6 ? normalizedWeights[6] : 0;\\n        _normalizedWeight7 = normalizedWeights.length > 7 ? normalizedWeights[7] : 0;\\n    }\\n\\n    function _normalizedWeight(IERC20 token) internal view virtual returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _normalizedWeight0; }\\n        else if (token == _token1) { return _normalizedWeight1; }\\n        else if (token == _token2) { return _normalizedWeight2; }\\n        else if (token == _token3) { return _normalizedWeight3; }\\n        else if (token == _token4) { return _normalizedWeight4; }\\n        else if (token == _token5) { return _normalizedWeight5; }\\n        else if (token == _token6) { return _normalizedWeight6; }\\n        else if (token == _token7) { return _normalizedWeight7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    function _normalizedWeights() internal view virtual returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory normalizedWeights = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { normalizedWeights[0] = _normalizedWeight0; } else { return normalizedWeights; }\\n            if (totalTokens > 1) { normalizedWeights[1] = _normalizedWeight1; } else { return normalizedWeights; }\\n            if (totalTokens > 2) { normalizedWeights[2] = _normalizedWeight2; } else { return normalizedWeights; }\\n            if (totalTokens > 3) { normalizedWeights[3] = _normalizedWeight3; } else { return normalizedWeights; }\\n            if (totalTokens > 4) { normalizedWeights[4] = _normalizedWeight4; } else { return normalizedWeights; }\\n            if (totalTokens > 5) { normalizedWeights[5] = _normalizedWeight5; } else { return normalizedWeights; }\\n            if (totalTokens > 6) { normalizedWeights[6] = _normalizedWeight6; } else { return normalizedWeights; }\\n            if (totalTokens > 7) { normalizedWeights[7] = _normalizedWeight7; } else { return normalizedWeights; }\\n        }\\n\\n        return normalizedWeights;\\n    }\\n\\n    function getLastInvariant() external view returns (uint256) {\\n        return _lastInvariant;\\n    }\\n\\n    /**\\n     * @dev Returns the current value of the invariant.\\n     */\\n    function getInvariant() public view returns (uint256) {\\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\\n\\n        // Since the Pool hooks always work with upscaled balances, we manually\\n        // upscale here for consistency\\n        _upscaleArray(balances, _scalingFactors());\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    function getNormalizedWeights() external view returns (uint256[] memory) {\\n        return _normalizedWeights();\\n    }\\n\\n    // Base Pool handlers\\n\\n    // Swap\\n\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        // Swaps are disabled while the contract is paused.\\n\\n        return\\n            WeightedMath._calcOutGivenIn(\\n                currentBalanceTokenIn,\\n                _normalizedWeight(swapRequest.tokenIn),\\n                currentBalanceTokenOut,\\n                _normalizedWeight(swapRequest.tokenOut),\\n                swapRequest.amount\\n            );\\n    }\\n\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        // Swaps are disabled while the contract is paused.\\n\\n        return\\n            WeightedMath._calcInGivenOut(\\n                currentBalanceTokenIn,\\n                _normalizedWeight(swapRequest.tokenIn),\\n                currentBalanceTokenOut,\\n                _normalizedWeight(swapRequest.tokenOut),\\n                swapRequest.amount\\n            );\\n    }\\n\\n    // Initialize\\n\\n    function _onInitializePool(\\n        bytes32,\\n        address,\\n        address,\\n        bytes memory userData\\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\\n        // It would be strange for the Pool to be paused before it is initialized, but for consistency we prevent\\n        // initialization in this case.\\n\\n        WeightedPool.JoinKind kind = userData.joinKind();\\n        _require(kind == WeightedPool.JoinKind.INIT, Errors.UNINITIALIZED);\\n\\n        uint256[] memory amountsIn = userData.initialAmountsIn();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        uint256 invariantAfterJoin = WeightedMath._calculateInvariant(normalizedWeights, amountsIn);\\n\\n        // Set the initial BPT to the value of the invariant times the number of tokens. This makes BPT supply more\\n        // consistent in Pools with similar compositions but different number of tokens.\\n        uint256 bptAmountOut = Math.mul(invariantAfterJoin, _getTotalTokens());\\n\\n        _lastInvariant = invariantAfterJoin;\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Join\\n\\n    function _onJoinPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        whenNotPaused\\n        returns (\\n            uint256,\\n            uint256[] memory,\\n            uint256[] memory\\n        )\\n    {\\n        // All joins are disabled while the contract is paused.\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas\\n        // computing them on each individual swap\\n        uint256 invariantBeforeJoin = WeightedMath._calculateInvariant(normalizedWeights, balances);\\n\\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n            balances,\\n            normalizedWeights,\\n            _lastInvariant,\\n            invariantBeforeJoin,\\n            protocolSwapFeePercentage\\n        );\\n\\n        // Update current balances by subtracting the protocol fee amounts\\n        _mutateAmounts(balances, dueProtocolFeeAmounts, FixedPoint.sub);\\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, normalizedWeights, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn, normalizedWeights);\\n\\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doJoin(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        JoinKind kind = userData.joinKind();\\n\\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\\n            return _joinExactTokensInForBPTOut(balances, normalizedWeights, userData);\\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\\n            return _joinTokenInForExactBPTOut(balances, normalizedWeights, userData);\\n        } else {\\n            _revert(Errors.UNHANDLED_JOIN_KIND);\\n        }\\n    }\\n\\n    function _joinExactTokensInForBPTOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 bptAmountOut = WeightedMath._calcBptOutGivenExactTokensIn(\\n            balances,\\n            normalizedWeights,\\n            amountsIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    function _joinTokenInForExactBPTOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\\n        // Note that there is no maximum amountIn parameter: this is handled by `IVault.joinPool`.\\n\\n        _require(tokenIndex < _getTotalTokens(), Errors.OUT_OF_BOUNDS);\\n\\n        uint256[] memory amountsIn = new uint256[](_getTotalTokens());\\n        amountsIn[tokenIndex] = WeightedMath._calcTokenInGivenExactBptOut(\\n            balances[tokenIndex],\\n            normalizedWeights[tokenIndex],\\n            bptAmountOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Exit\\n\\n    function _onExitPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        // Exits are not completely disabled while the contract is paused: proportional exits (exact BPT in for tokens\\n        // out) remain functional.\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        if (_isNotPaused()) {\\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\\n            // spending gas calculating the fees on each individual swap.\\n            uint256 invariantBeforeExit = WeightedMath._calculateInvariant(normalizedWeights, balances);\\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n                balances,\\n                normalizedWeights,\\n                _lastInvariant,\\n                invariantBeforeExit,\\n                protocolSwapFeePercentage\\n            );\\n\\n            // Update current balances by subtracting the protocol fee amounts\\n            _mutateAmounts(balances, dueProtocolFeeAmounts, FixedPoint.sub);\\n        } else {\\n            // If the contract is paused, swap protocol fee amounts are not charged to avoid extra calculations and\\n            // reduce the potential for errors.\\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n        }\\n\\n        (bptAmountIn, amountsOut) = _doExit(balances, normalizedWeights, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\\n        // protocol swap fees due in future joins and exits.\\n        _lastInvariant = _invariantAfterExit(balances, amountsOut, normalizedWeights);\\n\\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doExit(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        ExitKind kind = userData.exitKind();\\n\\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\\n            return _exitExactBPTInForTokenOut(balances, normalizedWeights, userData);\\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\\n            return _exitExactBPTInForTokensOut(balances, userData);\\n        } else {\\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\\n            return _exitBPTInForExactTokensOut(balances, normalizedWeights, userData);\\n        }\\n    }\\n\\n    function _exitExactBPTInForTokenOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view whenNotPaused returns (uint256, uint256[] memory) {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\\n        // Note that there is no minimum amountOut parameter: this is handled by `IVault.exitPool`.\\n\\n        _require(tokenIndex < _getTotalTokens(), Errors.OUT_OF_BOUNDS);\\n\\n        // We exit in a single token, so we initialize amountsOut with zeros\\n        uint256[] memory amountsOut = new uint256[](_getTotalTokens());\\n\\n        // And then assign the result to the selected token\\n        amountsOut[tokenIndex] = WeightedMath._calcTokenOutGivenExactBptIn(\\n            balances[tokenIndex],\\n            normalizedWeights[tokenIndex],\\n            bptAmountIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\\n        // This particular exit function is the only one that remains available because it is the simplest one, and\\n        // therefore the one with the lowest likelihood of errors.\\n\\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\\n        // Note that there is no minimum amountOut parameter: this is handled by `IVault.exitPool`.\\n\\n        uint256[] memory amountsOut = WeightedMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitBPTInForExactTokensOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view whenNotPaused returns (uint256, uint256[] memory) {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\\n        _upscaleArray(amountsOut, _scalingFactors());\\n\\n        uint256 bptAmountIn = WeightedMath._calcBptInGivenExactTokensOut(\\n            balances,\\n            normalizedWeights,\\n            amountsOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    // Helpers\\n\\n    function _getDueProtocolFeeAmounts(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256 previousInvariant,\\n        uint256 currentInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) private view returns (uint256[] memory) {\\n        // Initialize with zeros\\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n\\n        // Early return if the protocol swap fee percentage is zero, saving gas.\\n        if (protocolSwapFeePercentage == 0) {\\n            return dueProtocolFeeAmounts;\\n        }\\n\\n        // The protocol swap fees are always paid using the token with the largest weight in the Pool. As this is the\\n        // token that is expected to have the largest balance, using it to pay fees should not unbalance the Pool.\\n        dueProtocolFeeAmounts[_maxWeightTokenIndex] = WeightedMath._calcDueTokenProtocolSwapFeeAmount(\\n            balances[_maxWeightTokenIndex],\\n            normalizedWeights[_maxWeightTokenIndex],\\n            previousInvariant,\\n            currentInvariant,\\n            protocolSwapFeePercentage\\n        );\\n\\n        return dueProtocolFeeAmounts;\\n    }\\n\\n    /**\\n     * @dev Returns the value of the invariant given `balances`, assuming they are increased by `amountsIn`. All\\n     * amounts are expected to be upscaled.\\n     */\\n    function _invariantAfterJoin(\\n        uint256[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256[] memory normalizedWeights\\n    ) private view returns (uint256) {\\n        _mutateAmounts(balances, amountsIn, FixedPoint.add);\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    function _invariantAfterExit(\\n        uint256[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256[] memory normalizedWeights\\n    ) private view returns (uint256) {\\n        _mutateAmounts(balances, amountsOut, FixedPoint.sub);\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    /**\\n     * @dev Mutates `amounts` by applying `mutation` with each entry in `arguments`.\\n     *\\n     * Equivalent to `amounts = amounts.map(mutation)`.\\n     */\\n    function _mutateAmounts(\\n        uint256[] memory toMutate,\\n        uint256[] memory arguments,\\n        function(uint256, uint256) pure returns (uint256) mutation\\n    ) private view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            toMutate[i] = mutation(toMutate[i], arguments[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev This function returns the appreciation of one BPT relative to the\\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\\n     */\\n    function getRate() public view returns (uint256) {\\n        // The initial BPT supply is equal to the invariant times the number of tokens.\\n        return Math.mul(getInvariant(), _getTotalTokens()).divDown(totalSupply());\\n    }\\n}\\n\",\"keccak256\":\"0x4e73b22be8c4325be39cc05796926b173b867292d73fe051dcfa49aafd9fb9d7\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedPoolFactory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../vault/interfaces/IVault.sol\\\";\\n\\nimport \\\"../factories/BasePoolFactory.sol\\\";\\nimport \\\"../factories/FactoryWidePauseWindow.sol\\\";\\n\\nimport \\\"./WeightedPool.sol\\\";\\n\\ncontract WeightedPoolFactory is BasePoolFactory, FactoryWidePauseWindow {\\n    constructor(IVault vault) BasePoolFactory(vault) {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    /**\\n     * @dev Deploys a new `WeightedPool`.\\n     */\\n    function create(\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256[] memory weights,\\n        uint256 swapFeePercentage,\\n        address owner\\n    ) external returns (address) {\\n        (uint256 pauseWindowDuration, uint256 bufferPeriodDuration) = getPauseConfiguration();\\n\\n        address pool = address(\\n            new WeightedPool(\\n                getVault(),\\n                name,\\n                symbol,\\n                tokens,\\n                weights,\\n                swapFeePercentage,\\n                pauseWindowDuration,\\n                bufferPeriodDuration,\\n                owner\\n            )\\n        );\\n        _register(pool);\\n        return pool;\\n    }\\n}\\n\",\"keccak256\":\"0x746b351e59b430d9d565dfeb0df208f2af923f0ce4c69dee5d5d36f3c9f30016\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./WeightedPool.sol\\\";\\n\\nlibrary WeightedPoolUserDataHelpers {\\n    function joinKind(bytes memory self) internal pure returns (WeightedPool.JoinKind) {\\n        return abi.decode(self, (WeightedPool.JoinKind));\\n    }\\n\\n    function exitKind(bytes memory self) internal pure returns (WeightedPool.ExitKind) {\\n        return abi.decode(self, (WeightedPool.ExitKind));\\n    }\\n\\n    // Joins\\n\\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\\n        (, amountsIn) = abi.decode(self, (WeightedPool.JoinKind, uint256[]));\\n    }\\n\\n    function exactTokensInForBptOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountOut)\\n    {\\n        (, amountsIn, minBPTAmountOut) = abi.decode(self, (WeightedPool.JoinKind, uint256[], uint256));\\n    }\\n\\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (WeightedPool.JoinKind, uint256, uint256));\\n    }\\n\\n    // Exits\\n\\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (WeightedPool.ExitKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\\n        (, bptAmountIn) = abi.decode(self, (WeightedPool.ExitKind, uint256));\\n    }\\n\\n    function bptInForExactTokensOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\\n    {\\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (WeightedPool.ExitKind, uint256[], uint256));\\n    }\\n}\\n\",\"keccak256\":\"0x6a2f98e68608e65dd9c0de8c57c1fc2e1643789b18bcf75d7109d27cdf45d62f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\\n * to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IMinimalSwapInfoPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7469919e147c0db8b4f290d310ca3816dec5d3c6cc6b258cf6e0df820a20a179\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 8042,
                "contract": "src.sol/amm/pools/weighted/WeightedPoolFactory.sol:WeightedPoolFactory",
                "label": "_isPoolFromFactory",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_address,t_bool)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol": {
        "WeightedPoolUserDataHelpers": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122048179896e901ceddc80ccca8c902569abd22ccfeb7d940a3cfe81e64e223285164736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x48 OR SWAP9 SWAP7 0xE9 ADD 0xCE 0xDD 0xC8 0xC 0xCC 0xA8 0xC9 MUL JUMP SWAP11 0xBD 0x22 0xCC INVALID 0xB7 0xD9 BLOCKHASH LOG3 0xCF 0xE8 0x1E PUSH5 0xE223285164 PUSH20 0x6F6C634300070100330000000000000000000000 ",
              "sourceMap": "788:1745:40:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122048179896e901ceddc80ccca8c902569abd22ccfeb7d940a3cfe81e64e223285164736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x48 OR SWAP9 SWAP7 0xE9 ADD 0xCE 0xDD 0xC8 0xC 0xCC 0xA8 0xC9 MUL JUMP SWAP11 0xBD 0x22 0xCC INVALID 0xB7 0xD9 BLOCKHASH LOG3 0xCF 0xE8 0x1E PUSH5 0xE223285164 PUSH20 0x6F6C634300070100330000000000000000000000 ",
              "sourceMap": "788:1745:40:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "bptInForExactTokensOut(bytes memory)": "infinite",
                "exactBptInForTokenOut(bytes memory)": "infinite",
                "exactBptInForTokensOut(bytes memory)": "infinite",
                "exactTokensInForBptOut(bytes memory)": "infinite",
                "exitKind(bytes memory)": "infinite",
                "initialAmountsIn(bytes memory)": "infinite",
                "joinKind(bytes memory)": "infinite",
                "tokenInForExactBptOut(bytes memory)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol\":\"WeightedPoolUserDataHelpers\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is IERC20 {\\n    using SafeMath for uint256;\\n\\n    mapping(address => uint256) private _balances;\\n\\n    mapping(address => mapping(address => uint256)) private _allowances;\\n\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n    uint8 private _decimals;\\n\\n    /**\\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\\n     * a default value of 18.\\n     *\\n     * To select a different value for {decimals}, use {_setupDecimals}.\\n     *\\n     * All three of these values are immutable: they can only be set once during\\n     * construction.\\n     */\\n    constructor(string memory name_, string memory symbol_) {\\n        _name = name_;\\n        _symbol = symbol_;\\n        _decimals = 18;\\n    }\\n\\n    /**\\n     * @dev Returns the name of the token.\\n     */\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    /**\\n     * @dev Returns the symbol of the token, usually a shorter version of the\\n     * name.\\n     */\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    /**\\n     * @dev Returns the number of decimals used to get its user representation.\\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n     *\\n     * Tokens usually opt for a value of 18, imitating the relationship between\\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\\n     * called.\\n     *\\n     * NOTE: This information is only used for _display_ purposes: it in\\n     * no way affects any of the arithmetic of the contract, including\\n     * {IERC20-balanceOf} and {IERC20-transfer}.\\n     */\\n    function decimals() public view returns (uint8) {\\n        return _decimals;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-totalSupply}.\\n     */\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-balanceOf}.\\n     */\\n    function balanceOf(address account) public view override returns (uint256) {\\n        return _balances[account];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transfer}.\\n     *\\n     * Requirements:\\n     *\\n     * - `recipient` cannot be the zero address.\\n     * - the caller must have a balance of at least `amount`.\\n     */\\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n        _transfer(msg.sender, recipient, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-allowance}.\\n     */\\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n        return _allowances[owner][spender];\\n    }\\n\\n    /**\\n     * @dev See {IERC20-approve}.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n        _approve(msg.sender, spender, amount);\\n        return true;\\n    }\\n\\n    /**\\n     * @dev See {IERC20-transferFrom}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance. This is not\\n     * required by the EIP. See the note at the beginning of {ERC20}.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` and `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     * - the caller must have allowance for ``sender``'s tokens of at least\\n     * `amount`.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) public virtual override returns (bool) {\\n        _transfer(sender, recipient, amount);\\n        _approve(\\n            sender,\\n            msg.sender,\\n            _allowances[sender][msg.sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_ALLOWANCE)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     */\\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n     *\\n     * This is an alternative to {approve} that can be used as a mitigation for\\n     * problems described in {IERC20-approve}.\\n     *\\n     * Emits an {Approval} event indicating the updated allowance.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `spender` must have allowance for the caller of at least\\n     * `subtractedValue`.\\n     */\\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n        _approve(\\n            msg.sender,\\n            spender,\\n            _allowances[msg.sender][spender].sub(subtractedValue, Errors.ERC20_DECREASED_ALLOWANCE_BELOW_ZERO)\\n        );\\n        return true;\\n    }\\n\\n    /**\\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\\n     *\\n     * This is internal function is equivalent to {transfer}, and can be used to\\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\\n     *\\n     * Emits a {Transfer} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `sender` cannot be the zero address.\\n     * - `recipient` cannot be the zero address.\\n     * - `sender` must have a balance of at least `amount`.\\n     */\\n    function _transfer(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(sender != address(0), Errors.ERC20_TRANSFER_FROM_ZERO_ADDRESS);\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(sender, recipient, amount);\\n\\n        _balances[sender] = _balances[sender].sub(amount, Errors.ERC20_TRANSFER_EXCEEDS_BALANCE);\\n        _balances[recipient] = _balances[recipient].add(amount);\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n     * the total supply.\\n     *\\n     * Emits a {Transfer} event with `from` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     */\\n    function _mint(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_MINT_TO_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(address(0), account, amount);\\n\\n        _totalSupply = _totalSupply.add(amount);\\n        _balances[account] = _balances[account].add(amount);\\n        emit Transfer(address(0), account, amount);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens from `account`, reducing the\\n     * total supply.\\n     *\\n     * Emits a {Transfer} event with `to` set to the zero address.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     * - `account` must have at least `amount` tokens.\\n     */\\n    function _burn(address account, uint256 amount) internal virtual {\\n        _require(account != address(0), Errors.ERC20_BURN_FROM_ZERO_ADDRESS);\\n\\n        _beforeTokenTransfer(account, address(0), amount);\\n\\n        _balances[account] = _balances[account].sub(amount, Errors.ERC20_BURN_EXCEEDS_ALLOWANCE);\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(account, address(0), amount);\\n    }\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n     *\\n     * This internal function is equivalent to `approve`, and can be used to\\n     * e.g. set automatic allowances for certain subsystems, etc.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `owner` cannot be the zero address.\\n     * - `spender` cannot be the zero address.\\n     */\\n    function _approve(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) internal virtual {\\n        _require(owner != address(0), Errors.ERC20_APPROVE_FROM_ZERO_ADDRESS);\\n        _require(spender != address(0), Errors.ERC20_APPROVE_TO_ZERO_ADDRESS);\\n\\n        _allowances[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n\\n    /**\\n     * @dev Sets {decimals} to a value other than the default one of 18.\\n     *\\n     * WARNING: This function should only be called from the constructor. Most\\n     * applications that interact with token contracts will not expect\\n     * {decimals} to ever change, and may work incorrectly if it does.\\n     */\\n    function _setupDecimals(uint8 decimals_) internal {\\n        _decimals = decimals_;\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any transfer of tokens. This includes\\n     * minting and burning.\\n     *\\n     * Calling conditions:\\n     *\\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * will be to transferred to `to`.\\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n     * - `from` and `to` are never both zero.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x10a0774f23f09b8617c9c62afe230829175c20be368ff327a7d529e4f7348bcb\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n    /**\\n     * @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\\n     * given `owner`'s signed approval.\\n     *\\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n     * ordering also apply here.\\n     *\\n     * Emits an {Approval} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `spender` cannot be the zero address.\\n     * - `deadline` must be a timestamp in the future.\\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n     * over the EIP712-formatted function arguments.\\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\\n     *\\n     * For more information on the signature format, see the\\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n     * section].\\n     */\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) external;\\n\\n    /**\\n     * @dev Returns the current nonce for `owner`. This value must be\\n     * included whenever a signature is generated for {permit}.\\n     *\\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n     * prevents a signature from being used multiple times.\\n     */\\n    function nonces(address owner) external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.\\n     */\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xffe929ce55ef0cbdcc60eee8bc9375c295757ad13afe3d757646538aa0429ff5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, Errors.SUB_OVERFLOW);\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, uint256 errorCode) internal pure returns (uint256) {\\n        _require(b <= a, errorCode);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n}\\n\",\"keccak256\":\"0xafe0542eb14932a66ce6280fbe9991130ead5bbcb7836d0a822fc4a59810c100\",\"license\":\"MIT\"},\"src.sol/amm/pools/BalancerPoolToken.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20Permit.sol\\\";\\nimport \\\"../lib/openzeppelin/EIP712.sol\\\";\\n\\n/**\\n * @title Highly opinionated token implementation\\n * @author Balancer Labs\\n * @dev\\n * - Includes functions to increase and decrease allowance as a workaround\\n *   for the well-known issue with `approve`:\\n *   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n * - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\\n *   decreased by calls to transferFrom\\n * - Lets a token holder use `transferFrom` to send their own tokens,\\n *   without first setting allowance\\n * - Emits 'Approval' events whenever allowance is changed by `transferFrom`\\n */\\ncontract BalancerPoolToken is IERC20, IERC20Permit, EIP712 {\\n    using Math for uint256;\\n\\n    // State variables\\n\\n    uint8 private constant _DECIMALS = 18;\\n\\n    mapping(address => uint256) private _balance;\\n    mapping(address => mapping(address => uint256)) private _allowance;\\n    uint256 private _totalSupply;\\n\\n    string private _name;\\n    string private _symbol;\\n\\n    mapping(address => uint256) private _nonces;\\n\\n    // solhint-disable-next-line var-name-mixedcase\\n    bytes32 private immutable _PERMIT_TYPE_HASH = keccak256(\\n        \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n    );\\n\\n    // Function declarations\\n\\n    constructor(string memory tokenName, string memory tokenSymbol) EIP712(tokenName, \\\"1\\\") {\\n        _name = tokenName;\\n        _symbol = tokenSymbol;\\n    }\\n\\n    // External functions\\n\\n    function allowance(address owner, address spender) external view override returns (uint256) {\\n        return _allowance[owner][spender];\\n    }\\n\\n    function balanceOf(address account) external view override returns (uint256) {\\n        return _balance[account];\\n    }\\n\\n    function approve(address spender, uint256 amount) external override returns (bool) {\\n        _setAllowance(msg.sender, spender, amount);\\n\\n        return true;\\n    }\\n\\n    function increaseApproval(address spender, uint256 amount) external returns (bool) {\\n        _setAllowance(msg.sender, spender, _allowance[msg.sender][spender].add(amount));\\n\\n        return true;\\n    }\\n\\n    function decreaseApproval(address spender, uint256 amount) external returns (bool) {\\n        uint256 currentAllowance = _allowance[msg.sender][spender];\\n\\n        if (amount >= currentAllowance) {\\n            _setAllowance(msg.sender, spender, 0);\\n        } else {\\n            _setAllowance(msg.sender, spender, currentAllowance.sub(amount));\\n        }\\n\\n        return true;\\n    }\\n\\n    function transfer(address recipient, uint256 amount) external override returns (bool) {\\n        _move(msg.sender, recipient, amount);\\n\\n        return true;\\n    }\\n\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external override returns (bool) {\\n        uint256 currentAllowance = _allowance[sender][msg.sender];\\n        _require(msg.sender == sender || currentAllowance >= amount, Errors.INSUFFICIENT_ALLOWANCE);\\n\\n        _move(sender, recipient, amount);\\n\\n        if (msg.sender != sender && currentAllowance != uint256(-1)) {\\n            // Because of the previous require, we know that if msg.sender != sender then currentAllowance >= amount\\n            _setAllowance(sender, msg.sender, currentAllowance - amount);\\n        }\\n\\n        return true;\\n    }\\n\\n    function permit(\\n        address owner,\\n        address spender,\\n        uint256 value,\\n        uint256 deadline,\\n        uint8 v,\\n        bytes32 r,\\n        bytes32 s\\n    ) public virtual override {\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.EXPIRED_PERMIT);\\n\\n        uint256 nonce = _nonces[owner];\\n\\n        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPE_HASH, owner, spender, value, nonce, deadline));\\n\\n        bytes32 hash = _hashTypedDataV4(structHash);\\n\\n        address signer = ecrecover(hash, v, r, s);\\n        _require((signer != address(0)) && (signer == owner), Errors.INVALID_SIGNATURE);\\n\\n        _nonces[owner] = nonce + 1;\\n        _setAllowance(owner, spender, value);\\n    }\\n\\n    // Public functions\\n\\n    function name() public view returns (string memory) {\\n        return _name;\\n    }\\n\\n    function symbol() public view returns (string memory) {\\n        return _symbol;\\n    }\\n\\n    function decimals() public pure returns (uint8) {\\n        return _DECIMALS;\\n    }\\n\\n    function totalSupply() public view override returns (uint256) {\\n        return _totalSupply;\\n    }\\n\\n    function nonces(address owner) external view override returns (uint256) {\\n        return _nonces[owner];\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    // Internal functions\\n\\n    function _mintPoolTokens(address recipient, uint256 amount) internal {\\n        _balance[recipient] = _balance[recipient].add(amount);\\n        _totalSupply = _totalSupply.add(amount);\\n        emit Transfer(address(0), recipient, amount);\\n    }\\n\\n    function _burnPoolTokens(address sender, uint256 amount) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _totalSupply = _totalSupply.sub(amount);\\n        emit Transfer(sender, address(0), amount);\\n    }\\n\\n    function _move(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) internal {\\n        uint256 currentBalance = _balance[sender];\\n        _require(currentBalance >= amount, Errors.INSUFFICIENT_BALANCE);\\n        // Prohibit transfers to the zero address to avoid confusion with the\\n        // Transfer event emitted by `_burnPoolTokens`\\n        _require(recipient != address(0), Errors.ERC20_TRANSFER_TO_ZERO_ADDRESS);\\n\\n        _balance[sender] = currentBalance - amount;\\n        _balance[recipient] = _balance[recipient].add(amount);\\n\\n        emit Transfer(sender, recipient, amount);\\n    }\\n\\n    // Private functions\\n\\n    function _setAllowance(\\n        address owner,\\n        address spender,\\n        uint256 amount\\n    ) private {\\n        _allowance[owner][spender] = amount;\\n        emit Approval(owner, spender, amount);\\n    }\\n}\\n\",\"keccak256\":\"0x98ba9ab8cbd475a64405d5eecedbed1bb68b4adca54493894747f8e9f61a9e42\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BaseMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./BasePool.sol\\\";\\nimport \\\"../vault/interfaces/IMinimalSwapInfoPool.sol\\\";\\n\\n/**\\n * @dev Extension of `BasePool`, adding a handler for `IMinimalSwapInfoPool.onSwap`.\\n *\\n * Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions.\\n */\\nabstract contract BaseMinimalSwapInfoPool is IMinimalSwapInfoPool, BasePool {\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BasePool(\\n            vault,\\n            tokens.length == 2 ? IVault.PoolSpecialization.TWO_TOKEN : IVault.PoolSpecialization.MINIMAL_SWAP_INFO,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    // Swap Hooks\\n\\n    function onSwap(\\n        SwapRequest memory request,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) external view virtual override returns (uint256) {\\n        uint256 scalingFactorTokenIn = _scalingFactor(request.tokenIn);\\n        uint256 scalingFactorTokenOut = _scalingFactor(request.tokenOut);\\n\\n        if (request.kind == IVault.SwapKind.GIVEN_IN) {\\n            // Fees are subtracted before scaling, to reduce the complexity of the rounding direction analysis.\\n            request.amount = _subtractSwapFeeAmount(request.amount);\\n\\n            // All token amounts are upscaled.\\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\\n            request.amount = _upscale(request.amount, scalingFactorTokenIn);\\n\\n            uint256 amountOut = _onSwapGivenIn(request, balanceTokenIn, balanceTokenOut);\\n\\n            // amountOut tokens are exiting the Pool, so we round down.\\n            return _downscaleDown(amountOut, scalingFactorTokenOut);\\n        } else {\\n            // All token amounts are upscaled.\\n            balanceTokenIn = _upscale(balanceTokenIn, scalingFactorTokenIn);\\n            balanceTokenOut = _upscale(balanceTokenOut, scalingFactorTokenOut);\\n            request.amount = _upscale(request.amount, scalingFactorTokenOut);\\n\\n            uint256 amountIn = _onSwapGivenOut(request, balanceTokenIn, balanceTokenOut);\\n\\n            // amountIn tokens are entering the Pool, so we round up.\\n            amountIn = _downscaleUp(amountIn, scalingFactorTokenIn);\\n\\n            // Fees are added after scaling happens, to reduce the complexity of the rounding direction analysis.\\n            return _addSwapFeeAmount(amountIn);\\n        }\\n    }\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens entering the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be taken from the Pool in return.\\n     *\\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled. The swap fee has already\\n     * been deducted from `swapRequest.amount`.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding down) before returning it to the\\n     * Vault.\\n     */\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) internal view virtual returns (uint256);\\n\\n    /*\\n     * @dev Called when a swap with the Pool occurs, where the amount of tokens exiting the Pool is known.\\n     *\\n     * Returns the amount of tokens that will be granted to the Pool in return.\\n     *\\n     * All amounts inside `swapRequest`, `balanceTokenIn` and `balanceTokenOut` are upscaled.\\n     *\\n     * The return value is also considered upscaled, and will be downscaled (rounding up) before applying the swap fee\\n     * and returning it to the Vault.\\n     */\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256 balanceTokenIn,\\n        uint256 balanceTokenOut\\n    ) internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x6a634f43159cd970522a2005d13934d1d56a85edaee4290ded729340761e19c3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/openzeppelin/ERC20.sol\\\";\\n\\nimport \\\"./BalancerPoolToken.sol\\\";\\nimport \\\"./BasePoolAuthorization.sol\\\";\\nimport \\\"../vault/interfaces/IVault.sol\\\";\\nimport \\\"../vault/interfaces/IBasePool.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus a total\\n// count, resulting in a large number of state variables.\\n\\n// solhint-disable max-states-count\\n\\n/**\\n * @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\\n * of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\\n *\\n * Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\\n * derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\\n * `whenNotPaused` modifier.\\n *\\n * No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\\n *\\n * Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\\n * BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\\n * and implement the swap callbacks themselves.\\n */\\nabstract contract BasePool is IBasePool, BasePoolAuthorization, BalancerPoolToken, TemporarilyPausable {\\n    using FixedPoint for uint256;\\n\\n    uint256 private constant _MIN_TOKENS = 2;\\n    uint256 private constant _MAX_TOKENS = 8;\\n\\n    // 1e18 corresponds to 1.0, or a 100% fee\\n    uint256 private constant _MIN_SWAP_FEE_PERCENTAGE = 1e12; // 0.0001%\\n    uint256 private constant _MAX_SWAP_FEE_PERCENTAGE = 1e17; // 10%\\n\\n    uint256 private constant _MINIMUM_BPT = 1e6;\\n\\n    uint256 internal _swapFeePercentage;\\n\\n    IVault private immutable _vault;\\n    bytes32 private immutable _poolId;\\n    uint256 private immutable _totalTokens;\\n\\n    IERC20 internal immutable _token0;\\n    IERC20 internal immutable _token1;\\n    IERC20 internal immutable _token2;\\n    IERC20 internal immutable _token3;\\n    IERC20 internal immutable _token4;\\n    IERC20 internal immutable _token5;\\n    IERC20 internal immutable _token6;\\n    IERC20 internal immutable _token7;\\n\\n    // All token balances are normalized to behave as if the token had 18 decimals. We assume a token's decimals will\\n    // not change throughout its lifetime, and store the corresponding scaling factor for each at construction time.\\n    // These factors are always greater than or equal to one: tokens with more than 18 decimals are not supported.\\n\\n    uint256 internal immutable _scalingFactor0;\\n    uint256 internal immutable _scalingFactor1;\\n    uint256 internal immutable _scalingFactor2;\\n    uint256 internal immutable _scalingFactor3;\\n    uint256 internal immutable _scalingFactor4;\\n    uint256 internal immutable _scalingFactor5;\\n    uint256 internal immutable _scalingFactor6;\\n    uint256 internal immutable _scalingFactor7;\\n\\n    event SwapFeeChanged(uint256 swapFeePercentage);\\n\\n    constructor(\\n        IVault vault,\\n        IVault.PoolSpecialization specialization,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        // Base Pools are expected to be deployed using factories. By using the factory address as the action\\n        // disambiguator, we make all Pools deployed by the same factory share action identifiers. This allows for\\n        // simpler management of permissions (such as being able to manage granting the 'set fee percentage' action in\\n        // any Pool created by the same factory), while still making action identifiers unique among different factories\\n        // if the selectors match, preventing accidental errors.\\n        Authentication(bytes32(uint256(msg.sender)))\\n        BalancerPoolToken(name, symbol)\\n        BasePoolAuthorization(owner)\\n        TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration)\\n    {\\n        _require(tokens.length >= _MIN_TOKENS, Errors.MIN_TOKENS);\\n        _require(tokens.length <= _MAX_TOKENS, Errors.MAX_TOKENS);\\n\\n        // The Vault only requires the token list to be ordered for the Two Token Pools specialization. However,\\n        // to make the developer experience consistent, we are requiring this condition for all the native pools.\\n        // Also, since these Pools will register tokens only once, we can ensure the Pool tokens will follow the same\\n        // order. We rely on this property to make Pools simpler to write, as it lets us assume that the\\n        // order of token-specific parameters (such as token weights) will not change.\\n        InputHelpers.ensureArrayIsSorted(tokens);\\n\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        bytes32 poolId = vault.registerPool(specialization);\\n\\n        // Pass in zero addresses for Asset Managers\\n        vault.registerTokens(poolId, tokens, new address[](tokens.length));\\n\\n        // Set immutable state variables - these cannot be read from during construction\\n\\n        _vault = vault;\\n        _poolId = poolId;\\n        _swapFeePercentage = swapFeePercentage;\\n        _totalTokens = tokens.length;\\n\\n        // Immutable variables cannot be initialized inside an if statement, so we must do conditional assignments\\n\\n        _token0 = tokens.length > 0 ? tokens[0] : IERC20(0);\\n        _token1 = tokens.length > 1 ? tokens[1] : IERC20(0);\\n        _token2 = tokens.length > 2 ? tokens[2] : IERC20(0);\\n        _token3 = tokens.length > 3 ? tokens[3] : IERC20(0);\\n        _token4 = tokens.length > 4 ? tokens[4] : IERC20(0);\\n        _token5 = tokens.length > 5 ? tokens[5] : IERC20(0);\\n        _token6 = tokens.length > 6 ? tokens[6] : IERC20(0);\\n        _token7 = tokens.length > 7 ? tokens[7] : IERC20(0);\\n\\n        _scalingFactor0 = tokens.length > 0 ? _computeScalingFactor(tokens[0]) : 0;\\n        _scalingFactor1 = tokens.length > 1 ? _computeScalingFactor(tokens[1]) : 0;\\n        _scalingFactor2 = tokens.length > 2 ? _computeScalingFactor(tokens[2]) : 0;\\n        _scalingFactor3 = tokens.length > 3 ? _computeScalingFactor(tokens[3]) : 0;\\n        _scalingFactor4 = tokens.length > 4 ? _computeScalingFactor(tokens[4]) : 0;\\n        _scalingFactor5 = tokens.length > 5 ? _computeScalingFactor(tokens[5]) : 0;\\n        _scalingFactor6 = tokens.length > 6 ? _computeScalingFactor(tokens[6]) : 0;\\n        _scalingFactor7 = tokens.length > 7 ? _computeScalingFactor(tokens[7]) : 0;\\n    }\\n\\n    // Getters / Setters\\n\\n    function getVault() public view returns (IVault) {\\n        return _vault;\\n    }\\n\\n    function getPoolId() public view returns (bytes32) {\\n        return _poolId;\\n    }\\n\\n    function _getTotalTokens() internal view returns (uint256) {\\n        return _totalTokens;\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setSwapFeePercentage(uint256 swapFeePercentage) external virtual authenticate whenNotPaused {\\n        _require(swapFeePercentage >= _MIN_SWAP_FEE_PERCENTAGE, Errors.MIN_SWAP_FEE_PERCENTAGE);\\n        _require(swapFeePercentage <= _MAX_SWAP_FEE_PERCENTAGE, Errors.MAX_SWAP_FEE_PERCENTAGE);\\n\\n        _swapFeePercentage = swapFeePercentage;\\n        emit SwapFeeChanged(swapFeePercentage);\\n    }\\n\\n    // Caller must be approved by the Vault's Authorizer\\n    function setPaused(bool paused) external authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // Join / Exit Hooks\\n\\n    modifier onlyVault(bytes32 poolId) {\\n        _require(msg.sender == address(getVault()), Errors.CALLER_NOT_VAULT);\\n        _require(poolId == getPoolId(), Errors.INVALID_POOL_ID);\\n        _;\\n    }\\n\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n\\n        if (totalSupply() == 0) {\\n            (uint256 bptAmountOut, uint256[] memory amountsIn) = _onInitializePool(poolId, sender, recipient, userData);\\n\\n            // On initialization, we lock _MINIMUM_BPT by minting it for the zero address. This BPT acts as a minimum\\n            // as it will never be burned, which reduces potential issues with rounding, and also prevents the Pool from\\n            // ever being fully drained.\\n            _require(bptAmountOut >= _MINIMUM_BPT, Errors.MINIMUM_BPT);\\n            _mintPoolTokens(address(0), _MINIMUM_BPT);\\n            _mintPoolTokens(recipient, bptAmountOut - _MINIMUM_BPT);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n\\n            return (amountsIn, new uint256[](_getTotalTokens()));\\n        } else {\\n            _upscaleArray(balances, scalingFactors);\\n            (uint256 bptAmountOut, uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts) = _onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            // Note we no longer use `balances` after calling `_onJoinPool`, which may mutate it.\\n\\n            _mintPoolTokens(recipient, bptAmountOut);\\n\\n            // amountsIn are amounts entering the Pool, so we round up.\\n            _downscaleUpArray(amountsIn, scalingFactors);\\n            // dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n            _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n            return (amountsIn, dueProtocolFeeAmounts);\\n        }\\n    }\\n\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external virtual override onlyVault(poolId) returns (uint256[] memory, uint256[] memory) {\\n        uint256[] memory scalingFactors = _scalingFactors();\\n        _upscaleArray(balances, scalingFactors);\\n\\n        (uint256 bptAmountIn, uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts) = _onExitPool(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData\\n        );\\n\\n        // Note we no longer use `balances` after calling `_onExitPool`, which may mutate it.\\n\\n        _burnPoolTokens(sender, bptAmountIn);\\n\\n        // Both amountsOut and dueProtocolFeeAmounts are amounts exiting the Pool, so we round down.\\n        _downscaleDownArray(amountsOut, scalingFactors);\\n        _downscaleDownArray(dueProtocolFeeAmounts, scalingFactors);\\n\\n        return (amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    // Query functions\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `sender` would have to supply.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryJoin(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptOut, uint256[] memory amountsIn) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onJoinPool,\\n            _downscaleUpArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptOut, amountsIn);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\\n     * Vault with the same arguments, along with the number of tokens `recipient` would receive.\\n     *\\n     * This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\\n     * data, such as the protocol swap fee percentage and Pool balances.\\n     *\\n     * Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\\n     * explicitly use eth_call instead of eth_sendTransaction.\\n     */\\n    function queryExit(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256 bptIn, uint256[] memory amountsOut) {\\n        InputHelpers.ensureInputLengthMatch(balances.length, _getTotalTokens());\\n\\n        _queryAction(\\n            poolId,\\n            sender,\\n            recipient,\\n            balances,\\n            lastChangeBlock,\\n            protocolSwapFeePercentage,\\n            userData,\\n            _onExitPool,\\n            _downscaleDownArray\\n        );\\n\\n        // The `return` opcode is executed directly inside `_queryAction`, so execution never reaches this statement,\\n        // and we don't need to return anything here - it just silences compiler warnings.\\n        return (bptIn, amountsOut);\\n    }\\n\\n    // Internal hooks to be overridden by derived contracts - all token amounts (except BPT) in these interfaces are\\n    // upscaled.\\n\\n    /**\\n     * @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\\n     *\\n     * Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\\n     *\\n     * Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\\n     * to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\\n     * ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\\n     * lifetime.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     */\\n    function _onInitializePool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        bytes memory userData\\n    ) internal virtual returns (uint256 bptAmountOut, uint256[] memory amountsIn);\\n\\n    /**\\n     * @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\\n     *\\n     * Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\\n     * tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * Minted BPT will be sent to `recipient`.\\n     *\\n     * The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\\n     * be downscaled (rounding up) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountOut,\\n            uint256[] memory amountsIn,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    /**\\n     * @dev Called whenever the Pool is exited.\\n     *\\n     * Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\\n     * the number of tokens to pay in protocol swap fees.\\n     *\\n     * Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\\n     * performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\\n     *\\n     * BPT will be burnt from `sender`.\\n     *\\n     * The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\\n     * (rounding down) before being returned to the Vault.\\n     *\\n     * Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\\n     * amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault.\\n     */\\n    function _onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        );\\n\\n    // Internal functions\\n\\n    /**\\n     * @dev Adds swap fee amount to `amount`, returning a higher value.\\n     */\\n    function _addSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount + fee amount, so we round up (favoring a higher fee amount).\\n        return amount.divUp(_swapFeePercentage.complement());\\n    }\\n\\n    /**\\n     * @dev Subtracts swap fee amount from `amount`, returning a lower value.\\n     */\\n    function _subtractSwapFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // This returns amount - fee amount, so we round up (favoring a higher fee amount).\\n        uint256 feeAmount = amount.mulUp(_swapFeePercentage);\\n        return amount.sub(feeAmount);\\n    }\\n\\n    // Scaling\\n\\n    /**\\n     * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\\n     * it had 18 decimals.\\n     */\\n    function _computeScalingFactor(IERC20 token) private view returns (uint256) {\\n        // Tokens that don't implement the `decimals` method are not supported.\\n        uint256 tokenDecimals = ERC20(address(token)).decimals();\\n\\n        // Tokens with more than 18 decimals are not supported.\\n        uint256 decimalsDifference = Math.sub(18, tokenDecimals);\\n        return 10**decimalsDifference;\\n    }\\n\\n    /**\\n     * @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\\n     * Pool.\\n     */\\n    function _scalingFactor(IERC20 token) internal view returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _scalingFactor0; }\\n        else if (token == _token1) { return _scalingFactor1; }\\n        else if (token == _token2) { return _scalingFactor2; }\\n        else if (token == _token3) { return _scalingFactor3; }\\n        else if (token == _token4) { return _scalingFactor4; }\\n        else if (token == _token5) { return _scalingFactor5; }\\n        else if (token == _token6) { return _scalingFactor6; }\\n        else if (token == _token7) { return _scalingFactor7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\\n     * pass balances in this order when calling any of the Pool hooks\\n     */\\n    function _scalingFactors() internal view returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory scalingFactors = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { scalingFactors[0] = _scalingFactor0; } else { return scalingFactors; }\\n            if (totalTokens > 1) { scalingFactors[1] = _scalingFactor1; } else { return scalingFactors; }\\n            if (totalTokens > 2) { scalingFactors[2] = _scalingFactor2; } else { return scalingFactors; }\\n            if (totalTokens > 3) { scalingFactors[3] = _scalingFactor3; } else { return scalingFactors; }\\n            if (totalTokens > 4) { scalingFactors[4] = _scalingFactor4; } else { return scalingFactors; }\\n            if (totalTokens > 5) { scalingFactors[5] = _scalingFactor5; } else { return scalingFactors; }\\n            if (totalTokens > 6) { scalingFactors[6] = _scalingFactor6; } else { return scalingFactors; }\\n            if (totalTokens > 7) { scalingFactors[7] = _scalingFactor7; } else { return scalingFactors; }\\n        }\\n\\n        return scalingFactors;\\n    }\\n\\n    /**\\n     * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\\n     * scaling or not.\\n     */\\n    function _upscale(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.mul(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\\n     * the `amounts` array.\\n     */\\n    function _upscaleArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.mul(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded down.\\n     */\\n    function _downscaleDown(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divDown(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleDownArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divDown(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\\n     * whether it needed scaling or not. The result is rounded up.\\n     */\\n    function _downscaleUp(uint256 amount, uint256 scalingFactor) internal pure returns (uint256) {\\n        return Math.divUp(amount, scalingFactor);\\n    }\\n\\n    /**\\n     * @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\\n     * *mutates* the `amounts` array.\\n     */\\n    function _downscaleUpArray(uint256[] memory amounts, uint256[] memory scalingFactors) internal view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            amounts[i] = Math.divUp(amounts[i], scalingFactors[i]);\\n        }\\n    }\\n\\n    function _getAuthorizer() internal view override returns (IAuthorizer) {\\n        // Access control management is delegated to the Vault's Authorizer. This lets Balancer Governance manage which\\n        // accounts can call permissioned functions: for example, to perform emergency pauses.\\n        // If the owner is delegated, then *all* permissioned functions, including `setSwapFeePercentage`, will be under\\n        // Governance control.\\n        return getVault().getAuthorizer();\\n    }\\n\\n    function _queryAction(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData,\\n        function(bytes32, address, address, uint256[] memory, uint256, uint256, bytes memory)\\n            internal\\n            returns (uint256, uint256[] memory, uint256[] memory) _action,\\n        function(uint256[] memory, uint256[] memory) internal view _downscaleArray\\n    ) private {\\n        // This uses the same technique used by the Vault in queryBatchSwap. Refer to that function for a detailed\\n        // explanation.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the bpt and token amounts from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0x43adbafb00000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of the\\n                        // `bptAmount` and `tokenAmounts` (array: length + data). We need to return an ABI-encoded\\n                        // representation of these.\\n                        // An ABI-encoded response will include one additional field to indicate the starting offset of\\n                        // the `tokenAmounts` array. The `bptAmount` will be laid out in the first word of the\\n                        // returndata.\\n                        //\\n                        // In returndata:\\n                        // [ signature ][ bptAmount ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  4 bytes  ][  32 bytes ][       32 bytes      ][ (32 * length) bytes ]\\n                        //\\n                        // We now need to return (ABI-encoded values):\\n                        // [ bptAmount ][ tokeAmounts offset ][ tokenAmounts length ][ tokenAmounts values ]\\n                        // [  32 bytes ][       32 bytes     ][       32 bytes      ][ (32 * length) bytes ]\\n\\n                        // We copy 32 bytes for the `bptAmount` from returndata into memory.\\n                        // Note that we skip the first 4 bytes for the error signature\\n                        returndatacopy(0, 0x04, 32)\\n\\n                        // The offsets are 32-bytes long, so the array of `tokenAmounts` will start after\\n                        // the initial 64 bytes.\\n                        mstore(0x20, 64)\\n\\n                        // We now copy the raw memory array for the `tokenAmounts` from returndata into memory.\\n                        // Since bpt amount and offset take up 64 bytes, we start copying at address 0x40. We also\\n                        // skip the first 36 bytes from returndata, which correspond to the signature plus bpt amount.\\n                        returndatacopy(0x40, 0x24, sub(returndatasize(), 36))\\n\\n                        // We finally return the ABI-encoded uint256 and the array, which has a total length equal to\\n                        // the size of returndata, plus the 32 bytes of the offset but without the 4 bytes of the\\n                        // error signature.\\n                        return(0, add(returndatasize(), 28))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            uint256[] memory scalingFactors = _scalingFactors();\\n            _upscaleArray(balances, scalingFactors);\\n\\n            (uint256 bptAmount, uint256[] memory tokenAmounts, ) = _action(\\n                poolId,\\n                sender,\\n                recipient,\\n                balances,\\n                lastChangeBlock,\\n                protocolSwapFeePercentage,\\n                userData\\n            );\\n\\n            _downscaleArray(tokenAmounts, scalingFactors);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of `bptAmount` and `tokenAmounts` in memory, which is composed of\\n                // a 32-byte uint256, followed by a 32-byte for the array length, and finally the 32-byte uint256 values\\n                // Because revert expects a size in bytes, we multiply the array length (stored at `tokenAmounts`) by 32\\n                let size := mul(mload(tokenAmounts), 32)\\n\\n                // We store the `bptAmount` in the previous slot to the `tokenAmounts` array. We can make sure there\\n                // will be at least one available slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                let start := sub(tokenAmounts, 0x20)\\n                mstore(start, bptAmount)\\n\\n                // We send one extra value for the error signature \\\"QueryError(uint256,uint256[])\\\" which is 0x43adbafb\\n                // We use the previous slot to `bptAmount`.\\n                mstore(sub(start, 0x20), 0x0000000000000000000000000000000000000000000000000000000043adbafb)\\n                start := sub(start, 0x04)\\n\\n                // When copying from `tokenAmounts` into returndata, we copy the additional 68 bytes to also return\\n                // the `bptAmount`, the array 's length, and the error signature.\\n                revert(start, add(size, 68))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2c5f45afc279e0b638bef607738d3c5fd1ffa3e6d8c2996b6de96110938a2457\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/BasePoolAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../vault/interfaces/IAuthorizer.sol\\\";\\n\\nimport \\\"./BasePool.sol\\\";\\n\\n/**\\n * @dev Base authorization layer implementation for Pools.\\n *\\n * The owner account can call some of the permissioned functions - access control of the rest is delegated to the\\n * Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\\n * granular roles, etc., could be built on top of this by making the owner a smart contract.\\n *\\n * Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\\n * control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`.\\n */\\nabstract contract BasePoolAuthorization is Authentication {\\n    address private immutable _owner;\\n\\n    address private constant _DELEGATE_OWNER = 0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B;\\n\\n    constructor(address owner) {\\n        _owner = owner;\\n    }\\n\\n    function getOwner() public view returns (address) {\\n        return _owner;\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        if ((getOwner() != _DELEGATE_OWNER) && _isOwnerOnlyAction(actionId)) {\\n            // Only the owner can perform \\\"owner only\\\" actions, unless the owner is delegated.\\n            return msg.sender == getOwner();\\n        } else {\\n            // Non-owner actions are always processed via the Authorizer, as \\\"owner only\\\" ones are when delegated.\\n            return _getAuthorizer().canPerform(actionId, account, address(this));\\n        }\\n    }\\n\\n    function _isOwnerOnlyAction(bytes32 actionId) private view returns (bool) {\\n        // This implementation hardcodes the setSwapFeePercentage action identifier.\\n        return actionId == getActionId(BasePool.setSwapFeePercentage.selector);\\n    }\\n\\n    function _getAuthorizer() internal view virtual returns (IAuthorizer);\\n}\\n\",\"keccak256\":\"0x080dfa64851c8f2bc9e989d37154453cf154609a792f8ca554478450290be7db\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/math/Math.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\ncontract WeightedMath {\\n    using FixedPoint for uint256;\\n    // A minimum normalized weight imposes a maximum weight ratio. We need this due to limitations in the\\n    // implementation of the power function, as these ratios are often exponents.\\n    uint256 internal constant _MIN_WEIGHT = 0.01e18;\\n    // Having a minimum normalized weight imposes a limit on the maximum number of tokens;\\n    // i.e., the largest possible pool is one where all tokens have exactly the minimum weight.\\n    uint256 internal constant _MAX_WEIGHTED_TOKENS = 100;\\n\\n    // Pool limits that arise from limitations in the fixed point power function (and the imposed 1:100 maximum weight\\n    // ratio).\\n\\n    // Swap limits: amounts swapped may not be larger than this percentage of total balance.\\n    uint256 internal constant _MAX_IN_RATIO = 0.3e18;\\n    uint256 internal constant _MAX_OUT_RATIO = 0.3e18;\\n\\n    // Invariant growth limit: non-proportional joins cannot cause the invariant to increase by more than this ratio.\\n    uint256 internal constant _MAX_INVARIANT_RATIO = 3e18;\\n    // Invariant shrink limit: non-proportional exits cannot cause the invariant to decrease by less than this ratio.\\n    uint256 internal constant _MIN_INVARIANT_RATIO = 0.7e18;\\n\\n    // Invariant is used to collect protocol swap fees by comparing its value between two times.\\n    // So we can round always to the same direction. It is also used to initiate the BPT amount\\n    // and, because there is a minimum BPT, we round down the invariant.\\n    function _calculateInvariant(uint256[] memory normalizedWeights, uint256[] memory balances)\\n        internal\\n        pure\\n        returns (uint256 invariant)\\n    {\\n        /**********************************************************************************************\\n        // invariant               _____                                                             //\\n        // wi = weight index i      | |      wi                                                      //\\n        // bi = balance index i     | |  bi ^   = i                                                  //\\n        // i = invariant                                                                             //\\n        **********************************************************************************************/\\n\\n        invariant = FixedPoint.ONE;\\n        for (uint256 i = 0; i < normalizedWeights.length; i++) {\\n            invariant = invariant.mulDown(balances[i].powDown(normalizedWeights[i]));\\n        }\\n\\n        _require(invariant > 0, Errors.ZERO_INVARIANT);\\n    }\\n\\n    // Computes how many tokens can be taken out of a pool if `amountIn` are sent, given the\\n    // current balances and weights.\\n    function _calcOutGivenIn(\\n        uint256 balanceIn,\\n        uint256 weightIn,\\n        uint256 balanceOut,\\n        uint256 weightOut,\\n        uint256 amountIn\\n    ) internal pure returns (uint256) {\\n        /**********************************************************************************************\\n        // outGivenIn                                                                                //\\n        // aO = amountOut                                                                            //\\n        // bO = balanceOut                                                                           //\\n        // bI = balanceIn              /      /            bI             \\\\    (wI / wO) \\\\           //\\n        // aI = amountIn    aO = bO * |  1 - | --------------------------  | ^            |          //\\n        // wI = weightIn               \\\\      \\\\       ( bI + aI )         /              /           //\\n        // wO = weightOut                                                                            //\\n        **********************************************************************************************/\\n\\n        // Amount out, so we round down overall.\\n\\n        // The multiplication rounds down, and the subtrahend (power) rounds up (so the base rounds up too).\\n        // Because bI / (bI + aI) <= 1, the exponent rounds down.\\n\\n        // Cannot exceed maximum in ratio\\n        _require(amountIn <= balanceIn.mulDown(_MAX_IN_RATIO), Errors.MAX_IN_RATIO);\\n\\n        uint256 denominator = balanceIn.add(amountIn);\\n        uint256 base = balanceIn.divUp(denominator);\\n        uint256 exponent = weightIn.divDown(weightOut);\\n        uint256 power = base.powUp(exponent);\\n\\n        return balanceOut.mulDown(power.complement());\\n    }\\n\\n    // Computes how many tokens must be sent to a pool in order to take `amountOut`, given the\\n    // current balances and weights.\\n    function _calcInGivenOut(\\n        uint256 balanceIn,\\n        uint256 weightIn,\\n        uint256 balanceOut,\\n        uint256 weightOut,\\n        uint256 amountOut\\n    ) internal pure returns (uint256) {\\n        /**********************************************************************************************\\n        // inGivenOut                                                                                //\\n        // aO = amountOut                                                                            //\\n        // bO = balanceOut                                                                           //\\n        // bI = balanceIn              /  /            bO             \\\\    (wO / wI)      \\\\          //\\n        // aI = amountIn    aI = bI * |  | --------------------------  | ^            - 1  |         //\\n        // wI = weightIn               \\\\  \\\\       ( bO - aO )         /                   /          //\\n        // wO = weightOut                                                                            //\\n        **********************************************************************************************/\\n\\n        // Amount in, so we round up overall.\\n\\n        // The multiplication rounds up, and the power rounds up (so the base rounds up too).\\n        // Because b0 / (b0 - a0) >= 1, the exponent rounds up.\\n\\n        // Cannot exceed maximum out ratio\\n        _require(amountOut <= balanceOut.mulDown(_MAX_OUT_RATIO), Errors.MAX_OUT_RATIO);\\n\\n        uint256 base = balanceOut.divUp(balanceOut.sub(amountOut));\\n        uint256 exponent = weightOut.divUp(weightIn);\\n        uint256 power = base.powUp(exponent);\\n\\n        // Because the base is larger than one (and the power rounds up), the power should always be larger than one, so\\n        // the following subtraction should never revert.\\n        uint256 ratio = power.sub(FixedPoint.ONE);\\n\\n        return balanceIn.mulUp(ratio);\\n    }\\n\\n    function _calcBptOutGivenExactTokensIn(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256[] memory amountsIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT out, so we round down overall.\\n\\n        uint256[] memory balanceRatiosWithFee = new uint256[](amountsIn.length);\\n\\n        uint256 invariantRatioWithFees = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            balanceRatiosWithFee[i] = balances[i].add(amountsIn[i]).divDown(balances[i]);\\n            invariantRatioWithFees = invariantRatioWithFees.add(balanceRatiosWithFee[i].mulDown(normalizedWeights[i]));\\n        }\\n\\n        uint256 invariantRatio = FixedPoint.ONE;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            uint256 amountInWithoutFee;\\n\\n            if (balanceRatiosWithFee[i] > invariantRatioWithFees) {\\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithFees.sub(FixedPoint.ONE));\\n                uint256 taxableAmount = amountsIn[i].sub(nonTaxableAmount);\\n                amountInWithoutFee = nonTaxableAmount.add(taxableAmount.mulDown(FixedPoint.ONE.sub(swapFee)));\\n            } else {\\n                amountInWithoutFee = amountsIn[i];\\n            }\\n\\n            uint256 balanceRatio = balances[i].add(amountInWithoutFee).divDown(balances[i]);\\n\\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\\n        }\\n\\n        if (invariantRatio >= FixedPoint.ONE) {\\n            return bptTotalSupply.mulDown(invariantRatio.sub(FixedPoint.ONE));\\n        } else {\\n            return 0;\\n        }\\n    }\\n\\n    function _calcTokenInGivenExactBptOut(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 bptAmountOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        /******************************************************************************************\\n        // tokenInForExactBPTOut                                                                 //\\n        // a = amountIn                                                                          //\\n        // b = balance                      /  /    totalBPT + bptOut      \\\\    (1 / w)       \\\\  //\\n        // bptOut = bptAmountOut   a = b * |  | --------------------------  | ^          - 1  |  //\\n        // bpt = totalBPT                   \\\\  \\\\       totalBPT            /                  /  //\\n        // w = weight                                                                            //\\n        ******************************************************************************************/\\n\\n        // Token in, so we round up overall.\\n\\n        // Calculate the factor by which the invariant will increase after minting BPTAmountOut\\n        uint256 invariantRatio = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply);\\n        _require(invariantRatio <= _MAX_INVARIANT_RATIO, Errors.MAX_OUT_BPT_FOR_TOKEN_IN);\\n\\n        // Calculate by how much the token balance has to increase to match the invariantRatio\\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divUp(normalizedWeight));\\n\\n        uint256 amountInWithoutFee = balance.mulUp(balanceRatio.sub(FixedPoint.ONE));\\n\\n        // We can now compute how much extra balance is being deposited and used in virtual swaps, and charge swap fees\\n        // accordingly.\\n        uint256 taxablePercentage = normalizedWeight.complement();\\n        uint256 taxableAmount = amountInWithoutFee.mulUp(taxablePercentage);\\n        uint256 nonTaxableAmount = amountInWithoutFee.sub(taxableAmount);\\n\\n        return nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\\n    }\\n\\n    function _calcBptInGivenExactTokensOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256[] memory amountsOut,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        // BPT in, so we round up overall.\\n\\n        uint256[] memory balanceRatiosWithoutFee = new uint256[](amountsOut.length);\\n        uint256 invariantRatioWithoutFees = 0;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            balanceRatiosWithoutFee[i] = balances[i].sub(amountsOut[i]).divUp(balances[i]);\\n            invariantRatioWithoutFees = invariantRatioWithoutFees.add(\\n                balanceRatiosWithoutFee[i].mulUp(normalizedWeights[i])\\n            );\\n        }\\n\\n        uint256 invariantRatio = FixedPoint.ONE;\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            // Swap fees are typically charged on 'token in', but there is no 'token in' here,\\n            // o we apply it to 'token out'.\\n            // This results in slightly larger price impact.\\n\\n            uint256 amountOutWithFee;\\n            if (invariantRatioWithoutFees > balanceRatiosWithoutFee[i]) {\\n                uint256 nonTaxableAmount = balances[i].mulDown(invariantRatioWithoutFees.complement());\\n                uint256 taxableAmount = amountsOut[i].sub(nonTaxableAmount);\\n\\n                amountOutWithFee = nonTaxableAmount.add(taxableAmount.divUp(swapFee.complement()));\\n            } else {\\n                amountOutWithFee = amountsOut[i];\\n            }\\n\\n            uint256 balanceRatio = balances[i].sub(amountOutWithFee).divDown(balances[i]);\\n\\n            invariantRatio = invariantRatio.mulDown(balanceRatio.powDown(normalizedWeights[i]));\\n        }\\n\\n        return bptTotalSupply.mulUp(invariantRatio.complement());\\n    }\\n\\n    function _calcTokenOutGivenExactBptIn(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 bptAmountIn,\\n        uint256 bptTotalSupply,\\n        uint256 swapFee\\n    ) internal pure returns (uint256) {\\n        /*****************************************************************************************\\n        // exactBPTInForTokenOut                                                                //\\n        // a = amountOut                                                                        //\\n        // b = balance                     /      /    totalBPT - bptIn       \\\\    (1 / w)  \\\\   //\\n        // bptIn = bptAmountIn    a = b * |  1 - | --------------------------  | ^           |  //\\n        // bpt = totalBPT                  \\\\      \\\\       totalBPT            /             /   //\\n        // w = weight                                                                           //\\n        *****************************************************************************************/\\n\\n        // Token out, so we round down overall. The multiplication rounds down, but the power rounds up (so the base\\n        // rounds up). Because (totalBPT - bptIn) / totalBPT <= 1, the exponent rounds down.\\n\\n        // Calculate the factor by which the invariant will decrease after burning BPTAmountIn\\n        uint256 invariantRatio = bptTotalSupply.sub(bptAmountIn).divUp(bptTotalSupply);\\n        _require(invariantRatio >= _MIN_INVARIANT_RATIO, Errors.MIN_BPT_IN_FOR_TOKEN_OUT);\\n\\n        // Calculate by how much the token balance has to decrease to match invariantRatio\\n        uint256 balanceRatio = invariantRatio.powUp(FixedPoint.ONE.divDown(normalizedWeight));\\n\\n        // Because of rounding up, balanceRatio can be greater than one. Using complement prevents reverts.\\n        uint256 amountOutWithoutFee = balance.mulDown(balanceRatio.complement());\\n\\n        // We can now compute how much excess balance is being withdrawn as a result of the virtual swaps, which result\\n        // in swap fees.\\n        uint256 taxablePercentage = normalizedWeight.complement();\\n\\n        // Swap fees are typically charged on 'token in', but there is no 'token in' here, so we apply it\\n        // to 'token out'. This results in slightly larger price impact. Fees are rounded up.\\n        uint256 taxableAmount = amountOutWithoutFee.mulUp(taxablePercentage);\\n        uint256 nonTaxableAmount = amountOutWithoutFee.sub(taxableAmount);\\n\\n        return nonTaxableAmount.add(taxableAmount.mulDown(swapFee.complement()));\\n    }\\n\\n    function _calcTokensOutGivenExactBptIn(\\n        uint256[] memory balances,\\n        uint256 bptAmountIn,\\n        uint256 totalBPT\\n    ) internal pure returns (uint256[] memory) {\\n        /**********************************************************************************************\\n        // exactBPTInForTokensOut                                                                    //\\n        // (per token)                                                                               //\\n        // aO = amountOut                  /        bptIn         \\\\                                  //\\n        // b = balance           a0 = b * | ---------------------  |                                 //\\n        // bptIn = bptAmountIn             \\\\       totalBPT       /                                  //\\n        // bpt = totalBPT                                                                            //\\n        **********************************************************************************************/\\n\\n        // Since we're computing an amount out, we round down overall. This means rounding down on both the\\n        // multiplication and division.\\n\\n        uint256 bptRatio = bptAmountIn.divDown(totalBPT);\\n\\n        uint256[] memory amountsOut = new uint256[](balances.length);\\n        for (uint256 i = 0; i < balances.length; i++) {\\n            amountsOut[i] = balances[i].mulDown(bptRatio);\\n        }\\n\\n        return amountsOut;\\n    }\\n\\n    function _calcDueTokenProtocolSwapFeeAmount(\\n        uint256 balance,\\n        uint256 normalizedWeight,\\n        uint256 previousInvariant,\\n        uint256 currentInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) internal pure returns (uint256) {\\n        /*********************************************************************************\\n        /*  protocolSwapFeePercentage * balanceToken * ( 1 - (previousInvariant / currentInvariant) ^ (1 / weightToken))\\n        *********************************************************************************/\\n\\n        if (currentInvariant <= previousInvariant) {\\n            // This shouldn't happen outside of rounding errors, but have this safeguard nonetheless to prevent the Pool\\n            // from entering a locked state in which joins and exits revert while computing accumulated swap fees.\\n            return 0;\\n        }\\n\\n        // We round down to prevent issues in the Pool's accounting, even if it means paying slightly less in protocol\\n        // fees to the Vault.\\n\\n        // Fee percentage and balance multiplications round down, while the subtrahend (power) rounds up (as does the\\n        // base). Because previousInvariant / currentInvariant <= 1, the exponent rounds down.\\n\\n        uint256 base = previousInvariant.divUp(currentInvariant);\\n        uint256 exponent = FixedPoint.ONE.divDown(normalizedWeight);\\n\\n        // Because the exponent is larger than one, the base of the power function has a lower bound. We cap to this\\n        // value to avoid numeric issues, which means in the extreme case (where the invariant growth is larger than\\n        // 1 / min exponent) the Pool will pay less in protocol fees than it should.\\n        base = Math.max(base, FixedPoint.MIN_POW_BASE_FREE_EXPONENT);\\n\\n        uint256 power = base.powUp(exponent);\\n\\n        uint256 tokenAccruedFees = balance.mulDown(power.complement());\\n        return tokenAccruedFees.mulDown(protocolSwapFeePercentage);\\n    }\\n}\\n\",\"keccak256\":\"0xb7b712312afa0000d491862a7e50e1d6814a18e92ca16897baaa412ef5aff138\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/math/FixedPoint.sol\\\";\\nimport \\\"../../lib/helpers/InputHelpers.sol\\\";\\n\\nimport \\\"../BaseMinimalSwapInfoPool.sol\\\";\\n\\nimport \\\"./WeightedMath.sol\\\";\\nimport \\\"./WeightedPoolUserDataHelpers.sol\\\";\\n\\n// This contract relies on tons of immutable state variables to perform efficient lookup, without resorting to storage\\n// reads. Because immutable arrays are not supported, we instead declare a fixed set of state variables plus total\\n// count, resulting in a large number of state variables.\\n\\ncontract WeightedPool is BaseMinimalSwapInfoPool, WeightedMath {\\n    using FixedPoint for uint256;\\n    using WeightedPoolUserDataHelpers for bytes;\\n\\n    // The protocol fees will always be charged using the token associated with the max weight in the pool.\\n    // Since these Pools will register tokens only once, we can assume this index will be constant.\\n    uint256 private immutable _maxWeightTokenIndex;\\n\\n    uint256 private immutable _normalizedWeight0;\\n    uint256 private immutable _normalizedWeight1;\\n    uint256 private immutable _normalizedWeight2;\\n    uint256 private immutable _normalizedWeight3;\\n    uint256 private immutable _normalizedWeight4;\\n    uint256 private immutable _normalizedWeight5;\\n    uint256 private immutable _normalizedWeight6;\\n    uint256 private immutable _normalizedWeight7;\\n\\n    uint256 private _lastInvariant;\\n\\n    enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT }\\n    enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\\n\\n    constructor(\\n        IVault vault,\\n        string memory name,\\n        string memory symbol,\\n        IERC20[] memory tokens,\\n        uint256[] memory normalizedWeights,\\n        uint256 swapFeePercentage,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration,\\n        address owner\\n    )\\n        BaseMinimalSwapInfoPool(\\n            vault,\\n            name,\\n            symbol,\\n            tokens,\\n            swapFeePercentage,\\n            pauseWindowDuration,\\n            bufferPeriodDuration,\\n            owner\\n        )\\n    {\\n        uint256 numTokens = tokens.length;\\n        InputHelpers.ensureInputLengthMatch(numTokens, normalizedWeights.length);\\n\\n        // Ensure  each normalized weight is above them minimum and find the token index of the maximum weight\\n        uint256 normalizedSum = 0;\\n        uint256 maxWeightTokenIndex = 0;\\n        uint256 maxNormalizedWeight = 0;\\n        for (uint8 i = 0; i < numTokens; i++) {\\n            uint256 normalizedWeight = normalizedWeights[i];\\n            _require(normalizedWeight >= _MIN_WEIGHT, Errors.MIN_WEIGHT);\\n\\n            normalizedSum = normalizedSum.add(normalizedWeight);\\n            if (normalizedWeight > maxNormalizedWeight) {\\n                maxWeightTokenIndex = i;\\n                maxNormalizedWeight = normalizedWeight;\\n            }\\n        }\\n        // Ensure that the normalized weights sum to ONE\\n        _require(normalizedSum == FixedPoint.ONE, Errors.NORMALIZED_WEIGHT_INVARIANT);\\n\\n        _maxWeightTokenIndex = maxWeightTokenIndex;\\n        _normalizedWeight0 = normalizedWeights.length > 0 ? normalizedWeights[0] : 0;\\n        _normalizedWeight1 = normalizedWeights.length > 1 ? normalizedWeights[1] : 0;\\n        _normalizedWeight2 = normalizedWeights.length > 2 ? normalizedWeights[2] : 0;\\n        _normalizedWeight3 = normalizedWeights.length > 3 ? normalizedWeights[3] : 0;\\n        _normalizedWeight4 = normalizedWeights.length > 4 ? normalizedWeights[4] : 0;\\n        _normalizedWeight5 = normalizedWeights.length > 5 ? normalizedWeights[5] : 0;\\n        _normalizedWeight6 = normalizedWeights.length > 6 ? normalizedWeights[6] : 0;\\n        _normalizedWeight7 = normalizedWeights.length > 7 ? normalizedWeights[7] : 0;\\n    }\\n\\n    function _normalizedWeight(IERC20 token) internal view virtual returns (uint256) {\\n        // prettier-ignore\\n        if (token == _token0) { return _normalizedWeight0; }\\n        else if (token == _token1) { return _normalizedWeight1; }\\n        else if (token == _token2) { return _normalizedWeight2; }\\n        else if (token == _token3) { return _normalizedWeight3; }\\n        else if (token == _token4) { return _normalizedWeight4; }\\n        else if (token == _token5) { return _normalizedWeight5; }\\n        else if (token == _token6) { return _normalizedWeight6; }\\n        else if (token == _token7) { return _normalizedWeight7; }\\n        else {\\n            _revert(Errors.INVALID_TOKEN);\\n        }\\n    }\\n\\n    function _normalizedWeights() internal view virtual returns (uint256[] memory) {\\n        uint256 totalTokens = _getTotalTokens();\\n        uint256[] memory normalizedWeights = new uint256[](totalTokens);\\n\\n        // prettier-ignore\\n        {\\n            if (totalTokens > 0) { normalizedWeights[0] = _normalizedWeight0; } else { return normalizedWeights; }\\n            if (totalTokens > 1) { normalizedWeights[1] = _normalizedWeight1; } else { return normalizedWeights; }\\n            if (totalTokens > 2) { normalizedWeights[2] = _normalizedWeight2; } else { return normalizedWeights; }\\n            if (totalTokens > 3) { normalizedWeights[3] = _normalizedWeight3; } else { return normalizedWeights; }\\n            if (totalTokens > 4) { normalizedWeights[4] = _normalizedWeight4; } else { return normalizedWeights; }\\n            if (totalTokens > 5) { normalizedWeights[5] = _normalizedWeight5; } else { return normalizedWeights; }\\n            if (totalTokens > 6) { normalizedWeights[6] = _normalizedWeight6; } else { return normalizedWeights; }\\n            if (totalTokens > 7) { normalizedWeights[7] = _normalizedWeight7; } else { return normalizedWeights; }\\n        }\\n\\n        return normalizedWeights;\\n    }\\n\\n    function getLastInvariant() external view returns (uint256) {\\n        return _lastInvariant;\\n    }\\n\\n    /**\\n     * @dev Returns the current value of the invariant.\\n     */\\n    function getInvariant() public view returns (uint256) {\\n        (, uint256[] memory balances, ) = getVault().getPoolTokens(getPoolId());\\n\\n        // Since the Pool hooks always work with upscaled balances, we manually\\n        // upscale here for consistency\\n        _upscaleArray(balances, _scalingFactors());\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    function getNormalizedWeights() external view returns (uint256[] memory) {\\n        return _normalizedWeights();\\n    }\\n\\n    // Base Pool handlers\\n\\n    // Swap\\n\\n    function _onSwapGivenIn(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        // Swaps are disabled while the contract is paused.\\n\\n        return\\n            WeightedMath._calcOutGivenIn(\\n                currentBalanceTokenIn,\\n                _normalizedWeight(swapRequest.tokenIn),\\n                currentBalanceTokenOut,\\n                _normalizedWeight(swapRequest.tokenOut),\\n                swapRequest.amount\\n            );\\n    }\\n\\n    function _onSwapGivenOut(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) internal view virtual override whenNotPaused returns (uint256) {\\n        // Swaps are disabled while the contract is paused.\\n\\n        return\\n            WeightedMath._calcInGivenOut(\\n                currentBalanceTokenIn,\\n                _normalizedWeight(swapRequest.tokenIn),\\n                currentBalanceTokenOut,\\n                _normalizedWeight(swapRequest.tokenOut),\\n                swapRequest.amount\\n            );\\n    }\\n\\n    // Initialize\\n\\n    function _onInitializePool(\\n        bytes32,\\n        address,\\n        address,\\n        bytes memory userData\\n    ) internal virtual override whenNotPaused returns (uint256, uint256[] memory) {\\n        // It would be strange for the Pool to be paused before it is initialized, but for consistency we prevent\\n        // initialization in this case.\\n\\n        WeightedPool.JoinKind kind = userData.joinKind();\\n        _require(kind == WeightedPool.JoinKind.INIT, Errors.UNINITIALIZED);\\n\\n        uint256[] memory amountsIn = userData.initialAmountsIn();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        uint256 invariantAfterJoin = WeightedMath._calculateInvariant(normalizedWeights, amountsIn);\\n\\n        // Set the initial BPT to the value of the invariant times the number of tokens. This makes BPT supply more\\n        // consistent in Pools with similar compositions but different number of tokens.\\n        uint256 bptAmountOut = Math.mul(invariantAfterJoin, _getTotalTokens());\\n\\n        _lastInvariant = invariantAfterJoin;\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Join\\n\\n    function _onJoinPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        whenNotPaused\\n        returns (\\n            uint256,\\n            uint256[] memory,\\n            uint256[] memory\\n        )\\n    {\\n        // All joins are disabled while the contract is paused.\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous join\\n        // or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids spending gas\\n        // computing them on each individual swap\\n        uint256 invariantBeforeJoin = WeightedMath._calculateInvariant(normalizedWeights, balances);\\n\\n        uint256[] memory dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n            balances,\\n            normalizedWeights,\\n            _lastInvariant,\\n            invariantBeforeJoin,\\n            protocolSwapFeePercentage\\n        );\\n\\n        // Update current balances by subtracting the protocol fee amounts\\n        _mutateAmounts(balances, dueProtocolFeeAmounts, FixedPoint.sub);\\n        (uint256 bptAmountOut, uint256[] memory amountsIn) = _doJoin(balances, normalizedWeights, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the join, in order to compute the\\n        // protocol swap fee amounts due in future joins and exits.\\n        _lastInvariant = _invariantAfterJoin(balances, amountsIn, normalizedWeights);\\n\\n        return (bptAmountOut, amountsIn, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doJoin(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        JoinKind kind = userData.joinKind();\\n\\n        if (kind == JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\\n            return _joinExactTokensInForBPTOut(balances, normalizedWeights, userData);\\n        } else if (kind == JoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\\n            return _joinTokenInForExactBPTOut(balances, normalizedWeights, userData);\\n        } else {\\n            _revert(Errors.UNHANDLED_JOIN_KIND);\\n        }\\n    }\\n\\n    function _joinExactTokensInForBPTOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        (uint256[] memory amountsIn, uint256 minBPTAmountOut) = userData.exactTokensInForBptOut();\\n        InputHelpers.ensureInputLengthMatch(_getTotalTokens(), amountsIn.length);\\n\\n        _upscaleArray(amountsIn, _scalingFactors());\\n\\n        uint256 bptAmountOut = WeightedMath._calcBptOutGivenExactTokensIn(\\n            balances,\\n            normalizedWeights,\\n            amountsIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        _require(bptAmountOut >= minBPTAmountOut, Errors.BPT_OUT_MIN_AMOUNT);\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    function _joinTokenInForExactBPTOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        (uint256 bptAmountOut, uint256 tokenIndex) = userData.tokenInForExactBptOut();\\n        // Note that there is no maximum amountIn parameter: this is handled by `IVault.joinPool`.\\n\\n        _require(tokenIndex < _getTotalTokens(), Errors.OUT_OF_BOUNDS);\\n\\n        uint256[] memory amountsIn = new uint256[](_getTotalTokens());\\n        amountsIn[tokenIndex] = WeightedMath._calcTokenInGivenExactBptOut(\\n            balances[tokenIndex],\\n            normalizedWeights[tokenIndex],\\n            bptAmountOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountOut, amountsIn);\\n    }\\n\\n    // Exit\\n\\n    function _onExitPool(\\n        bytes32,\\n        address,\\n        address,\\n        uint256[] memory balances,\\n        uint256,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    )\\n        internal\\n        virtual\\n        override\\n        returns (\\n            uint256 bptAmountIn,\\n            uint256[] memory amountsOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        // Exits are not completely disabled while the contract is paused: proportional exits (exact BPT in for tokens\\n        // out) remain functional.\\n\\n        uint256[] memory normalizedWeights = _normalizedWeights();\\n\\n        if (_isNotPaused()) {\\n            // Due protocol swap fee amounts are computed by measuring the growth of the invariant between the previous\\n            // join or exit event and now - the invariant's growth is due exclusively to swap fees. This avoids\\n            // spending gas calculating the fees on each individual swap.\\n            uint256 invariantBeforeExit = WeightedMath._calculateInvariant(normalizedWeights, balances);\\n            dueProtocolFeeAmounts = _getDueProtocolFeeAmounts(\\n                balances,\\n                normalizedWeights,\\n                _lastInvariant,\\n                invariantBeforeExit,\\n                protocolSwapFeePercentage\\n            );\\n\\n            // Update current balances by subtracting the protocol fee amounts\\n            _mutateAmounts(balances, dueProtocolFeeAmounts, FixedPoint.sub);\\n        } else {\\n            // If the contract is paused, swap protocol fee amounts are not charged to avoid extra calculations and\\n            // reduce the potential for errors.\\n            dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n        }\\n\\n        (bptAmountIn, amountsOut) = _doExit(balances, normalizedWeights, userData);\\n\\n        // Update the invariant with the balances the Pool will have after the exit, in order to compute the\\n        // protocol swap fees due in future joins and exits.\\n        _lastInvariant = _invariantAfterExit(balances, amountsOut, normalizedWeights);\\n\\n        return (bptAmountIn, amountsOut, dueProtocolFeeAmounts);\\n    }\\n\\n    function _doExit(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view returns (uint256, uint256[] memory) {\\n        ExitKind kind = userData.exitKind();\\n\\n        if (kind == ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT) {\\n            return _exitExactBPTInForTokenOut(balances, normalizedWeights, userData);\\n        } else if (kind == ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\\n            return _exitExactBPTInForTokensOut(balances, userData);\\n        } else {\\n            // ExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\\n            return _exitBPTInForExactTokensOut(balances, normalizedWeights, userData);\\n        }\\n    }\\n\\n    function _exitExactBPTInForTokenOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view whenNotPaused returns (uint256, uint256[] memory) {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256 bptAmountIn, uint256 tokenIndex) = userData.exactBptInForTokenOut();\\n        // Note that there is no minimum amountOut parameter: this is handled by `IVault.exitPool`.\\n\\n        _require(tokenIndex < _getTotalTokens(), Errors.OUT_OF_BOUNDS);\\n\\n        // We exit in a single token, so we initialize amountsOut with zeros\\n        uint256[] memory amountsOut = new uint256[](_getTotalTokens());\\n\\n        // And then assign the result to the selected token\\n        amountsOut[tokenIndex] = WeightedMath._calcTokenOutGivenExactBptIn(\\n            balances[tokenIndex],\\n            normalizedWeights[tokenIndex],\\n            bptAmountIn,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitExactBPTInForTokensOut(uint256[] memory balances, bytes memory userData)\\n        private\\n        view\\n        returns (uint256, uint256[] memory)\\n    {\\n        // This exit function is the only one that is not disabled if the contract is paused: it remains unrestricted\\n        // in an attempt to provide users with a mechanism to retrieve their tokens in case of an emergency.\\n        // This particular exit function is the only one that remains available because it is the simplest one, and\\n        // therefore the one with the lowest likelihood of errors.\\n\\n        uint256 bptAmountIn = userData.exactBptInForTokensOut();\\n        // Note that there is no minimum amountOut parameter: this is handled by `IVault.exitPool`.\\n\\n        uint256[] memory amountsOut = WeightedMath._calcTokensOutGivenExactBptIn(balances, bptAmountIn, totalSupply());\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    function _exitBPTInForExactTokensOut(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        bytes memory userData\\n    ) private view whenNotPaused returns (uint256, uint256[] memory) {\\n        // This exit function is disabled if the contract is paused.\\n\\n        (uint256[] memory amountsOut, uint256 maxBPTAmountIn) = userData.bptInForExactTokensOut();\\n        InputHelpers.ensureInputLengthMatch(amountsOut.length, _getTotalTokens());\\n        _upscaleArray(amountsOut, _scalingFactors());\\n\\n        uint256 bptAmountIn = WeightedMath._calcBptInGivenExactTokensOut(\\n            balances,\\n            normalizedWeights,\\n            amountsOut,\\n            totalSupply(),\\n            _swapFeePercentage\\n        );\\n        _require(bptAmountIn <= maxBPTAmountIn, Errors.BPT_IN_MAX_AMOUNT);\\n\\n        return (bptAmountIn, amountsOut);\\n    }\\n\\n    // Helpers\\n\\n    function _getDueProtocolFeeAmounts(\\n        uint256[] memory balances,\\n        uint256[] memory normalizedWeights,\\n        uint256 previousInvariant,\\n        uint256 currentInvariant,\\n        uint256 protocolSwapFeePercentage\\n    ) private view returns (uint256[] memory) {\\n        // Initialize with zeros\\n        uint256[] memory dueProtocolFeeAmounts = new uint256[](_getTotalTokens());\\n\\n        // Early return if the protocol swap fee percentage is zero, saving gas.\\n        if (protocolSwapFeePercentage == 0) {\\n            return dueProtocolFeeAmounts;\\n        }\\n\\n        // The protocol swap fees are always paid using the token with the largest weight in the Pool. As this is the\\n        // token that is expected to have the largest balance, using it to pay fees should not unbalance the Pool.\\n        dueProtocolFeeAmounts[_maxWeightTokenIndex] = WeightedMath._calcDueTokenProtocolSwapFeeAmount(\\n            balances[_maxWeightTokenIndex],\\n            normalizedWeights[_maxWeightTokenIndex],\\n            previousInvariant,\\n            currentInvariant,\\n            protocolSwapFeePercentage\\n        );\\n\\n        return dueProtocolFeeAmounts;\\n    }\\n\\n    /**\\n     * @dev Returns the value of the invariant given `balances`, assuming they are increased by `amountsIn`. All\\n     * amounts are expected to be upscaled.\\n     */\\n    function _invariantAfterJoin(\\n        uint256[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256[] memory normalizedWeights\\n    ) private view returns (uint256) {\\n        _mutateAmounts(balances, amountsIn, FixedPoint.add);\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    function _invariantAfterExit(\\n        uint256[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256[] memory normalizedWeights\\n    ) private view returns (uint256) {\\n        _mutateAmounts(balances, amountsOut, FixedPoint.sub);\\n        return WeightedMath._calculateInvariant(normalizedWeights, balances);\\n    }\\n\\n    /**\\n     * @dev Mutates `amounts` by applying `mutation` with each entry in `arguments`.\\n     *\\n     * Equivalent to `amounts = amounts.map(mutation)`.\\n     */\\n    function _mutateAmounts(\\n        uint256[] memory toMutate,\\n        uint256[] memory arguments,\\n        function(uint256, uint256) pure returns (uint256) mutation\\n    ) private view {\\n        for (uint256 i = 0; i < _getTotalTokens(); ++i) {\\n            toMutate[i] = mutation(toMutate[i], arguments[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev This function returns the appreciation of one BPT relative to the\\n     * underlying tokens. This starts at 1 when the pool is created and grows over time\\n     */\\n    function getRate() public view returns (uint256) {\\n        // The initial BPT supply is equal to the invariant times the number of tokens.\\n        return Math.mul(getInvariant(), _getTotalTokens()).divDown(totalSupply());\\n    }\\n}\\n\",\"keccak256\":\"0x4e73b22be8c4325be39cc05796926b173b867292d73fe051dcfa49aafd9fb9d7\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./WeightedPool.sol\\\";\\n\\nlibrary WeightedPoolUserDataHelpers {\\n    function joinKind(bytes memory self) internal pure returns (WeightedPool.JoinKind) {\\n        return abi.decode(self, (WeightedPool.JoinKind));\\n    }\\n\\n    function exitKind(bytes memory self) internal pure returns (WeightedPool.ExitKind) {\\n        return abi.decode(self, (WeightedPool.ExitKind));\\n    }\\n\\n    // Joins\\n\\n    function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\\n        (, amountsIn) = abi.decode(self, (WeightedPool.JoinKind, uint256[]));\\n    }\\n\\n    function exactTokensInForBptOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsIn, uint256 minBPTAmountOut)\\n    {\\n        (, amountsIn, minBPTAmountOut) = abi.decode(self, (WeightedPool.JoinKind, uint256[], uint256));\\n    }\\n\\n    function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\\n        (, bptAmountOut, tokenIndex) = abi.decode(self, (WeightedPool.JoinKind, uint256, uint256));\\n    }\\n\\n    // Exits\\n\\n    function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\\n        (, bptAmountIn, tokenIndex) = abi.decode(self, (WeightedPool.ExitKind, uint256, uint256));\\n    }\\n\\n    function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\\n        (, bptAmountIn) = abi.decode(self, (WeightedPool.ExitKind, uint256));\\n    }\\n\\n    function bptInForExactTokensOut(bytes memory self)\\n        internal\\n        pure\\n        returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\\n    {\\n        (, amountsOut, maxBPTAmountIn) = abi.decode(self, (WeightedPool.ExitKind, uint256[], uint256));\\n    }\\n}\\n\",\"keccak256\":\"0x6a2f98e68608e65dd9c0de8c57c1fc2e1643789b18bcf75d7109d27cdf45d62f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\\n * to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IMinimalSwapInfoPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7469919e147c0db8b4f290d310ca3816dec5d3c6cc6b258cf6e0df820a20a179\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/AssetManagers.sol": {
        "AssetManagers": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/AssetManagers.sol\":\"AssetManagers\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\\n    }\\n}\\n\",\"keccak256\":\"0x5f83465783b239828f83c626bae1ac944cfff074c8919c245d14b208bcf317d5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n// Based on the EnumerableMap library from OpenZeppelin contracts, altered to include the following:\\n//  * a map from IERC20 to bytes32\\n//  * entries are stored in mappings instead of arrays, reducing implicit storage reads for out-of-bounds checks\\n//  * unchecked_at and unchecked_valueAt, which allow for more gas efficient data reads in some scenarios\\n//  * unchecked_indexOf and unchecked_setAt, which allow for more gas efficient data writes in some scenarios\\n//\\n// Additionally, the base private functions that work on bytes32 were removed and replaced with a native implementation\\n// for IERC20 keys, to reduce bytecode size and runtime costs.\\n\\n// We're using non-standard casing for the unchecked functions to differentiate them, so we need to turn off that rule\\n// solhint-disable func-name-mixedcase\\n\\nimport \\\"./IERC20.sol\\\";\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n *     // Declare a set state variable\\n *     EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n */\\nlibrary EnumerableMap {\\n    // The original OpenZeppelin implementation uses a generic Map type with bytes32 keys: this was replaced with\\n    // IERC20ToBytes32Map, which uses IERC20 keys natively, resulting in more dense bytecode.\\n\\n    struct IERC20ToBytes32MapEntry {\\n        IERC20 _key;\\n        bytes32 _value;\\n    }\\n\\n    struct IERC20ToBytes32Map {\\n        // Number of entries in the map\\n        uint256 _length;\\n        // Storage of map keys and values\\n        mapping(uint256 => IERC20ToBytes32MapEntry) _entries;\\n        // Position of the entry defined by a key in the `entries` array, plus 1\\n        // because index 0 means a key is not in the map.\\n        mapping(IERC20 => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\\n     * key. O(1).\\n     *\\n     * Returns true if the key was added to the map, that is if it was not\\n     * already present.\\n     */\\n    function set(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        bytes32 value\\n    ) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to !contains(map, key)\\n        if (keyIndex == 0) {\\n            uint256 previousLength = map._length;\\n            map._entries[previousLength] = IERC20ToBytes32MapEntry({ _key: key, _value: value });\\n            map._length = previousLength + 1;\\n\\n            // The entry is stored at previousLength, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            map._indexes[key] = previousLength + 1;\\n            return true;\\n        } else {\\n            map._entries[keyIndex - 1]._value = value;\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\\n     * {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\\n     *\\n     * This function performs one less storage read than {set}, but it should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_setAt(\\n        IERC20ToBytes32Map storage map,\\n        uint256 index,\\n        bytes32 value\\n    ) internal {\\n        map._entries[index]._value = value;\\n    }\\n\\n    /**\\n     * @dev Removes a key-value pair from a map. O(1).\\n     *\\n     * Returns true if the key was removed from the map, that is if it was present.\\n     */\\n    function remove(IERC20ToBytes32Map storage map, IERC20 key) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to contains(map, key)\\n        if (keyIndex != 0) {\\n            // To delete a key-value pair from the _entries pseudo-array in O(1), we swap the entry to delete with the\\n            // one at the highest index, and then remove this last entry (sometimes called as 'swap and pop').\\n            // This modifies the order of the pseudo-array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = keyIndex - 1;\\n            uint256 lastIndex = map._length - 1;\\n\\n            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            IERC20ToBytes32MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n            // Move the last entry to the index where the entry to delete is\\n            map._entries[toDeleteIndex] = lastEntry;\\n            // Update the index for the moved entry\\n            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved entry was stored\\n            delete map._entries[lastIndex];\\n            map._length = lastIndex;\\n\\n            // Delete the index for the deleted slot\\n            delete map._indexes[key];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the key is in the map. O(1).\\n     */\\n    function contains(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (bool) {\\n        return map._indexes[key] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of key-value pairs in the map. O(1).\\n     */\\n    function length(IERC20ToBytes32Map storage map) internal view returns (uint256) {\\n        return map._length;\\n    }\\n\\n    /**\\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of entries inside the\\n     * array, and it may change when more entries are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        _require(map._length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(map, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        IERC20ToBytes32MapEntry storage entry = map._entries[index];\\n        return (entry._key, entry._value);\\n    }\\n\\n    /**\\n     * @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\\n     * read). O(1).\\n     */\\n    function unchecked_valueAt(IERC20ToBytes32Map storage map, uint256 index) internal view returns (bytes32) {\\n        return map._entries[index]._value;\\n    }\\n\\n    /**\\n     * @dev Returns the value associated with `key`. O(1).\\n     *\\n     * Requirements:\\n     *\\n     * - `key` must be in the map. Reverts with `errorCode` otherwise.\\n     */\\n    function get(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        uint256 errorCode\\n    ) internal view returns (bytes32) {\\n        uint256 index = map._indexes[key];\\n        _require(index > 0, errorCode);\\n        return unchecked_valueAt(map, index - 1);\\n    }\\n\\n    /**\\n     * @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\\n     * instead.\\n     */\\n    function unchecked_indexOf(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (uint256) {\\n        return map._indexes[key];\\n    }\\n}\\n\",\"keccak256\":\"0x0e7bb50a1095a2a000328ef2243fca7b556ebccfe594f4466d0853f56ed07755\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n    /**\\n     * @dev Converts an unsigned uint256 into a signed int256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be less than or equal to maxInt256.\\n     */\\n    function toInt256(uint256 value) internal pure returns (int256) {\\n        _require(value < 2**255, Errors.SAFE_CAST_VALUE_CANT_FIT_INT256);\\n        return int256(value);\\n    }\\n}\\n\",\"keccak256\":\"0xfefa8c6b6aed0ac9df03ac0c4cce2a94da8d8815bb7f1459fef9f93ada8d316d\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/AssetManagers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./UserBalance.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\nimport \\\"./balances/GeneralPoolsBalance.sol\\\";\\nimport \\\"./balances/MinimalSwapInfoPoolsBalance.sol\\\";\\nimport \\\"./balances/TwoTokenPoolsBalance.sol\\\";\\n\\nabstract contract AssetManagers is\\n    ReentrancyGuard,\\n    GeneralPoolsBalance,\\n    MinimalSwapInfoPoolsBalance,\\n    TwoTokenPoolsBalance\\n{\\n    using Math for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Stores the Asset Manager for each token of each Pool.\\n    mapping(bytes32 => mapping(IERC20 => address)) internal _poolAssetManagers;\\n\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external override nonReentrant whenNotPaused {\\n        // This variable could be declared inside the loop, but that causes the compiler to allocate memory on each\\n        // loop iteration, increasing gas costs.\\n        PoolBalanceOp memory op;\\n\\n        for (uint256 i = 0; i < ops.length; ++i) {\\n            // By indexing the array only once, we don't spend extra gas in the same bounds check.\\n            op = ops[i];\\n\\n            bytes32 poolId = op.poolId;\\n            _ensureRegisteredPool(poolId);\\n\\n            IERC20 token = op.token;\\n            _require(_isTokenRegistered(poolId, token), Errors.TOKEN_NOT_REGISTERED);\\n            _require(_poolAssetManagers[poolId][token] == msg.sender, Errors.SENDER_NOT_ASSET_MANAGER);\\n\\n            PoolBalanceOpKind kind = op.kind;\\n            uint256 amount = op.amount;\\n            (int256 cashDelta, int256 managedDelta) = _performPoolManagementOperation(kind, poolId, token, amount);\\n\\n            emit PoolBalanceManaged(poolId, msg.sender, token, cashDelta, managedDelta);\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs the `kind` Asset Manager operation on a Pool.\\n     *\\n     * Withdrawals will transfer `amount` tokens to the caller, deposits will transfer `amount` tokens from the caller,\\n     * and updates will set the managed balance to `amount`.\\n     *\\n     * Returns a tuple with the 'cash' and 'managed' balance deltas as a result of this call.\\n     */\\n    function _performPoolManagementOperation(\\n        PoolBalanceOpKind kind,\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256, int256) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (kind == PoolBalanceOpKind.WITHDRAW) {\\n            return _withdrawPoolBalance(poolId, specialization, token, amount);\\n        } else if (kind == PoolBalanceOpKind.DEPOSIT) {\\n            return _depositPoolBalance(poolId, specialization, token, amount);\\n        } else {\\n            // PoolBalanceOpKind.UPDATE\\n            return _updateManagedBalance(poolId, specialization, token, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'cash' to 'managed' balance, and transfers them to the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _withdrawPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolCashToManaged(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolCashToManaged(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolCashToManaged(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransfer(msg.sender, amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(-amount);\\n        managedDelta = int256(amount);\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'managed' to 'cash' balance, and transfers them from the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _depositPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolManagedToCash(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolManagedToCash(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolManagedToCash(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransferFrom(msg.sender, address(this), amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(amount);\\n        managedDelta = int256(-amount);\\n    }\\n\\n    /**\\n     * @dev Sets a Pool's 'managed' balance to `amount`.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call (the 'cash' delta will always be zero).\\n     */\\n    function _updateManagedBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            managedDelta = _setTwoTokenPoolManagedBalance(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            managedDelta = _setMinimalSwapInfoPoolManagedBalance(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            managedDelta = _setGeneralPoolManagedBalance(poolId, token, amount);\\n        }\\n\\n        cashDelta = 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered for `poolId`.\\n     */\\n    function _isTokenRegistered(bytes32 poolId, IERC20 token) private view returns (bool) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _isTwoTokenPoolTokenRegistered(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _isMinimalSwapInfoPoolTokenRegistered(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _isGeneralPoolTokenRegistered(poolId, token);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xef8f7cdf851eaf8e97e55d4510739b32722de4de07cf069ddfa76ced2c9cd193\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/AssetTransfersHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/AssetHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/Address.sol\\\";\\n\\nimport \\\"./interfaces/IWETH.sol\\\";\\nimport \\\"./interfaces/IAsset.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\nabstract contract AssetTransfersHandler is AssetHelpers {\\n    using SafeERC20 for IERC20;\\n    using Address for address payable;\\n\\n    /**\\n     * @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\\n     * as possible from Internal Balance, then transfers any remaining amount.\\n     *\\n     * If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * will be wrapped into WETH.\\n     *\\n     * WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\\n     * caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\\n     * typically doesn't hold any).\\n     */\\n    function _receiveAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address sender,\\n        bool fromInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            _require(!fromInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // The ETH amount to receive is deposited into the WETH contract, which will in turn mint WETH for\\n            // the Vault at a 1:1 ratio.\\n\\n            // A check for this condition is also introduced by the compiler, but this one provides a revert reason.\\n            // Note we're checking for the Vault's total balance, *not* ETH sent in this transaction.\\n            _require(address(this).balance >= amount, Errors.INSUFFICIENT_ETH);\\n            _WETH().deposit{ value: amount }();\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n\\n            if (fromInternalBalance) {\\n                // We take as many tokens from Internal Balance as possible: any remaining amounts will be transferred.\\n                uint256 deductedBalance = _decreaseInternalBalance(sender, token, amount, true);\\n                // Because `deductedBalance` will be always the lesser of the current internal balance\\n                // and the amount to decrease, it is safe to perform unchecked arithmetic.\\n                amount -= deductedBalance;\\n            }\\n\\n            if (amount > 0) {\\n                token.safeTransferFrom(sender, address(this), amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\\n     * Balance instead of being transferred.\\n     *\\n     * If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * are instead sent directly after unwrapping WETH.\\n     */\\n    function _sendAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address payable recipient,\\n        bool toInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            // Sending ETH is not as involved as receiving it: the only special behavior is it cannot be\\n            // deposited to Internal Balance.\\n            _require(!toInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // First, the Vault withdraws deposited ETH from the WETH contract, by burning the same amount of WETH\\n            // from the Vault. This receipt will be handled by the Vault's `receive`.\\n            _WETH().withdraw(amount);\\n\\n            // Then, the withdrawn ETH is sent to the recipient.\\n            recipient.sendValue(amount);\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n            if (toInternalBalance) {\\n                _increaseInternalBalance(recipient, token, amount);\\n            } else {\\n                token.safeTransfer(recipient, amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\\n     * if the caller sent less ETH than `amountUsed`.\\n     *\\n     * Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\\n     * Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\\n     * not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\\n     * returned ETH.\\n     */\\n    function _handleRemainingEth(uint256 amountUsed) internal {\\n        _require(msg.value >= amountUsed, Errors.INSUFFICIENT_ETH);\\n\\n        uint256 excess = msg.value - amountUsed;\\n        if (excess > 0) {\\n            msg.sender.sendValue(excess);\\n        }\\n    }\\n\\n    /**\\n     * @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\\n     * caller.\\n     *\\n     * Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\\n     * we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\\n     * ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\\n     * locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\\n     * prevent user error.\\n     */\\n    receive() external payable {\\n        _require(msg.sender == address(_WETH()), Errors.ETH_TRANSFER);\\n    }\\n\\n    // This contract uses virtual internal functions instead of inheriting from the modules that implement them (in\\n    // this case UserBalance) in order to decouple it from the rest of the system and enable standalone testing by\\n    // implementing these with mocks.\\n\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal virtual;\\n\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool capped\\n    ) internal virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x5534195c226355beb7c084ac01ac615920c6f7fbec550dab472827318536c9cb\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\\n * and helper functions for ensuring correct behavior when working with Pools.\\n */\\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\\n    // types.\\n    mapping(bytes32 => bool) private _isPoolRegistered;\\n\\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\\n    uint256 private _nextPoolNonce;\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    modifier withRegisteredPool(bytes32 poolId) {\\n        _ensureRegisteredPool(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    modifier onlyPool(bytes32 poolId) {\\n        _ensurePoolIsSender(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    function _ensurePoolIsSender(bytes32 poolId) private view {\\n        _ensureRegisteredPool(poolId);\\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\\n    }\\n\\n    function registerPool(PoolSpecialization specialization)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        returns (bytes32)\\n    {\\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\\n        // 2**80 Pools, and the nonce will not overflow.\\n\\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\\n\\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\\n        _isPoolRegistered[poolId] = true;\\n\\n        _nextPoolNonce += 1;\\n\\n        emit PoolRegistered(poolId);\\n        return poolId;\\n    }\\n\\n    function getPool(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (address, PoolSpecialization)\\n    {\\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\\n    }\\n\\n    /**\\n     * @dev Creates a Pool ID.\\n     *\\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\\n     *\\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\\n     * unique.\\n     *\\n     * Pool IDs have the following layout:\\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\\n     * MSB                                                                              LSB\\n     *\\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\\n     * suffice. However, there's nothing else of interest to store in this extra space.\\n     */\\n    function _toPoolId(\\n        address pool,\\n        PoolSpecialization specialization,\\n        uint80 nonce\\n    ) internal pure returns (bytes32) {\\n        bytes32 serialized;\\n\\n        serialized |= bytes32(uint256(nonce));\\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\\n\\n        return serialized;\\n    }\\n\\n    /**\\n     * @dev Returns the address of a Pool's contract.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\\n        // since the logical shift already sets the upper bits to zero.\\n        return address(uint256(poolId) >> (12 * 8));\\n    }\\n\\n    /**\\n     * @dev Returns the specialization setting of a Pool.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\\n\\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\\n        // string: we instead perform the check ourselves to help in error diagnosis.\\n\\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\\n        // values 0, 1 and 2.\\n        _require(value < 3, Errors.INVALID_POOL_ID);\\n\\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            specialization := value\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaf06c559c8a964e9b43308003b43cf698bda38d88cc26118b55394017a369327\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/UserBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeCast.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./AssetTransfersHandler.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance.\\n *\\n * Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n * transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n * when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n * gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n *\\n * Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n * operations of different kinds, with different senders and recipients, at once.\\n */\\nabstract contract UserBalance is ReentrancyGuard, AssetTransfersHandler, VaultAuthorization {\\n    using Math for uint256;\\n    using SafeCast for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Internal Balance for each token, for each account.\\n    mapping(address => mapping(IERC20 => uint256)) private _internalTokenBalance;\\n\\n    function getInternalBalance(address user, IERC20[] memory tokens)\\n        external\\n        view\\n        override\\n        returns (uint256[] memory balances)\\n    {\\n        balances = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; i++) {\\n            balances[i] = _getInternalBalance(user, tokens[i]);\\n        }\\n    }\\n\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable override nonReentrant {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 ethWrapped = 0;\\n\\n        // Cache for these checks so we only perform them once (if at all).\\n        bool checkedCallerIsRelayer = false;\\n        bool checkedNotPaused = false;\\n\\n        for (uint256 i = 0; i < ops.length; i++) {\\n            UserBalanceOpKind kind;\\n            IAsset asset;\\n            uint256 amount;\\n            address sender;\\n            address payable recipient;\\n\\n            // This destructuring by calling `_validateUserBalanceOp` seems odd, but results in reduced bytecode size.\\n            (kind, asset, amount, sender, recipient, checkedCallerIsRelayer) = _validateUserBalanceOp(\\n                ops[i],\\n                checkedCallerIsRelayer\\n            );\\n\\n            if (kind == UserBalanceOpKind.WITHDRAW_INTERNAL) {\\n                // Internal Balance withdrawals can always be performed by an authorized account.\\n                _withdrawFromInternalBalance(asset, sender, recipient, amount);\\n            } else {\\n                // All other operations are blocked if the contract is paused.\\n\\n                // We cache the result of the pause check and skip it for other operations in this same transaction\\n                // (if any).\\n                if (!checkedNotPaused) {\\n                    _ensureNotPaused();\\n                    checkedNotPaused = true;\\n                }\\n\\n                if (kind == UserBalanceOpKind.DEPOSIT_INTERNAL) {\\n                    _depositToInternalBalance(asset, sender, recipient, amount);\\n\\n                    // Keep track of all ETH wrapped into WETH as part of a deposit.\\n                    if (_isETH(asset)) {\\n                        ethWrapped = ethWrapped.add(amount);\\n                    }\\n                } else {\\n                    // Transfers don't support ETH.\\n                    _require(!_isETH(asset), Errors.CANNOT_USE_ETH_SENTINEL);\\n                    IERC20 token = _asIERC20(asset);\\n\\n                    if (kind == UserBalanceOpKind.TRANSFER_INTERNAL) {\\n                        _transferInternalBalance(token, sender, recipient, amount);\\n                    } else {\\n                        // TRANSFER_EXTERNAL\\n                        _transferToExternalBalance(token, sender, recipient, amount);\\n                    }\\n                }\\n            }\\n        }\\n\\n        // Handle any remaining ETH.\\n        _handleRemainingEth(ethWrapped);\\n    }\\n\\n    function _depositToInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        _increaseInternalBalance(recipient, _translateToIERC20(asset), amount);\\n        _receiveAsset(asset, amount, sender, false);\\n    }\\n\\n    function _withdrawFromInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address payable recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, _translateToIERC20(asset), amount, false);\\n        _sendAsset(asset, amount, recipient, false);\\n    }\\n\\n    function _transferInternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, token, amount, false);\\n        _increaseInternalBalance(recipient, token, amount);\\n    }\\n\\n    function _transferToExternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        if (amount > 0) {\\n            token.safeTransferFrom(sender, recipient, amount);\\n            emit ExternalBalanceTransfer(token, sender, recipient, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Increases `account`'s Internal Balance for `token` by `amount`.\\n     */\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal override {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        uint256 newBalance = currentBalance.add(amount);\\n        _setInternalBalance(account, token, newBalance, amount.toInt256());\\n    }\\n\\n    /**\\n     * @dev Decreases `account`'s Internal Balance for `token` by `amount`. If `allowPartial` is true, this function\\n     * doesn't revert if `account` doesn't have enough balance, and sets it to zero and returns the deducted amount\\n     * instead.\\n     */\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool allowPartial\\n    ) internal override returns (uint256 deducted) {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        _require(allowPartial || (currentBalance >= amount), Errors.INSUFFICIENT_INTERNAL_BALANCE);\\n\\n        deducted = Math.min(currentBalance, amount);\\n        // By construction, `deducted` is lower or equal to `currentBalance`, so we don't need to use checked\\n        // arithmetic.\\n        uint256 newBalance = currentBalance - deducted;\\n        _setInternalBalance(account, token, newBalance, -(deducted.toInt256()));\\n    }\\n\\n    /**\\n     * @dev Sets `account`'s Internal Balance for `token` to `newBalance`.\\n     *\\n     * Emits an `InternalBalanceChanged` event. This event includes `delta`, which is the amount the balance increased\\n     * (if positive) or decreased (if negative). To avoid reading the current balance in order to compute the delta,\\n     * this function relies on the caller providing it directly.\\n     */\\n    function _setInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 newBalance,\\n        int256 delta\\n    ) private {\\n        _internalTokenBalance[account][token] = newBalance;\\n        emit InternalBalanceChanged(account, token, delta);\\n    }\\n\\n    /**\\n     * @dev Returns `account`'s Internal Balance for `token`.\\n     */\\n    function _getInternalBalance(address account, IERC20 token) internal view returns (uint256) {\\n        return _internalTokenBalance[account][token];\\n    }\\n\\n    /**\\n     * @dev Destructures a User Balance operation, validating that the contract caller is allowed to perform it.\\n     */\\n    function _validateUserBalanceOp(UserBalanceOp memory op, bool checkedCallerIsRelayer)\\n        private\\n        view\\n        returns (\\n            UserBalanceOpKind,\\n            IAsset,\\n            uint256,\\n            address,\\n            address payable,\\n            bool\\n        )\\n    {\\n        // The only argument we need to validate is `sender`, which can only be either the contract caller, or a\\n        // relayer approved by `sender`.\\n        address sender = op.sender;\\n\\n        if (sender != msg.sender) {\\n            // We need to check both that the contract caller is a relayer, and that `sender` approved them.\\n\\n            // Because the relayer check is global (i.e. independent of `sender`), we cache that result and skip it for\\n            // other operations in this same transaction (if any).\\n            if (!checkedCallerIsRelayer) {\\n                _authenticateCaller();\\n                checkedCallerIsRelayer = true;\\n            }\\n\\n            _require(_hasApprovedRelayer(sender, msg.sender), Errors.USER_DOESNT_ALLOW_RELAYER);\\n        }\\n\\n        return (op.kind, op.asset, op.amount, sender, op.recipient, checkedCallerIsRelayer);\\n    }\\n}\\n\",\"keccak256\":\"0x4412e4e084ff3be5b80f421a9fdbc72de7e2fc17a054609f40c32c32fdcaefbd\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/GeneralPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableMap.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\n\\nabstract contract GeneralPoolsBalance {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\\n\\n    // Data for Pools with the General specialization setting\\n    //\\n    // These Pools use the IGeneralPool interface, which means the Vault must query the balance for *all* of their\\n    // tokens in every swap. If we kept a mapping of token to balance plus a set (array) of tokens, it'd be very gas\\n    // intensive to read all token addresses just to then do a lookup on the balance mapping.\\n    //\\n    // Instead, we use our customized EnumerableMap, which lets us read the N balances in N+1 storage accesses (one for\\n    // each token in the Pool), access the index of any 'token in' a single read (required for the IGeneralPool call),\\n    // and update an entry's value given its index.\\n\\n    // Map of token -> balance pairs for each Pool with this specialization. Many functions rely on storage pointers to\\n    // a Pool's EnumerableMap to save gas when computing storage slots.\\n    mapping(bytes32 => EnumerableMap.IERC20ToBytes32Map) internal _generalPoolsBalances;\\n\\n    /**\\n     * @dev Registers a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // EnumerableMaps require an explicit initial value when creating a key-value pair: we use zero, the same\\n            // value that is found in uninitialized storage, which corresponds to an empty balance.\\n            bool added = poolBalances.set(tokens[i], 0);\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n            _require(currentBalance.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // We don't need to check remove's return value, since _getGeneralPoolBalance already checks that the token\\n            // was registered.\\n            poolBalances.remove(token);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a General Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setGeneralPoolBalances(bytes32 poolId, bytes32[] memory balances) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < balances.length; ++i) {\\n            // Since we assume all balances are properly ordered, we can simply use `unchecked_setAt` to avoid one less\\n            // storage read per token.\\n            poolBalances.unchecked_setAt(i, balances[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a General Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setGeneralPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateGeneralPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a General Pool to the result of the `mutation` function when called with the\\n     * current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateGeneralPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        poolBalances.set(token, newBalance);\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a General Pool. The order may change when tokens are\\n     * registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _getGeneralPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        tokens = new IERC20[](poolBalances.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableMap's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            (tokens[i], balances[i]) = poolBalances.unchecked_at(i);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getGeneralPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return _getGeneralPoolBalance(poolBalances, token);\\n    }\\n\\n    /**\\n     * @dev Same as `_getGeneralPoolBalance` but using a Pool's storage pointer, which saves gas in repeated reads and\\n     * writes.\\n     */\\n    function _getGeneralPoolBalance(EnumerableMap.IERC20ToBytes32Map storage poolBalances, IERC20 token)\\n        private\\n        view\\n        returns (bytes32)\\n    {\\n        return poolBalances.get(token, Errors.TOKEN_NOT_REGISTERED);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _isGeneralPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return poolBalances.contains(token);\\n    }\\n}\\n\",\"keccak256\":\"0x534135bd6edee54ffaa785ff26916a2471211c55e718aba84e41961823edfc0c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableSet.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract MinimalSwapInfoPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n\\n    // Data for Pools with the Minimal Swap Info specialization setting\\n    //\\n    // These Pools use the IMinimalSwapInfoPool interface, and so the Vault must read the balance of the two tokens\\n    // in the swap. The best solution is to use a mapping from token to balance, which lets us read or write any token's\\n    // balance in a single storage access.\\n    //\\n    // We also keep a set of registered tokens. Because tokens with non-zero balance are by definition registered, in\\n    // some balance getters we skip checking for token registration if a non-zero balance is found, saving gas by\\n    // performing a single read instead of two.\\n\\n    mapping(bytes32 => mapping(IERC20 => bytes32)) internal _minimalSwapInfoPoolsBalances;\\n    mapping(bytes32 => EnumerableSet.AddressSet) internal _minimalSwapInfoPoolsTokens;\\n\\n    /**\\n     * @dev Registers a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            bool added = poolTokens.add(address(tokens[i]));\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n            // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n            // balance.\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(_minimalSwapInfoPoolsBalances[poolId][token].isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // For consistency with other Pool specialization settings, we explicitly reset the balance (which may have\\n            // a non-zero last change block).\\n            delete _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n            bool removed = poolTokens.remove(address(token));\\n            _require(removed, Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a Minimal Swap Info Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setMinimalSwapInfoPoolBalances(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        bytes32[] memory balances\\n    ) internal {\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            _minimalSwapInfoPoolsBalances[poolId][tokens[i]] = balances[i];\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Minimal Swap Info Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setMinimalSwapInfoPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Minimal Swap Info Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateMinimalSwapInfoPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        bytes32 currentBalance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        _minimalSwapInfoPoolsBalances[poolId][token] = newBalance;\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a Minimal Swap Info Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _getMinimalSwapInfoPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        tokens = new IERC20[](poolTokens.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableSet's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            IERC20 token = IERC20(poolTokens.unchecked_at(i));\\n            tokens[i] = token;\\n            balances[i] = _minimalSwapInfoPoolsBalances[poolId][token];\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Minimal Swap Info Pool.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getMinimalSwapInfoPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        bytes32 balance = _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n        // A non-zero balance guarantees that the token is registered. If zero, we manually check if the token is\\n        // registered in the Pool. Token registration implies that the Pool is registered as well, which lets us save\\n        // gas by not performing the check.\\n        bool tokenRegistered = balance.isNotZero() || _minimalSwapInfoPoolsTokens[poolId].contains(address(token));\\n\\n        if (!tokenRegistered) {\\n            // The token might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        return balance;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _isMinimalSwapInfoPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        return poolTokens.contains(address(token));\\n    }\\n}\\n\",\"keccak256\":\"0x4b002c25bd067d9e1272df67271a0993be4f7f92cae0a0871abc2d52272b10df\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract TwoTokenPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n\\n    // Data for Pools with the Two Token specialization setting\\n    //\\n    // These are similar to the Minimal Swap Info Pool case (because the Pool only has two tokens, and therefore there\\n    // are only two balances to read), but there's a key difference in how data is stored. Keeping a set makes little\\n    // sense, as it will only ever hold two tokens, so we can just store those two directly.\\n    //\\n    // The gas savings associated with using these Pools come from how token balances are stored: cash amounts for token\\n    // A and token B are packed together, as are managed amounts. Because only cash changes in a swap, there's no need\\n    // to write to this second storage slot. A single last change block number for both tokens is stored with the packed\\n    // cash fields.\\n\\n    struct TwoTokenPoolBalances {\\n        bytes32 sharedCash;\\n        bytes32 sharedManaged;\\n    }\\n\\n    // We could just keep a mapping from Pool ID to TwoTokenSharedBalances, but there's an issue: we wouldn't know to\\n    // which tokens those balances correspond. This would mean having to also check which are registered with the Pool.\\n    //\\n    // What we do instead to save those storage reads is keep a nested mapping from the token pair hash to the balances\\n    // struct. The Pool only has two tokens, so only a single entry of this mapping is set (the one that corresponds to\\n    // that pair's hash).\\n    //\\n    // This has the trade-off of making Vault code that interacts with these Pools cumbersome: both balances must be\\n    // accessed at the same time by using both token addresses, and some logic is needed to determine how the pair hash\\n    // is computed. We do this by sorting the tokens, calling the token with the lowest numerical address value token A,\\n    // and the other one token B. In functions where the token arguments could be either A or B, we use X and Y instead.\\n    //\\n    // If users query a token pair containing an unregistered token, the Pool will generate a hash for a mapping entry\\n    // that was not set, and return zero balances. Non-zero balances are only possible if both tokens in the pair\\n    // are registered with the Pool, which means we don't have to check the TwoTokenPoolTokens struct, and can save\\n    // storage reads.\\n\\n    struct TwoTokenPoolTokens {\\n        IERC20 tokenA;\\n        IERC20 tokenB;\\n        mapping(bytes32 => TwoTokenPoolBalances) balances;\\n    }\\n\\n    mapping(bytes32 => TwoTokenPoolTokens) private _twoTokenPoolTokens;\\n\\n    /**\\n     * @dev Registers tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must not be the same\\n     * - The tokens must be ordered: tokenX < tokenY\\n     */\\n    function _registerTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        // Not technically true since we didn't register yet, but this is consistent with the error messages of other\\n        // specialization settings.\\n        _require(tokenX != tokenY, Errors.TOKEN_ALREADY_REGISTERED);\\n\\n        _require(tokenX < tokenY, Errors.UNSORTED_TOKENS);\\n\\n        // A Two Token Pool with no registered tokens is identified by having zero addresses for tokens A and B.\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        _require(poolTokens.tokenA == IERC20(0) && poolTokens.tokenB == IERC20(0), Errors.TOKENS_ALREADY_SET);\\n\\n        // Since tokenX < tokenY, tokenX is A and tokenY is B\\n        poolTokens.tokenA = tokenX;\\n        poolTokens.tokenB = tokenY;\\n\\n        // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n        // balance.\\n    }\\n\\n    /**\\n     * @dev Deregisters tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     * - both tokens must have zero balance in the Vault\\n     */\\n    function _deregisterTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        ) = _getTwoTokenPoolSharedBalances(poolId, tokenX, tokenY);\\n\\n        _require(balanceA.isZero() && balanceB.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n        delete _twoTokenPoolTokens[poolId];\\n\\n        // For consistency with other Pool specialization settings, we explicitly reset the packed cash field (which may\\n        // have a non-zero last change block).\\n        delete poolBalances.sharedCash;\\n    }\\n\\n    /**\\n     * @dev Sets the cash balances of a Two Token Pool's tokens.\\n     *\\n     * WARNING: this assumes `tokenA` and `tokenB` are the Pool's two registered tokens, and are in the correct order.\\n     */\\n    function _setTwoTokenPoolCashBalances(\\n        bytes32 poolId,\\n        IERC20 tokenA,\\n        bytes32 balanceA,\\n        IERC20 tokenB,\\n        bytes32 balanceB\\n    ) internal {\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        TwoTokenPoolBalances storage poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n        poolBalances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Two Token Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setTwoTokenPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Two Token Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateTwoTokenPoolSharedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        (\\n            TwoTokenPoolBalances storage balances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            ,\\n            bytes32 balanceB\\n        ) = _getTwoTokenPoolBalances(poolId);\\n\\n        int256 delta;\\n        if (token == tokenA) {\\n            bytes32 newBalance = mutation(balanceA, amount);\\n            delta = newBalance.managedDelta(balanceA);\\n            balanceA = newBalance;\\n        } else {\\n            // token == tokenB\\n            bytes32 newBalance = mutation(balanceB, amount);\\n            delta = newBalance.managedDelta(balanceB);\\n            balanceB = newBalance;\\n        }\\n\\n        balances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n        balances.sharedManaged = BalanceAllocation.toSharedManaged(balanceA, balanceB);\\n\\n        return delta;\\n    }\\n\\n    /*\\n     * @dev Returns an array with all the tokens and balances in a Two Token Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _getTwoTokenPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        // Both tokens will either be zero (if unregistered) or non-zero (if registered), but we keep the full check for\\n        // clarity.\\n        if (tokenA == IERC20(0) || tokenB == IERC20(0)) {\\n            return (new IERC20[](0), new bytes32[](0));\\n        }\\n\\n        // Note that functions relying on this getter expect tokens to be properly ordered, so we use the (A, B)\\n        // ordering.\\n\\n        tokens = new IERC20[](2);\\n        tokens[0] = tokenA;\\n        tokens[1] = tokenB;\\n\\n        balances = new bytes32[](2);\\n        balances[0] = balanceA;\\n        balances[1] = balanceB;\\n    }\\n\\n    /**\\n     * @dev Same as `_getTwoTokenPoolTokens`, except it returns the two tokens and balances directly instead of using\\n     * an array, as well as a storage pointer to the `TwoTokenPoolBalances` struct, which can be used to update it\\n     * without having to recompute the pair hash and storage slot.\\n     */\\n    function _getTwoTokenPoolBalances(bytes32 poolId)\\n        private\\n        view\\n        returns (\\n            TwoTokenPoolBalances storage poolBalances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            IERC20 tokenB,\\n            bytes32 balanceB\\n        )\\n    {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        tokenA = poolTokens.tokenA;\\n        tokenB = poolTokens.tokenB;\\n\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        poolBalances = poolTokens.balances[pairHash];\\n\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * This function is convenient but not particularly gas efficient, and should be avoided during gas-sensitive\\n     * operations, such as swaps. For those, _getTwoTokenPoolSharedBalances provides a more flexible interface.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        // We can't just read the balance of token, because we need to know the full pair in order to compute the pair\\n        // hash and access the balance mapping. We therefore rely on `_getTwoTokenPoolBalances`.\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        if (token == tokenA) {\\n            return balanceA;\\n        } else if (token == tokenB) {\\n            return balanceB;\\n        } else {\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of the two tokens in a Two Token Pool.\\n     *\\n     * The returned balances are those of token A and token B, where token A is the lowest of token X and token Y, and\\n     * token B the other.\\n     *\\n     * This function also returns a storage pointer to the TwoTokenPoolBalances struct associated with the token pair,\\n     * which can be used to update it without having to recompute the pair hash and storage slot.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolSharedBalances(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    )\\n        internal\\n        view\\n        returns (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        )\\n    {\\n        (IERC20 tokenA, IERC20 tokenB) = _sortTwoTokens(tokenX, tokenY);\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n\\n        poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n\\n        // Because we're reading balances using the pair hash, if either token X or token Y is not registered then\\n        // *both* balance entries will be zero.\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        // A non-zero balance guarantees that both tokens are registered. If zero, we manually check whether each\\n        // token is registered in the Pool. Token registration implies that the Pool is registered as well, which\\n        // lets us save gas by not performing the check.\\n        bool tokensRegistered = sharedCash.isNotZero() ||\\n            sharedManaged.isNotZero() ||\\n            (_isTwoTokenPoolTokenRegistered(poolId, tokenA) && _isTwoTokenPoolTokenRegistered(poolId, tokenB));\\n\\n        if (!tokensRegistered) {\\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _isTwoTokenPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n\\n        // The zero address can never be a registered token.\\n        return (token == poolTokens.tokenA || token == poolTokens.tokenB) && token != IERC20(0);\\n    }\\n\\n    /**\\n     * @dev Returns the hash associated with a given token pair.\\n     */\\n    function _getTwoTokenPairHash(IERC20 tokenA, IERC20 tokenB) private pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(tokenA, tokenB));\\n    }\\n\\n    /**\\n     * @dev Sorts two tokens in ascending order, returning them as a (tokenA, tokenB) tuple.\\n     */\\n    function _sortTwoTokens(IERC20 tokenX, IERC20 tokenY) private pure returns (IERC20, IERC20) {\\n        return tokenX < tokenY ? (tokenX, tokenY) : (tokenY, tokenX);\\n    }\\n}\\n\",\"keccak256\":\"0x2cd5a8f9bee0addefa4e63cb7380f9b133d2e482807603fed931d42e3e1f40f4\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 19073,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_generalPoolsBalances",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "2",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_paused",
                "offset": 0,
                "slot": "3",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_authorizer",
                "offset": 1,
                "slot": "3",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 15355,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_isPoolRegistered",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_bytes32,t_bool)"
              },
              {
                "astId": 15357,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_nextPoolNonce",
                "offset": 0,
                "slot": "6",
                "type": "t_uint256"
              },
              {
                "astId": 19489,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_minimalSwapInfoPoolsBalances",
                "offset": 0,
                "slot": "7",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))"
              },
              {
                "astId": 19493,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_minimalSwapInfoPoolsTokens",
                "offset": 0,
                "slot": "8",
                "type": "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)"
              },
              {
                "astId": 19947,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_twoTokenPoolTokens",
                "offset": 0,
                "slot": "9",
                "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)"
              },
              {
                "astId": 13417,
                "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                "label": "_poolAssetManagers",
                "offset": 0,
                "slot": "10",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_array(t_address)dyn_storage": {
                "base": "t_address",
                "encoding": "dynamic_array",
                "label": "address[]",
                "numberOfBytes": "32"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_bool)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => address))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_address)"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => bytes32))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_bytes32)"
              },
              "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)",
                "numberOfBytes": "32",
                "value": "t_struct(AddressSet)4822_storage"
              },
              "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32Map)4479_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolBalances)19934_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolTokens)19943_storage"
              },
              "t_mapping(t_contract(IERC20)5095,t_address)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => address)",
                "numberOfBytes": "32",
                "value": "t_address"
              },
              "t_mapping(t_contract(IERC20)5095,t_bytes32)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => bytes32)",
                "numberOfBytes": "32",
                "value": "t_bytes32"
              },
              "t_mapping(t_contract(IERC20)5095,t_uint256)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)": {
                "encoding": "mapping",
                "key": "t_uint256",
                "label": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32MapEntry)4468_storage"
              },
              "t_struct(AddressSet)4822_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableSet.AddressSet",
                "members": [
                  {
                    "astId": 4817,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "_values",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_array(t_address)dyn_storage"
                  },
                  {
                    "astId": 4821,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_address,t_uint256)"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(IERC20ToBytes32Map)4479_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32Map",
                "members": [
                  {
                    "astId": 4470,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "_length",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_uint256"
                  },
                  {
                    "astId": 4474,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "_entries",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)"
                  },
                  {
                    "astId": 4478,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_contract(IERC20)5095,t_uint256)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_struct(IERC20ToBytes32MapEntry)4468_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32MapEntry",
                "members": [
                  {
                    "astId": 4465,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "_key",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 4467,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "_value",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolBalances)19934_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances",
                "members": [
                  {
                    "astId": 19931,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "sharedCash",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_bytes32"
                  },
                  {
                    "astId": 19933,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "sharedManaged",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolTokens)19943_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens",
                "members": [
                  {
                    "astId": 19936,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "tokenA",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19938,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "tokenB",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19942,
                    "contract": "src.sol/amm/vault/AssetManagers.sol:AssetManagers",
                    "label": "balances",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/AssetTransfersHandler.sol": {
        "AssetTransfersHandler": {
          "abi": [
            {
              "stateMutability": "payable",
              "type": "receive"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/AssetTransfersHandler.sol\":\"AssetTransfersHandler\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\\n    }\\n}\\n\",\"keccak256\":\"0x5f83465783b239828f83c626bae1ac944cfff074c8919c245d14b208bcf317d5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/AssetTransfersHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/AssetHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/Address.sol\\\";\\n\\nimport \\\"./interfaces/IWETH.sol\\\";\\nimport \\\"./interfaces/IAsset.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\nabstract contract AssetTransfersHandler is AssetHelpers {\\n    using SafeERC20 for IERC20;\\n    using Address for address payable;\\n\\n    /**\\n     * @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\\n     * as possible from Internal Balance, then transfers any remaining amount.\\n     *\\n     * If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * will be wrapped into WETH.\\n     *\\n     * WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\\n     * caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\\n     * typically doesn't hold any).\\n     */\\n    function _receiveAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address sender,\\n        bool fromInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            _require(!fromInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // The ETH amount to receive is deposited into the WETH contract, which will in turn mint WETH for\\n            // the Vault at a 1:1 ratio.\\n\\n            // A check for this condition is also introduced by the compiler, but this one provides a revert reason.\\n            // Note we're checking for the Vault's total balance, *not* ETH sent in this transaction.\\n            _require(address(this).balance >= amount, Errors.INSUFFICIENT_ETH);\\n            _WETH().deposit{ value: amount }();\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n\\n            if (fromInternalBalance) {\\n                // We take as many tokens from Internal Balance as possible: any remaining amounts will be transferred.\\n                uint256 deductedBalance = _decreaseInternalBalance(sender, token, amount, true);\\n                // Because `deductedBalance` will be always the lesser of the current internal balance\\n                // and the amount to decrease, it is safe to perform unchecked arithmetic.\\n                amount -= deductedBalance;\\n            }\\n\\n            if (amount > 0) {\\n                token.safeTransferFrom(sender, address(this), amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\\n     * Balance instead of being transferred.\\n     *\\n     * If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * are instead sent directly after unwrapping WETH.\\n     */\\n    function _sendAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address payable recipient,\\n        bool toInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            // Sending ETH is not as involved as receiving it: the only special behavior is it cannot be\\n            // deposited to Internal Balance.\\n            _require(!toInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // First, the Vault withdraws deposited ETH from the WETH contract, by burning the same amount of WETH\\n            // from the Vault. This receipt will be handled by the Vault's `receive`.\\n            _WETH().withdraw(amount);\\n\\n            // Then, the withdrawn ETH is sent to the recipient.\\n            recipient.sendValue(amount);\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n            if (toInternalBalance) {\\n                _increaseInternalBalance(recipient, token, amount);\\n            } else {\\n                token.safeTransfer(recipient, amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\\n     * if the caller sent less ETH than `amountUsed`.\\n     *\\n     * Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\\n     * Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\\n     * not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\\n     * returned ETH.\\n     */\\n    function _handleRemainingEth(uint256 amountUsed) internal {\\n        _require(msg.value >= amountUsed, Errors.INSUFFICIENT_ETH);\\n\\n        uint256 excess = msg.value - amountUsed;\\n        if (excess > 0) {\\n            msg.sender.sendValue(excess);\\n        }\\n    }\\n\\n    /**\\n     * @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\\n     * caller.\\n     *\\n     * Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\\n     * we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\\n     * ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\\n     * locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\\n     * prevent user error.\\n     */\\n    receive() external payable {\\n        _require(msg.sender == address(_WETH()), Errors.ETH_TRANSFER);\\n    }\\n\\n    // This contract uses virtual internal functions instead of inheriting from the modules that implement them (in\\n    // this case UserBalance) in order to decouple it from the rest of the system and enable standalone testing by\\n    // implementing these with mocks.\\n\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal virtual;\\n\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool capped\\n    ) internal virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x5534195c226355beb7c084ac01ac615920c6f7fbec550dab472827318536c9cb\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/Authorizer.sol": {
        "Authorizer": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "admin",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "previousAdminRole",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "newAdminRole",
                  "type": "bytes32"
                }
              ],
              "name": "RoleAdminChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                }
              ],
              "name": "RoleGranted",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                }
              ],
              "name": "RoleRevoked",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "DEFAULT_ADMIN_ROLE",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "actionId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "name": "canPerform",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                }
              ],
              "name": "getRoleAdmin",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "uint256",
                  "name": "index",
                  "type": "uint256"
                }
              ],
              "name": "getRoleMember",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                }
              ],
              "name": "getRoleMemberCount",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "grantRole",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32[]",
                  "name": "roles",
                  "type": "bytes32[]"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "grantRoles",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32[]",
                  "name": "roles",
                  "type": "bytes32[]"
                },
                {
                  "internalType": "address[]",
                  "name": "accounts",
                  "type": "address[]"
                }
              ],
              "name": "grantRolesToMany",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "hasRole",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "renounceRole",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "role",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "revokeRole",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32[]",
                  "name": "roles",
                  "type": "bytes32[]"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "revokeRoles",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32[]",
                  "name": "roles",
                  "type": "bytes32[]"
                },
                {
                  "internalType": "address[]",
                  "name": "accounts",
                  "type": "address[]"
                }
              ],
              "name": "revokeRolesFromMany",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Basic Authorizer implementation, based on OpenZeppelin's Access Control. Users are allowed to perform actions if they have the role with the same identifier. In this sense, roles are not being truly used as such, since they each map to a single action identifier. This temporary implementation is expected to be replaced soon after launch by a more sophisticated one, able to manage permissions across multiple contracts and to natively handle timelocks.",
            "kind": "dev",
            "methods": {
              "getRoleAdmin(bytes32)": {
                "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."
              },
              "getRoleMember(bytes32,uint256)": {
                "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information."
              },
              "getRoleMemberCount(bytes32)": {
                "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role."
              },
              "grantRole(bytes32,address)": {
                "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role."
              },
              "grantRoles(bytes32[],address)": {
                "details": "Grants multiple roles to a single account."
              },
              "grantRolesToMany(bytes32[],address[])": {
                "details": "Grants roles to a list of accounts."
              },
              "hasRole(bytes32,address)": {
                "details": "Returns `true` if `account` has been granted `role`."
              },
              "renounceRole(bytes32,address)": {
                "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`."
              },
              "revokeRole(bytes32,address)": {
                "details": "Revokes `role` from `account`. If `account` had already been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role."
              },
              "revokeRoles(bytes32[],address)": {
                "details": "Revokes multiple roles from a single account."
              },
              "revokeRolesFromMany(bytes32[],address[])": {
                "details": "Revokes roles from a list of accounts."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50604051610c79380380610c798339818101604052602081101561003357600080fd5b5051610040600082610046565b5061013d565b6100508282610054565b5050565b6000828152602081815260409091206100769183906108036100b7821b17901c565b156100505760405133906001600160a01b0383169084907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d90600090a45050565b60006100c3838361011c565b61011257508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b03861690811790915585549082528286019093526040902091909155610116565b5060005b92915050565b6001600160a01b031660009081526001919091016020526040902054151590565b610b2d8061014c6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063988360a31161008c578063a73cb2ab11610066578063a73cb2ab146103e7578063ca15c8731461050a578063d547741f14610527578063fcd7627e14610553576100cf565b8063988360a3146102ff5780639be2a884146103ab578063a217fddf146103df576100cf565b806318b2cde9146100d4578063248a9ca3146101f95780632f2ff15d1461022857806336568abe146102545780639010d07c1461028057806391d14854146102bf575b600080fd5b6101f7600480360360408110156100ea57600080fd5b810190602081018135600160201b81111561010457600080fd5b82018360208201111561011657600080fd5b803590602001918460208302840111600160201b8311171561013757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561018657600080fd5b82018360208201111561019857600080fd5b803590602001918460208302840111600160201b831117156101b957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506105ff945050505050565b005b6102166004803603602081101561020f57600080fd5b5035610654565b60408051918252519081900360200190f35b6101f76004803603604081101561023e57600080fd5b50803590602001356001600160a01b0316610669565b6101f76004803603604081101561026a57600080fd5b50803590602001356001600160a01b031661069f565b6102a36004803603604081101561029657600080fd5b50803590602001356106c0565b604080516001600160a01b039092168252519081900360200190f35b6102eb600480360360408110156102d557600080fd5b50803590602001356001600160a01b03166106e1565b604080519115158252519081900360200190f35b6101f76004803603604081101561031557600080fd5b810190602081018135600160201b81111561032f57600080fd5b82018360208201111561034157600080fd5b803590602001918460208302840111600160201b8311171561036257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b031691506106f99050565b6102eb600480360360608110156103c157600080fd5b508035906001600160a01b036020820135811691604001351661072a565b61021661073e565b6101f7600480360360408110156103fd57600080fd5b810190602081018135600160201b81111561041757600080fd5b82018360208201111561042957600080fd5b803590602001918460208302840111600160201b8311171561044a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561049957600080fd5b8201836020820111156104ab57600080fd5b803590602001918460208302840111600160201b831117156104cc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610743945050505050565b6102166004803603602081101561052057600080fd5b5035610793565b6101f76004803603604081101561053d57600080fd5b50803590602001356001600160a01b03166107aa565b6101f76004803603604081101561056957600080fd5b810190602081018135600160201b81111561058357600080fd5b82018360208201111561059557600080fd5b803590602001918460208302840111600160201b831117156105b657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b031691506107d29050565b61060b82518251610866565b60005b825181101561064f5761064783828151811061062657fe5b602002602001015183838151811061063a57fe5b60200260200101516107aa565b60010161060e565b505050565b60009081526020819052604090206002015490565b6000828152602081905260409020600201546106919061068990336106e1565b6101a661086f565b61069b828261087d565b5050565b6106b66001600160a01b03821633146101a861086f565b61069b82826108d6565b60008281526020819052604081206106d8908361092f565b90505b92915050565b60008281526020819052604081206106d8908361094b565b60005b825181101561064f5761072283828151811061071457fe5b6020026020010151836107aa565b6001016106fc565b600061073684846106e1565b949350505050565b600081565b61074f82518251610866565b60005b825181101561064f5761078b83828151811061076a57fe5b602002602001015183838151811061077e57fe5b6020026020010151610669565b600101610752565b60008181526020819052604081206106db9061096c565b6000828152602081905260409020600201546106b6906107ca90336106e1565b6101a761086f565b60005b825181101561064f576107fb8382815181106107ed57fe5b602002602001015183610669565b6001016107d5565b600061080f838361094b565b61085e57508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b038616908117909155855490825282860190935260409020919091556106db565b5060006106db565b61069b81831460675b8161069b5761069b81610970565b60008281526020819052604090206108959082610803565b1561069b5760405133906001600160a01b0383169084907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d90600090a45050565b60008281526020819052604090206108ee90826109c3565b1561069b5760405133906001600160a01b0383169084907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b90600090a45050565b8154600090610941908310606461086f565b6106d88383610aca565b6001600160a01b031660009081526001919091016020526040902054151590565b5490565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6001600160a01b03811660009081526001830160205260408120548015610ac05783546000198083019190810190600090879083908110610a0057fe5b60009182526020909120015487546001600160a01b0390911691508190889085908110610a2957fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055918316815260018981019092526040902090840190558654879080610a7257fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03881682526001898101909152604082209190915594506106db9350505050565b60009150506106db565b6000826000018281548110610adb57fe5b6000918252602090912001546001600160a01b0316939250505056fea26469706673582212201ddc704008d6591a64fab7b3482344eb894e33d24562c7900982a557dff0306964736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0xC79 CODESIZE SUB DUP1 PUSH2 0xC79 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x33 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH2 0x40 PUSH1 0x0 DUP3 PUSH2 0x46 JUMP JUMPDEST POP PUSH2 0x13D JUMP JUMPDEST PUSH2 0x50 DUP3 DUP3 PUSH2 0x54 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 PUSH2 0x76 SWAP2 DUP4 SWAP1 PUSH2 0x803 PUSH2 0xB7 DUP3 SHL OR SWAP1 SHR JUMP JUMPDEST ISZERO PUSH2 0x50 JUMPI PUSH1 0x40 MLOAD CALLER SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 DUP5 SWAP1 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D SWAP1 PUSH1 0x0 SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xC3 DUP4 DUP4 PUSH2 0x11C JUMP JUMPDEST PUSH2 0x112 JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP6 SLOAD SWAP1 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x116 JUMP JUMPDEST POP PUSH1 0x0 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH2 0xB2D DUP1 PUSH2 0x14C PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xCF JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x988360A3 GT PUSH2 0x8C JUMPI DUP1 PUSH4 0xA73CB2AB GT PUSH2 0x66 JUMPI DUP1 PUSH4 0xA73CB2AB EQ PUSH2 0x3E7 JUMPI DUP1 PUSH4 0xCA15C873 EQ PUSH2 0x50A JUMPI DUP1 PUSH4 0xD547741F EQ PUSH2 0x527 JUMPI DUP1 PUSH4 0xFCD7627E EQ PUSH2 0x553 JUMPI PUSH2 0xCF JUMP JUMPDEST DUP1 PUSH4 0x988360A3 EQ PUSH2 0x2FF JUMPI DUP1 PUSH4 0x9BE2A884 EQ PUSH2 0x3AB JUMPI DUP1 PUSH4 0xA217FDDF EQ PUSH2 0x3DF JUMPI PUSH2 0xCF JUMP JUMPDEST DUP1 PUSH4 0x18B2CDE9 EQ PUSH2 0xD4 JUMPI DUP1 PUSH4 0x248A9CA3 EQ PUSH2 0x1F9 JUMPI DUP1 PUSH4 0x2F2FF15D EQ PUSH2 0x228 JUMPI DUP1 PUSH4 0x36568ABE EQ PUSH2 0x254 JUMPI DUP1 PUSH4 0x9010D07C EQ PUSH2 0x280 JUMPI DUP1 PUSH4 0x91D14854 EQ PUSH2 0x2BF JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x104 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x116 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x137 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x186 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x198 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x1B9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0x5FF SWAP5 POP POP POP POP POP JUMP JUMPDEST STOP JUMPDEST PUSH2 0x216 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x20F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x654 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x23E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x669 JUMP JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x26A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x69F JUMP JUMPDEST PUSH2 0x2A3 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x296 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x6C0 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x2EB PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x2D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x6E1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x315 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x32F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x341 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x362 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP POP SWAP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 POP PUSH2 0x6F9 SWAP1 POP JUMP JUMPDEST PUSH2 0x2EB PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x3C1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH1 0x20 DUP3 ADD CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x40 ADD CALLDATALOAD AND PUSH2 0x72A JUMP JUMPDEST PUSH2 0x216 PUSH2 0x73E JUMP JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x3FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x417 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x429 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x44A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x499 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x4AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x4CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0x743 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH2 0x216 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x520 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x793 JUMP JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x53D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x7AA JUMP JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x569 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x583 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x595 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x5B6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP POP SWAP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 POP PUSH2 0x7D2 SWAP1 POP JUMP JUMPDEST PUSH2 0x60B DUP3 MLOAD DUP3 MLOAD PUSH2 0x866 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x64F JUMPI PUSH2 0x647 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x626 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x63A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x7AA JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x60E JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x691 SWAP1 PUSH2 0x689 SWAP1 CALLER PUSH2 0x6E1 JUMP JUMPDEST PUSH2 0x1A6 PUSH2 0x86F JUMP JUMPDEST PUSH2 0x69B DUP3 DUP3 PUSH2 0x87D JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x6B6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND CALLER EQ PUSH2 0x1A8 PUSH2 0x86F JUMP JUMPDEST PUSH2 0x69B DUP3 DUP3 PUSH2 0x8D6 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x6D8 SWAP1 DUP4 PUSH2 0x92F JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x6D8 SWAP1 DUP4 PUSH2 0x94B JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x64F JUMPI PUSH2 0x722 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x714 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x7AA JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x6FC JUMP JUMPDEST PUSH1 0x0 PUSH2 0x736 DUP5 DUP5 PUSH2 0x6E1 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 JUMP JUMPDEST PUSH2 0x74F DUP3 MLOAD DUP3 MLOAD PUSH2 0x866 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x64F JUMPI PUSH2 0x78B DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x76A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x77E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x669 JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x752 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x6DB SWAP1 PUSH2 0x96C JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x6B6 SWAP1 PUSH2 0x7CA SWAP1 CALLER PUSH2 0x6E1 JUMP JUMPDEST PUSH2 0x1A7 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x64F JUMPI PUSH2 0x7FB DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x7ED JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x669 JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x7D5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x80F DUP4 DUP4 PUSH2 0x94B JUMP JUMPDEST PUSH2 0x85E JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP6 SLOAD SWAP1 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x6DB JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x6DB JUMP JUMPDEST PUSH2 0x69B DUP2 DUP4 EQ PUSH1 0x67 JUMPDEST DUP2 PUSH2 0x69B JUMPI PUSH2 0x69B DUP2 PUSH2 0x970 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x895 SWAP1 DUP3 PUSH2 0x803 JUMP JUMPDEST ISZERO PUSH2 0x69B JUMPI PUSH1 0x40 MLOAD CALLER SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 DUP5 SWAP1 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D SWAP1 PUSH1 0x0 SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x8EE SWAP1 DUP3 PUSH2 0x9C3 JUMP JUMPDEST ISZERO PUSH2 0x69B JUMPI PUSH1 0x40 MLOAD CALLER SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 DUP5 SWAP1 PUSH32 0xF6391F5C32D9C69D2A47EA670B442974B53935D1EDC7FD64EB21E047A839171B SWAP1 PUSH1 0x0 SWAP1 LOG4 POP POP JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 PUSH2 0x941 SWAP1 DUP4 LT PUSH1 0x64 PUSH2 0x86F JUMP JUMPDEST PUSH2 0x6D8 DUP4 DUP4 PUSH2 0xACA JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0xAC0 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0xA00 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP8 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 POP DUP2 SWAP1 DUP9 SWAP1 DUP6 SWAP1 DUP2 LT PUSH2 0xA29 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP2 SWAP1 SWAP2 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND OR SWAP1 SSTORE SWAP2 DUP4 AND DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0xA72 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 DUP4 ADD PUSH1 0x0 NOT SWAP1 DUP2 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE SWAP1 SWAP3 ADD SWAP1 SWAP3 SSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP3 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE SWAP5 POP PUSH2 0x6DB SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x6DB JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0xADB JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SAR 0xDC PUSH17 0x4008D6591A64FAB7B3482344EB894E33D2 GASLIMIT PUSH3 0xC79009 DUP3 0xA5 JUMPI 0xDF CREATE ADDRESS PUSH10 0x64736F6C634300070100 CALLER ",
              "sourceMap": "1332:1630:43:-:0;;;1388:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1388:81:43;1425:37;1693:4:12;1388:81:43;1425:10;:37::i;:::-;1388:81;1332:1630;;6467:110:12;6545:25;6556:4;6562:7;6545:10;:25::i;:::-;6467:110;;:::o;6904:182::-;6977:6;:12;;;;;;;;;;;:33;;7002:7;;6977:24;;;;;:33;;:::i;:::-;6973:107;;;7031:38;;7058:10;;-1:-1:-1;;;;;7031:38:12;;;7043:4;;7031:38;;;;;6904:182;;:::o;1803:410:19:-;1873:4;1894:20;1903:3;1908:5;1894:8;:20::i;:::-;1889:318;;-1:-1:-1;1930:23:19;;;;;;;;-1:-1:-1;1930:23:19;;;;;;;;;;;;-1:-1:-1;;;;;;1930:23:19;-1:-1:-1;;;;;1930:23:19;;;;;;;;2110:18;;2088:19;;;:12;;;:19;;;;;;:40;;;;2142:11;;1889:318;-1:-1:-1;2191:5:19;1889:318;1803:410;;;;:::o;3993:134::-;-1:-1:-1;;;;;4096:19:19;4073:4;4096:19;;;:12;;;;;:19;;;;;;:24;;;3993:134::o;1332:1630:43:-;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063988360a31161008c578063a73cb2ab11610066578063a73cb2ab146103e7578063ca15c8731461050a578063d547741f14610527578063fcd7627e14610553576100cf565b8063988360a3146102ff5780639be2a884146103ab578063a217fddf146103df576100cf565b806318b2cde9146100d4578063248a9ca3146101f95780632f2ff15d1461022857806336568abe146102545780639010d07c1461028057806391d14854146102bf575b600080fd5b6101f7600480360360408110156100ea57600080fd5b810190602081018135600160201b81111561010457600080fd5b82018360208201111561011657600080fd5b803590602001918460208302840111600160201b8311171561013757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561018657600080fd5b82018360208201111561019857600080fd5b803590602001918460208302840111600160201b831117156101b957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506105ff945050505050565b005b6102166004803603602081101561020f57600080fd5b5035610654565b60408051918252519081900360200190f35b6101f76004803603604081101561023e57600080fd5b50803590602001356001600160a01b0316610669565b6101f76004803603604081101561026a57600080fd5b50803590602001356001600160a01b031661069f565b6102a36004803603604081101561029657600080fd5b50803590602001356106c0565b604080516001600160a01b039092168252519081900360200190f35b6102eb600480360360408110156102d557600080fd5b50803590602001356001600160a01b03166106e1565b604080519115158252519081900360200190f35b6101f76004803603604081101561031557600080fd5b810190602081018135600160201b81111561032f57600080fd5b82018360208201111561034157600080fd5b803590602001918460208302840111600160201b8311171561036257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b031691506106f99050565b6102eb600480360360608110156103c157600080fd5b508035906001600160a01b036020820135811691604001351661072a565b61021661073e565b6101f7600480360360408110156103fd57600080fd5b810190602081018135600160201b81111561041757600080fd5b82018360208201111561042957600080fd5b803590602001918460208302840111600160201b8311171561044a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561049957600080fd5b8201836020820111156104ab57600080fd5b803590602001918460208302840111600160201b831117156104cc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610743945050505050565b6102166004803603602081101561052057600080fd5b5035610793565b6101f76004803603604081101561053d57600080fd5b50803590602001356001600160a01b03166107aa565b6101f76004803603604081101561056957600080fd5b810190602081018135600160201b81111561058357600080fd5b82018360208201111561059557600080fd5b803590602001918460208302840111600160201b831117156105b657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b031691506107d29050565b61060b82518251610866565b60005b825181101561064f5761064783828151811061062657fe5b602002602001015183838151811061063a57fe5b60200260200101516107aa565b60010161060e565b505050565b60009081526020819052604090206002015490565b6000828152602081905260409020600201546106919061068990336106e1565b6101a661086f565b61069b828261087d565b5050565b6106b66001600160a01b03821633146101a861086f565b61069b82826108d6565b60008281526020819052604081206106d8908361092f565b90505b92915050565b60008281526020819052604081206106d8908361094b565b60005b825181101561064f5761072283828151811061071457fe5b6020026020010151836107aa565b6001016106fc565b600061073684846106e1565b949350505050565b600081565b61074f82518251610866565b60005b825181101561064f5761078b83828151811061076a57fe5b602002602001015183838151811061077e57fe5b6020026020010151610669565b600101610752565b60008181526020819052604081206106db9061096c565b6000828152602081905260409020600201546106b6906107ca90336106e1565b6101a761086f565b60005b825181101561064f576107fb8382815181106107ed57fe5b602002602001015183610669565b6001016107d5565b600061080f838361094b565b61085e57508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b038616908117909155855490825282860190935260409020919091556106db565b5060006106db565b61069b81831460675b8161069b5761069b81610970565b60008281526020819052604090206108959082610803565b1561069b5760405133906001600160a01b0383169084907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d90600090a45050565b60008281526020819052604090206108ee90826109c3565b1561069b5760405133906001600160a01b0383169084907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b90600090a45050565b8154600090610941908310606461086f565b6106d88383610aca565b6001600160a01b031660009081526001919091016020526040902054151590565b5490565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6001600160a01b03811660009081526001830160205260408120548015610ac05783546000198083019190810190600090879083908110610a0057fe5b60009182526020909120015487546001600160a01b0390911691508190889085908110610a2957fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055918316815260018981019092526040902090840190558654879080610a7257fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03881682526001898101909152604082209190915594506106db9350505050565b60009150506106db565b6000826000018281548110610adb57fe5b6000918252602090912001546001600160a01b0316939250505056fea26469706673582212201ddc704008d6591a64fab7b3482344eb894e33d24562c7900982a557dff0306964736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xCF JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x988360A3 GT PUSH2 0x8C JUMPI DUP1 PUSH4 0xA73CB2AB GT PUSH2 0x66 JUMPI DUP1 PUSH4 0xA73CB2AB EQ PUSH2 0x3E7 JUMPI DUP1 PUSH4 0xCA15C873 EQ PUSH2 0x50A JUMPI DUP1 PUSH4 0xD547741F EQ PUSH2 0x527 JUMPI DUP1 PUSH4 0xFCD7627E EQ PUSH2 0x553 JUMPI PUSH2 0xCF JUMP JUMPDEST DUP1 PUSH4 0x988360A3 EQ PUSH2 0x2FF JUMPI DUP1 PUSH4 0x9BE2A884 EQ PUSH2 0x3AB JUMPI DUP1 PUSH4 0xA217FDDF EQ PUSH2 0x3DF JUMPI PUSH2 0xCF JUMP JUMPDEST DUP1 PUSH4 0x18B2CDE9 EQ PUSH2 0xD4 JUMPI DUP1 PUSH4 0x248A9CA3 EQ PUSH2 0x1F9 JUMPI DUP1 PUSH4 0x2F2FF15D EQ PUSH2 0x228 JUMPI DUP1 PUSH4 0x36568ABE EQ PUSH2 0x254 JUMPI DUP1 PUSH4 0x9010D07C EQ PUSH2 0x280 JUMPI DUP1 PUSH4 0x91D14854 EQ PUSH2 0x2BF JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x104 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x116 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x137 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x186 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x198 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x1B9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0x5FF SWAP5 POP POP POP POP POP JUMP JUMPDEST STOP JUMPDEST PUSH2 0x216 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x20F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x654 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x23E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x669 JUMP JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x26A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x69F JUMP JUMPDEST PUSH2 0x2A3 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x296 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x6C0 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x2EB PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x2D5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x6E1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x315 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x32F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x341 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x362 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP POP SWAP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 POP PUSH2 0x6F9 SWAP1 POP JUMP JUMPDEST PUSH2 0x2EB PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x3C1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH1 0x20 DUP3 ADD CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x40 ADD CALLDATALOAD AND PUSH2 0x72A JUMP JUMPDEST PUSH2 0x216 PUSH2 0x73E JUMP JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x3FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x417 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x429 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x44A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 SWAP5 SWAP4 PUSH1 0x20 DUP2 ADD SWAP4 POP CALLDATALOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x499 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x4AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x4CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP PUSH2 0x743 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH2 0x216 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x520 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x793 JUMP JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x53D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH2 0x7AA JUMP JUMPDEST PUSH2 0x1F7 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x569 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 ADD SWAP1 PUSH1 0x20 DUP2 ADD DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x20 SHL DUP2 GT ISZERO PUSH2 0x583 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 ADD DUP4 PUSH1 0x20 DUP3 ADD GT ISZERO PUSH2 0x595 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD SWAP1 PUSH1 0x20 ADD SWAP2 DUP5 PUSH1 0x20 DUP4 MUL DUP5 ADD GT PUSH1 0x1 PUSH1 0x20 SHL DUP4 GT OR ISZERO PUSH2 0x5B6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 DUP1 DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 PUSH1 0x20 MUL DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP6 POP POP POP SWAP1 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP2 POP PUSH2 0x7D2 SWAP1 POP JUMP JUMPDEST PUSH2 0x60B DUP3 MLOAD DUP3 MLOAD PUSH2 0x866 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x64F JUMPI PUSH2 0x647 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x626 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x63A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x7AA JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x60E JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x691 SWAP1 PUSH2 0x689 SWAP1 CALLER PUSH2 0x6E1 JUMP JUMPDEST PUSH2 0x1A6 PUSH2 0x86F JUMP JUMPDEST PUSH2 0x69B DUP3 DUP3 PUSH2 0x87D JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x6B6 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND CALLER EQ PUSH2 0x1A8 PUSH2 0x86F JUMP JUMPDEST PUSH2 0x69B DUP3 DUP3 PUSH2 0x8D6 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x6D8 SWAP1 DUP4 PUSH2 0x92F JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x6D8 SWAP1 DUP4 PUSH2 0x94B JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x64F JUMPI PUSH2 0x722 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x714 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x7AA JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x6FC JUMP JUMPDEST PUSH1 0x0 PUSH2 0x736 DUP5 DUP5 PUSH2 0x6E1 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 JUMP JUMPDEST PUSH2 0x74F DUP3 MLOAD DUP3 MLOAD PUSH2 0x866 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x64F JUMPI PUSH2 0x78B DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x76A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x77E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x669 JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x752 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0x6DB SWAP1 PUSH2 0x96C JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x2 ADD SLOAD PUSH2 0x6B6 SWAP1 PUSH2 0x7CA SWAP1 CALLER PUSH2 0x6E1 JUMP JUMPDEST PUSH2 0x1A7 PUSH2 0x86F JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x64F JUMPI PUSH2 0x7FB DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x7ED JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP4 PUSH2 0x669 JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x7D5 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x80F DUP4 DUP4 PUSH2 0x94B JUMP JUMPDEST PUSH2 0x85E JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP6 SLOAD SWAP1 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x6DB JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x6DB JUMP JUMPDEST PUSH2 0x69B DUP2 DUP4 EQ PUSH1 0x67 JUMPDEST DUP2 PUSH2 0x69B JUMPI PUSH2 0x69B DUP2 PUSH2 0x970 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x895 SWAP1 DUP3 PUSH2 0x803 JUMP JUMPDEST ISZERO PUSH2 0x69B JUMPI PUSH1 0x40 MLOAD CALLER SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 DUP5 SWAP1 PUSH32 0x2F8788117E7EFF1D82E926EC794901D17C78024A50270940304540A733656F0D SWAP1 PUSH1 0x0 SWAP1 LOG4 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x8EE SWAP1 DUP3 PUSH2 0x9C3 JUMP JUMPDEST ISZERO PUSH2 0x69B JUMPI PUSH1 0x40 MLOAD CALLER SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND SWAP1 DUP5 SWAP1 PUSH32 0xF6391F5C32D9C69D2A47EA670B442974B53935D1EDC7FD64EB21E047A839171B SWAP1 PUSH1 0x0 SWAP1 LOG4 POP POP JUMP JUMPDEST DUP2 SLOAD PUSH1 0x0 SWAP1 PUSH2 0x941 SWAP1 DUP4 LT PUSH1 0x64 PUSH2 0x86F JUMP JUMPDEST PUSH2 0x6D8 DUP4 DUP4 PUSH2 0xACA JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0xAC0 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0xA00 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP8 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 POP DUP2 SWAP1 DUP9 SWAP1 DUP6 SWAP1 DUP2 LT PUSH2 0xA29 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP2 SWAP1 SWAP2 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND OR SWAP1 SSTORE SWAP2 DUP4 AND DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0xA72 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 DUP4 ADD PUSH1 0x0 NOT SWAP1 DUP2 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE SWAP1 SWAP3 ADD SWAP1 SWAP3 SSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP3 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE SWAP5 POP PUSH2 0x6DB SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x6DB JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0xADB JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP4 SWAP3 POP POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SAR 0xDC PUSH17 0x4008D6591A64FAB7B3482344EB894E33D2 GASLIMIT PUSH3 0xC79009 DUP3 0xA5 JUMPI 0xDF CREATE ADDRESS PUSH10 0x64736F6C634300070100 CALLER ",
              "sourceMap": "1332:1630:43:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2678:282;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2678:282:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2678:282:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2678:282:43;;;;;;;;-1:-1:-1;2678:282:43;;-1:-1:-1;;;;;2678:282:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2678:282:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2678:282:43;;-1:-1:-1;2678:282:43;;-1:-1:-1;;;;;2678:282:43:i;:::-;;4211:112:12;;;;;;;;;;;;;;;;-1:-1:-1;4211:112:12;;:::i;:::-;;;;;;;;;;;;;;;;4573:202;;;;;;;;;;;;;;;;-1:-1:-1;4573:202:12;;;;;;-1:-1:-1;;;;;4573:202:12;;:::i;5713:189::-;;;;;;;;;;;;;;;;-1:-1:-1;5713:189:12;;;;;;-1:-1:-1;;;;;5713:189:12;;:::i;3894:136::-;;;;;;;;;;;;;;;;-1:-1:-1;3894:136:12;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;3894:136:12;;;;;;;;;;;;;;2871:145;;;;;;;;;;;;;;;;-1:-1:-1;2871:145:12;;;;;;-1:-1:-1;;;;;2871:145:12;;:::i;:::-;;;;;;;;;;;;;;;;;;2421:184:43;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2421:184:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2421:184:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2421:184:43;;-1:-1:-1;;;2421:184:43;;-1:-1:-1;;;;;2421:184:43;;-1:-1:-1;2421:184:43;;-1:-1:-1;2421:184:43:i;1475:259::-;;;;;;;;;;;;;;;;-1:-1:-1;1475:259:43;;;-1:-1:-1;;;;;1475:259:43;;;;;;;;;;;;:::i;1648:49:12:-;;;:::i;2063:278:43:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2063:278:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2063:278:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2063:278:43;;;;;;;;-1:-1:-1;2063:278:43;;-1:-1:-1;;;;;2063:278:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2063:278:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2063:278:43;;-1:-1:-1;2063:278:43;;-1:-1:-1;;;;;2063:278:43:i;3184:125:12:-;;;;;;;;;;;;;;;;-1:-1:-1;3184:125:12;;:::i;5017:205::-;;;;;;;;;;;;;;;;-1:-1:-1;5017:205:12;;;;;;-1:-1:-1;;;;;5017:205:12;;:::i;1811:182:43:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1811:182:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1811:182:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1811:182:43;;-1:-1:-1;;;1811:182:43;;-1:-1:-1;;;;;1811:182:43;;-1:-1:-1;1811:182:43;;-1:-1:-1;1811:182:43:i;2678:282::-;2777:66;2813:5;:12;2827:8;:15;2777:35;:66::i;:::-;2858:9;2853:101;2877:5;:12;2873:1;:16;2853:101;;;2910:33;2921:5;2927:1;2921:8;;;;;;;;;;;;;;2931;2940:1;2931:11;;;;;;;;;;;;;;2910:10;:33::i;:::-;2891:3;;2853:101;;;;2678:282;;:::o;4211:112:12:-;4268:7;4294:12;;;;;;;;;;:22;;;;4211:112::o;4573:202::-;4665:6;:12;;;;;;;;;;:22;;;4648:84;;4657:43;;4689:10;4657:7;:43::i;:::-;7726:3:3;4648:8:12;:84::i;:::-;4743:25;4754:4;4760:7;4743:10;:25::i;:::-;4573:202;;:::o;5713:189::-;5791:67;-1:-1:-1;;;;;5800:21:12;;5811:10;5800:21;7852:3:3;5791:8:12;:67::i;:::-;5869:26;5881:4;5887:7;5869:11;:26::i;3894:136::-;3967:7;3993:12;;;;;;;;;;:30;;4017:5;3993:23;:30::i;:::-;3986:37;;3894:136;;;;;:::o;2871:145::-;2948:4;2971:12;;;;;;;;;;:38;;3001:7;2971:29;:38::i;2421:184:43:-;2507:9;2502:97;2526:5;:12;2522:1;:16;2502:97;;;2559:29;2570:5;2576:1;2570:8;;;;;;;;;;;;;;2580:7;2559:10;:29::i;:::-;2540:3;;2502:97;;1475:259;1599:4;1687:40;1709:8;1719:7;1687:21;:40::i;:::-;1680:47;1475:259;-1:-1:-1;;;;1475:259:43:o;1648:49:12:-;1693:4;1648:49;:::o;2063:278:43:-;2159:66;2195:5;:12;2209:8;:15;2159:35;:66::i;:::-;2240:9;2235:100;2259:5;:12;2255:1;:16;2235:100;;;2292:32;2302:5;2308:1;2302:8;;;;;;;;;;;;;;2312;2321:1;2312:11;;;;;;;;;;;;;;2292:9;:32::i;:::-;2273:3;;2235:100;;3184:125:12;3247:7;3273:12;;;;;;;;;;:29;;:27;:29::i;5017:205::-;5110:6;:12;;;;;;;;;;:22;;;5093:85;;5102:43;;5134:10;5102:7;:43::i;:::-;7787:3:3;5093:8:12;:85::i;1811:182:43:-;1896:9;1891:96;1915:5;:12;1911:1;:16;1891:96;;;1948:28;1958:5;1964:1;1958:8;;;;;;;;;;;;;;1968:7;1948:9;:28::i;:::-;1929:3;;1891:96;;1803:410:19;1873:4;1894:20;1903:3;1908:5;1894:8;:20::i;:::-;1889:318;;-1:-1:-1;1930:23:19;;;;;;;;-1:-1:-1;1930:23:19;;;;;;;;;;;;-1:-1:-1;;;;;;1930:23:19;-1:-1:-1;;;;;1930:23:19;;;;;;;;2110:18;;2088:19;;;:12;;;:19;;;;;;:40;;;;2142:11;;1889:318;-1:-1:-1;2191:5:19;2184:12;;855:131:6;933:46;947:1;942;:6;5002:3:3;866:101;935:9;930:34;;946:18;954:9;946:7;:18::i;6904:182:12:-;6977:6;:12;;;;;;;;;;:33;;7002:7;6977:24;:33::i;:::-;6973:107;;;7031:38;;7058:10;;-1:-1:-1;;;;;7031:38:12;;;7043:4;;7031:38;;;;;6904:182;;:::o;7092:186::-;7166:6;:12;;;;;;;;;;:36;;7194:7;7166:27;:36::i;:::-;7162:110;;;7223:38;;7250:10;;-1:-1:-1;;;;;7223:38:12;;;7235:4;;7223:38;;;;;7092:186;;:::o;4664:199:19:-;4766:18;;4738:7;;4757:58;;4766:26;-1:-1:-1;4838:3:3;4757:8:19;:58::i;:::-;4832:24;4845:3;4850:5;4832:12;:24::i;3993:134::-;-1:-1:-1;;;;;4096:19:19;4073:4;4096:19;;;:12;;;;;:19;;;;;;:24;;;3993:134::o;4208:114::-;4297:18;;4208:114::o;1074:3172:3:-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2999:73;2210:2;2243:18;;;2288;;;2215:4;2284:29;;;3040:1;3036:14;2195:18;;;;3025:26;;;;2336:18;;;;2383;;;2379:29;;;3057:2;3053:17;3021:50;;;;2999:73;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;2381:1531:19;-1:-1:-1;;;;;2591:19:19;;2454:4;2591:19;;;:12;;;:19;;;;;;2625:15;;2621:1285;;3066:18;;-1:-1:-1;;3018:14:19;;;;3066:22;;;;2994:21;;3066:3;;:22;;3348;;;;;;;;;;;;;;;;3462:26;;-1:-1:-1;;;;;3348:22:19;;;;-1:-1:-1;3348:22:19;;3462:3;;3474:13;;3462:26;;;;;;;;;;;;;;;;;;:38;;-1:-1:-1;;;;;;3462:38:19;-1:-1:-1;;;;;3462:38:19;;;;;;3566:23;;;;;-1:-1:-1;3566:12:19;;;:23;;;;;;3592:17;;;3566:43;;3715:17;;3566:12;;3715:17;;;;;;;;;;;;;;;-1:-1:-1;;3715:17:19;;;;;-1:-1:-1;;;;;;3715:17:19;;;;;;;;;-1:-1:-1;;;;;3807:19:19;;;;3715:17;3807:12;;;:19;;;;;;3800:26;;;;3715:17;-1:-1:-1;3841:11:19;;-1:-1:-1;;;;3841:11:19;2621:1285;3890:5;3883:12;;;;;5175:135;5259:7;5285:3;:11;;5297:5;5285:18;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5285:18:19;;5175:135;-1:-1:-1;;;5175:135:19:o"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "572200",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "DEFAULT_ADMIN_ROLE()": "265",
                "canPerform(bytes32,address,address)": "1412",
                "getRoleAdmin(bytes32)": "1138",
                "getRoleMember(bytes32,uint256)": "infinite",
                "getRoleMemberCount(bytes32)": "1190",
                "grantRole(bytes32,address)": "infinite",
                "grantRoles(bytes32[],address)": "infinite",
                "grantRolesToMany(bytes32[],address[])": "infinite",
                "hasRole(bytes32,address)": "1410",
                "renounceRole(bytes32,address)": "infinite",
                "revokeRole(bytes32,address)": "infinite",
                "revokeRoles(bytes32[],address)": "infinite",
                "revokeRolesFromMany(bytes32[],address[])": "infinite"
              }
            },
            "methodIdentifiers": {
              "DEFAULT_ADMIN_ROLE()": "a217fddf",
              "canPerform(bytes32,address,address)": "9be2a884",
              "getRoleAdmin(bytes32)": "248a9ca3",
              "getRoleMember(bytes32,uint256)": "9010d07c",
              "getRoleMemberCount(bytes32)": "ca15c873",
              "grantRole(bytes32,address)": "2f2ff15d",
              "grantRoles(bytes32[],address)": "fcd7627e",
              "grantRolesToMany(bytes32[],address[])": "a73cb2ab",
              "hasRole(bytes32,address)": "91d14854",
              "renounceRole(bytes32,address)": "36568abe",
              "revokeRole(bytes32,address)": "d547741f",
              "revokeRoles(bytes32[],address)": "988360a3",
              "revokeRolesFromMany(bytes32[],address[])": "18b2cde9"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"actionId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canPerform\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"roles\",\"type\":\"bytes32[]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"roles\",\"type\":\"bytes32[]\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"grantRolesToMany\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"roles\",\"type\":\"bytes32[]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRoles\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"roles\",\"type\":\"bytes32[]\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"revokeRolesFromMany\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Basic Authorizer implementation, based on OpenZeppelin's Access Control. Users are allowed to perform actions if they have the role with the same identifier. In this sense, roles are not being truly used as such, since they each map to a single action identifier. This temporary implementation is expected to be replaced soon after launch by a more sophisticated one, able to manage permissions across multiple contracts and to natively handle timelocks.\",\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"grantRoles(bytes32[],address)\":{\"details\":\"Grants multiple roles to a single account.\"},\"grantRolesToMany(bytes32[],address[])\":{\"details\":\"Grants roles to a list of accounts.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had already been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"revokeRoles(bytes32[],address)\":{\"details\":\"Revokes multiple roles from a single account.\"},\"revokeRolesFromMany(bytes32[],address[])\":{\"details\":\"Revokes roles from a list of accounts.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/Authorizer.sol\":\"Authorizer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./EnumerableSet.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n *     require(hasRole(MY_ROLE, msg.sender));\\n *     ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl {\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n\\n    struct RoleData {\\n        EnumerableSet.AddressSet members;\\n        bytes32 adminRole;\\n    }\\n\\n    mapping(bytes32 => RoleData) private _roles;\\n\\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n    /**\\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n     *\\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n     * {RoleAdminChanged} not being emitted signaling this.\\n     *\\n     * _Available since v3.1._\\n     */\\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n    /**\\n     * @dev Emitted when `account` is granted `role`.\\n     *\\n     * `sender` is the account that originated the contract call, an admin role\\n     * bearer except when using {_setupRole}.\\n     */\\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n    /**\\n     * @dev Emitted when `account` is revoked `role`.\\n     *\\n     * `sender` is the account that originated the contract call:\\n     *   - if using `revokeRole`, it is the admin role bearer\\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n     */\\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n    /**\\n     * @dev Returns `true` if `account` has been granted `role`.\\n     */\\n    function hasRole(bytes32 role, address account) public view virtual returns (bool) {\\n        return _roles[role].members.contains(account);\\n    }\\n\\n    /**\\n     * @dev Returns the number of accounts that have `role`. Can be used\\n     * together with {getRoleMember} to enumerate all bearers of a role.\\n     */\\n    function getRoleMemberCount(bytes32 role) public view returns (uint256) {\\n        return _roles[role].members.length();\\n    }\\n\\n    /**\\n     * @dev Returns one of the accounts that have `role`. `index` must be a\\n     * value between 0 and {getRoleMemberCount}, non-inclusive.\\n     *\\n     * Role bearers are not sorted in any particular way, and their ordering may\\n     * change at any point.\\n     *\\n     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n     * you perform all queries on the same block. See the following\\n     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n     * for more information.\\n     */\\n    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {\\n        return _roles[role].members.at(index);\\n    }\\n\\n    /**\\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\\n     * {revokeRole}.\\n     *\\n     * To change a role's admin, use {_setRoleAdmin}.\\n     */\\n    function getRoleAdmin(bytes32 role) public view returns (bytes32) {\\n        return _roles[role].adminRole;\\n    }\\n\\n    /**\\n     * @dev Grants `role` to `account`.\\n     *\\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\\n     * event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have ``role``'s admin role.\\n     */\\n    function grantRole(bytes32 role, address account) public virtual {\\n        _require(hasRole(_roles[role].adminRole, msg.sender), Errors.GRANT_SENDER_NOT_ADMIN);\\n\\n        _grantRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Revokes `role` from `account`.\\n     *\\n     * If `account` had already been granted `role`, emits a {RoleRevoked} event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have ``role``'s admin role.\\n     */\\n    function revokeRole(bytes32 role, address account) public virtual {\\n        _require(hasRole(_roles[role].adminRole, msg.sender), Errors.REVOKE_SENDER_NOT_ADMIN);\\n\\n        _revokeRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Revokes `role` from the calling account.\\n     *\\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n     * purpose is to provide a mechanism for accounts to lose their privileges\\n     * if they are compromised (such as when a trusted device is misplaced).\\n     *\\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\\n     * event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must be `account`.\\n     */\\n    function renounceRole(bytes32 role, address account) public virtual {\\n        _require(account == msg.sender, Errors.RENOUNCE_SENDER_NOT_ALLOWED);\\n\\n        _revokeRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Grants `role` to `account`.\\n     *\\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\\n     * event. Note that unlike {grantRole}, this function doesn't perform any\\n     * checks on the calling account.\\n     *\\n     * [WARNING]\\n     * ====\\n     * This function should only be called from the constructor when setting\\n     * up the initial roles for the system.\\n     *\\n     * Using this function in any other way is effectively circumventing the admin\\n     * system imposed by {AccessControl}.\\n     * ====\\n     */\\n    function _setupRole(bytes32 role, address account) internal virtual {\\n        _grantRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Sets `adminRole` as ``role``'s admin role.\\n     *\\n     * Emits a {RoleAdminChanged} event.\\n     */\\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);\\n        _roles[role].adminRole = adminRole;\\n    }\\n\\n    function _grantRole(bytes32 role, address account) private {\\n        if (_roles[role].members.add(account)) {\\n            emit RoleGranted(role, account, msg.sender);\\n        }\\n    }\\n\\n    function _revokeRole(bytes32 role, address account) private {\\n        if (_roles[role].members.remove(account)) {\\n            emit RoleRevoked(role, account, msg.sender);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9fd091441925ba3fa46391c0417721b116065fc5a50cacb1ec3e974d46627fa5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/vault/Authorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\nimport \\\"../lib/openzeppelin/AccessControl.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\n\\n/**\\n * @dev Basic Authorizer implementation, based on OpenZeppelin's Access Control.\\n *\\n * Users are allowed to perform actions if they have the role with the same identifier. In this sense, roles are not\\n * being truly used as such, since they each map to a single action identifier.\\n *\\n * This temporary implementation is expected to be replaced soon after launch by a more sophisticated one, able to\\n * manage permissions across multiple contracts and to natively handle timelocks.\\n */\\ncontract Authorizer is AccessControl, IAuthorizer {\\n    constructor(address admin) {\\n        _setupRole(DEFAULT_ADMIN_ROLE, admin);\\n    }\\n\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address\\n    ) public view override returns (bool) {\\n        // This Authorizer ignores the 'where' field completely.\\n        return AccessControl.hasRole(actionId, account);\\n    }\\n\\n    /**\\n     * @dev Grants multiple roles to a single account.\\n     */\\n    function grantRoles(bytes32[] memory roles, address account) external {\\n        for (uint256 i = 0; i < roles.length; i++) {\\n            grantRole(roles[i], account);\\n        }\\n    }\\n\\n    /**\\n     * @dev Grants roles to a list of accounts.\\n     */\\n    function grantRolesToMany(bytes32[] memory roles, address[] memory accounts) external {\\n        InputHelpers.ensureInputLengthMatch(roles.length, accounts.length);\\n        for (uint256 i = 0; i < roles.length; i++) {\\n            grantRole(roles[i], accounts[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Revokes multiple roles from a single account.\\n     */\\n    function revokeRoles(bytes32[] memory roles, address account) external {\\n        for (uint256 i = 0; i < roles.length; i++) {\\n            revokeRole(roles[i], account);\\n        }\\n    }\\n\\n    /**\\n     * @dev Revokes roles from a list of accounts.\\n     */\\n    function revokeRolesFromMany(bytes32[] memory roles, address[] memory accounts) external {\\n        InputHelpers.ensureInputLengthMatch(roles.length, accounts.length);\\n        for (uint256 i = 0; i < roles.length; i++) {\\n            revokeRole(roles[i], accounts[i]);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x1008f94ffcdcab9f9baf76a6088fd4821f3299c34d438ee4a39cba67c426e91e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 3367,
                "contract": "src.sol/amm/vault/Authorizer.sol:Authorizer",
                "label": "_roles",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_bytes32,t_struct(RoleData)3363_storage)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_array(t_address)dyn_storage": {
                "base": "t_address",
                "encoding": "dynamic_array",
                "label": "address[]",
                "numberOfBytes": "32"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_struct(RoleData)3363_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct AccessControl.RoleData)",
                "numberOfBytes": "32",
                "value": "t_struct(RoleData)3363_storage"
              },
              "t_struct(AddressSet)4822_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableSet.AddressSet",
                "members": [
                  {
                    "astId": 4817,
                    "contract": "src.sol/amm/vault/Authorizer.sol:Authorizer",
                    "label": "_values",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_array(t_address)dyn_storage"
                  },
                  {
                    "astId": 4821,
                    "contract": "src.sol/amm/vault/Authorizer.sol:Authorizer",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_address,t_uint256)"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(RoleData)3363_storage": {
                "encoding": "inplace",
                "label": "struct AccessControl.RoleData",
                "members": [
                  {
                    "astId": 3360,
                    "contract": "src.sol/amm/vault/Authorizer.sol:Authorizer",
                    "label": "members",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_struct(AddressSet)4822_storage"
                  },
                  {
                    "astId": 3362,
                    "contract": "src.sol/amm/vault/Authorizer.sol:Authorizer",
                    "label": "adminRole",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/Fees.sol": {
        "Fees": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the ProtocolFeesCollector contract.",
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the ProtocolFeesCollector contract.\",\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/Fees.sol\":\"Fees\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/Fees.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./ProtocolFeesCollector.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\n/**\\n * @dev To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the\\n * ProtocolFeesCollector contract.\\n */\\nabstract contract Fees is IVault {\\n    using SafeERC20 for IERC20;\\n\\n    ProtocolFeesCollector private immutable _protocolFeesCollector;\\n\\n    constructor() {\\n        _protocolFeesCollector = new ProtocolFeesCollector(IVault(this));\\n    }\\n\\n    function getProtocolFeesCollector() public view override returns (ProtocolFeesCollector) {\\n        return _protocolFeesCollector;\\n    }\\n\\n    /**\\n     * @dev Returns the protocol swap fee percentage.\\n     */\\n    function _getProtocolSwapFeePercentage() internal view returns (uint256) {\\n        return getProtocolFeesCollector().getSwapFeePercentage();\\n    }\\n\\n    /**\\n     * @dev Returns the protocol fee amount to charge for a flash loan of `amount`.\\n     */\\n    function _calculateFlashLoanFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // Fixed point multiplication introduces error: we round up, which means in certain scenarios the charged\\n        // percentage can be slightly higher than intended.\\n        uint256 percentage = getProtocolFeesCollector().getFlashLoanFeePercentage();\\n        return FixedPoint.mulUp(amount, percentage);\\n    }\\n\\n    function _payFee(IERC20 token, uint256 amount) internal {\\n        if (amount > 0) {\\n            token.safeTransfer(address(getProtocolFeesCollector()), amount);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaed6f3ebf261e68a5093bb6b775d4c6c85eb9c7133aa20e701013f02edc4a6e3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/FlashLoans.sol": {
        "FlashLoans": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Handles Flash Loans through the Vault. Calls the `receiveFlashLoan` hook on the flash loan recipient contract, which implements the `IFlashLoanRecipient` interface.",
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Handles Flash Loans through the Vault. Calls the `receiveFlashLoan` hook on the flash loan recipient contract, which implements the `IFlashLoanRecipient` interface.\",\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/FlashLoans.sol\":\"FlashLoans\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/Fees.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./ProtocolFeesCollector.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\n/**\\n * @dev To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the\\n * ProtocolFeesCollector contract.\\n */\\nabstract contract Fees is IVault {\\n    using SafeERC20 for IERC20;\\n\\n    ProtocolFeesCollector private immutable _protocolFeesCollector;\\n\\n    constructor() {\\n        _protocolFeesCollector = new ProtocolFeesCollector(IVault(this));\\n    }\\n\\n    function getProtocolFeesCollector() public view override returns (ProtocolFeesCollector) {\\n        return _protocolFeesCollector;\\n    }\\n\\n    /**\\n     * @dev Returns the protocol swap fee percentage.\\n     */\\n    function _getProtocolSwapFeePercentage() internal view returns (uint256) {\\n        return getProtocolFeesCollector().getSwapFeePercentage();\\n    }\\n\\n    /**\\n     * @dev Returns the protocol fee amount to charge for a flash loan of `amount`.\\n     */\\n    function _calculateFlashLoanFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // Fixed point multiplication introduces error: we round up, which means in certain scenarios the charged\\n        // percentage can be slightly higher than intended.\\n        uint256 percentage = getProtocolFeesCollector().getFlashLoanFeePercentage();\\n        return FixedPoint.mulUp(amount, percentage);\\n    }\\n\\n    function _payFee(IERC20 token, uint256 amount) internal {\\n        if (amount > 0) {\\n            token.safeTransfer(address(getProtocolFeesCollector()), amount);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaed6f3ebf261e68a5093bb6b775d4c6c85eb9c7133aa20e701013f02edc4a6e3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/FlashLoans.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\n// This flash loan provider was based on the Aave protocol's open source\\n// implementation and terminology and interfaces are intentionally kept\\n// similar\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./Fees.sol\\\";\\nimport \\\"./interfaces/IFlashLoanRecipient.sol\\\";\\n\\n/**\\n * @dev Handles Flash Loans through the Vault. Calls the `receiveFlashLoan` hook on the flash loan recipient\\n * contract, which implements the `IFlashLoanRecipient` interface.\\n */\\nabstract contract FlashLoans is Fees, ReentrancyGuard, TemporarilyPausable {\\n    using SafeERC20 for IERC20;\\n\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external override nonReentrant whenNotPaused {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        uint256[] memory feeAmounts = new uint256[](tokens.length);\\n        uint256[] memory preLoanBalances = new uint256[](tokens.length);\\n\\n        // Used to ensure `tokens` is sorted in ascending order, which ensures token uniqueness.\\n        IERC20 previousToken = IERC20(0);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n\\n            _require(token > previousToken, token == IERC20(0) ? Errors.ZERO_TOKEN : Errors.UNSORTED_TOKENS);\\n            previousToken = token;\\n\\n            preLoanBalances[i] = token.balanceOf(address(this));\\n            feeAmounts[i] = _calculateFlashLoanFeeAmount(amount);\\n\\n            _require(preLoanBalances[i] >= amount, Errors.INSUFFICIENT_FLASH_LOAN_BALANCE);\\n            token.safeTransfer(address(recipient), amount);\\n        }\\n\\n        recipient.receiveFlashLoan(tokens, amounts, feeAmounts, userData);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 preLoanBalance = preLoanBalances[i];\\n\\n            // Checking for loan repayment first (without accounting for fees) makes for simpler debugging, and results\\n            // in more accurate revert reasons if the flash loan protocol fee percentage is zero.\\n            uint256 postLoanBalance = token.balanceOf(address(this));\\n            _require(postLoanBalance >= preLoanBalance, Errors.INVALID_POST_LOAN_BALANCE);\\n\\n            // No need for checked arithmetic since we know the loan was fully repaid.\\n            uint256 receivedFees = postLoanBalance - preLoanBalance;\\n            _require(receivedFees >= feeAmounts[i], Errors.INSUFFICIENT_FLASH_LOAN_FEES);\\n\\n            _payFee(token, receivedFees);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x8c120a27ca27e199a713e509154c0743347b8087321d5235409b2e9b15e32b3b\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/FlashLoans.sol:FlashLoans",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/FlashLoans.sol:FlashLoans",
                "label": "_paused",
                "offset": 0,
                "slot": "1",
                "type": "t_bool"
              }
            ],
            "types": {
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/PoolBalances.sol": {
        "PoolBalances": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "stateMutability": "payable",
              "type": "receive"
            }
          ],
          "devdoc": {
            "details": "Stores the Asset Managers (by Pool and token), and implements the top level Asset Manager and Pool interfaces, such as registering and deregistering tokens, joining and exiting Pools, and informational functions like `getPool` and `getPoolTokens`, delegating to specialization-specific functions as needed. `managePoolBalance` handles all Asset Manager interactions.",
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"Stores the Asset Managers (by Pool and token), and implements the top level Asset Manager and Pool interfaces, such as registering and deregistering tokens, joining and exiting Pools, and informational functions like `getPool` and `getPoolTokens`, delegating to specialization-specific functions as needed. `managePoolBalance` handles all Asset Manager interactions.\",\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/PoolBalances.sol\":\"PoolBalances\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\\n    }\\n}\\n\",\"keccak256\":\"0x5f83465783b239828f83c626bae1ac944cfff074c8919c245d14b208bcf317d5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n// Based on the EnumerableMap library from OpenZeppelin contracts, altered to include the following:\\n//  * a map from IERC20 to bytes32\\n//  * entries are stored in mappings instead of arrays, reducing implicit storage reads for out-of-bounds checks\\n//  * unchecked_at and unchecked_valueAt, which allow for more gas efficient data reads in some scenarios\\n//  * unchecked_indexOf and unchecked_setAt, which allow for more gas efficient data writes in some scenarios\\n//\\n// Additionally, the base private functions that work on bytes32 were removed and replaced with a native implementation\\n// for IERC20 keys, to reduce bytecode size and runtime costs.\\n\\n// We're using non-standard casing for the unchecked functions to differentiate them, so we need to turn off that rule\\n// solhint-disable func-name-mixedcase\\n\\nimport \\\"./IERC20.sol\\\";\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n *     // Declare a set state variable\\n *     EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n */\\nlibrary EnumerableMap {\\n    // The original OpenZeppelin implementation uses a generic Map type with bytes32 keys: this was replaced with\\n    // IERC20ToBytes32Map, which uses IERC20 keys natively, resulting in more dense bytecode.\\n\\n    struct IERC20ToBytes32MapEntry {\\n        IERC20 _key;\\n        bytes32 _value;\\n    }\\n\\n    struct IERC20ToBytes32Map {\\n        // Number of entries in the map\\n        uint256 _length;\\n        // Storage of map keys and values\\n        mapping(uint256 => IERC20ToBytes32MapEntry) _entries;\\n        // Position of the entry defined by a key in the `entries` array, plus 1\\n        // because index 0 means a key is not in the map.\\n        mapping(IERC20 => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\\n     * key. O(1).\\n     *\\n     * Returns true if the key was added to the map, that is if it was not\\n     * already present.\\n     */\\n    function set(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        bytes32 value\\n    ) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to !contains(map, key)\\n        if (keyIndex == 0) {\\n            uint256 previousLength = map._length;\\n            map._entries[previousLength] = IERC20ToBytes32MapEntry({ _key: key, _value: value });\\n            map._length = previousLength + 1;\\n\\n            // The entry is stored at previousLength, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            map._indexes[key] = previousLength + 1;\\n            return true;\\n        } else {\\n            map._entries[keyIndex - 1]._value = value;\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\\n     * {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\\n     *\\n     * This function performs one less storage read than {set}, but it should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_setAt(\\n        IERC20ToBytes32Map storage map,\\n        uint256 index,\\n        bytes32 value\\n    ) internal {\\n        map._entries[index]._value = value;\\n    }\\n\\n    /**\\n     * @dev Removes a key-value pair from a map. O(1).\\n     *\\n     * Returns true if the key was removed from the map, that is if it was present.\\n     */\\n    function remove(IERC20ToBytes32Map storage map, IERC20 key) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to contains(map, key)\\n        if (keyIndex != 0) {\\n            // To delete a key-value pair from the _entries pseudo-array in O(1), we swap the entry to delete with the\\n            // one at the highest index, and then remove this last entry (sometimes called as 'swap and pop').\\n            // This modifies the order of the pseudo-array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = keyIndex - 1;\\n            uint256 lastIndex = map._length - 1;\\n\\n            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            IERC20ToBytes32MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n            // Move the last entry to the index where the entry to delete is\\n            map._entries[toDeleteIndex] = lastEntry;\\n            // Update the index for the moved entry\\n            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved entry was stored\\n            delete map._entries[lastIndex];\\n            map._length = lastIndex;\\n\\n            // Delete the index for the deleted slot\\n            delete map._indexes[key];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the key is in the map. O(1).\\n     */\\n    function contains(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (bool) {\\n        return map._indexes[key] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of key-value pairs in the map. O(1).\\n     */\\n    function length(IERC20ToBytes32Map storage map) internal view returns (uint256) {\\n        return map._length;\\n    }\\n\\n    /**\\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of entries inside the\\n     * array, and it may change when more entries are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        _require(map._length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(map, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        IERC20ToBytes32MapEntry storage entry = map._entries[index];\\n        return (entry._key, entry._value);\\n    }\\n\\n    /**\\n     * @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\\n     * read). O(1).\\n     */\\n    function unchecked_valueAt(IERC20ToBytes32Map storage map, uint256 index) internal view returns (bytes32) {\\n        return map._entries[index]._value;\\n    }\\n\\n    /**\\n     * @dev Returns the value associated with `key`. O(1).\\n     *\\n     * Requirements:\\n     *\\n     * - `key` must be in the map. Reverts with `errorCode` otherwise.\\n     */\\n    function get(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        uint256 errorCode\\n    ) internal view returns (bytes32) {\\n        uint256 index = map._indexes[key];\\n        _require(index > 0, errorCode);\\n        return unchecked_valueAt(map, index - 1);\\n    }\\n\\n    /**\\n     * @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\\n     * instead.\\n     */\\n    function unchecked_indexOf(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (uint256) {\\n        return map._indexes[key];\\n    }\\n}\\n\",\"keccak256\":\"0x0e7bb50a1095a2a000328ef2243fca7b556ebccfe594f4466d0853f56ed07755\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n    /**\\n     * @dev Converts an unsigned uint256 into a signed int256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be less than or equal to maxInt256.\\n     */\\n    function toInt256(uint256 value) internal pure returns (int256) {\\n        _require(value < 2**255, Errors.SAFE_CAST_VALUE_CANT_FIT_INT256);\\n        return int256(value);\\n    }\\n}\\n\",\"keccak256\":\"0xfefa8c6b6aed0ac9df03ac0c4cce2a94da8d8815bb7f1459fef9f93ada8d316d\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/AssetManagers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./UserBalance.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\nimport \\\"./balances/GeneralPoolsBalance.sol\\\";\\nimport \\\"./balances/MinimalSwapInfoPoolsBalance.sol\\\";\\nimport \\\"./balances/TwoTokenPoolsBalance.sol\\\";\\n\\nabstract contract AssetManagers is\\n    ReentrancyGuard,\\n    GeneralPoolsBalance,\\n    MinimalSwapInfoPoolsBalance,\\n    TwoTokenPoolsBalance\\n{\\n    using Math for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Stores the Asset Manager for each token of each Pool.\\n    mapping(bytes32 => mapping(IERC20 => address)) internal _poolAssetManagers;\\n\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external override nonReentrant whenNotPaused {\\n        // This variable could be declared inside the loop, but that causes the compiler to allocate memory on each\\n        // loop iteration, increasing gas costs.\\n        PoolBalanceOp memory op;\\n\\n        for (uint256 i = 0; i < ops.length; ++i) {\\n            // By indexing the array only once, we don't spend extra gas in the same bounds check.\\n            op = ops[i];\\n\\n            bytes32 poolId = op.poolId;\\n            _ensureRegisteredPool(poolId);\\n\\n            IERC20 token = op.token;\\n            _require(_isTokenRegistered(poolId, token), Errors.TOKEN_NOT_REGISTERED);\\n            _require(_poolAssetManagers[poolId][token] == msg.sender, Errors.SENDER_NOT_ASSET_MANAGER);\\n\\n            PoolBalanceOpKind kind = op.kind;\\n            uint256 amount = op.amount;\\n            (int256 cashDelta, int256 managedDelta) = _performPoolManagementOperation(kind, poolId, token, amount);\\n\\n            emit PoolBalanceManaged(poolId, msg.sender, token, cashDelta, managedDelta);\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs the `kind` Asset Manager operation on a Pool.\\n     *\\n     * Withdrawals will transfer `amount` tokens to the caller, deposits will transfer `amount` tokens from the caller,\\n     * and updates will set the managed balance to `amount`.\\n     *\\n     * Returns a tuple with the 'cash' and 'managed' balance deltas as a result of this call.\\n     */\\n    function _performPoolManagementOperation(\\n        PoolBalanceOpKind kind,\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256, int256) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (kind == PoolBalanceOpKind.WITHDRAW) {\\n            return _withdrawPoolBalance(poolId, specialization, token, amount);\\n        } else if (kind == PoolBalanceOpKind.DEPOSIT) {\\n            return _depositPoolBalance(poolId, specialization, token, amount);\\n        } else {\\n            // PoolBalanceOpKind.UPDATE\\n            return _updateManagedBalance(poolId, specialization, token, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'cash' to 'managed' balance, and transfers them to the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _withdrawPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolCashToManaged(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolCashToManaged(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolCashToManaged(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransfer(msg.sender, amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(-amount);\\n        managedDelta = int256(amount);\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'managed' to 'cash' balance, and transfers them from the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _depositPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolManagedToCash(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolManagedToCash(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolManagedToCash(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransferFrom(msg.sender, address(this), amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(amount);\\n        managedDelta = int256(-amount);\\n    }\\n\\n    /**\\n     * @dev Sets a Pool's 'managed' balance to `amount`.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call (the 'cash' delta will always be zero).\\n     */\\n    function _updateManagedBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            managedDelta = _setTwoTokenPoolManagedBalance(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            managedDelta = _setMinimalSwapInfoPoolManagedBalance(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            managedDelta = _setGeneralPoolManagedBalance(poolId, token, amount);\\n        }\\n\\n        cashDelta = 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered for `poolId`.\\n     */\\n    function _isTokenRegistered(bytes32 poolId, IERC20 token) private view returns (bool) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _isTwoTokenPoolTokenRegistered(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _isMinimalSwapInfoPoolTokenRegistered(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _isGeneralPoolTokenRegistered(poolId, token);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xef8f7cdf851eaf8e97e55d4510739b32722de4de07cf069ddfa76ced2c9cd193\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/AssetTransfersHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/AssetHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/Address.sol\\\";\\n\\nimport \\\"./interfaces/IWETH.sol\\\";\\nimport \\\"./interfaces/IAsset.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\nabstract contract AssetTransfersHandler is AssetHelpers {\\n    using SafeERC20 for IERC20;\\n    using Address for address payable;\\n\\n    /**\\n     * @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\\n     * as possible from Internal Balance, then transfers any remaining amount.\\n     *\\n     * If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * will be wrapped into WETH.\\n     *\\n     * WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\\n     * caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\\n     * typically doesn't hold any).\\n     */\\n    function _receiveAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address sender,\\n        bool fromInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            _require(!fromInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // The ETH amount to receive is deposited into the WETH contract, which will in turn mint WETH for\\n            // the Vault at a 1:1 ratio.\\n\\n            // A check for this condition is also introduced by the compiler, but this one provides a revert reason.\\n            // Note we're checking for the Vault's total balance, *not* ETH sent in this transaction.\\n            _require(address(this).balance >= amount, Errors.INSUFFICIENT_ETH);\\n            _WETH().deposit{ value: amount }();\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n\\n            if (fromInternalBalance) {\\n                // We take as many tokens from Internal Balance as possible: any remaining amounts will be transferred.\\n                uint256 deductedBalance = _decreaseInternalBalance(sender, token, amount, true);\\n                // Because `deductedBalance` will be always the lesser of the current internal balance\\n                // and the amount to decrease, it is safe to perform unchecked arithmetic.\\n                amount -= deductedBalance;\\n            }\\n\\n            if (amount > 0) {\\n                token.safeTransferFrom(sender, address(this), amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\\n     * Balance instead of being transferred.\\n     *\\n     * If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * are instead sent directly after unwrapping WETH.\\n     */\\n    function _sendAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address payable recipient,\\n        bool toInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            // Sending ETH is not as involved as receiving it: the only special behavior is it cannot be\\n            // deposited to Internal Balance.\\n            _require(!toInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // First, the Vault withdraws deposited ETH from the WETH contract, by burning the same amount of WETH\\n            // from the Vault. This receipt will be handled by the Vault's `receive`.\\n            _WETH().withdraw(amount);\\n\\n            // Then, the withdrawn ETH is sent to the recipient.\\n            recipient.sendValue(amount);\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n            if (toInternalBalance) {\\n                _increaseInternalBalance(recipient, token, amount);\\n            } else {\\n                token.safeTransfer(recipient, amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\\n     * if the caller sent less ETH than `amountUsed`.\\n     *\\n     * Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\\n     * Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\\n     * not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\\n     * returned ETH.\\n     */\\n    function _handleRemainingEth(uint256 amountUsed) internal {\\n        _require(msg.value >= amountUsed, Errors.INSUFFICIENT_ETH);\\n\\n        uint256 excess = msg.value - amountUsed;\\n        if (excess > 0) {\\n            msg.sender.sendValue(excess);\\n        }\\n    }\\n\\n    /**\\n     * @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\\n     * caller.\\n     *\\n     * Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\\n     * we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\\n     * ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\\n     * locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\\n     * prevent user error.\\n     */\\n    receive() external payable {\\n        _require(msg.sender == address(_WETH()), Errors.ETH_TRANSFER);\\n    }\\n\\n    // This contract uses virtual internal functions instead of inheriting from the modules that implement them (in\\n    // this case UserBalance) in order to decouple it from the rest of the system and enable standalone testing by\\n    // implementing these with mocks.\\n\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal virtual;\\n\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool capped\\n    ) internal virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x5534195c226355beb7c084ac01ac615920c6f7fbec550dab472827318536c9cb\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/Fees.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./ProtocolFeesCollector.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\n/**\\n * @dev To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the\\n * ProtocolFeesCollector contract.\\n */\\nabstract contract Fees is IVault {\\n    using SafeERC20 for IERC20;\\n\\n    ProtocolFeesCollector private immutable _protocolFeesCollector;\\n\\n    constructor() {\\n        _protocolFeesCollector = new ProtocolFeesCollector(IVault(this));\\n    }\\n\\n    function getProtocolFeesCollector() public view override returns (ProtocolFeesCollector) {\\n        return _protocolFeesCollector;\\n    }\\n\\n    /**\\n     * @dev Returns the protocol swap fee percentage.\\n     */\\n    function _getProtocolSwapFeePercentage() internal view returns (uint256) {\\n        return getProtocolFeesCollector().getSwapFeePercentage();\\n    }\\n\\n    /**\\n     * @dev Returns the protocol fee amount to charge for a flash loan of `amount`.\\n     */\\n    function _calculateFlashLoanFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // Fixed point multiplication introduces error: we round up, which means in certain scenarios the charged\\n        // percentage can be slightly higher than intended.\\n        uint256 percentage = getProtocolFeesCollector().getFlashLoanFeePercentage();\\n        return FixedPoint.mulUp(amount, percentage);\\n    }\\n\\n    function _payFee(IERC20 token, uint256 amount) internal {\\n        if (amount > 0) {\\n            token.safeTransfer(address(getProtocolFeesCollector()), amount);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaed6f3ebf261e68a5093bb6b775d4c6c85eb9c7133aa20e701013f02edc4a6e3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolBalances.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./Fees.sol\\\";\\nimport \\\"./PoolTokens.sol\\\";\\nimport \\\"./UserBalance.sol\\\";\\nimport \\\"./interfaces/IBasePool.sol\\\";\\n\\n/**\\n * @dev Stores the Asset Managers (by Pool and token), and implements the top level Asset Manager and Pool interfaces,\\n * such as registering and deregistering tokens, joining and exiting Pools, and informational functions like `getPool`\\n * and `getPoolTokens`, delegating to specialization-specific functions as needed.\\n *\\n * `managePoolBalance` handles all Asset Manager interactions.\\n */\\nabstract contract PoolBalances is Fees, ReentrancyGuard, PoolTokens, UserBalance {\\n    using Math for uint256;\\n    using SafeERC20 for IERC20;\\n    using BalanceAllocation for bytes32;\\n    using BalanceAllocation for bytes32[];\\n\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable override whenNotPaused {\\n        // This function doesn't have the nonReentrant modifier: it is applied to `_joinOrExit` instead.\\n\\n        // Note that `recipient` is not actually payable in the context of a join - we cast it because we handle both\\n        // joins and exits at once.\\n        _joinOrExit(PoolBalanceChangeKind.JOIN, poolId, sender, payable(recipient), _toPoolBalanceChange(request));\\n    }\\n\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external override {\\n        // This function doesn't have the nonReentrant modifier: it is applied to `_joinOrExit` instead.\\n        _joinOrExit(PoolBalanceChangeKind.EXIT, poolId, sender, recipient, _toPoolBalanceChange(request));\\n    }\\n\\n    // This has the exact same layout as JoinPoolRequest and ExitPoolRequest, except the `maxAmountsIn` and\\n    // `minAmountsOut` are called `limits`. Internally we use this struct for both since these two functions are quite\\n    // similar, but expose the others to callers for clarity.\\n    struct PoolBalanceChange {\\n        IAsset[] assets;\\n        uint256[] limits;\\n        bytes userData;\\n        bool useInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Converts a JoinPoolRequest into a PoolBalanceChange, with no runtime cost.\\n     */\\n    function _toPoolBalanceChange(JoinPoolRequest memory request)\\n        private\\n        pure\\n        returns (PoolBalanceChange memory change)\\n    {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            change := request\\n        }\\n    }\\n\\n    /**\\n     * @dev Converts an ExitPoolRequest into a PoolBalanceChange, with no runtime cost.\\n     */\\n    function _toPoolBalanceChange(ExitPoolRequest memory request)\\n        private\\n        pure\\n        returns (PoolBalanceChange memory change)\\n    {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            change := request\\n        }\\n    }\\n\\n    /**\\n     * @dev Implements both `joinPool` and `exitPool`, based on `kind`.\\n     */\\n    function _joinOrExit(\\n        PoolBalanceChangeKind kind,\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        PoolBalanceChange memory change\\n    ) private nonReentrant withRegisteredPool(poolId) authenticateFor(sender) {\\n        // This function uses a large number of stack variables (poolId, sender and recipient, balances, amounts, fees,\\n        // etc.), which leads to 'stack too deep' issues. It relies on private functions with seemingly arbitrary\\n        // interfaces to work around this limitation.\\n\\n        InputHelpers.ensureInputLengthMatch(change.assets.length, change.limits.length);\\n\\n        // We first check that the caller passed the Pool's registered tokens in the correct order, and retrieve the\\n        // current balance for each.\\n        IERC20[] memory tokens = _translateToIERC20(change.assets);\\n        bytes32[] memory balances = _validateTokensAndGetBalances(poolId, tokens);\\n\\n        // The bulk of the work is done here: the corresponding Pool hook is called, its final balances are computed,\\n        // assets are transferred, and fees are paid.\\n        (\\n            bytes32[] memory finalBalances,\\n            uint256[] memory amountsInOrOut,\\n            uint256[] memory paidProtocolSwapFeeAmounts\\n        ) = _callPoolBalanceChange(kind, poolId, sender, recipient, change, balances);\\n\\n        // All that remains is storing the new Pool balances.\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _setTwoTokenPoolCashBalances(poolId, tokens[0], finalBalances[0], tokens[1], finalBalances[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _setMinimalSwapInfoPoolBalances(poolId, tokens, finalBalances);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _setGeneralPoolBalances(poolId, finalBalances);\\n        }\\n\\n        bool positive = kind == PoolBalanceChangeKind.JOIN; // Amounts in are positive, out are negative\\n        emit PoolBalanceChanged(\\n            poolId,\\n            sender,\\n            tokens,\\n            // We can unsafely cast to int256 because balances are actually stored as uint112\\n            _unsafeCastToInt256(amountsInOrOut, positive),\\n            paidProtocolSwapFeeAmounts\\n        );\\n    }\\n\\n    /**\\n     * @dev Calls the corresponding Pool hook to get the amounts in/out plus protocol fee amounts, and performs the\\n     * associated token transfers and fee payments, returning the Pool's final balances.\\n     */\\n    function _callPoolBalanceChange(\\n        PoolBalanceChangeKind kind,\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances\\n    )\\n        private\\n        returns (\\n            bytes32[] memory finalBalances,\\n            uint256[] memory amountsInOrOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        (uint256[] memory totalBalances, uint256 lastChangeBlock) = balances.totalsAndLastChangeBlock();\\n\\n        IBasePool pool = IBasePool(_getPoolAddress(poolId));\\n        (amountsInOrOut, dueProtocolFeeAmounts) = kind == PoolBalanceChangeKind.JOIN\\n            ? pool.onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                totalBalances,\\n                lastChangeBlock,\\n                _getProtocolSwapFeePercentage(),\\n                change.userData\\n            )\\n            : pool.onExitPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                totalBalances,\\n                lastChangeBlock,\\n                _getProtocolSwapFeePercentage(),\\n                change.userData\\n            );\\n\\n        InputHelpers.ensureInputLengthMatch(balances.length, amountsInOrOut.length, dueProtocolFeeAmounts.length);\\n\\n        // The Vault ignores the `recipient` in joins and the `sender` in exits: it is up to the Pool to keep track of\\n        // their participation.\\n        finalBalances = kind == PoolBalanceChangeKind.JOIN\\n            ? _processJoinPoolTransfers(sender, change, balances, amountsInOrOut, dueProtocolFeeAmounts)\\n            : _processExitPoolTransfers(recipient, change, balances, amountsInOrOut, dueProtocolFeeAmounts);\\n    }\\n\\n    /**\\n     * @dev Transfers `amountsIn` from `sender`, checking that they are within their accepted limits, and pays\\n     * accumulated protocol swap fees.\\n     *\\n     * Returns the Pool's final balances, which are the current balances plus `amountsIn` minus accumulated protocol\\n     * swap fees.\\n     */\\n    function _processJoinPoolTransfers(\\n        address sender,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256[] memory dueProtocolFeeAmounts\\n    ) private returns (bytes32[] memory finalBalances) {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 wrappedEth = 0;\\n\\n        finalBalances = new bytes32[](balances.length);\\n        for (uint256 i = 0; i < change.assets.length; ++i) {\\n            uint256 amountIn = amountsIn[i];\\n            _require(amountIn <= change.limits[i], Errors.JOIN_ABOVE_MAX);\\n\\n            // Receive assets from the sender - possibly from Internal Balance.\\n            IAsset asset = change.assets[i];\\n            _receiveAsset(asset, amountIn, sender, change.useInternalBalance);\\n\\n            if (_isETH(asset)) {\\n                wrappedEth = wrappedEth.add(amountIn);\\n            }\\n\\n            uint256 feeAmount = dueProtocolFeeAmounts[i];\\n            _payFee(_translateToIERC20(asset), feeAmount);\\n\\n            // Compute the new Pool balances. Note that the fee amount might be larger than `amountIn`,\\n            // resulting in an overall decrease of the Pool's balance for a token.\\n            finalBalances[i] = (amountIn >= feeAmount) // This lets us skip checked arithmetic\\n                ? balances[i].increaseCash(amountIn - feeAmount)\\n                : balances[i].decreaseCash(feeAmount - amountIn);\\n        }\\n\\n        // Handle any used and remaining ETH.\\n        _handleRemainingEth(wrappedEth);\\n    }\\n\\n    /**\\n     * @dev Transfers `amountsOut` to `recipient`, checking that they are within their accepted limits, and pays\\n     * accumulated protocol swap fees from the Pool.\\n     *\\n     * Returns the Pool's final balances, which are the current `balances` minus `amountsOut` and fees paid\\n     * (`dueProtocolFeeAmounts`).\\n     */\\n    function _processExitPoolTransfers(\\n        address payable recipient,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256[] memory dueProtocolFeeAmounts\\n    ) private returns (bytes32[] memory finalBalances) {\\n        finalBalances = new bytes32[](balances.length);\\n        for (uint256 i = 0; i < change.assets.length; ++i) {\\n            uint256 amountOut = amountsOut[i];\\n            _require(amountOut >= change.limits[i], Errors.EXIT_BELOW_MIN);\\n\\n            // Send tokens to the recipient - possibly to Internal Balance\\n            IAsset asset = change.assets[i];\\n            _sendAsset(asset, amountOut, recipient, change.useInternalBalance);\\n\\n            uint256 feeAmount = dueProtocolFeeAmounts[i];\\n            _payFee(_translateToIERC20(asset), feeAmount);\\n\\n            // Compute the new Pool balances. A Pool's token balance always decreases after an exit (potentially by 0).\\n            finalBalances[i] = balances[i].decreaseCash(amountOut.add(feeAmount));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for `poolId`'s `expectedTokens`.\\n     *\\n     * `expectedTokens` must exactly equal the token array returned by `getPoolTokens`: both arrays must have the same\\n     * length, elements and order. Additionally, the Pool must have at least one registered token.\\n     */\\n    function _validateTokensAndGetBalances(bytes32 poolId, IERC20[] memory expectedTokens)\\n        private\\n        view\\n        returns (bytes32[] memory)\\n    {\\n        (IERC20[] memory actualTokens, bytes32[] memory balances) = _getPoolTokens(poolId);\\n        InputHelpers.ensureInputLengthMatch(actualTokens.length, expectedTokens.length);\\n        _require(actualTokens.length > 0, Errors.POOL_NO_TOKENS);\\n\\n        for (uint256 i = 0; i < actualTokens.length; ++i) {\\n            _require(actualTokens[i] == expectedTokens[i], Errors.TOKENS_MISMATCH);\\n        }\\n\\n        return balances;\\n    }\\n\\n    /**\\n     * @dev Casts an array of uint256 to int256, setting the sign of the result according to the `positive` flag,\\n     * without checking whether the values fit in the signed 256 bit range.\\n     */\\n    function _unsafeCastToInt256(uint256[] memory values, bool positive)\\n        private\\n        pure\\n        returns (int256[] memory signedValues)\\n    {\\n        signedValues = new int256[](values.length);\\n        for (uint256 i = 0; i < values.length; i++) {\\n            signedValues[i] = positive ? int256(values[i]) : -int256(values[i]);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xe9a33a9311984449a3271bbd0cbf5970cd4c1910179afdaee2a62413ebaf5ba8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\\n * and helper functions for ensuring correct behavior when working with Pools.\\n */\\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\\n    // types.\\n    mapping(bytes32 => bool) private _isPoolRegistered;\\n\\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\\n    uint256 private _nextPoolNonce;\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    modifier withRegisteredPool(bytes32 poolId) {\\n        _ensureRegisteredPool(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    modifier onlyPool(bytes32 poolId) {\\n        _ensurePoolIsSender(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    function _ensurePoolIsSender(bytes32 poolId) private view {\\n        _ensureRegisteredPool(poolId);\\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\\n    }\\n\\n    function registerPool(PoolSpecialization specialization)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        returns (bytes32)\\n    {\\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\\n        // 2**80 Pools, and the nonce will not overflow.\\n\\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\\n\\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\\n        _isPoolRegistered[poolId] = true;\\n\\n        _nextPoolNonce += 1;\\n\\n        emit PoolRegistered(poolId);\\n        return poolId;\\n    }\\n\\n    function getPool(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (address, PoolSpecialization)\\n    {\\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\\n    }\\n\\n    /**\\n     * @dev Creates a Pool ID.\\n     *\\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\\n     *\\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\\n     * unique.\\n     *\\n     * Pool IDs have the following layout:\\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\\n     * MSB                                                                              LSB\\n     *\\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\\n     * suffice. However, there's nothing else of interest to store in this extra space.\\n     */\\n    function _toPoolId(\\n        address pool,\\n        PoolSpecialization specialization,\\n        uint80 nonce\\n    ) internal pure returns (bytes32) {\\n        bytes32 serialized;\\n\\n        serialized |= bytes32(uint256(nonce));\\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\\n\\n        return serialized;\\n    }\\n\\n    /**\\n     * @dev Returns the address of a Pool's contract.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\\n        // since the logical shift already sets the upper bits to zero.\\n        return address(uint256(poolId) >> (12 * 8));\\n    }\\n\\n    /**\\n     * @dev Returns the specialization setting of a Pool.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\\n\\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\\n        // string: we instead perform the check ourselves to help in error diagnosis.\\n\\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\\n        // values 0, 1 and 2.\\n        _require(value < 3, Errors.INVALID_POOL_ID);\\n\\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            specialization := value\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaf06c559c8a964e9b43308003b43cf698bda38d88cc26118b55394017a369327\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolTokens.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./AssetManagers.sol\\\";\\nimport \\\"./PoolRegistry.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\n\\nabstract contract PoolTokens is ReentrancyGuard, PoolRegistry, AssetManagers {\\n    using BalanceAllocation for bytes32;\\n    using BalanceAllocation for bytes32[];\\n\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external override nonReentrant whenNotPaused onlyPool(poolId) {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, assetManagers.length);\\n\\n        // Validates token addresses and assigns Asset Managers\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(token != IERC20(0), Errors.INVALID_TOKEN);\\n\\n            _poolAssetManagers[poolId][token] = assetManagers[i];\\n        }\\n\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\\n            _registerTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _registerMinimalSwapInfoPoolTokens(poolId, tokens);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _registerGeneralPoolTokens(poolId, tokens);\\n        }\\n\\n        emit TokensRegistered(poolId, tokens, assetManagers);\\n    }\\n\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        onlyPool(poolId)\\n    {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\\n            _deregisterTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _deregisterMinimalSwapInfoPoolTokens(poolId, tokens);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _deregisterGeneralPoolTokens(poolId, tokens);\\n        }\\n\\n        // The deregister calls above ensure the total token balance is zero. Therefore it is now safe to remove any\\n        // associated Asset Managers, since they hold no Pool balance.\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            delete _poolAssetManagers[poolId][tokens[i]];\\n        }\\n\\n        emit TokensDeregistered(poolId, tokens);\\n    }\\n\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        )\\n    {\\n        bytes32[] memory rawBalances;\\n        (tokens, rawBalances) = _getPoolTokens(poolId);\\n        (balances, lastChangeBlock) = rawBalances.totalsAndLastChangeBlock();\\n    }\\n\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        )\\n    {\\n        bytes32 balance;\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            balance = _getTwoTokenPoolBalance(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            balance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            balance = _getGeneralPoolBalance(poolId, token);\\n        }\\n\\n        cash = balance.cash();\\n        managed = balance.managed();\\n        lastChangeBlock = balance.lastChangeBlock();\\n        assetManager = _poolAssetManagers[poolId][token];\\n    }\\n\\n    /**\\n     * @dev Returns all of `poolId`'s registered tokens, along with their raw balances.\\n     */\\n    function _getPoolTokens(bytes32 poolId) internal view returns (IERC20[] memory tokens, bytes32[] memory balances) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _getTwoTokenPoolTokens(poolId);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _getMinimalSwapInfoPoolTokens(poolId);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _getGeneralPoolTokens(poolId);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd68fdb5d0d889ebbb8084921492d441792b4eed7164d3ded3cd5f531fe237629\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/UserBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeCast.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./AssetTransfersHandler.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance.\\n *\\n * Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n * transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n * when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n * gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n *\\n * Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n * operations of different kinds, with different senders and recipients, at once.\\n */\\nabstract contract UserBalance is ReentrancyGuard, AssetTransfersHandler, VaultAuthorization {\\n    using Math for uint256;\\n    using SafeCast for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Internal Balance for each token, for each account.\\n    mapping(address => mapping(IERC20 => uint256)) private _internalTokenBalance;\\n\\n    function getInternalBalance(address user, IERC20[] memory tokens)\\n        external\\n        view\\n        override\\n        returns (uint256[] memory balances)\\n    {\\n        balances = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; i++) {\\n            balances[i] = _getInternalBalance(user, tokens[i]);\\n        }\\n    }\\n\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable override nonReentrant {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 ethWrapped = 0;\\n\\n        // Cache for these checks so we only perform them once (if at all).\\n        bool checkedCallerIsRelayer = false;\\n        bool checkedNotPaused = false;\\n\\n        for (uint256 i = 0; i < ops.length; i++) {\\n            UserBalanceOpKind kind;\\n            IAsset asset;\\n            uint256 amount;\\n            address sender;\\n            address payable recipient;\\n\\n            // This destructuring by calling `_validateUserBalanceOp` seems odd, but results in reduced bytecode size.\\n            (kind, asset, amount, sender, recipient, checkedCallerIsRelayer) = _validateUserBalanceOp(\\n                ops[i],\\n                checkedCallerIsRelayer\\n            );\\n\\n            if (kind == UserBalanceOpKind.WITHDRAW_INTERNAL) {\\n                // Internal Balance withdrawals can always be performed by an authorized account.\\n                _withdrawFromInternalBalance(asset, sender, recipient, amount);\\n            } else {\\n                // All other operations are blocked if the contract is paused.\\n\\n                // We cache the result of the pause check and skip it for other operations in this same transaction\\n                // (if any).\\n                if (!checkedNotPaused) {\\n                    _ensureNotPaused();\\n                    checkedNotPaused = true;\\n                }\\n\\n                if (kind == UserBalanceOpKind.DEPOSIT_INTERNAL) {\\n                    _depositToInternalBalance(asset, sender, recipient, amount);\\n\\n                    // Keep track of all ETH wrapped into WETH as part of a deposit.\\n                    if (_isETH(asset)) {\\n                        ethWrapped = ethWrapped.add(amount);\\n                    }\\n                } else {\\n                    // Transfers don't support ETH.\\n                    _require(!_isETH(asset), Errors.CANNOT_USE_ETH_SENTINEL);\\n                    IERC20 token = _asIERC20(asset);\\n\\n                    if (kind == UserBalanceOpKind.TRANSFER_INTERNAL) {\\n                        _transferInternalBalance(token, sender, recipient, amount);\\n                    } else {\\n                        // TRANSFER_EXTERNAL\\n                        _transferToExternalBalance(token, sender, recipient, amount);\\n                    }\\n                }\\n            }\\n        }\\n\\n        // Handle any remaining ETH.\\n        _handleRemainingEth(ethWrapped);\\n    }\\n\\n    function _depositToInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        _increaseInternalBalance(recipient, _translateToIERC20(asset), amount);\\n        _receiveAsset(asset, amount, sender, false);\\n    }\\n\\n    function _withdrawFromInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address payable recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, _translateToIERC20(asset), amount, false);\\n        _sendAsset(asset, amount, recipient, false);\\n    }\\n\\n    function _transferInternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, token, amount, false);\\n        _increaseInternalBalance(recipient, token, amount);\\n    }\\n\\n    function _transferToExternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        if (amount > 0) {\\n            token.safeTransferFrom(sender, recipient, amount);\\n            emit ExternalBalanceTransfer(token, sender, recipient, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Increases `account`'s Internal Balance for `token` by `amount`.\\n     */\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal override {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        uint256 newBalance = currentBalance.add(amount);\\n        _setInternalBalance(account, token, newBalance, amount.toInt256());\\n    }\\n\\n    /**\\n     * @dev Decreases `account`'s Internal Balance for `token` by `amount`. If `allowPartial` is true, this function\\n     * doesn't revert if `account` doesn't have enough balance, and sets it to zero and returns the deducted amount\\n     * instead.\\n     */\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool allowPartial\\n    ) internal override returns (uint256 deducted) {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        _require(allowPartial || (currentBalance >= amount), Errors.INSUFFICIENT_INTERNAL_BALANCE);\\n\\n        deducted = Math.min(currentBalance, amount);\\n        // By construction, `deducted` is lower or equal to `currentBalance`, so we don't need to use checked\\n        // arithmetic.\\n        uint256 newBalance = currentBalance - deducted;\\n        _setInternalBalance(account, token, newBalance, -(deducted.toInt256()));\\n    }\\n\\n    /**\\n     * @dev Sets `account`'s Internal Balance for `token` to `newBalance`.\\n     *\\n     * Emits an `InternalBalanceChanged` event. This event includes `delta`, which is the amount the balance increased\\n     * (if positive) or decreased (if negative). To avoid reading the current balance in order to compute the delta,\\n     * this function relies on the caller providing it directly.\\n     */\\n    function _setInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 newBalance,\\n        int256 delta\\n    ) private {\\n        _internalTokenBalance[account][token] = newBalance;\\n        emit InternalBalanceChanged(account, token, delta);\\n    }\\n\\n    /**\\n     * @dev Returns `account`'s Internal Balance for `token`.\\n     */\\n    function _getInternalBalance(address account, IERC20 token) internal view returns (uint256) {\\n        return _internalTokenBalance[account][token];\\n    }\\n\\n    /**\\n     * @dev Destructures a User Balance operation, validating that the contract caller is allowed to perform it.\\n     */\\n    function _validateUserBalanceOp(UserBalanceOp memory op, bool checkedCallerIsRelayer)\\n        private\\n        view\\n        returns (\\n            UserBalanceOpKind,\\n            IAsset,\\n            uint256,\\n            address,\\n            address payable,\\n            bool\\n        )\\n    {\\n        // The only argument we need to validate is `sender`, which can only be either the contract caller, or a\\n        // relayer approved by `sender`.\\n        address sender = op.sender;\\n\\n        if (sender != msg.sender) {\\n            // We need to check both that the contract caller is a relayer, and that `sender` approved them.\\n\\n            // Because the relayer check is global (i.e. independent of `sender`), we cache that result and skip it for\\n            // other operations in this same transaction (if any).\\n            if (!checkedCallerIsRelayer) {\\n                _authenticateCaller();\\n                checkedCallerIsRelayer = true;\\n            }\\n\\n            _require(_hasApprovedRelayer(sender, msg.sender), Errors.USER_DOESNT_ALLOW_RELAYER);\\n        }\\n\\n        return (op.kind, op.asset, op.amount, sender, op.recipient, checkedCallerIsRelayer);\\n    }\\n}\\n\",\"keccak256\":\"0x4412e4e084ff3be5b80f421a9fdbc72de7e2fc17a054609f40c32c32fdcaefbd\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/GeneralPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableMap.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\n\\nabstract contract GeneralPoolsBalance {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\\n\\n    // Data for Pools with the General specialization setting\\n    //\\n    // These Pools use the IGeneralPool interface, which means the Vault must query the balance for *all* of their\\n    // tokens in every swap. If we kept a mapping of token to balance plus a set (array) of tokens, it'd be very gas\\n    // intensive to read all token addresses just to then do a lookup on the balance mapping.\\n    //\\n    // Instead, we use our customized EnumerableMap, which lets us read the N balances in N+1 storage accesses (one for\\n    // each token in the Pool), access the index of any 'token in' a single read (required for the IGeneralPool call),\\n    // and update an entry's value given its index.\\n\\n    // Map of token -> balance pairs for each Pool with this specialization. Many functions rely on storage pointers to\\n    // a Pool's EnumerableMap to save gas when computing storage slots.\\n    mapping(bytes32 => EnumerableMap.IERC20ToBytes32Map) internal _generalPoolsBalances;\\n\\n    /**\\n     * @dev Registers a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // EnumerableMaps require an explicit initial value when creating a key-value pair: we use zero, the same\\n            // value that is found in uninitialized storage, which corresponds to an empty balance.\\n            bool added = poolBalances.set(tokens[i], 0);\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n            _require(currentBalance.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // We don't need to check remove's return value, since _getGeneralPoolBalance already checks that the token\\n            // was registered.\\n            poolBalances.remove(token);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a General Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setGeneralPoolBalances(bytes32 poolId, bytes32[] memory balances) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < balances.length; ++i) {\\n            // Since we assume all balances are properly ordered, we can simply use `unchecked_setAt` to avoid one less\\n            // storage read per token.\\n            poolBalances.unchecked_setAt(i, balances[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a General Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setGeneralPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateGeneralPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a General Pool to the result of the `mutation` function when called with the\\n     * current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateGeneralPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        poolBalances.set(token, newBalance);\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a General Pool. The order may change when tokens are\\n     * registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _getGeneralPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        tokens = new IERC20[](poolBalances.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableMap's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            (tokens[i], balances[i]) = poolBalances.unchecked_at(i);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getGeneralPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return _getGeneralPoolBalance(poolBalances, token);\\n    }\\n\\n    /**\\n     * @dev Same as `_getGeneralPoolBalance` but using a Pool's storage pointer, which saves gas in repeated reads and\\n     * writes.\\n     */\\n    function _getGeneralPoolBalance(EnumerableMap.IERC20ToBytes32Map storage poolBalances, IERC20 token)\\n        private\\n        view\\n        returns (bytes32)\\n    {\\n        return poolBalances.get(token, Errors.TOKEN_NOT_REGISTERED);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _isGeneralPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return poolBalances.contains(token);\\n    }\\n}\\n\",\"keccak256\":\"0x534135bd6edee54ffaa785ff26916a2471211c55e718aba84e41961823edfc0c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableSet.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract MinimalSwapInfoPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n\\n    // Data for Pools with the Minimal Swap Info specialization setting\\n    //\\n    // These Pools use the IMinimalSwapInfoPool interface, and so the Vault must read the balance of the two tokens\\n    // in the swap. The best solution is to use a mapping from token to balance, which lets us read or write any token's\\n    // balance in a single storage access.\\n    //\\n    // We also keep a set of registered tokens. Because tokens with non-zero balance are by definition registered, in\\n    // some balance getters we skip checking for token registration if a non-zero balance is found, saving gas by\\n    // performing a single read instead of two.\\n\\n    mapping(bytes32 => mapping(IERC20 => bytes32)) internal _minimalSwapInfoPoolsBalances;\\n    mapping(bytes32 => EnumerableSet.AddressSet) internal _minimalSwapInfoPoolsTokens;\\n\\n    /**\\n     * @dev Registers a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            bool added = poolTokens.add(address(tokens[i]));\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n            // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n            // balance.\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(_minimalSwapInfoPoolsBalances[poolId][token].isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // For consistency with other Pool specialization settings, we explicitly reset the balance (which may have\\n            // a non-zero last change block).\\n            delete _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n            bool removed = poolTokens.remove(address(token));\\n            _require(removed, Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a Minimal Swap Info Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setMinimalSwapInfoPoolBalances(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        bytes32[] memory balances\\n    ) internal {\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            _minimalSwapInfoPoolsBalances[poolId][tokens[i]] = balances[i];\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Minimal Swap Info Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setMinimalSwapInfoPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Minimal Swap Info Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateMinimalSwapInfoPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        bytes32 currentBalance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        _minimalSwapInfoPoolsBalances[poolId][token] = newBalance;\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a Minimal Swap Info Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _getMinimalSwapInfoPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        tokens = new IERC20[](poolTokens.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableSet's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            IERC20 token = IERC20(poolTokens.unchecked_at(i));\\n            tokens[i] = token;\\n            balances[i] = _minimalSwapInfoPoolsBalances[poolId][token];\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Minimal Swap Info Pool.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getMinimalSwapInfoPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        bytes32 balance = _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n        // A non-zero balance guarantees that the token is registered. If zero, we manually check if the token is\\n        // registered in the Pool. Token registration implies that the Pool is registered as well, which lets us save\\n        // gas by not performing the check.\\n        bool tokenRegistered = balance.isNotZero() || _minimalSwapInfoPoolsTokens[poolId].contains(address(token));\\n\\n        if (!tokenRegistered) {\\n            // The token might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        return balance;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _isMinimalSwapInfoPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        return poolTokens.contains(address(token));\\n    }\\n}\\n\",\"keccak256\":\"0x4b002c25bd067d9e1272df67271a0993be4f7f92cae0a0871abc2d52272b10df\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract TwoTokenPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n\\n    // Data for Pools with the Two Token specialization setting\\n    //\\n    // These are similar to the Minimal Swap Info Pool case (because the Pool only has two tokens, and therefore there\\n    // are only two balances to read), but there's a key difference in how data is stored. Keeping a set makes little\\n    // sense, as it will only ever hold two tokens, so we can just store those two directly.\\n    //\\n    // The gas savings associated with using these Pools come from how token balances are stored: cash amounts for token\\n    // A and token B are packed together, as are managed amounts. Because only cash changes in a swap, there's no need\\n    // to write to this second storage slot. A single last change block number for both tokens is stored with the packed\\n    // cash fields.\\n\\n    struct TwoTokenPoolBalances {\\n        bytes32 sharedCash;\\n        bytes32 sharedManaged;\\n    }\\n\\n    // We could just keep a mapping from Pool ID to TwoTokenSharedBalances, but there's an issue: we wouldn't know to\\n    // which tokens those balances correspond. This would mean having to also check which are registered with the Pool.\\n    //\\n    // What we do instead to save those storage reads is keep a nested mapping from the token pair hash to the balances\\n    // struct. The Pool only has two tokens, so only a single entry of this mapping is set (the one that corresponds to\\n    // that pair's hash).\\n    //\\n    // This has the trade-off of making Vault code that interacts with these Pools cumbersome: both balances must be\\n    // accessed at the same time by using both token addresses, and some logic is needed to determine how the pair hash\\n    // is computed. We do this by sorting the tokens, calling the token with the lowest numerical address value token A,\\n    // and the other one token B. In functions where the token arguments could be either A or B, we use X and Y instead.\\n    //\\n    // If users query a token pair containing an unregistered token, the Pool will generate a hash for a mapping entry\\n    // that was not set, and return zero balances. Non-zero balances are only possible if both tokens in the pair\\n    // are registered with the Pool, which means we don't have to check the TwoTokenPoolTokens struct, and can save\\n    // storage reads.\\n\\n    struct TwoTokenPoolTokens {\\n        IERC20 tokenA;\\n        IERC20 tokenB;\\n        mapping(bytes32 => TwoTokenPoolBalances) balances;\\n    }\\n\\n    mapping(bytes32 => TwoTokenPoolTokens) private _twoTokenPoolTokens;\\n\\n    /**\\n     * @dev Registers tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must not be the same\\n     * - The tokens must be ordered: tokenX < tokenY\\n     */\\n    function _registerTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        // Not technically true since we didn't register yet, but this is consistent with the error messages of other\\n        // specialization settings.\\n        _require(tokenX != tokenY, Errors.TOKEN_ALREADY_REGISTERED);\\n\\n        _require(tokenX < tokenY, Errors.UNSORTED_TOKENS);\\n\\n        // A Two Token Pool with no registered tokens is identified by having zero addresses for tokens A and B.\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        _require(poolTokens.tokenA == IERC20(0) && poolTokens.tokenB == IERC20(0), Errors.TOKENS_ALREADY_SET);\\n\\n        // Since tokenX < tokenY, tokenX is A and tokenY is B\\n        poolTokens.tokenA = tokenX;\\n        poolTokens.tokenB = tokenY;\\n\\n        // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n        // balance.\\n    }\\n\\n    /**\\n     * @dev Deregisters tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     * - both tokens must have zero balance in the Vault\\n     */\\n    function _deregisterTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        ) = _getTwoTokenPoolSharedBalances(poolId, tokenX, tokenY);\\n\\n        _require(balanceA.isZero() && balanceB.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n        delete _twoTokenPoolTokens[poolId];\\n\\n        // For consistency with other Pool specialization settings, we explicitly reset the packed cash field (which may\\n        // have a non-zero last change block).\\n        delete poolBalances.sharedCash;\\n    }\\n\\n    /**\\n     * @dev Sets the cash balances of a Two Token Pool's tokens.\\n     *\\n     * WARNING: this assumes `tokenA` and `tokenB` are the Pool's two registered tokens, and are in the correct order.\\n     */\\n    function _setTwoTokenPoolCashBalances(\\n        bytes32 poolId,\\n        IERC20 tokenA,\\n        bytes32 balanceA,\\n        IERC20 tokenB,\\n        bytes32 balanceB\\n    ) internal {\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        TwoTokenPoolBalances storage poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n        poolBalances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Two Token Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setTwoTokenPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Two Token Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateTwoTokenPoolSharedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        (\\n            TwoTokenPoolBalances storage balances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            ,\\n            bytes32 balanceB\\n        ) = _getTwoTokenPoolBalances(poolId);\\n\\n        int256 delta;\\n        if (token == tokenA) {\\n            bytes32 newBalance = mutation(balanceA, amount);\\n            delta = newBalance.managedDelta(balanceA);\\n            balanceA = newBalance;\\n        } else {\\n            // token == tokenB\\n            bytes32 newBalance = mutation(balanceB, amount);\\n            delta = newBalance.managedDelta(balanceB);\\n            balanceB = newBalance;\\n        }\\n\\n        balances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n        balances.sharedManaged = BalanceAllocation.toSharedManaged(balanceA, balanceB);\\n\\n        return delta;\\n    }\\n\\n    /*\\n     * @dev Returns an array with all the tokens and balances in a Two Token Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _getTwoTokenPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        // Both tokens will either be zero (if unregistered) or non-zero (if registered), but we keep the full check for\\n        // clarity.\\n        if (tokenA == IERC20(0) || tokenB == IERC20(0)) {\\n            return (new IERC20[](0), new bytes32[](0));\\n        }\\n\\n        // Note that functions relying on this getter expect tokens to be properly ordered, so we use the (A, B)\\n        // ordering.\\n\\n        tokens = new IERC20[](2);\\n        tokens[0] = tokenA;\\n        tokens[1] = tokenB;\\n\\n        balances = new bytes32[](2);\\n        balances[0] = balanceA;\\n        balances[1] = balanceB;\\n    }\\n\\n    /**\\n     * @dev Same as `_getTwoTokenPoolTokens`, except it returns the two tokens and balances directly instead of using\\n     * an array, as well as a storage pointer to the `TwoTokenPoolBalances` struct, which can be used to update it\\n     * without having to recompute the pair hash and storage slot.\\n     */\\n    function _getTwoTokenPoolBalances(bytes32 poolId)\\n        private\\n        view\\n        returns (\\n            TwoTokenPoolBalances storage poolBalances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            IERC20 tokenB,\\n            bytes32 balanceB\\n        )\\n    {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        tokenA = poolTokens.tokenA;\\n        tokenB = poolTokens.tokenB;\\n\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        poolBalances = poolTokens.balances[pairHash];\\n\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * This function is convenient but not particularly gas efficient, and should be avoided during gas-sensitive\\n     * operations, such as swaps. For those, _getTwoTokenPoolSharedBalances provides a more flexible interface.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        // We can't just read the balance of token, because we need to know the full pair in order to compute the pair\\n        // hash and access the balance mapping. We therefore rely on `_getTwoTokenPoolBalances`.\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        if (token == tokenA) {\\n            return balanceA;\\n        } else if (token == tokenB) {\\n            return balanceB;\\n        } else {\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of the two tokens in a Two Token Pool.\\n     *\\n     * The returned balances are those of token A and token B, where token A is the lowest of token X and token Y, and\\n     * token B the other.\\n     *\\n     * This function also returns a storage pointer to the TwoTokenPoolBalances struct associated with the token pair,\\n     * which can be used to update it without having to recompute the pair hash and storage slot.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolSharedBalances(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    )\\n        internal\\n        view\\n        returns (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        )\\n    {\\n        (IERC20 tokenA, IERC20 tokenB) = _sortTwoTokens(tokenX, tokenY);\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n\\n        poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n\\n        // Because we're reading balances using the pair hash, if either token X or token Y is not registered then\\n        // *both* balance entries will be zero.\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        // A non-zero balance guarantees that both tokens are registered. If zero, we manually check whether each\\n        // token is registered in the Pool. Token registration implies that the Pool is registered as well, which\\n        // lets us save gas by not performing the check.\\n        bool tokensRegistered = sharedCash.isNotZero() ||\\n            sharedManaged.isNotZero() ||\\n            (_isTwoTokenPoolTokenRegistered(poolId, tokenA) && _isTwoTokenPoolTokenRegistered(poolId, tokenB));\\n\\n        if (!tokensRegistered) {\\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _isTwoTokenPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n\\n        // The zero address can never be a registered token.\\n        return (token == poolTokens.tokenA || token == poolTokens.tokenB) && token != IERC20(0);\\n    }\\n\\n    /**\\n     * @dev Returns the hash associated with a given token pair.\\n     */\\n    function _getTwoTokenPairHash(IERC20 tokenA, IERC20 tokenB) private pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(tokenA, tokenB));\\n    }\\n\\n    /**\\n     * @dev Sorts two tokens in ascending order, returning them as a (tokenA, tokenB) tuple.\\n     */\\n    function _sortTwoTokens(IERC20 tokenX, IERC20 tokenY) private pure returns (IERC20, IERC20) {\\n        return tokenX < tokenY ? (tokenX, tokenY) : (tokenY, tokenX);\\n    }\\n}\\n\",\"keccak256\":\"0x2cd5a8f9bee0addefa4e63cb7380f9b133d2e482807603fed931d42e3e1f40f4\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 19073,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_generalPoolsBalances",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "2",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_paused",
                "offset": 0,
                "slot": "3",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_authorizer",
                "offset": 1,
                "slot": "3",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 15355,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_isPoolRegistered",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_bytes32,t_bool)"
              },
              {
                "astId": 15357,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_nextPoolNonce",
                "offset": 0,
                "slot": "6",
                "type": "t_uint256"
              },
              {
                "astId": 19489,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_minimalSwapInfoPoolsBalances",
                "offset": 0,
                "slot": "7",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))"
              },
              {
                "astId": 19493,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_minimalSwapInfoPoolsTokens",
                "offset": 0,
                "slot": "8",
                "type": "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)"
              },
              {
                "astId": 19947,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_twoTokenPoolTokens",
                "offset": 0,
                "slot": "9",
                "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)"
              },
              {
                "astId": 13417,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_poolAssetManagers",
                "offset": 0,
                "slot": "10",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))"
              },
              {
                "astId": 17602,
                "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                "label": "_internalTokenBalance",
                "offset": 0,
                "slot": "11",
                "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)5095,t_uint256))"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_array(t_address)dyn_storage": {
                "base": "t_address",
                "encoding": "dynamic_array",
                "label": "address[]",
                "numberOfBytes": "32"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_mapping(t_contract(IERC20)5095,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(contract IERC20 => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_bool)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => address))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_address)"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => bytes32))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_bytes32)"
              },
              "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)",
                "numberOfBytes": "32",
                "value": "t_struct(AddressSet)4822_storage"
              },
              "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32Map)4479_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolBalances)19934_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolTokens)19943_storage"
              },
              "t_mapping(t_contract(IERC20)5095,t_address)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => address)",
                "numberOfBytes": "32",
                "value": "t_address"
              },
              "t_mapping(t_contract(IERC20)5095,t_bytes32)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => bytes32)",
                "numberOfBytes": "32",
                "value": "t_bytes32"
              },
              "t_mapping(t_contract(IERC20)5095,t_uint256)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)": {
                "encoding": "mapping",
                "key": "t_uint256",
                "label": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32MapEntry)4468_storage"
              },
              "t_struct(AddressSet)4822_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableSet.AddressSet",
                "members": [
                  {
                    "astId": 4817,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "_values",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_array(t_address)dyn_storage"
                  },
                  {
                    "astId": 4821,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_address,t_uint256)"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(IERC20ToBytes32Map)4479_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32Map",
                "members": [
                  {
                    "astId": 4470,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "_length",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_uint256"
                  },
                  {
                    "astId": 4474,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "_entries",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)"
                  },
                  {
                    "astId": 4478,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_contract(IERC20)5095,t_uint256)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_struct(IERC20ToBytes32MapEntry)4468_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32MapEntry",
                "members": [
                  {
                    "astId": 4465,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "_key",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 4467,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "_value",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolBalances)19934_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances",
                "members": [
                  {
                    "astId": 19931,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "sharedCash",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_bytes32"
                  },
                  {
                    "astId": 19933,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "sharedManaged",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolTokens)19943_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens",
                "members": [
                  {
                    "astId": 19936,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "tokenA",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19938,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "tokenB",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19942,
                    "contract": "src.sol/amm/vault/PoolBalances.sol:PoolBalances",
                    "label": "balances",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/PoolRegistry.sol": {
        "PoolRegistry": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers and helper functions for ensuring correct behavior when working with Pools.",
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers and helper functions for ensuring correct behavior when working with Pools.\",\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/PoolRegistry.sol\":\"PoolRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/PoolRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\\n * and helper functions for ensuring correct behavior when working with Pools.\\n */\\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\\n    // types.\\n    mapping(bytes32 => bool) private _isPoolRegistered;\\n\\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\\n    uint256 private _nextPoolNonce;\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    modifier withRegisteredPool(bytes32 poolId) {\\n        _ensureRegisteredPool(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    modifier onlyPool(bytes32 poolId) {\\n        _ensurePoolIsSender(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    function _ensurePoolIsSender(bytes32 poolId) private view {\\n        _ensureRegisteredPool(poolId);\\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\\n    }\\n\\n    function registerPool(PoolSpecialization specialization)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        returns (bytes32)\\n    {\\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\\n        // 2**80 Pools, and the nonce will not overflow.\\n\\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\\n\\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\\n        _isPoolRegistered[poolId] = true;\\n\\n        _nextPoolNonce += 1;\\n\\n        emit PoolRegistered(poolId);\\n        return poolId;\\n    }\\n\\n    function getPool(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (address, PoolSpecialization)\\n    {\\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\\n    }\\n\\n    /**\\n     * @dev Creates a Pool ID.\\n     *\\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\\n     *\\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\\n     * unique.\\n     *\\n     * Pool IDs have the following layout:\\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\\n     * MSB                                                                              LSB\\n     *\\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\\n     * suffice. However, there's nothing else of interest to store in this extra space.\\n     */\\n    function _toPoolId(\\n        address pool,\\n        PoolSpecialization specialization,\\n        uint80 nonce\\n    ) internal pure returns (bytes32) {\\n        bytes32 serialized;\\n\\n        serialized |= bytes32(uint256(nonce));\\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\\n\\n        return serialized;\\n    }\\n\\n    /**\\n     * @dev Returns the address of a Pool's contract.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\\n        // since the logical shift already sets the upper bits to zero.\\n        return address(uint256(poolId) >> (12 * 8));\\n    }\\n\\n    /**\\n     * @dev Returns the specialization setting of a Pool.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\\n\\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\\n        // string: we instead perform the check ourselves to help in error diagnosis.\\n\\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\\n        // values 0, 1 and 2.\\n        _require(value < 3, Errors.INVALID_POOL_ID);\\n\\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            specialization := value\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaf06c559c8a964e9b43308003b43cf698bda38d88cc26118b55394017a369327\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/PoolRegistry.sol:PoolRegistry",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/PoolRegistry.sol:PoolRegistry",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/PoolRegistry.sol:PoolRegistry",
                "label": "_paused",
                "offset": 0,
                "slot": "2",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/PoolRegistry.sol:PoolRegistry",
                "label": "_authorizer",
                "offset": 1,
                "slot": "2",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/PoolRegistry.sol:PoolRegistry",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "3",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 15355,
                "contract": "src.sol/amm/vault/PoolRegistry.sol:PoolRegistry",
                "label": "_isPoolRegistered",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_bytes32,t_bool)"
              },
              {
                "astId": 15357,
                "contract": "src.sol/amm/vault/PoolRegistry.sol:PoolRegistry",
                "label": "_nextPoolNonce",
                "offset": 0,
                "slot": "5",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_bool)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/PoolTokens.sol": {
        "PoolTokens": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/PoolTokens.sol\":\"PoolTokens\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\\n    }\\n}\\n\",\"keccak256\":\"0x5f83465783b239828f83c626bae1ac944cfff074c8919c245d14b208bcf317d5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n// Based on the EnumerableMap library from OpenZeppelin contracts, altered to include the following:\\n//  * a map from IERC20 to bytes32\\n//  * entries are stored in mappings instead of arrays, reducing implicit storage reads for out-of-bounds checks\\n//  * unchecked_at and unchecked_valueAt, which allow for more gas efficient data reads in some scenarios\\n//  * unchecked_indexOf and unchecked_setAt, which allow for more gas efficient data writes in some scenarios\\n//\\n// Additionally, the base private functions that work on bytes32 were removed and replaced with a native implementation\\n// for IERC20 keys, to reduce bytecode size and runtime costs.\\n\\n// We're using non-standard casing for the unchecked functions to differentiate them, so we need to turn off that rule\\n// solhint-disable func-name-mixedcase\\n\\nimport \\\"./IERC20.sol\\\";\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n *     // Declare a set state variable\\n *     EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n */\\nlibrary EnumerableMap {\\n    // The original OpenZeppelin implementation uses a generic Map type with bytes32 keys: this was replaced with\\n    // IERC20ToBytes32Map, which uses IERC20 keys natively, resulting in more dense bytecode.\\n\\n    struct IERC20ToBytes32MapEntry {\\n        IERC20 _key;\\n        bytes32 _value;\\n    }\\n\\n    struct IERC20ToBytes32Map {\\n        // Number of entries in the map\\n        uint256 _length;\\n        // Storage of map keys and values\\n        mapping(uint256 => IERC20ToBytes32MapEntry) _entries;\\n        // Position of the entry defined by a key in the `entries` array, plus 1\\n        // because index 0 means a key is not in the map.\\n        mapping(IERC20 => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\\n     * key. O(1).\\n     *\\n     * Returns true if the key was added to the map, that is if it was not\\n     * already present.\\n     */\\n    function set(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        bytes32 value\\n    ) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to !contains(map, key)\\n        if (keyIndex == 0) {\\n            uint256 previousLength = map._length;\\n            map._entries[previousLength] = IERC20ToBytes32MapEntry({ _key: key, _value: value });\\n            map._length = previousLength + 1;\\n\\n            // The entry is stored at previousLength, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            map._indexes[key] = previousLength + 1;\\n            return true;\\n        } else {\\n            map._entries[keyIndex - 1]._value = value;\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\\n     * {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\\n     *\\n     * This function performs one less storage read than {set}, but it should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_setAt(\\n        IERC20ToBytes32Map storage map,\\n        uint256 index,\\n        bytes32 value\\n    ) internal {\\n        map._entries[index]._value = value;\\n    }\\n\\n    /**\\n     * @dev Removes a key-value pair from a map. O(1).\\n     *\\n     * Returns true if the key was removed from the map, that is if it was present.\\n     */\\n    function remove(IERC20ToBytes32Map storage map, IERC20 key) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to contains(map, key)\\n        if (keyIndex != 0) {\\n            // To delete a key-value pair from the _entries pseudo-array in O(1), we swap the entry to delete with the\\n            // one at the highest index, and then remove this last entry (sometimes called as 'swap and pop').\\n            // This modifies the order of the pseudo-array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = keyIndex - 1;\\n            uint256 lastIndex = map._length - 1;\\n\\n            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            IERC20ToBytes32MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n            // Move the last entry to the index where the entry to delete is\\n            map._entries[toDeleteIndex] = lastEntry;\\n            // Update the index for the moved entry\\n            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved entry was stored\\n            delete map._entries[lastIndex];\\n            map._length = lastIndex;\\n\\n            // Delete the index for the deleted slot\\n            delete map._indexes[key];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the key is in the map. O(1).\\n     */\\n    function contains(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (bool) {\\n        return map._indexes[key] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of key-value pairs in the map. O(1).\\n     */\\n    function length(IERC20ToBytes32Map storage map) internal view returns (uint256) {\\n        return map._length;\\n    }\\n\\n    /**\\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of entries inside the\\n     * array, and it may change when more entries are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        _require(map._length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(map, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        IERC20ToBytes32MapEntry storage entry = map._entries[index];\\n        return (entry._key, entry._value);\\n    }\\n\\n    /**\\n     * @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\\n     * read). O(1).\\n     */\\n    function unchecked_valueAt(IERC20ToBytes32Map storage map, uint256 index) internal view returns (bytes32) {\\n        return map._entries[index]._value;\\n    }\\n\\n    /**\\n     * @dev Returns the value associated with `key`. O(1).\\n     *\\n     * Requirements:\\n     *\\n     * - `key` must be in the map. Reverts with `errorCode` otherwise.\\n     */\\n    function get(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        uint256 errorCode\\n    ) internal view returns (bytes32) {\\n        uint256 index = map._indexes[key];\\n        _require(index > 0, errorCode);\\n        return unchecked_valueAt(map, index - 1);\\n    }\\n\\n    /**\\n     * @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\\n     * instead.\\n     */\\n    function unchecked_indexOf(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (uint256) {\\n        return map._indexes[key];\\n    }\\n}\\n\",\"keccak256\":\"0x0e7bb50a1095a2a000328ef2243fca7b556ebccfe594f4466d0853f56ed07755\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n    /**\\n     * @dev Converts an unsigned uint256 into a signed int256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be less than or equal to maxInt256.\\n     */\\n    function toInt256(uint256 value) internal pure returns (int256) {\\n        _require(value < 2**255, Errors.SAFE_CAST_VALUE_CANT_FIT_INT256);\\n        return int256(value);\\n    }\\n}\\n\",\"keccak256\":\"0xfefa8c6b6aed0ac9df03ac0c4cce2a94da8d8815bb7f1459fef9f93ada8d316d\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/AssetManagers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./UserBalance.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\nimport \\\"./balances/GeneralPoolsBalance.sol\\\";\\nimport \\\"./balances/MinimalSwapInfoPoolsBalance.sol\\\";\\nimport \\\"./balances/TwoTokenPoolsBalance.sol\\\";\\n\\nabstract contract AssetManagers is\\n    ReentrancyGuard,\\n    GeneralPoolsBalance,\\n    MinimalSwapInfoPoolsBalance,\\n    TwoTokenPoolsBalance\\n{\\n    using Math for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Stores the Asset Manager for each token of each Pool.\\n    mapping(bytes32 => mapping(IERC20 => address)) internal _poolAssetManagers;\\n\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external override nonReentrant whenNotPaused {\\n        // This variable could be declared inside the loop, but that causes the compiler to allocate memory on each\\n        // loop iteration, increasing gas costs.\\n        PoolBalanceOp memory op;\\n\\n        for (uint256 i = 0; i < ops.length; ++i) {\\n            // By indexing the array only once, we don't spend extra gas in the same bounds check.\\n            op = ops[i];\\n\\n            bytes32 poolId = op.poolId;\\n            _ensureRegisteredPool(poolId);\\n\\n            IERC20 token = op.token;\\n            _require(_isTokenRegistered(poolId, token), Errors.TOKEN_NOT_REGISTERED);\\n            _require(_poolAssetManagers[poolId][token] == msg.sender, Errors.SENDER_NOT_ASSET_MANAGER);\\n\\n            PoolBalanceOpKind kind = op.kind;\\n            uint256 amount = op.amount;\\n            (int256 cashDelta, int256 managedDelta) = _performPoolManagementOperation(kind, poolId, token, amount);\\n\\n            emit PoolBalanceManaged(poolId, msg.sender, token, cashDelta, managedDelta);\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs the `kind` Asset Manager operation on a Pool.\\n     *\\n     * Withdrawals will transfer `amount` tokens to the caller, deposits will transfer `amount` tokens from the caller,\\n     * and updates will set the managed balance to `amount`.\\n     *\\n     * Returns a tuple with the 'cash' and 'managed' balance deltas as a result of this call.\\n     */\\n    function _performPoolManagementOperation(\\n        PoolBalanceOpKind kind,\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256, int256) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (kind == PoolBalanceOpKind.WITHDRAW) {\\n            return _withdrawPoolBalance(poolId, specialization, token, amount);\\n        } else if (kind == PoolBalanceOpKind.DEPOSIT) {\\n            return _depositPoolBalance(poolId, specialization, token, amount);\\n        } else {\\n            // PoolBalanceOpKind.UPDATE\\n            return _updateManagedBalance(poolId, specialization, token, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'cash' to 'managed' balance, and transfers them to the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _withdrawPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolCashToManaged(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolCashToManaged(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolCashToManaged(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransfer(msg.sender, amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(-amount);\\n        managedDelta = int256(amount);\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'managed' to 'cash' balance, and transfers them from the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _depositPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolManagedToCash(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolManagedToCash(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolManagedToCash(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransferFrom(msg.sender, address(this), amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(amount);\\n        managedDelta = int256(-amount);\\n    }\\n\\n    /**\\n     * @dev Sets a Pool's 'managed' balance to `amount`.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call (the 'cash' delta will always be zero).\\n     */\\n    function _updateManagedBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            managedDelta = _setTwoTokenPoolManagedBalance(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            managedDelta = _setMinimalSwapInfoPoolManagedBalance(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            managedDelta = _setGeneralPoolManagedBalance(poolId, token, amount);\\n        }\\n\\n        cashDelta = 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered for `poolId`.\\n     */\\n    function _isTokenRegistered(bytes32 poolId, IERC20 token) private view returns (bool) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _isTwoTokenPoolTokenRegistered(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _isMinimalSwapInfoPoolTokenRegistered(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _isGeneralPoolTokenRegistered(poolId, token);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xef8f7cdf851eaf8e97e55d4510739b32722de4de07cf069ddfa76ced2c9cd193\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/AssetTransfersHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/AssetHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/Address.sol\\\";\\n\\nimport \\\"./interfaces/IWETH.sol\\\";\\nimport \\\"./interfaces/IAsset.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\nabstract contract AssetTransfersHandler is AssetHelpers {\\n    using SafeERC20 for IERC20;\\n    using Address for address payable;\\n\\n    /**\\n     * @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\\n     * as possible from Internal Balance, then transfers any remaining amount.\\n     *\\n     * If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * will be wrapped into WETH.\\n     *\\n     * WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\\n     * caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\\n     * typically doesn't hold any).\\n     */\\n    function _receiveAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address sender,\\n        bool fromInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            _require(!fromInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // The ETH amount to receive is deposited into the WETH contract, which will in turn mint WETH for\\n            // the Vault at a 1:1 ratio.\\n\\n            // A check for this condition is also introduced by the compiler, but this one provides a revert reason.\\n            // Note we're checking for the Vault's total balance, *not* ETH sent in this transaction.\\n            _require(address(this).balance >= amount, Errors.INSUFFICIENT_ETH);\\n            _WETH().deposit{ value: amount }();\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n\\n            if (fromInternalBalance) {\\n                // We take as many tokens from Internal Balance as possible: any remaining amounts will be transferred.\\n                uint256 deductedBalance = _decreaseInternalBalance(sender, token, amount, true);\\n                // Because `deductedBalance` will be always the lesser of the current internal balance\\n                // and the amount to decrease, it is safe to perform unchecked arithmetic.\\n                amount -= deductedBalance;\\n            }\\n\\n            if (amount > 0) {\\n                token.safeTransferFrom(sender, address(this), amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\\n     * Balance instead of being transferred.\\n     *\\n     * If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * are instead sent directly after unwrapping WETH.\\n     */\\n    function _sendAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address payable recipient,\\n        bool toInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            // Sending ETH is not as involved as receiving it: the only special behavior is it cannot be\\n            // deposited to Internal Balance.\\n            _require(!toInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // First, the Vault withdraws deposited ETH from the WETH contract, by burning the same amount of WETH\\n            // from the Vault. This receipt will be handled by the Vault's `receive`.\\n            _WETH().withdraw(amount);\\n\\n            // Then, the withdrawn ETH is sent to the recipient.\\n            recipient.sendValue(amount);\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n            if (toInternalBalance) {\\n                _increaseInternalBalance(recipient, token, amount);\\n            } else {\\n                token.safeTransfer(recipient, amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\\n     * if the caller sent less ETH than `amountUsed`.\\n     *\\n     * Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\\n     * Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\\n     * not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\\n     * returned ETH.\\n     */\\n    function _handleRemainingEth(uint256 amountUsed) internal {\\n        _require(msg.value >= amountUsed, Errors.INSUFFICIENT_ETH);\\n\\n        uint256 excess = msg.value - amountUsed;\\n        if (excess > 0) {\\n            msg.sender.sendValue(excess);\\n        }\\n    }\\n\\n    /**\\n     * @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\\n     * caller.\\n     *\\n     * Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\\n     * we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\\n     * ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\\n     * locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\\n     * prevent user error.\\n     */\\n    receive() external payable {\\n        _require(msg.sender == address(_WETH()), Errors.ETH_TRANSFER);\\n    }\\n\\n    // This contract uses virtual internal functions instead of inheriting from the modules that implement them (in\\n    // this case UserBalance) in order to decouple it from the rest of the system and enable standalone testing by\\n    // implementing these with mocks.\\n\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal virtual;\\n\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool capped\\n    ) internal virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x5534195c226355beb7c084ac01ac615920c6f7fbec550dab472827318536c9cb\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\\n * and helper functions for ensuring correct behavior when working with Pools.\\n */\\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\\n    // types.\\n    mapping(bytes32 => bool) private _isPoolRegistered;\\n\\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\\n    uint256 private _nextPoolNonce;\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    modifier withRegisteredPool(bytes32 poolId) {\\n        _ensureRegisteredPool(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    modifier onlyPool(bytes32 poolId) {\\n        _ensurePoolIsSender(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    function _ensurePoolIsSender(bytes32 poolId) private view {\\n        _ensureRegisteredPool(poolId);\\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\\n    }\\n\\n    function registerPool(PoolSpecialization specialization)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        returns (bytes32)\\n    {\\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\\n        // 2**80 Pools, and the nonce will not overflow.\\n\\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\\n\\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\\n        _isPoolRegistered[poolId] = true;\\n\\n        _nextPoolNonce += 1;\\n\\n        emit PoolRegistered(poolId);\\n        return poolId;\\n    }\\n\\n    function getPool(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (address, PoolSpecialization)\\n    {\\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\\n    }\\n\\n    /**\\n     * @dev Creates a Pool ID.\\n     *\\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\\n     *\\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\\n     * unique.\\n     *\\n     * Pool IDs have the following layout:\\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\\n     * MSB                                                                              LSB\\n     *\\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\\n     * suffice. However, there's nothing else of interest to store in this extra space.\\n     */\\n    function _toPoolId(\\n        address pool,\\n        PoolSpecialization specialization,\\n        uint80 nonce\\n    ) internal pure returns (bytes32) {\\n        bytes32 serialized;\\n\\n        serialized |= bytes32(uint256(nonce));\\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\\n\\n        return serialized;\\n    }\\n\\n    /**\\n     * @dev Returns the address of a Pool's contract.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\\n        // since the logical shift already sets the upper bits to zero.\\n        return address(uint256(poolId) >> (12 * 8));\\n    }\\n\\n    /**\\n     * @dev Returns the specialization setting of a Pool.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\\n\\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\\n        // string: we instead perform the check ourselves to help in error diagnosis.\\n\\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\\n        // values 0, 1 and 2.\\n        _require(value < 3, Errors.INVALID_POOL_ID);\\n\\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            specialization := value\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaf06c559c8a964e9b43308003b43cf698bda38d88cc26118b55394017a369327\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolTokens.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./AssetManagers.sol\\\";\\nimport \\\"./PoolRegistry.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\n\\nabstract contract PoolTokens is ReentrancyGuard, PoolRegistry, AssetManagers {\\n    using BalanceAllocation for bytes32;\\n    using BalanceAllocation for bytes32[];\\n\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external override nonReentrant whenNotPaused onlyPool(poolId) {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, assetManagers.length);\\n\\n        // Validates token addresses and assigns Asset Managers\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(token != IERC20(0), Errors.INVALID_TOKEN);\\n\\n            _poolAssetManagers[poolId][token] = assetManagers[i];\\n        }\\n\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\\n            _registerTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _registerMinimalSwapInfoPoolTokens(poolId, tokens);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _registerGeneralPoolTokens(poolId, tokens);\\n        }\\n\\n        emit TokensRegistered(poolId, tokens, assetManagers);\\n    }\\n\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        onlyPool(poolId)\\n    {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\\n            _deregisterTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _deregisterMinimalSwapInfoPoolTokens(poolId, tokens);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _deregisterGeneralPoolTokens(poolId, tokens);\\n        }\\n\\n        // The deregister calls above ensure the total token balance is zero. Therefore it is now safe to remove any\\n        // associated Asset Managers, since they hold no Pool balance.\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            delete _poolAssetManagers[poolId][tokens[i]];\\n        }\\n\\n        emit TokensDeregistered(poolId, tokens);\\n    }\\n\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        )\\n    {\\n        bytes32[] memory rawBalances;\\n        (tokens, rawBalances) = _getPoolTokens(poolId);\\n        (balances, lastChangeBlock) = rawBalances.totalsAndLastChangeBlock();\\n    }\\n\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        )\\n    {\\n        bytes32 balance;\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            balance = _getTwoTokenPoolBalance(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            balance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            balance = _getGeneralPoolBalance(poolId, token);\\n        }\\n\\n        cash = balance.cash();\\n        managed = balance.managed();\\n        lastChangeBlock = balance.lastChangeBlock();\\n        assetManager = _poolAssetManagers[poolId][token];\\n    }\\n\\n    /**\\n     * @dev Returns all of `poolId`'s registered tokens, along with their raw balances.\\n     */\\n    function _getPoolTokens(bytes32 poolId) internal view returns (IERC20[] memory tokens, bytes32[] memory balances) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _getTwoTokenPoolTokens(poolId);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _getMinimalSwapInfoPoolTokens(poolId);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _getGeneralPoolTokens(poolId);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd68fdb5d0d889ebbb8084921492d441792b4eed7164d3ded3cd5f531fe237629\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/UserBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeCast.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./AssetTransfersHandler.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance.\\n *\\n * Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n * transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n * when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n * gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n *\\n * Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n * operations of different kinds, with different senders and recipients, at once.\\n */\\nabstract contract UserBalance is ReentrancyGuard, AssetTransfersHandler, VaultAuthorization {\\n    using Math for uint256;\\n    using SafeCast for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Internal Balance for each token, for each account.\\n    mapping(address => mapping(IERC20 => uint256)) private _internalTokenBalance;\\n\\n    function getInternalBalance(address user, IERC20[] memory tokens)\\n        external\\n        view\\n        override\\n        returns (uint256[] memory balances)\\n    {\\n        balances = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; i++) {\\n            balances[i] = _getInternalBalance(user, tokens[i]);\\n        }\\n    }\\n\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable override nonReentrant {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 ethWrapped = 0;\\n\\n        // Cache for these checks so we only perform them once (if at all).\\n        bool checkedCallerIsRelayer = false;\\n        bool checkedNotPaused = false;\\n\\n        for (uint256 i = 0; i < ops.length; i++) {\\n            UserBalanceOpKind kind;\\n            IAsset asset;\\n            uint256 amount;\\n            address sender;\\n            address payable recipient;\\n\\n            // This destructuring by calling `_validateUserBalanceOp` seems odd, but results in reduced bytecode size.\\n            (kind, asset, amount, sender, recipient, checkedCallerIsRelayer) = _validateUserBalanceOp(\\n                ops[i],\\n                checkedCallerIsRelayer\\n            );\\n\\n            if (kind == UserBalanceOpKind.WITHDRAW_INTERNAL) {\\n                // Internal Balance withdrawals can always be performed by an authorized account.\\n                _withdrawFromInternalBalance(asset, sender, recipient, amount);\\n            } else {\\n                // All other operations are blocked if the contract is paused.\\n\\n                // We cache the result of the pause check and skip it for other operations in this same transaction\\n                // (if any).\\n                if (!checkedNotPaused) {\\n                    _ensureNotPaused();\\n                    checkedNotPaused = true;\\n                }\\n\\n                if (kind == UserBalanceOpKind.DEPOSIT_INTERNAL) {\\n                    _depositToInternalBalance(asset, sender, recipient, amount);\\n\\n                    // Keep track of all ETH wrapped into WETH as part of a deposit.\\n                    if (_isETH(asset)) {\\n                        ethWrapped = ethWrapped.add(amount);\\n                    }\\n                } else {\\n                    // Transfers don't support ETH.\\n                    _require(!_isETH(asset), Errors.CANNOT_USE_ETH_SENTINEL);\\n                    IERC20 token = _asIERC20(asset);\\n\\n                    if (kind == UserBalanceOpKind.TRANSFER_INTERNAL) {\\n                        _transferInternalBalance(token, sender, recipient, amount);\\n                    } else {\\n                        // TRANSFER_EXTERNAL\\n                        _transferToExternalBalance(token, sender, recipient, amount);\\n                    }\\n                }\\n            }\\n        }\\n\\n        // Handle any remaining ETH.\\n        _handleRemainingEth(ethWrapped);\\n    }\\n\\n    function _depositToInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        _increaseInternalBalance(recipient, _translateToIERC20(asset), amount);\\n        _receiveAsset(asset, amount, sender, false);\\n    }\\n\\n    function _withdrawFromInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address payable recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, _translateToIERC20(asset), amount, false);\\n        _sendAsset(asset, amount, recipient, false);\\n    }\\n\\n    function _transferInternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, token, amount, false);\\n        _increaseInternalBalance(recipient, token, amount);\\n    }\\n\\n    function _transferToExternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        if (amount > 0) {\\n            token.safeTransferFrom(sender, recipient, amount);\\n            emit ExternalBalanceTransfer(token, sender, recipient, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Increases `account`'s Internal Balance for `token` by `amount`.\\n     */\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal override {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        uint256 newBalance = currentBalance.add(amount);\\n        _setInternalBalance(account, token, newBalance, amount.toInt256());\\n    }\\n\\n    /**\\n     * @dev Decreases `account`'s Internal Balance for `token` by `amount`. If `allowPartial` is true, this function\\n     * doesn't revert if `account` doesn't have enough balance, and sets it to zero and returns the deducted amount\\n     * instead.\\n     */\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool allowPartial\\n    ) internal override returns (uint256 deducted) {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        _require(allowPartial || (currentBalance >= amount), Errors.INSUFFICIENT_INTERNAL_BALANCE);\\n\\n        deducted = Math.min(currentBalance, amount);\\n        // By construction, `deducted` is lower or equal to `currentBalance`, so we don't need to use checked\\n        // arithmetic.\\n        uint256 newBalance = currentBalance - deducted;\\n        _setInternalBalance(account, token, newBalance, -(deducted.toInt256()));\\n    }\\n\\n    /**\\n     * @dev Sets `account`'s Internal Balance for `token` to `newBalance`.\\n     *\\n     * Emits an `InternalBalanceChanged` event. This event includes `delta`, which is the amount the balance increased\\n     * (if positive) or decreased (if negative). To avoid reading the current balance in order to compute the delta,\\n     * this function relies on the caller providing it directly.\\n     */\\n    function _setInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 newBalance,\\n        int256 delta\\n    ) private {\\n        _internalTokenBalance[account][token] = newBalance;\\n        emit InternalBalanceChanged(account, token, delta);\\n    }\\n\\n    /**\\n     * @dev Returns `account`'s Internal Balance for `token`.\\n     */\\n    function _getInternalBalance(address account, IERC20 token) internal view returns (uint256) {\\n        return _internalTokenBalance[account][token];\\n    }\\n\\n    /**\\n     * @dev Destructures a User Balance operation, validating that the contract caller is allowed to perform it.\\n     */\\n    function _validateUserBalanceOp(UserBalanceOp memory op, bool checkedCallerIsRelayer)\\n        private\\n        view\\n        returns (\\n            UserBalanceOpKind,\\n            IAsset,\\n            uint256,\\n            address,\\n            address payable,\\n            bool\\n        )\\n    {\\n        // The only argument we need to validate is `sender`, which can only be either the contract caller, or a\\n        // relayer approved by `sender`.\\n        address sender = op.sender;\\n\\n        if (sender != msg.sender) {\\n            // We need to check both that the contract caller is a relayer, and that `sender` approved them.\\n\\n            // Because the relayer check is global (i.e. independent of `sender`), we cache that result and skip it for\\n            // other operations in this same transaction (if any).\\n            if (!checkedCallerIsRelayer) {\\n                _authenticateCaller();\\n                checkedCallerIsRelayer = true;\\n            }\\n\\n            _require(_hasApprovedRelayer(sender, msg.sender), Errors.USER_DOESNT_ALLOW_RELAYER);\\n        }\\n\\n        return (op.kind, op.asset, op.amount, sender, op.recipient, checkedCallerIsRelayer);\\n    }\\n}\\n\",\"keccak256\":\"0x4412e4e084ff3be5b80f421a9fdbc72de7e2fc17a054609f40c32c32fdcaefbd\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/GeneralPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableMap.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\n\\nabstract contract GeneralPoolsBalance {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\\n\\n    // Data for Pools with the General specialization setting\\n    //\\n    // These Pools use the IGeneralPool interface, which means the Vault must query the balance for *all* of their\\n    // tokens in every swap. If we kept a mapping of token to balance plus a set (array) of tokens, it'd be very gas\\n    // intensive to read all token addresses just to then do a lookup on the balance mapping.\\n    //\\n    // Instead, we use our customized EnumerableMap, which lets us read the N balances in N+1 storage accesses (one for\\n    // each token in the Pool), access the index of any 'token in' a single read (required for the IGeneralPool call),\\n    // and update an entry's value given its index.\\n\\n    // Map of token -> balance pairs for each Pool with this specialization. Many functions rely on storage pointers to\\n    // a Pool's EnumerableMap to save gas when computing storage slots.\\n    mapping(bytes32 => EnumerableMap.IERC20ToBytes32Map) internal _generalPoolsBalances;\\n\\n    /**\\n     * @dev Registers a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // EnumerableMaps require an explicit initial value when creating a key-value pair: we use zero, the same\\n            // value that is found in uninitialized storage, which corresponds to an empty balance.\\n            bool added = poolBalances.set(tokens[i], 0);\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n            _require(currentBalance.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // We don't need to check remove's return value, since _getGeneralPoolBalance already checks that the token\\n            // was registered.\\n            poolBalances.remove(token);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a General Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setGeneralPoolBalances(bytes32 poolId, bytes32[] memory balances) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < balances.length; ++i) {\\n            // Since we assume all balances are properly ordered, we can simply use `unchecked_setAt` to avoid one less\\n            // storage read per token.\\n            poolBalances.unchecked_setAt(i, balances[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a General Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setGeneralPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateGeneralPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a General Pool to the result of the `mutation` function when called with the\\n     * current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateGeneralPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        poolBalances.set(token, newBalance);\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a General Pool. The order may change when tokens are\\n     * registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _getGeneralPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        tokens = new IERC20[](poolBalances.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableMap's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            (tokens[i], balances[i]) = poolBalances.unchecked_at(i);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getGeneralPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return _getGeneralPoolBalance(poolBalances, token);\\n    }\\n\\n    /**\\n     * @dev Same as `_getGeneralPoolBalance` but using a Pool's storage pointer, which saves gas in repeated reads and\\n     * writes.\\n     */\\n    function _getGeneralPoolBalance(EnumerableMap.IERC20ToBytes32Map storage poolBalances, IERC20 token)\\n        private\\n        view\\n        returns (bytes32)\\n    {\\n        return poolBalances.get(token, Errors.TOKEN_NOT_REGISTERED);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _isGeneralPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return poolBalances.contains(token);\\n    }\\n}\\n\",\"keccak256\":\"0x534135bd6edee54ffaa785ff26916a2471211c55e718aba84e41961823edfc0c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableSet.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract MinimalSwapInfoPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n\\n    // Data for Pools with the Minimal Swap Info specialization setting\\n    //\\n    // These Pools use the IMinimalSwapInfoPool interface, and so the Vault must read the balance of the two tokens\\n    // in the swap. The best solution is to use a mapping from token to balance, which lets us read or write any token's\\n    // balance in a single storage access.\\n    //\\n    // We also keep a set of registered tokens. Because tokens with non-zero balance are by definition registered, in\\n    // some balance getters we skip checking for token registration if a non-zero balance is found, saving gas by\\n    // performing a single read instead of two.\\n\\n    mapping(bytes32 => mapping(IERC20 => bytes32)) internal _minimalSwapInfoPoolsBalances;\\n    mapping(bytes32 => EnumerableSet.AddressSet) internal _minimalSwapInfoPoolsTokens;\\n\\n    /**\\n     * @dev Registers a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            bool added = poolTokens.add(address(tokens[i]));\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n            // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n            // balance.\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(_minimalSwapInfoPoolsBalances[poolId][token].isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // For consistency with other Pool specialization settings, we explicitly reset the balance (which may have\\n            // a non-zero last change block).\\n            delete _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n            bool removed = poolTokens.remove(address(token));\\n            _require(removed, Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a Minimal Swap Info Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setMinimalSwapInfoPoolBalances(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        bytes32[] memory balances\\n    ) internal {\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            _minimalSwapInfoPoolsBalances[poolId][tokens[i]] = balances[i];\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Minimal Swap Info Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setMinimalSwapInfoPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Minimal Swap Info Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateMinimalSwapInfoPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        bytes32 currentBalance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        _minimalSwapInfoPoolsBalances[poolId][token] = newBalance;\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a Minimal Swap Info Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _getMinimalSwapInfoPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        tokens = new IERC20[](poolTokens.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableSet's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            IERC20 token = IERC20(poolTokens.unchecked_at(i));\\n            tokens[i] = token;\\n            balances[i] = _minimalSwapInfoPoolsBalances[poolId][token];\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Minimal Swap Info Pool.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getMinimalSwapInfoPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        bytes32 balance = _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n        // A non-zero balance guarantees that the token is registered. If zero, we manually check if the token is\\n        // registered in the Pool. Token registration implies that the Pool is registered as well, which lets us save\\n        // gas by not performing the check.\\n        bool tokenRegistered = balance.isNotZero() || _minimalSwapInfoPoolsTokens[poolId].contains(address(token));\\n\\n        if (!tokenRegistered) {\\n            // The token might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        return balance;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _isMinimalSwapInfoPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        return poolTokens.contains(address(token));\\n    }\\n}\\n\",\"keccak256\":\"0x4b002c25bd067d9e1272df67271a0993be4f7f92cae0a0871abc2d52272b10df\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract TwoTokenPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n\\n    // Data for Pools with the Two Token specialization setting\\n    //\\n    // These are similar to the Minimal Swap Info Pool case (because the Pool only has two tokens, and therefore there\\n    // are only two balances to read), but there's a key difference in how data is stored. Keeping a set makes little\\n    // sense, as it will only ever hold two tokens, so we can just store those two directly.\\n    //\\n    // The gas savings associated with using these Pools come from how token balances are stored: cash amounts for token\\n    // A and token B are packed together, as are managed amounts. Because only cash changes in a swap, there's no need\\n    // to write to this second storage slot. A single last change block number for both tokens is stored with the packed\\n    // cash fields.\\n\\n    struct TwoTokenPoolBalances {\\n        bytes32 sharedCash;\\n        bytes32 sharedManaged;\\n    }\\n\\n    // We could just keep a mapping from Pool ID to TwoTokenSharedBalances, but there's an issue: we wouldn't know to\\n    // which tokens those balances correspond. This would mean having to also check which are registered with the Pool.\\n    //\\n    // What we do instead to save those storage reads is keep a nested mapping from the token pair hash to the balances\\n    // struct. The Pool only has two tokens, so only a single entry of this mapping is set (the one that corresponds to\\n    // that pair's hash).\\n    //\\n    // This has the trade-off of making Vault code that interacts with these Pools cumbersome: both balances must be\\n    // accessed at the same time by using both token addresses, and some logic is needed to determine how the pair hash\\n    // is computed. We do this by sorting the tokens, calling the token with the lowest numerical address value token A,\\n    // and the other one token B. In functions where the token arguments could be either A or B, we use X and Y instead.\\n    //\\n    // If users query a token pair containing an unregistered token, the Pool will generate a hash for a mapping entry\\n    // that was not set, and return zero balances. Non-zero balances are only possible if both tokens in the pair\\n    // are registered with the Pool, which means we don't have to check the TwoTokenPoolTokens struct, and can save\\n    // storage reads.\\n\\n    struct TwoTokenPoolTokens {\\n        IERC20 tokenA;\\n        IERC20 tokenB;\\n        mapping(bytes32 => TwoTokenPoolBalances) balances;\\n    }\\n\\n    mapping(bytes32 => TwoTokenPoolTokens) private _twoTokenPoolTokens;\\n\\n    /**\\n     * @dev Registers tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must not be the same\\n     * - The tokens must be ordered: tokenX < tokenY\\n     */\\n    function _registerTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        // Not technically true since we didn't register yet, but this is consistent with the error messages of other\\n        // specialization settings.\\n        _require(tokenX != tokenY, Errors.TOKEN_ALREADY_REGISTERED);\\n\\n        _require(tokenX < tokenY, Errors.UNSORTED_TOKENS);\\n\\n        // A Two Token Pool with no registered tokens is identified by having zero addresses for tokens A and B.\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        _require(poolTokens.tokenA == IERC20(0) && poolTokens.tokenB == IERC20(0), Errors.TOKENS_ALREADY_SET);\\n\\n        // Since tokenX < tokenY, tokenX is A and tokenY is B\\n        poolTokens.tokenA = tokenX;\\n        poolTokens.tokenB = tokenY;\\n\\n        // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n        // balance.\\n    }\\n\\n    /**\\n     * @dev Deregisters tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     * - both tokens must have zero balance in the Vault\\n     */\\n    function _deregisterTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        ) = _getTwoTokenPoolSharedBalances(poolId, tokenX, tokenY);\\n\\n        _require(balanceA.isZero() && balanceB.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n        delete _twoTokenPoolTokens[poolId];\\n\\n        // For consistency with other Pool specialization settings, we explicitly reset the packed cash field (which may\\n        // have a non-zero last change block).\\n        delete poolBalances.sharedCash;\\n    }\\n\\n    /**\\n     * @dev Sets the cash balances of a Two Token Pool's tokens.\\n     *\\n     * WARNING: this assumes `tokenA` and `tokenB` are the Pool's two registered tokens, and are in the correct order.\\n     */\\n    function _setTwoTokenPoolCashBalances(\\n        bytes32 poolId,\\n        IERC20 tokenA,\\n        bytes32 balanceA,\\n        IERC20 tokenB,\\n        bytes32 balanceB\\n    ) internal {\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        TwoTokenPoolBalances storage poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n        poolBalances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Two Token Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setTwoTokenPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Two Token Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateTwoTokenPoolSharedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        (\\n            TwoTokenPoolBalances storage balances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            ,\\n            bytes32 balanceB\\n        ) = _getTwoTokenPoolBalances(poolId);\\n\\n        int256 delta;\\n        if (token == tokenA) {\\n            bytes32 newBalance = mutation(balanceA, amount);\\n            delta = newBalance.managedDelta(balanceA);\\n            balanceA = newBalance;\\n        } else {\\n            // token == tokenB\\n            bytes32 newBalance = mutation(balanceB, amount);\\n            delta = newBalance.managedDelta(balanceB);\\n            balanceB = newBalance;\\n        }\\n\\n        balances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n        balances.sharedManaged = BalanceAllocation.toSharedManaged(balanceA, balanceB);\\n\\n        return delta;\\n    }\\n\\n    /*\\n     * @dev Returns an array with all the tokens and balances in a Two Token Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _getTwoTokenPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        // Both tokens will either be zero (if unregistered) or non-zero (if registered), but we keep the full check for\\n        // clarity.\\n        if (tokenA == IERC20(0) || tokenB == IERC20(0)) {\\n            return (new IERC20[](0), new bytes32[](0));\\n        }\\n\\n        // Note that functions relying on this getter expect tokens to be properly ordered, so we use the (A, B)\\n        // ordering.\\n\\n        tokens = new IERC20[](2);\\n        tokens[0] = tokenA;\\n        tokens[1] = tokenB;\\n\\n        balances = new bytes32[](2);\\n        balances[0] = balanceA;\\n        balances[1] = balanceB;\\n    }\\n\\n    /**\\n     * @dev Same as `_getTwoTokenPoolTokens`, except it returns the two tokens and balances directly instead of using\\n     * an array, as well as a storage pointer to the `TwoTokenPoolBalances` struct, which can be used to update it\\n     * without having to recompute the pair hash and storage slot.\\n     */\\n    function _getTwoTokenPoolBalances(bytes32 poolId)\\n        private\\n        view\\n        returns (\\n            TwoTokenPoolBalances storage poolBalances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            IERC20 tokenB,\\n            bytes32 balanceB\\n        )\\n    {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        tokenA = poolTokens.tokenA;\\n        tokenB = poolTokens.tokenB;\\n\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        poolBalances = poolTokens.balances[pairHash];\\n\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * This function is convenient but not particularly gas efficient, and should be avoided during gas-sensitive\\n     * operations, such as swaps. For those, _getTwoTokenPoolSharedBalances provides a more flexible interface.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        // We can't just read the balance of token, because we need to know the full pair in order to compute the pair\\n        // hash and access the balance mapping. We therefore rely on `_getTwoTokenPoolBalances`.\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        if (token == tokenA) {\\n            return balanceA;\\n        } else if (token == tokenB) {\\n            return balanceB;\\n        } else {\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of the two tokens in a Two Token Pool.\\n     *\\n     * The returned balances are those of token A and token B, where token A is the lowest of token X and token Y, and\\n     * token B the other.\\n     *\\n     * This function also returns a storage pointer to the TwoTokenPoolBalances struct associated with the token pair,\\n     * which can be used to update it without having to recompute the pair hash and storage slot.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolSharedBalances(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    )\\n        internal\\n        view\\n        returns (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        )\\n    {\\n        (IERC20 tokenA, IERC20 tokenB) = _sortTwoTokens(tokenX, tokenY);\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n\\n        poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n\\n        // Because we're reading balances using the pair hash, if either token X or token Y is not registered then\\n        // *both* balance entries will be zero.\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        // A non-zero balance guarantees that both tokens are registered. If zero, we manually check whether each\\n        // token is registered in the Pool. Token registration implies that the Pool is registered as well, which\\n        // lets us save gas by not performing the check.\\n        bool tokensRegistered = sharedCash.isNotZero() ||\\n            sharedManaged.isNotZero() ||\\n            (_isTwoTokenPoolTokenRegistered(poolId, tokenA) && _isTwoTokenPoolTokenRegistered(poolId, tokenB));\\n\\n        if (!tokensRegistered) {\\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _isTwoTokenPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n\\n        // The zero address can never be a registered token.\\n        return (token == poolTokens.tokenA || token == poolTokens.tokenB) && token != IERC20(0);\\n    }\\n\\n    /**\\n     * @dev Returns the hash associated with a given token pair.\\n     */\\n    function _getTwoTokenPairHash(IERC20 tokenA, IERC20 tokenB) private pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(tokenA, tokenB));\\n    }\\n\\n    /**\\n     * @dev Sorts two tokens in ascending order, returning them as a (tokenA, tokenB) tuple.\\n     */\\n    function _sortTwoTokens(IERC20 tokenX, IERC20 tokenY) private pure returns (IERC20, IERC20) {\\n        return tokenX < tokenY ? (tokenX, tokenY) : (tokenY, tokenX);\\n    }\\n}\\n\",\"keccak256\":\"0x2cd5a8f9bee0addefa4e63cb7380f9b133d2e482807603fed931d42e3e1f40f4\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 19073,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_generalPoolsBalances",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "2",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_paused",
                "offset": 0,
                "slot": "3",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_authorizer",
                "offset": 1,
                "slot": "3",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 15355,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_isPoolRegistered",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_bytes32,t_bool)"
              },
              {
                "astId": 15357,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_nextPoolNonce",
                "offset": 0,
                "slot": "6",
                "type": "t_uint256"
              },
              {
                "astId": 19489,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_minimalSwapInfoPoolsBalances",
                "offset": 0,
                "slot": "7",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))"
              },
              {
                "astId": 19493,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_minimalSwapInfoPoolsTokens",
                "offset": 0,
                "slot": "8",
                "type": "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)"
              },
              {
                "astId": 19947,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_twoTokenPoolTokens",
                "offset": 0,
                "slot": "9",
                "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)"
              },
              {
                "astId": 13417,
                "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                "label": "_poolAssetManagers",
                "offset": 0,
                "slot": "10",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_array(t_address)dyn_storage": {
                "base": "t_address",
                "encoding": "dynamic_array",
                "label": "address[]",
                "numberOfBytes": "32"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_bool)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => address))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_address)"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => bytes32))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_bytes32)"
              },
              "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)",
                "numberOfBytes": "32",
                "value": "t_struct(AddressSet)4822_storage"
              },
              "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32Map)4479_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolBalances)19934_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolTokens)19943_storage"
              },
              "t_mapping(t_contract(IERC20)5095,t_address)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => address)",
                "numberOfBytes": "32",
                "value": "t_address"
              },
              "t_mapping(t_contract(IERC20)5095,t_bytes32)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => bytes32)",
                "numberOfBytes": "32",
                "value": "t_bytes32"
              },
              "t_mapping(t_contract(IERC20)5095,t_uint256)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)": {
                "encoding": "mapping",
                "key": "t_uint256",
                "label": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32MapEntry)4468_storage"
              },
              "t_struct(AddressSet)4822_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableSet.AddressSet",
                "members": [
                  {
                    "astId": 4817,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "_values",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_array(t_address)dyn_storage"
                  },
                  {
                    "astId": 4821,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_address,t_uint256)"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(IERC20ToBytes32Map)4479_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32Map",
                "members": [
                  {
                    "astId": 4470,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "_length",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_uint256"
                  },
                  {
                    "astId": 4474,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "_entries",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)"
                  },
                  {
                    "astId": 4478,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_contract(IERC20)5095,t_uint256)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_struct(IERC20ToBytes32MapEntry)4468_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32MapEntry",
                "members": [
                  {
                    "astId": 4465,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "_key",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 4467,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "_value",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolBalances)19934_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances",
                "members": [
                  {
                    "astId": 19931,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "sharedCash",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_bytes32"
                  },
                  {
                    "astId": 19933,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "sharedManaged",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolTokens)19943_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens",
                "members": [
                  {
                    "astId": 19936,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "tokenA",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19938,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "tokenB",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19942,
                    "contract": "src.sol/amm/vault/PoolTokens.sol:PoolTokens",
                    "label": "balances",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/ProtocolFeesCollector.sol": {
        "ProtocolFeesCollector": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "contract IVault",
                  "name": "_vault",
                  "type": "address"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "newFlashLoanFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "FlashLoanFeePercentageChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "newSwapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "SwapFeePercentageChanged",
              "type": "event"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getCollectedFeeAmounts",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "feeAmounts",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getFlashLoanFeePercentage",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getSwapFeePercentage",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "newFlashLoanFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "setFlashLoanFeePercentage",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "newSwapFeePercentage",
                  "type": "uint256"
                }
              ],
              "name": "setSwapFeePercentage",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "vault",
              "outputs": [
                {
                  "internalType": "contract IVault",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                }
              ],
              "name": "withdrawCollectedFees",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the Vault performs to reduce its overall bytecode size. The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated to the Vault's own authorizer.",
            "kind": "dev",
            "methods": {
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60c060405234801561001057600080fd5b50604051610b47380380610b4783398101604081905261002f9161004d565b30608052600160005560601b6001600160601b03191660a05261007b565b60006020828403121561005e578081fd5b81516001600160a01b0381168114610074578182fd5b9392505050565b60805160a05160601c610aa16100a66000398061040352806104f45250806102975250610aa16000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063851c1bb311610066578063851c1bb3146100f1578063aaabadc514610104578063d877845c14610119578063e42abf3514610121578063fbfa77cf1461014157610093565b806338e9922e1461009857806355c67628146100ad5780636b6b9f69146100cb5780636daefab6146100de575b600080fd5b6100ab6100a6366004610915565b610149565b005b6100b56101a8565b6040516100c29190610a07565b60405180910390f35b6100ab6100d9366004610915565b6101ae565b6100ab6100ec366004610762565b610201565b6100b56100ff3660046108b5565b610293565b61010c6102e5565b6040516100c29190610996565b6100b56102f4565b61013461012f3660046107e3565b6102fa565b6040516100c291906109c3565b61010c610401565b610151610425565b6101686706f05b59d3b20000821115610258610456565b60018190556040517fa9ba3ffe0b6c366b81232caab38605a0699ad5398d6cce76f91ee809e322dafc9061019d908390610a07565b60405180910390a150565b60015490565b6101b6610425565b6101cc662386f26fc10000821115610259610456565b60028190556040517f5a0b7386237e7f07fa741efc64e59c9387d2cccafec760efed4d53387f20e19a9061019d908390610a07565b610209610468565b610211610425565b61021b8483610481565b60005b8481101561028357600086868381811061023457fe5b905060200201602081019061024991906108f9565b9050600085858481811061025957fe5b6020029190910135915061027990506001600160a01b038316858361048e565b505060010161021e565b5061028c6104e9565b5050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000826040516020016102c8929190610945565b604051602081830303815290604052805190602001209050919050565b60006102ef6104f0565b905090565b60025490565b6060815167ffffffffffffffff8111801561031457600080fd5b5060405190808252806020026020018201604052801561033e578160200160208202803683370190505b50905060005b82518110156103fb5782818151811061035957fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161038c9190610996565b60206040518083038186803b1580156103a457600080fd5b505afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc919061092d565b8282815181106103e857fe5b6020908102919091010152600101610344565b50919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061043c6000356001600160e01b031916610293565b905061045361044b8233610583565b610191610456565b50565b816104645761046481610615565b5050565b61047a60026000541415610190610456565b6002600055565b6104648183146067610456565b6104e48363a9059cbb60e01b84846040516024016104ad9291906109aa565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610668565b505050565b6001600055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b15801561054b57600080fd5b505afa15801561055f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ef91906108dd565b600061058d6104f0565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b81526004016105bc93929190610a10565b60206040518083038186803b1580156105d457600080fd5b505afa1580156105e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060c919061088e565b90505b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b60006060836001600160a01b031683604051610684919061095d565b6000604051808303816000865af19150503d80600081146106c1576040519150601f19603f3d011682016040523d82523d6000602084013e6106c6565b606091505b509150915060008214156106de573d6000803e3d6000fd5b610708815160001480610700575081806020019051810190610700919061088e565b6101a2610456565b50505050565b60008083601f84011261071f578182fd5b50813567ffffffffffffffff811115610736578182fd5b602083019150836020808302850101111561075057600080fd5b9250929050565b803561060f81610a56565b600080600080600060608688031215610779578081fd5b853567ffffffffffffffff80821115610790578283fd5b61079c89838a0161070e565b909750955060208801359150808211156107b4578283fd5b506107c18882890161070e565b90945092505060408601356107d581610a56565b809150509295509295909350565b600060208083850312156107f5578182fd5b823567ffffffffffffffff8082111561080c578384fd5b818501915085601f83011261081f578384fd5b81358181111561082d578485fd5b838102915061083d848301610a2f565b8181528481019084860184860187018a1015610857578788fd5b8795505b838610156108815761086d8a82610757565b83526001959095019491860191860161085b565b5098975050505050505050565b60006020828403121561089f578081fd5b815180151581146108ae578182fd5b9392505050565b6000602082840312156108c6578081fd5b81356001600160e01b0319811681146108ae578182fd5b6000602082840312156108ee578081fd5b81516108ae81610a56565b60006020828403121561090a578081fd5b81356108ae81610a56565b600060208284031215610926578081fd5b5035919050565b60006020828403121561093e578081fd5b5051919050565b9182526001600160e01b031916602082015260240190565b60008251815b8181101561097d5760208186018101518583015201610963565b8181111561098b5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156109fb578351835292840192918401916001016109df565b50909695505050505050565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b60405181810167ffffffffffffffff81118282101715610a4e57600080fd5b604052919050565b6001600160a01b038116811461045357600080fdfea26469706673582212205cd8324bedf0f162cae9e752d3763f56b4bc85ff58eab3a6dc5d842ef61cd1a064736f6c63430007010033",
              "opcodes": "PUSH1 0xC0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0xB47 CODESIZE SUB DUP1 PUSH2 0xB47 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x4D JUMP JUMPDEST ADDRESS PUSH1 0x80 MSTORE PUSH1 0x1 PUSH1 0x0 SSTORE PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0xA0 MSTORE PUSH2 0x7B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x74 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH2 0xAA1 PUSH2 0xA6 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x403 MSTORE DUP1 PUSH2 0x4F4 MSTORE POP DUP1 PUSH2 0x297 MSTORE POP PUSH2 0xAA1 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x93 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x851C1BB3 GT PUSH2 0x66 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0xF1 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x104 JUMPI DUP1 PUSH4 0xD877845C EQ PUSH2 0x119 JUMPI DUP1 PUSH4 0xE42ABF35 EQ PUSH2 0x121 JUMPI DUP1 PUSH4 0xFBFA77CF EQ PUSH2 0x141 JUMPI PUSH2 0x93 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0xAD JUMPI DUP1 PUSH4 0x6B6B9F69 EQ PUSH2 0xCB JUMPI DUP1 PUSH4 0x6DAEFAB6 EQ PUSH2 0xDE JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAB PUSH2 0xA6 CALLDATASIZE PUSH1 0x4 PUSH2 0x915 JUMP JUMPDEST PUSH2 0x149 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB5 PUSH2 0x1A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xAB PUSH2 0xD9 CALLDATASIZE PUSH1 0x4 PUSH2 0x915 JUMP JUMPDEST PUSH2 0x1AE JUMP JUMPDEST PUSH2 0xAB PUSH2 0xEC CALLDATASIZE PUSH1 0x4 PUSH2 0x762 JUMP JUMPDEST PUSH2 0x201 JUMP JUMPDEST PUSH2 0xB5 PUSH2 0xFF CALLDATASIZE PUSH1 0x4 PUSH2 0x8B5 JUMP JUMPDEST PUSH2 0x293 JUMP JUMPDEST PUSH2 0x10C PUSH2 0x2E5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0x996 JUMP JUMPDEST PUSH2 0xB5 PUSH2 0x2F4 JUMP JUMPDEST PUSH2 0x134 PUSH2 0x12F CALLDATASIZE PUSH1 0x4 PUSH2 0x7E3 JUMP JUMPDEST PUSH2 0x2FA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0x9C3 JUMP JUMPDEST PUSH2 0x10C PUSH2 0x401 JUMP JUMPDEST PUSH2 0x151 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x168 PUSH8 0x6F05B59D3B20000 DUP3 GT ISZERO PUSH2 0x258 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x1 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0xA9BA3FFE0B6C366B81232CAAB38605A0699AD5398D6CCE76F91EE809E322DAFC SWAP1 PUSH2 0x19D SWAP1 DUP4 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x1 SLOAD SWAP1 JUMP JUMPDEST PUSH2 0x1B6 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x1CC PUSH7 0x2386F26FC10000 DUP3 GT ISZERO PUSH2 0x259 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x2 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x5A0B7386237E7F07FA741EFC64E59C9387D2CCCAFEC760EFED4D53387F20E19A SWAP1 PUSH2 0x19D SWAP1 DUP4 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH2 0x209 PUSH2 0x468 JUMP JUMPDEST PUSH2 0x211 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x21B DUP5 DUP4 PUSH2 0x481 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x283 JUMPI PUSH1 0x0 DUP7 DUP7 DUP4 DUP2 DUP2 LT PUSH2 0x234 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x249 SWAP2 SWAP1 PUSH2 0x8F9 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 DUP6 DUP5 DUP2 DUP2 LT PUSH2 0x259 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP PUSH2 0x279 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP6 DUP4 PUSH2 0x48E JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x21E JUMP JUMPDEST POP PUSH2 0x28C PUSH2 0x4E9 JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x2C8 SWAP3 SWAP2 SWAP1 PUSH2 0x945 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2EF PUSH2 0x4F0 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x314 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x33E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x3FB JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x359 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x38C SWAP2 SWAP1 PUSH2 0x996 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3B8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x3DC SWAP2 SWAP1 PUSH2 0x92D JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3E8 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x344 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x43C PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x293 JUMP JUMPDEST SWAP1 POP PUSH2 0x453 PUSH2 0x44B DUP3 CALLER PUSH2 0x583 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x456 JUMP JUMPDEST POP JUMP JUMPDEST DUP2 PUSH2 0x464 JUMPI PUSH2 0x464 DUP2 PUSH2 0x615 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x47A PUSH1 0x2 PUSH1 0x0 SLOAD EQ ISZERO PUSH2 0x190 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x2 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH2 0x464 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x456 JUMP JUMPDEST PUSH2 0x4E4 DUP4 PUSH4 0xA9059CBB PUSH1 0xE0 SHL DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x4AD SWAP3 SWAP2 SWAP1 PUSH2 0x9AA JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE PUSH2 0x668 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x54B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x55F JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2EF SWAP2 SWAP1 PUSH2 0x8DD JUMP JUMPDEST PUSH1 0x0 PUSH2 0x58D PUSH2 0x4F0 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5BC SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xA10 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x5D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5E8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x60C SWAP2 SWAP1 PUSH2 0x88E JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x684 SWAP2 SWAP1 PUSH2 0x95D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x6C1 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x6C6 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH1 0x0 DUP3 EQ ISZERO PUSH2 0x6DE JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH2 0x708 DUP2 MLOAD PUSH1 0x0 EQ DUP1 PUSH2 0x700 JUMPI POP DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x700 SWAP2 SWAP1 PUSH2 0x88E JUMP JUMPDEST PUSH2 0x1A2 PUSH2 0x456 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0x71F JUMPI DUP2 DUP3 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x736 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 DUP1 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0x750 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x60F DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x779 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x790 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x79C DUP10 DUP4 DUP11 ADD PUSH2 0x70E JUMP JUMPDEST SWAP1 SWAP8 POP SWAP6 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x7B4 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x7C1 DUP9 DUP3 DUP10 ADD PUSH2 0x70E JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP POP PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH2 0x7D5 DUP2 PUSH2 0xA56 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x7F5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x80C JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x81F JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x82D JUMPI DUP5 DUP6 REVERT JUMPDEST DUP4 DUP2 MUL SWAP2 POP PUSH2 0x83D DUP5 DUP4 ADD PUSH2 0xA2F JUMP JUMPDEST DUP2 DUP2 MSTORE DUP5 DUP2 ADD SWAP1 DUP5 DUP7 ADD DUP5 DUP7 ADD DUP8 ADD DUP11 LT ISZERO PUSH2 0x857 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x881 JUMPI PUSH2 0x86D DUP11 DUP3 PUSH2 0x757 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH2 0x85B JUMP JUMPDEST POP SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x89F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x8AE JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x8C6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x8AE JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x8EE JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x8AE DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x90A JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x8AE DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x926 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x93E JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x97D JUMPI PUSH1 0x20 DUP2 DUP7 ADD DUP2 ADD MLOAD DUP6 DUP4 ADD MSTORE ADD PUSH2 0x963 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x98B JUMPI DUP3 DUP3 DUP6 ADD MSTORE JUMPDEST POP SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x9FB JUMPI DUP4 MLOAD DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x9DF JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0xA4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x453 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x5C 0xD8 ORIGIN 0x4B 0xED CREATE CALL PUSH3 0xCAE9E7 MSTORE 0xD3 PUSH23 0x3F56B4BC85FF58EAB3A6DC5D842EF61CD1A064736F6C63 NUMBER STOP SMOD ADD STOP CALLER ",
              "sourceMap": "1494:3408:49:-:0;;;2533:252;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2741:4;1929:46:2;;2018:1:22;2717:31:49;2123:22:22;2764:14:49::1;::::0;-1:-1:-1;;2764:14:49;::::1;::::0;1494:3408;;178:295:-1;;309:2;297:9;288:7;284:23;280:32;277:2;;;-1:-1;;315:12;277:2;99:13;;-1:-1;;;;;754:54;;895:51;;885:2;;-1:-1;;950:12;885:2;367:90;271:202;-1:-1;;;271:202::o;:::-;1494:3408:49;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "275": [
                  {
                    "length": 32,
                    "start": 663
                  }
                ],
                "16044": [
                  {
                    "length": 32,
                    "start": 1027
                  },
                  {
                    "length": 32,
                    "start": 1268
                  }
                ]
              },
              "linkReferences": {},
              "object": "608060405234801561001057600080fd5b50600436106100935760003560e01c8063851c1bb311610066578063851c1bb3146100f1578063aaabadc514610104578063d877845c14610119578063e42abf3514610121578063fbfa77cf1461014157610093565b806338e9922e1461009857806355c67628146100ad5780636b6b9f69146100cb5780636daefab6146100de575b600080fd5b6100ab6100a6366004610915565b610149565b005b6100b56101a8565b6040516100c29190610a07565b60405180910390f35b6100ab6100d9366004610915565b6101ae565b6100ab6100ec366004610762565b610201565b6100b56100ff3660046108b5565b610293565b61010c6102e5565b6040516100c29190610996565b6100b56102f4565b61013461012f3660046107e3565b6102fa565b6040516100c291906109c3565b61010c610401565b610151610425565b6101686706f05b59d3b20000821115610258610456565b60018190556040517fa9ba3ffe0b6c366b81232caab38605a0699ad5398d6cce76f91ee809e322dafc9061019d908390610a07565b60405180910390a150565b60015490565b6101b6610425565b6101cc662386f26fc10000821115610259610456565b60028190556040517f5a0b7386237e7f07fa741efc64e59c9387d2cccafec760efed4d53387f20e19a9061019d908390610a07565b610209610468565b610211610425565b61021b8483610481565b60005b8481101561028357600086868381811061023457fe5b905060200201602081019061024991906108f9565b9050600085858481811061025957fe5b6020029190910135915061027990506001600160a01b038316858361048e565b505060010161021e565b5061028c6104e9565b5050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000826040516020016102c8929190610945565b604051602081830303815290604052805190602001209050919050565b60006102ef6104f0565b905090565b60025490565b6060815167ffffffffffffffff8111801561031457600080fd5b5060405190808252806020026020018201604052801561033e578160200160208202803683370190505b50905060005b82518110156103fb5782818151811061035957fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161038c9190610996565b60206040518083038186803b1580156103a457600080fd5b505afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc919061092d565b8282815181106103e857fe5b6020908102919091010152600101610344565b50919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061043c6000356001600160e01b031916610293565b905061045361044b8233610583565b610191610456565b50565b816104645761046481610615565b5050565b61047a60026000541415610190610456565b6002600055565b6104648183146067610456565b6104e48363a9059cbb60e01b84846040516024016104ad9291906109aa565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610668565b505050565b6001600055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b15801561054b57600080fd5b505afa15801561055f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ef91906108dd565b600061058d6104f0565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b81526004016105bc93929190610a10565b60206040518083038186803b1580156105d457600080fd5b505afa1580156105e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060c919061088e565b90505b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b60006060836001600160a01b031683604051610684919061095d565b6000604051808303816000865af19150503d80600081146106c1576040519150601f19603f3d011682016040523d82523d6000602084013e6106c6565b606091505b509150915060008214156106de573d6000803e3d6000fd5b610708815160001480610700575081806020019051810190610700919061088e565b6101a2610456565b50505050565b60008083601f84011261071f578182fd5b50813567ffffffffffffffff811115610736578182fd5b602083019150836020808302850101111561075057600080fd5b9250929050565b803561060f81610a56565b600080600080600060608688031215610779578081fd5b853567ffffffffffffffff80821115610790578283fd5b61079c89838a0161070e565b909750955060208801359150808211156107b4578283fd5b506107c18882890161070e565b90945092505060408601356107d581610a56565b809150509295509295909350565b600060208083850312156107f5578182fd5b823567ffffffffffffffff8082111561080c578384fd5b818501915085601f83011261081f578384fd5b81358181111561082d578485fd5b838102915061083d848301610a2f565b8181528481019084860184860187018a1015610857578788fd5b8795505b838610156108815761086d8a82610757565b83526001959095019491860191860161085b565b5098975050505050505050565b60006020828403121561089f578081fd5b815180151581146108ae578182fd5b9392505050565b6000602082840312156108c6578081fd5b81356001600160e01b0319811681146108ae578182fd5b6000602082840312156108ee578081fd5b81516108ae81610a56565b60006020828403121561090a578081fd5b81356108ae81610a56565b600060208284031215610926578081fd5b5035919050565b60006020828403121561093e578081fd5b5051919050565b9182526001600160e01b031916602082015260240190565b60008251815b8181101561097d5760208186018101518583015201610963565b8181111561098b5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156109fb578351835292840192918401916001016109df565b50909695505050505050565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b60405181810167ffffffffffffffff81118282101715610a4e57600080fd5b604052919050565b6001600160a01b038116811461045357600080fdfea26469706673582212205cd8324bedf0f162cae9e752d3763f56b4bc85ff58eab3a6dc5d842ef61cd1a064736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x93 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x851C1BB3 GT PUSH2 0x66 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0xF1 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x104 JUMPI DUP1 PUSH4 0xD877845C EQ PUSH2 0x119 JUMPI DUP1 PUSH4 0xE42ABF35 EQ PUSH2 0x121 JUMPI DUP1 PUSH4 0xFBFA77CF EQ PUSH2 0x141 JUMPI PUSH2 0x93 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0xAD JUMPI DUP1 PUSH4 0x6B6B9F69 EQ PUSH2 0xCB JUMPI DUP1 PUSH4 0x6DAEFAB6 EQ PUSH2 0xDE JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAB PUSH2 0xA6 CALLDATASIZE PUSH1 0x4 PUSH2 0x915 JUMP JUMPDEST PUSH2 0x149 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB5 PUSH2 0x1A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xAB PUSH2 0xD9 CALLDATASIZE PUSH1 0x4 PUSH2 0x915 JUMP JUMPDEST PUSH2 0x1AE JUMP JUMPDEST PUSH2 0xAB PUSH2 0xEC CALLDATASIZE PUSH1 0x4 PUSH2 0x762 JUMP JUMPDEST PUSH2 0x201 JUMP JUMPDEST PUSH2 0xB5 PUSH2 0xFF CALLDATASIZE PUSH1 0x4 PUSH2 0x8B5 JUMP JUMPDEST PUSH2 0x293 JUMP JUMPDEST PUSH2 0x10C PUSH2 0x2E5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0x996 JUMP JUMPDEST PUSH2 0xB5 PUSH2 0x2F4 JUMP JUMPDEST PUSH2 0x134 PUSH2 0x12F CALLDATASIZE PUSH1 0x4 PUSH2 0x7E3 JUMP JUMPDEST PUSH2 0x2FA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0x9C3 JUMP JUMPDEST PUSH2 0x10C PUSH2 0x401 JUMP JUMPDEST PUSH2 0x151 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x168 PUSH8 0x6F05B59D3B20000 DUP3 GT ISZERO PUSH2 0x258 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x1 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0xA9BA3FFE0B6C366B81232CAAB38605A0699AD5398D6CCE76F91EE809E322DAFC SWAP1 PUSH2 0x19D SWAP1 DUP4 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x1 SLOAD SWAP1 JUMP JUMPDEST PUSH2 0x1B6 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x1CC PUSH7 0x2386F26FC10000 DUP3 GT ISZERO PUSH2 0x259 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x2 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x5A0B7386237E7F07FA741EFC64E59C9387D2CCCAFEC760EFED4D53387F20E19A SWAP1 PUSH2 0x19D SWAP1 DUP4 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH2 0x209 PUSH2 0x468 JUMP JUMPDEST PUSH2 0x211 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x21B DUP5 DUP4 PUSH2 0x481 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x283 JUMPI PUSH1 0x0 DUP7 DUP7 DUP4 DUP2 DUP2 LT PUSH2 0x234 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x249 SWAP2 SWAP1 PUSH2 0x8F9 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 DUP6 DUP5 DUP2 DUP2 LT PUSH2 0x259 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP PUSH2 0x279 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP6 DUP4 PUSH2 0x48E JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x21E JUMP JUMPDEST POP PUSH2 0x28C PUSH2 0x4E9 JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x2C8 SWAP3 SWAP2 SWAP1 PUSH2 0x945 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2EF PUSH2 0x4F0 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x314 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x33E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x3FB JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x359 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x38C SWAP2 SWAP1 PUSH2 0x996 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3B8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x3DC SWAP2 SWAP1 PUSH2 0x92D JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3E8 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x344 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x43C PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x293 JUMP JUMPDEST SWAP1 POP PUSH2 0x453 PUSH2 0x44B DUP3 CALLER PUSH2 0x583 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x456 JUMP JUMPDEST POP JUMP JUMPDEST DUP2 PUSH2 0x464 JUMPI PUSH2 0x464 DUP2 PUSH2 0x615 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x47A PUSH1 0x2 PUSH1 0x0 SLOAD EQ ISZERO PUSH2 0x190 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x2 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH2 0x464 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x456 JUMP JUMPDEST PUSH2 0x4E4 DUP4 PUSH4 0xA9059CBB PUSH1 0xE0 SHL DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x4AD SWAP3 SWAP2 SWAP1 PUSH2 0x9AA JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE PUSH2 0x668 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x54B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x55F JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2EF SWAP2 SWAP1 PUSH2 0x8DD JUMP JUMPDEST PUSH1 0x0 PUSH2 0x58D PUSH2 0x4F0 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5BC SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xA10 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x5D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5E8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x60C SWAP2 SWAP1 PUSH2 0x88E JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x684 SWAP2 SWAP1 PUSH2 0x95D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x6C1 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x6C6 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH1 0x0 DUP3 EQ ISZERO PUSH2 0x6DE JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH2 0x708 DUP2 MLOAD PUSH1 0x0 EQ DUP1 PUSH2 0x700 JUMPI POP DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x700 SWAP2 SWAP1 PUSH2 0x88E JUMP JUMPDEST PUSH2 0x1A2 PUSH2 0x456 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0x71F JUMPI DUP2 DUP3 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x736 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 DUP1 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0x750 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x60F DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x779 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x790 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x79C DUP10 DUP4 DUP11 ADD PUSH2 0x70E JUMP JUMPDEST SWAP1 SWAP8 POP SWAP6 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x7B4 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x7C1 DUP9 DUP3 DUP10 ADD PUSH2 0x70E JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP POP PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH2 0x7D5 DUP2 PUSH2 0xA56 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x7F5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x80C JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x81F JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x82D JUMPI DUP5 DUP6 REVERT JUMPDEST DUP4 DUP2 MUL SWAP2 POP PUSH2 0x83D DUP5 DUP4 ADD PUSH2 0xA2F JUMP JUMPDEST DUP2 DUP2 MSTORE DUP5 DUP2 ADD SWAP1 DUP5 DUP7 ADD DUP5 DUP7 ADD DUP8 ADD DUP11 LT ISZERO PUSH2 0x857 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x881 JUMPI PUSH2 0x86D DUP11 DUP3 PUSH2 0x757 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH2 0x85B JUMP JUMPDEST POP SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x89F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x8AE JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x8C6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x8AE JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x8EE JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x8AE DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x90A JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x8AE DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x926 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x93E JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x97D JUMPI PUSH1 0x20 DUP2 DUP7 ADD DUP2 ADD MLOAD DUP6 DUP4 ADD MSTORE ADD PUSH2 0x963 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x98B JUMPI DUP3 DUP3 DUP6 ADD MSTORE JUMPDEST POP SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x9FB JUMPI DUP4 MLOAD DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x9DF JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0xA4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x453 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x5C 0xD8 ORIGIN 0x4B 0xED CREATE CALL PUSH3 0xCAE9E7 MSTORE 0xD3 PUSH23 0x3F56B4BC85FF58EAB3A6DC5D842EF61CD1A064736F6C63 NUMBER STOP SMOD ADD STOP CALLER ",
              "sourceMap": "1494:3408:49:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3244:315;;;;;;:::i;:::-;;:::i;:::-;;3967:106;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3565:396;;;;;;:::i;:::-;;:::i;2791:447::-;;;;;;:::i;:::-;;:::i;2487:430:2:-;;;;;;:::i;:::-;;:::i;4501:101:49:-;;;:::i;:::-;;;;;;;:::i;4079:116::-;;;:::i;4201:294::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1828:29::-;;;:::i;3244:315::-;2156:21:2;:19;:21::i;:::-;3336:104:49::1;1726:5;3345:20;:57;;9692:3:3;3336:8:49;:104::i;:::-;3450:18;:41:::0;;;3506:46:::1;::::0;::::1;::::0;::::1;::::0;3471:20;;3506:46:::1;:::i;:::-;;;;;;;;3244:315:::0;:::o;3967:106::-;4048:18;;3967:106;:::o;3565:396::-;2156:21:2;:19;:21::i;:::-;3667:155:49::1;1811:4;3689:25;:68;;9764:3:3;3667:8:49;:155::i;:::-;3832:23;:51:::0;;;3898:56:::1;::::0;::::1;::::0;::::1;::::0;3858:25;;3898:56:::1;:::i;2791:447::-:0;2561:20:22;:18;:20::i;:::-;2156:21:2::1;:19;:21::i;:::-;2970:66:49::2;3006:6:::0;3021:7;2970:35:::2;:66::i;:::-;3052:9;3047:185;3067:17:::0;;::::2;3047:185;;;3105:12;3120:6;;3127:1;3120:9;;;;;;;;;;;;;;;;;;;;:::i;:::-;3105:24;;3143:14;3160:7;;3168:1;3160:10;;;;;;;;;::::0;;;::::2;;::::0;-1:-1:-1;3184:37:49::2;::::0;-1:-1:-1;;;;;;3184:18:49;::::2;3203:9:::0;3160:10;3184:18:::2;:37::i;:::-;-1:-1:-1::0;;3086:3:49::2;;3047:185;;;;2602:19:22::0;:17;:19::i;:::-;2791:447:49;;;;;:::o;2487:430:2:-;2555:7;2876:22;2900:8;2859:50;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2849:61;;;;;;2842:68;;2487:430;;;:::o;4501:101:49:-;4549:11;4579:16;:14;:16::i;:::-;4572:23;;4501:101;:::o;4079:116::-;4165:23;;4079:116;:::o;4201:294::-;4280:27;4346:6;:13;4332:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4332:28:49;;4319:41;;4375:9;4370:119;4394:6;:13;4390:1;:17;4370:119;;;4444:6;4451:1;4444:9;;;;;;;;;;;;;;-1:-1:-1;;;;;4444:19:49;;4472:4;4444:34;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4428:10;4439:1;4428:13;;;;;;;;;;;;;;;;;:50;4409:3;;4370:119;;;;4201:294;;;:::o;1828:29::-;;;:::o;2300:181:2:-;2355:16;2374:20;-1:-1:-1;;;;;;2386:7:2;;;2374:11;:20::i;:::-;2355:39;;2404:70;2413:33;2425:8;2435:10;2413:11;:33::i;:::-;6379:3:3;2404:8:2;:70::i;:::-;2300:181;:::o;866:101:3:-;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;2634:271:22:-;2757:48;2061:1;2766:7;;:19;;6323:3:3;2757:8:22;:48::i;:::-;2061:1;2880:7;:18;2634:271::o;855:131:6:-;933:46;947:1;942;:6;5002:3:3;933:8:6;:46::i;605:214:24:-;717:95;745:5;776:23;;;801:2;805:5;753:58;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;753:58:24;;;;;;;;;;;;;;-1:-1:-1;;;;;753:58:24;-1:-1:-1;;;;;;753:58:24;;;;;;;;;;;717:19;:95::i;:::-;605:214;;;:::o;2911:208:22:-;2018:1;3090:7;:22;2911:208::o;4793:107:49:-;4842:11;4872:5;-1:-1:-1;;;;;4872:19:49;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;4608:179::-;4696:4;4719:16;:14;:16::i;:::-;:61;;-1:-1:-1;;;4719:61:49;;-1:-1:-1;;;;;4719:27:49;;;;;;;:61;;4747:8;;4757:7;;4774:4;;4719:61;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4712:68;;4608:179;;;;;:::o;1074:3172:3:-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2210:2;2243:18;;;2336;;;2383;;;2215:4;2379:29;;;3057:2;3053:17;2195:18;;;;2288;;;;2284:29;;;;3040:1;3036:14;3025:26;;;;3021:50;;;;2999:73;;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;1415:799:24;1699:16;;1658:12;;1672:23;;-1:-1:-1;;;;;1699:10:24;;;:16;;1710:4;;1699:16;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1657:58;;;;1853:1;1844:7;1841:14;1838:2;;;1895:16;1892:1;1889;1874:38;1939:16;1936:1;1929:27;1838:2;2110:97;2119:10;:17;2140:1;2119:22;:56;;;;2156:10;2145:30;;;;;;;;;;;;:::i;:::-;7468:3:3;2110:8:24;:97::i;:::-;1415:799;;;;:::o;168:367:-1:-;;;313:3;306:4;298:6;294:17;290:27;280:2;;-1:-1;;321:12;280:2;-1:-1;351:20;;391:18;380:30;;377:2;;;-1:-1;;413:12;377:2;457:4;449:6;445:17;433:29;;508:3;457:4;;492:6;488:17;449:6;474:32;;471:41;468:2;;;525:1;;515:12;468:2;273:262;;;;;:::o;2160:160::-;2242:20;;2267:48;2242:20;2267:48;:::i;2605:833::-;;;;;;2828:2;2816:9;2807:7;2803:23;2799:32;2796:2;;;-1:-1;;2834:12;2796:2;2892:17;2879:31;2930:18;;2922:6;2919:30;2916:2;;;-1:-1;;2952:12;2916:2;2990:95;3077:7;3068:6;3057:9;3053:22;2990:95;:::i;:::-;2972:113;;-1:-1;2972:113;-1:-1;3150:2;3135:18;;3122:32;;-1:-1;3163:30;;;3160:2;;;-1:-1;;3196:12;3160:2;;3234:80;3306:7;3297:6;3286:9;3282:22;3234:80;:::i;:::-;3216:98;;-1:-1;3216:98;-1:-1;;3351:2;3390:22;;72:20;97:33;72:20;97:33;:::i;:::-;3359:63;;;;2790:648;;;;;;;;:::o;3445:407::-;;3589:2;;3577:9;3568:7;3564:23;3560:32;3557:2;;;-1:-1;;3595:12;3557:2;3653:17;3640:31;3691:18;;3683:6;3680:30;3677:2;;;-1:-1;;3713:12;3677:2;3819:6;3808:9;3804:22;;;701:3;694:4;686:6;682:17;678:27;668:2;;-1:-1;;709:12;668:2;756:6;743:20;3691:18;11363:6;11360:30;11357:2;;;-1:-1;;11393:12;11357:2;3589;11430:6;11426:17;;;778:95;3589:2;11426:17;11491:15;778:95;:::i;:::-;901:21;;;958:14;;;;933:17;;;1038:27;;;;;1035:36;-1:-1;1032:2;;;-1:-1;;1074:12;1032:2;-1:-1;1100:10;;1094:221;1119:6;1116:1;1113:13;1094:221;;;1199:52;1247:3;1235:10;1199:52;:::i;:::-;1187:65;;1141:1;1134:9;;;;;1266:14;;;;1294;;1094:221;;;-1:-1;3733:103;3551:301;-1:-1;;;;;;;;3551:301::o;3859:257::-;;3971:2;3959:9;3950:7;3946:23;3942:32;3939:2;;;-1:-1;;3977:12;3939:2;1788:6;1782:13;14507:5;12572:13;12565:21;14485:5;14482:32;14472:2;;-1:-1;;14518:12;14472:2;4029:71;3933:183;-1:-1;;;3933:183::o;4123:239::-;;4226:2;4214:9;4205:7;4201:23;4197:32;4194:2;;;-1:-1;;4232:12;4194:2;1908:20;;-1:-1;;;;;;12738:78;;14602:34;;14592:2;;-1:-1;;14640:12;4369:305;;4505:2;4493:9;4484:7;4480:23;4476:32;4473:2;;;-1:-1;;4511:12;4473:2;2082:6;2076:13;2094:54;2142:5;2094:54;:::i;4681:271::-;;4800:2;4788:9;4779:7;4775:23;4771:32;4768:2;;;-1:-1;;4806:12;4768:2;2255:6;2242:20;2267:48;2309:5;2267:48;:::i;4959:241::-;;5063:2;5051:9;5042:7;5038:23;5034:32;5031:2;;;-1:-1;;5069:12;5031:2;-1:-1;2394:20;;5025:175;-1:-1;5025:175::o;5207:263::-;;5322:2;5310:9;5301:7;5297:23;5293:32;5290:2;;;-1:-1;;5328:12;5290:2;-1:-1;2542:13;;5284:186;-1:-1;5284:186::o;7875:387::-;6579:37;;;-1:-1;;;;;;12738:78;8126:2;8117:12;;6874:56;8226:11;;;8017:245::o;8269:271::-;;7102:5;11784:12;-1:-1;13937:101;13951:6;13948:1;13945:13;13937:101;;;7246:4;14018:11;;;;;14012:18;13999:11;;;13992:39;13966:10;13937:101;;;14053:6;14050:1;14047:13;14044:2;;;-1:-1;14109:6;14104:3;14100:16;14093:27;14044:2;-1:-1;7277:16;;;;;8403:137;-1:-1;;8403:137::o;8547:222::-;-1:-1;;;;;13122:54;;;;5730:37;;8674:2;8659:18;;8645:124::o;8776:333::-;-1:-1;;;;;13122:54;;;;5730:37;;9095:2;9080:18;;6579:37;8931:2;8916:18;;8902:207::o;9116:370::-;9293:2;9307:47;;;11784:12;;9278:18;;;12187:19;;;9116:370;;9293:2;11638:14;;;;12227;;;;9116:370;6218:260;6243:6;6240:1;6237:13;6218:260;;;6304:13;;6579:37;;12042:14;;;;5631;;;;6265:1;6258:9;6218:260;;;-1:-1;9360:116;;9264:222;-1:-1;;;;;;9264:222::o;9493:::-;6579:37;;;9620:2;9605:18;;9591:124::o;9722:444::-;6579:37;;;-1:-1;;;;;13122:54;;;10069:2;10054:18;;5730:37;13122:54;10152:2;10137:18;;5730:37;9905:2;9890:18;;9876:290::o;10934:256::-;10996:2;10990:9;11022:17;;;11097:18;11082:34;;11118:22;;;11079:62;11076:2;;;11154:1;;11144:12;11076:2;10996;11163:22;10974:216;;-1:-1;10974:216::o;14302:117::-;-1:-1;;;;;13122:54;;14361:35;;14351:2;;14410:1;;14400:12"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "544200",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "getActionId(bytes4)": "infinite",
                "getAuthorizer()": "infinite",
                "getCollectedFeeAmounts(address[])": "infinite",
                "getFlashLoanFeePercentage()": "1072",
                "getSwapFeePercentage()": "1051",
                "setFlashLoanFeePercentage(uint256)": "infinite",
                "setSwapFeePercentage(uint256)": "infinite",
                "vault()": "infinite",
                "withdrawCollectedFees(address[],uint256[],address)": "infinite"
              },
              "internal": {
                "_canPerform(bytes32,address)": "infinite",
                "_getAuthorizer()": "infinite"
              }
            },
            "methodIdentifiers": {
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getCollectedFeeAmounts(address[])": "e42abf35",
              "getFlashLoanFeePercentage()": "d877845c",
              "getSwapFeePercentage()": "55c67628",
              "setFlashLoanFeePercentage(uint256)": "6b6b9f69",
              "setSwapFeePercentage(uint256)": "38e9922e",
              "vault()": "fbfa77cf",
              "withdrawCollectedFees(address[],uint256[],address)": "6daefab6"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IVault\",\"name\":\"_vault\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newFlashLoanFeePercentage\",\"type\":\"uint256\"}],\"name\":\"FlashLoanFeePercentageChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSwapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"SwapFeePercentageChanged\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getCollectedFeeAmounts\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"feeAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFlashLoanFeePercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSwapFeePercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newFlashLoanFeePercentage\",\"type\":\"uint256\"}],\"name\":\"setFlashLoanFeePercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newSwapFeePercentage\",\"type\":\"uint256\"}],\"name\":\"setSwapFeePercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vault\",\"outputs\":[{\"internalType\":\"contract IVault\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawCollectedFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the Vault performs to reduce its overall bytecode size. The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated to the Vault's own authorizer.\",\"kind\":\"dev\",\"methods\":{\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/ProtocolFeesCollector.sol\":\"ProtocolFeesCollector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/ProtocolFeesCollector.sol:ProtocolFeesCollector",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 16046,
                "contract": "src.sol/amm/vault/ProtocolFeesCollector.sol:ProtocolFeesCollector",
                "label": "_swapFeePercentage",
                "offset": 0,
                "slot": "1",
                "type": "t_uint256"
              },
              {
                "astId": 16048,
                "contract": "src.sol/amm/vault/ProtocolFeesCollector.sol:ProtocolFeesCollector",
                "label": "_flashLoanFeePercentage",
                "offset": 0,
                "slot": "2",
                "type": "t_uint256"
              }
            ],
            "types": {
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/Swaps.sol": {
        "Swaps": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "amountCalculated",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "stateMutability": "payable",
              "type": "receive"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountCalculated\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Implements the Vault's high-level swap functionality. Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. They need not trust the Pool contracts to do this: all security checks are made by the Vault. The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence. In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'), and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out'). More complex swaps, such as one 'token in' to multiple tokens out can be achieved by batching together individual swaps.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/Swaps.sol\":\"Swaps\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\\n    }\\n}\\n\",\"keccak256\":\"0x5f83465783b239828f83c626bae1ac944cfff074c8919c245d14b208bcf317d5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n// Based on the EnumerableMap library from OpenZeppelin contracts, altered to include the following:\\n//  * a map from IERC20 to bytes32\\n//  * entries are stored in mappings instead of arrays, reducing implicit storage reads for out-of-bounds checks\\n//  * unchecked_at and unchecked_valueAt, which allow for more gas efficient data reads in some scenarios\\n//  * unchecked_indexOf and unchecked_setAt, which allow for more gas efficient data writes in some scenarios\\n//\\n// Additionally, the base private functions that work on bytes32 were removed and replaced with a native implementation\\n// for IERC20 keys, to reduce bytecode size and runtime costs.\\n\\n// We're using non-standard casing for the unchecked functions to differentiate them, so we need to turn off that rule\\n// solhint-disable func-name-mixedcase\\n\\nimport \\\"./IERC20.sol\\\";\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n *     // Declare a set state variable\\n *     EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n */\\nlibrary EnumerableMap {\\n    // The original OpenZeppelin implementation uses a generic Map type with bytes32 keys: this was replaced with\\n    // IERC20ToBytes32Map, which uses IERC20 keys natively, resulting in more dense bytecode.\\n\\n    struct IERC20ToBytes32MapEntry {\\n        IERC20 _key;\\n        bytes32 _value;\\n    }\\n\\n    struct IERC20ToBytes32Map {\\n        // Number of entries in the map\\n        uint256 _length;\\n        // Storage of map keys and values\\n        mapping(uint256 => IERC20ToBytes32MapEntry) _entries;\\n        // Position of the entry defined by a key in the `entries` array, plus 1\\n        // because index 0 means a key is not in the map.\\n        mapping(IERC20 => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\\n     * key. O(1).\\n     *\\n     * Returns true if the key was added to the map, that is if it was not\\n     * already present.\\n     */\\n    function set(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        bytes32 value\\n    ) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to !contains(map, key)\\n        if (keyIndex == 0) {\\n            uint256 previousLength = map._length;\\n            map._entries[previousLength] = IERC20ToBytes32MapEntry({ _key: key, _value: value });\\n            map._length = previousLength + 1;\\n\\n            // The entry is stored at previousLength, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            map._indexes[key] = previousLength + 1;\\n            return true;\\n        } else {\\n            map._entries[keyIndex - 1]._value = value;\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\\n     * {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\\n     *\\n     * This function performs one less storage read than {set}, but it should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_setAt(\\n        IERC20ToBytes32Map storage map,\\n        uint256 index,\\n        bytes32 value\\n    ) internal {\\n        map._entries[index]._value = value;\\n    }\\n\\n    /**\\n     * @dev Removes a key-value pair from a map. O(1).\\n     *\\n     * Returns true if the key was removed from the map, that is if it was present.\\n     */\\n    function remove(IERC20ToBytes32Map storage map, IERC20 key) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to contains(map, key)\\n        if (keyIndex != 0) {\\n            // To delete a key-value pair from the _entries pseudo-array in O(1), we swap the entry to delete with the\\n            // one at the highest index, and then remove this last entry (sometimes called as 'swap and pop').\\n            // This modifies the order of the pseudo-array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = keyIndex - 1;\\n            uint256 lastIndex = map._length - 1;\\n\\n            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            IERC20ToBytes32MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n            // Move the last entry to the index where the entry to delete is\\n            map._entries[toDeleteIndex] = lastEntry;\\n            // Update the index for the moved entry\\n            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved entry was stored\\n            delete map._entries[lastIndex];\\n            map._length = lastIndex;\\n\\n            // Delete the index for the deleted slot\\n            delete map._indexes[key];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the key is in the map. O(1).\\n     */\\n    function contains(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (bool) {\\n        return map._indexes[key] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of key-value pairs in the map. O(1).\\n     */\\n    function length(IERC20ToBytes32Map storage map) internal view returns (uint256) {\\n        return map._length;\\n    }\\n\\n    /**\\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of entries inside the\\n     * array, and it may change when more entries are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        _require(map._length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(map, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        IERC20ToBytes32MapEntry storage entry = map._entries[index];\\n        return (entry._key, entry._value);\\n    }\\n\\n    /**\\n     * @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\\n     * read). O(1).\\n     */\\n    function unchecked_valueAt(IERC20ToBytes32Map storage map, uint256 index) internal view returns (bytes32) {\\n        return map._entries[index]._value;\\n    }\\n\\n    /**\\n     * @dev Returns the value associated with `key`. O(1).\\n     *\\n     * Requirements:\\n     *\\n     * - `key` must be in the map. Reverts with `errorCode` otherwise.\\n     */\\n    function get(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        uint256 errorCode\\n    ) internal view returns (bytes32) {\\n        uint256 index = map._indexes[key];\\n        _require(index > 0, errorCode);\\n        return unchecked_valueAt(map, index - 1);\\n    }\\n\\n    /**\\n     * @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\\n     * instead.\\n     */\\n    function unchecked_indexOf(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (uint256) {\\n        return map._indexes[key];\\n    }\\n}\\n\",\"keccak256\":\"0x0e7bb50a1095a2a000328ef2243fca7b556ebccfe594f4466d0853f56ed07755\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n    /**\\n     * @dev Converts an unsigned uint256 into a signed int256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be less than or equal to maxInt256.\\n     */\\n    function toInt256(uint256 value) internal pure returns (int256) {\\n        _require(value < 2**255, Errors.SAFE_CAST_VALUE_CANT_FIT_INT256);\\n        return int256(value);\\n    }\\n}\\n\",\"keccak256\":\"0xfefa8c6b6aed0ac9df03ac0c4cce2a94da8d8815bb7f1459fef9f93ada8d316d\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/AssetManagers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./UserBalance.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\nimport \\\"./balances/GeneralPoolsBalance.sol\\\";\\nimport \\\"./balances/MinimalSwapInfoPoolsBalance.sol\\\";\\nimport \\\"./balances/TwoTokenPoolsBalance.sol\\\";\\n\\nabstract contract AssetManagers is\\n    ReentrancyGuard,\\n    GeneralPoolsBalance,\\n    MinimalSwapInfoPoolsBalance,\\n    TwoTokenPoolsBalance\\n{\\n    using Math for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Stores the Asset Manager for each token of each Pool.\\n    mapping(bytes32 => mapping(IERC20 => address)) internal _poolAssetManagers;\\n\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external override nonReentrant whenNotPaused {\\n        // This variable could be declared inside the loop, but that causes the compiler to allocate memory on each\\n        // loop iteration, increasing gas costs.\\n        PoolBalanceOp memory op;\\n\\n        for (uint256 i = 0; i < ops.length; ++i) {\\n            // By indexing the array only once, we don't spend extra gas in the same bounds check.\\n            op = ops[i];\\n\\n            bytes32 poolId = op.poolId;\\n            _ensureRegisteredPool(poolId);\\n\\n            IERC20 token = op.token;\\n            _require(_isTokenRegistered(poolId, token), Errors.TOKEN_NOT_REGISTERED);\\n            _require(_poolAssetManagers[poolId][token] == msg.sender, Errors.SENDER_NOT_ASSET_MANAGER);\\n\\n            PoolBalanceOpKind kind = op.kind;\\n            uint256 amount = op.amount;\\n            (int256 cashDelta, int256 managedDelta) = _performPoolManagementOperation(kind, poolId, token, amount);\\n\\n            emit PoolBalanceManaged(poolId, msg.sender, token, cashDelta, managedDelta);\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs the `kind` Asset Manager operation on a Pool.\\n     *\\n     * Withdrawals will transfer `amount` tokens to the caller, deposits will transfer `amount` tokens from the caller,\\n     * and updates will set the managed balance to `amount`.\\n     *\\n     * Returns a tuple with the 'cash' and 'managed' balance deltas as a result of this call.\\n     */\\n    function _performPoolManagementOperation(\\n        PoolBalanceOpKind kind,\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256, int256) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (kind == PoolBalanceOpKind.WITHDRAW) {\\n            return _withdrawPoolBalance(poolId, specialization, token, amount);\\n        } else if (kind == PoolBalanceOpKind.DEPOSIT) {\\n            return _depositPoolBalance(poolId, specialization, token, amount);\\n        } else {\\n            // PoolBalanceOpKind.UPDATE\\n            return _updateManagedBalance(poolId, specialization, token, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'cash' to 'managed' balance, and transfers them to the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _withdrawPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolCashToManaged(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolCashToManaged(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolCashToManaged(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransfer(msg.sender, amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(-amount);\\n        managedDelta = int256(amount);\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'managed' to 'cash' balance, and transfers them from the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _depositPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolManagedToCash(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolManagedToCash(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolManagedToCash(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransferFrom(msg.sender, address(this), amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(amount);\\n        managedDelta = int256(-amount);\\n    }\\n\\n    /**\\n     * @dev Sets a Pool's 'managed' balance to `amount`.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call (the 'cash' delta will always be zero).\\n     */\\n    function _updateManagedBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            managedDelta = _setTwoTokenPoolManagedBalance(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            managedDelta = _setMinimalSwapInfoPoolManagedBalance(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            managedDelta = _setGeneralPoolManagedBalance(poolId, token, amount);\\n        }\\n\\n        cashDelta = 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered for `poolId`.\\n     */\\n    function _isTokenRegistered(bytes32 poolId, IERC20 token) private view returns (bool) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _isTwoTokenPoolTokenRegistered(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _isMinimalSwapInfoPoolTokenRegistered(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _isGeneralPoolTokenRegistered(poolId, token);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xef8f7cdf851eaf8e97e55d4510739b32722de4de07cf069ddfa76ced2c9cd193\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/AssetTransfersHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/AssetHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/Address.sol\\\";\\n\\nimport \\\"./interfaces/IWETH.sol\\\";\\nimport \\\"./interfaces/IAsset.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\nabstract contract AssetTransfersHandler is AssetHelpers {\\n    using SafeERC20 for IERC20;\\n    using Address for address payable;\\n\\n    /**\\n     * @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\\n     * as possible from Internal Balance, then transfers any remaining amount.\\n     *\\n     * If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * will be wrapped into WETH.\\n     *\\n     * WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\\n     * caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\\n     * typically doesn't hold any).\\n     */\\n    function _receiveAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address sender,\\n        bool fromInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            _require(!fromInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // The ETH amount to receive is deposited into the WETH contract, which will in turn mint WETH for\\n            // the Vault at a 1:1 ratio.\\n\\n            // A check for this condition is also introduced by the compiler, but this one provides a revert reason.\\n            // Note we're checking for the Vault's total balance, *not* ETH sent in this transaction.\\n            _require(address(this).balance >= amount, Errors.INSUFFICIENT_ETH);\\n            _WETH().deposit{ value: amount }();\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n\\n            if (fromInternalBalance) {\\n                // We take as many tokens from Internal Balance as possible: any remaining amounts will be transferred.\\n                uint256 deductedBalance = _decreaseInternalBalance(sender, token, amount, true);\\n                // Because `deductedBalance` will be always the lesser of the current internal balance\\n                // and the amount to decrease, it is safe to perform unchecked arithmetic.\\n                amount -= deductedBalance;\\n            }\\n\\n            if (amount > 0) {\\n                token.safeTransferFrom(sender, address(this), amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\\n     * Balance instead of being transferred.\\n     *\\n     * If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * are instead sent directly after unwrapping WETH.\\n     */\\n    function _sendAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address payable recipient,\\n        bool toInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            // Sending ETH is not as involved as receiving it: the only special behavior is it cannot be\\n            // deposited to Internal Balance.\\n            _require(!toInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // First, the Vault withdraws deposited ETH from the WETH contract, by burning the same amount of WETH\\n            // from the Vault. This receipt will be handled by the Vault's `receive`.\\n            _WETH().withdraw(amount);\\n\\n            // Then, the withdrawn ETH is sent to the recipient.\\n            recipient.sendValue(amount);\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n            if (toInternalBalance) {\\n                _increaseInternalBalance(recipient, token, amount);\\n            } else {\\n                token.safeTransfer(recipient, amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\\n     * if the caller sent less ETH than `amountUsed`.\\n     *\\n     * Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\\n     * Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\\n     * not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\\n     * returned ETH.\\n     */\\n    function _handleRemainingEth(uint256 amountUsed) internal {\\n        _require(msg.value >= amountUsed, Errors.INSUFFICIENT_ETH);\\n\\n        uint256 excess = msg.value - amountUsed;\\n        if (excess > 0) {\\n            msg.sender.sendValue(excess);\\n        }\\n    }\\n\\n    /**\\n     * @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\\n     * caller.\\n     *\\n     * Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\\n     * we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\\n     * ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\\n     * locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\\n     * prevent user error.\\n     */\\n    receive() external payable {\\n        _require(msg.sender == address(_WETH()), Errors.ETH_TRANSFER);\\n    }\\n\\n    // This contract uses virtual internal functions instead of inheriting from the modules that implement them (in\\n    // this case UserBalance) in order to decouple it from the rest of the system and enable standalone testing by\\n    // implementing these with mocks.\\n\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal virtual;\\n\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool capped\\n    ) internal virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x5534195c226355beb7c084ac01ac615920c6f7fbec550dab472827318536c9cb\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/Fees.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./ProtocolFeesCollector.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\n/**\\n * @dev To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the\\n * ProtocolFeesCollector contract.\\n */\\nabstract contract Fees is IVault {\\n    using SafeERC20 for IERC20;\\n\\n    ProtocolFeesCollector private immutable _protocolFeesCollector;\\n\\n    constructor() {\\n        _protocolFeesCollector = new ProtocolFeesCollector(IVault(this));\\n    }\\n\\n    function getProtocolFeesCollector() public view override returns (ProtocolFeesCollector) {\\n        return _protocolFeesCollector;\\n    }\\n\\n    /**\\n     * @dev Returns the protocol swap fee percentage.\\n     */\\n    function _getProtocolSwapFeePercentage() internal view returns (uint256) {\\n        return getProtocolFeesCollector().getSwapFeePercentage();\\n    }\\n\\n    /**\\n     * @dev Returns the protocol fee amount to charge for a flash loan of `amount`.\\n     */\\n    function _calculateFlashLoanFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // Fixed point multiplication introduces error: we round up, which means in certain scenarios the charged\\n        // percentage can be slightly higher than intended.\\n        uint256 percentage = getProtocolFeesCollector().getFlashLoanFeePercentage();\\n        return FixedPoint.mulUp(amount, percentage);\\n    }\\n\\n    function _payFee(IERC20 token, uint256 amount) internal {\\n        if (amount > 0) {\\n            token.safeTransfer(address(getProtocolFeesCollector()), amount);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaed6f3ebf261e68a5093bb6b775d4c6c85eb9c7133aa20e701013f02edc4a6e3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolBalances.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./Fees.sol\\\";\\nimport \\\"./PoolTokens.sol\\\";\\nimport \\\"./UserBalance.sol\\\";\\nimport \\\"./interfaces/IBasePool.sol\\\";\\n\\n/**\\n * @dev Stores the Asset Managers (by Pool and token), and implements the top level Asset Manager and Pool interfaces,\\n * such as registering and deregistering tokens, joining and exiting Pools, and informational functions like `getPool`\\n * and `getPoolTokens`, delegating to specialization-specific functions as needed.\\n *\\n * `managePoolBalance` handles all Asset Manager interactions.\\n */\\nabstract contract PoolBalances is Fees, ReentrancyGuard, PoolTokens, UserBalance {\\n    using Math for uint256;\\n    using SafeERC20 for IERC20;\\n    using BalanceAllocation for bytes32;\\n    using BalanceAllocation for bytes32[];\\n\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable override whenNotPaused {\\n        // This function doesn't have the nonReentrant modifier: it is applied to `_joinOrExit` instead.\\n\\n        // Note that `recipient` is not actually payable in the context of a join - we cast it because we handle both\\n        // joins and exits at once.\\n        _joinOrExit(PoolBalanceChangeKind.JOIN, poolId, sender, payable(recipient), _toPoolBalanceChange(request));\\n    }\\n\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external override {\\n        // This function doesn't have the nonReentrant modifier: it is applied to `_joinOrExit` instead.\\n        _joinOrExit(PoolBalanceChangeKind.EXIT, poolId, sender, recipient, _toPoolBalanceChange(request));\\n    }\\n\\n    // This has the exact same layout as JoinPoolRequest and ExitPoolRequest, except the `maxAmountsIn` and\\n    // `minAmountsOut` are called `limits`. Internally we use this struct for both since these two functions are quite\\n    // similar, but expose the others to callers for clarity.\\n    struct PoolBalanceChange {\\n        IAsset[] assets;\\n        uint256[] limits;\\n        bytes userData;\\n        bool useInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Converts a JoinPoolRequest into a PoolBalanceChange, with no runtime cost.\\n     */\\n    function _toPoolBalanceChange(JoinPoolRequest memory request)\\n        private\\n        pure\\n        returns (PoolBalanceChange memory change)\\n    {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            change := request\\n        }\\n    }\\n\\n    /**\\n     * @dev Converts an ExitPoolRequest into a PoolBalanceChange, with no runtime cost.\\n     */\\n    function _toPoolBalanceChange(ExitPoolRequest memory request)\\n        private\\n        pure\\n        returns (PoolBalanceChange memory change)\\n    {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            change := request\\n        }\\n    }\\n\\n    /**\\n     * @dev Implements both `joinPool` and `exitPool`, based on `kind`.\\n     */\\n    function _joinOrExit(\\n        PoolBalanceChangeKind kind,\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        PoolBalanceChange memory change\\n    ) private nonReentrant withRegisteredPool(poolId) authenticateFor(sender) {\\n        // This function uses a large number of stack variables (poolId, sender and recipient, balances, amounts, fees,\\n        // etc.), which leads to 'stack too deep' issues. It relies on private functions with seemingly arbitrary\\n        // interfaces to work around this limitation.\\n\\n        InputHelpers.ensureInputLengthMatch(change.assets.length, change.limits.length);\\n\\n        // We first check that the caller passed the Pool's registered tokens in the correct order, and retrieve the\\n        // current balance for each.\\n        IERC20[] memory tokens = _translateToIERC20(change.assets);\\n        bytes32[] memory balances = _validateTokensAndGetBalances(poolId, tokens);\\n\\n        // The bulk of the work is done here: the corresponding Pool hook is called, its final balances are computed,\\n        // assets are transferred, and fees are paid.\\n        (\\n            bytes32[] memory finalBalances,\\n            uint256[] memory amountsInOrOut,\\n            uint256[] memory paidProtocolSwapFeeAmounts\\n        ) = _callPoolBalanceChange(kind, poolId, sender, recipient, change, balances);\\n\\n        // All that remains is storing the new Pool balances.\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _setTwoTokenPoolCashBalances(poolId, tokens[0], finalBalances[0], tokens[1], finalBalances[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _setMinimalSwapInfoPoolBalances(poolId, tokens, finalBalances);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _setGeneralPoolBalances(poolId, finalBalances);\\n        }\\n\\n        bool positive = kind == PoolBalanceChangeKind.JOIN; // Amounts in are positive, out are negative\\n        emit PoolBalanceChanged(\\n            poolId,\\n            sender,\\n            tokens,\\n            // We can unsafely cast to int256 because balances are actually stored as uint112\\n            _unsafeCastToInt256(amountsInOrOut, positive),\\n            paidProtocolSwapFeeAmounts\\n        );\\n    }\\n\\n    /**\\n     * @dev Calls the corresponding Pool hook to get the amounts in/out plus protocol fee amounts, and performs the\\n     * associated token transfers and fee payments, returning the Pool's final balances.\\n     */\\n    function _callPoolBalanceChange(\\n        PoolBalanceChangeKind kind,\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances\\n    )\\n        private\\n        returns (\\n            bytes32[] memory finalBalances,\\n            uint256[] memory amountsInOrOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        (uint256[] memory totalBalances, uint256 lastChangeBlock) = balances.totalsAndLastChangeBlock();\\n\\n        IBasePool pool = IBasePool(_getPoolAddress(poolId));\\n        (amountsInOrOut, dueProtocolFeeAmounts) = kind == PoolBalanceChangeKind.JOIN\\n            ? pool.onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                totalBalances,\\n                lastChangeBlock,\\n                _getProtocolSwapFeePercentage(),\\n                change.userData\\n            )\\n            : pool.onExitPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                totalBalances,\\n                lastChangeBlock,\\n                _getProtocolSwapFeePercentage(),\\n                change.userData\\n            );\\n\\n        InputHelpers.ensureInputLengthMatch(balances.length, amountsInOrOut.length, dueProtocolFeeAmounts.length);\\n\\n        // The Vault ignores the `recipient` in joins and the `sender` in exits: it is up to the Pool to keep track of\\n        // their participation.\\n        finalBalances = kind == PoolBalanceChangeKind.JOIN\\n            ? _processJoinPoolTransfers(sender, change, balances, amountsInOrOut, dueProtocolFeeAmounts)\\n            : _processExitPoolTransfers(recipient, change, balances, amountsInOrOut, dueProtocolFeeAmounts);\\n    }\\n\\n    /**\\n     * @dev Transfers `amountsIn` from `sender`, checking that they are within their accepted limits, and pays\\n     * accumulated protocol swap fees.\\n     *\\n     * Returns the Pool's final balances, which are the current balances plus `amountsIn` minus accumulated protocol\\n     * swap fees.\\n     */\\n    function _processJoinPoolTransfers(\\n        address sender,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256[] memory dueProtocolFeeAmounts\\n    ) private returns (bytes32[] memory finalBalances) {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 wrappedEth = 0;\\n\\n        finalBalances = new bytes32[](balances.length);\\n        for (uint256 i = 0; i < change.assets.length; ++i) {\\n            uint256 amountIn = amountsIn[i];\\n            _require(amountIn <= change.limits[i], Errors.JOIN_ABOVE_MAX);\\n\\n            // Receive assets from the sender - possibly from Internal Balance.\\n            IAsset asset = change.assets[i];\\n            _receiveAsset(asset, amountIn, sender, change.useInternalBalance);\\n\\n            if (_isETH(asset)) {\\n                wrappedEth = wrappedEth.add(amountIn);\\n            }\\n\\n            uint256 feeAmount = dueProtocolFeeAmounts[i];\\n            _payFee(_translateToIERC20(asset), feeAmount);\\n\\n            // Compute the new Pool balances. Note that the fee amount might be larger than `amountIn`,\\n            // resulting in an overall decrease of the Pool's balance for a token.\\n            finalBalances[i] = (amountIn >= feeAmount) // This lets us skip checked arithmetic\\n                ? balances[i].increaseCash(amountIn - feeAmount)\\n                : balances[i].decreaseCash(feeAmount - amountIn);\\n        }\\n\\n        // Handle any used and remaining ETH.\\n        _handleRemainingEth(wrappedEth);\\n    }\\n\\n    /**\\n     * @dev Transfers `amountsOut` to `recipient`, checking that they are within their accepted limits, and pays\\n     * accumulated protocol swap fees from the Pool.\\n     *\\n     * Returns the Pool's final balances, which are the current `balances` minus `amountsOut` and fees paid\\n     * (`dueProtocolFeeAmounts`).\\n     */\\n    function _processExitPoolTransfers(\\n        address payable recipient,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256[] memory dueProtocolFeeAmounts\\n    ) private returns (bytes32[] memory finalBalances) {\\n        finalBalances = new bytes32[](balances.length);\\n        for (uint256 i = 0; i < change.assets.length; ++i) {\\n            uint256 amountOut = amountsOut[i];\\n            _require(amountOut >= change.limits[i], Errors.EXIT_BELOW_MIN);\\n\\n            // Send tokens to the recipient - possibly to Internal Balance\\n            IAsset asset = change.assets[i];\\n            _sendAsset(asset, amountOut, recipient, change.useInternalBalance);\\n\\n            uint256 feeAmount = dueProtocolFeeAmounts[i];\\n            _payFee(_translateToIERC20(asset), feeAmount);\\n\\n            // Compute the new Pool balances. A Pool's token balance always decreases after an exit (potentially by 0).\\n            finalBalances[i] = balances[i].decreaseCash(amountOut.add(feeAmount));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for `poolId`'s `expectedTokens`.\\n     *\\n     * `expectedTokens` must exactly equal the token array returned by `getPoolTokens`: both arrays must have the same\\n     * length, elements and order. Additionally, the Pool must have at least one registered token.\\n     */\\n    function _validateTokensAndGetBalances(bytes32 poolId, IERC20[] memory expectedTokens)\\n        private\\n        view\\n        returns (bytes32[] memory)\\n    {\\n        (IERC20[] memory actualTokens, bytes32[] memory balances) = _getPoolTokens(poolId);\\n        InputHelpers.ensureInputLengthMatch(actualTokens.length, expectedTokens.length);\\n        _require(actualTokens.length > 0, Errors.POOL_NO_TOKENS);\\n\\n        for (uint256 i = 0; i < actualTokens.length; ++i) {\\n            _require(actualTokens[i] == expectedTokens[i], Errors.TOKENS_MISMATCH);\\n        }\\n\\n        return balances;\\n    }\\n\\n    /**\\n     * @dev Casts an array of uint256 to int256, setting the sign of the result according to the `positive` flag,\\n     * without checking whether the values fit in the signed 256 bit range.\\n     */\\n    function _unsafeCastToInt256(uint256[] memory values, bool positive)\\n        private\\n        pure\\n        returns (int256[] memory signedValues)\\n    {\\n        signedValues = new int256[](values.length);\\n        for (uint256 i = 0; i < values.length; i++) {\\n            signedValues[i] = positive ? int256(values[i]) : -int256(values[i]);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xe9a33a9311984449a3271bbd0cbf5970cd4c1910179afdaee2a62413ebaf5ba8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\\n * and helper functions for ensuring correct behavior when working with Pools.\\n */\\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\\n    // types.\\n    mapping(bytes32 => bool) private _isPoolRegistered;\\n\\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\\n    uint256 private _nextPoolNonce;\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    modifier withRegisteredPool(bytes32 poolId) {\\n        _ensureRegisteredPool(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    modifier onlyPool(bytes32 poolId) {\\n        _ensurePoolIsSender(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    function _ensurePoolIsSender(bytes32 poolId) private view {\\n        _ensureRegisteredPool(poolId);\\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\\n    }\\n\\n    function registerPool(PoolSpecialization specialization)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        returns (bytes32)\\n    {\\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\\n        // 2**80 Pools, and the nonce will not overflow.\\n\\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\\n\\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\\n        _isPoolRegistered[poolId] = true;\\n\\n        _nextPoolNonce += 1;\\n\\n        emit PoolRegistered(poolId);\\n        return poolId;\\n    }\\n\\n    function getPool(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (address, PoolSpecialization)\\n    {\\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\\n    }\\n\\n    /**\\n     * @dev Creates a Pool ID.\\n     *\\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\\n     *\\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\\n     * unique.\\n     *\\n     * Pool IDs have the following layout:\\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\\n     * MSB                                                                              LSB\\n     *\\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\\n     * suffice. However, there's nothing else of interest to store in this extra space.\\n     */\\n    function _toPoolId(\\n        address pool,\\n        PoolSpecialization specialization,\\n        uint80 nonce\\n    ) internal pure returns (bytes32) {\\n        bytes32 serialized;\\n\\n        serialized |= bytes32(uint256(nonce));\\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\\n\\n        return serialized;\\n    }\\n\\n    /**\\n     * @dev Returns the address of a Pool's contract.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\\n        // since the logical shift already sets the upper bits to zero.\\n        return address(uint256(poolId) >> (12 * 8));\\n    }\\n\\n    /**\\n     * @dev Returns the specialization setting of a Pool.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\\n\\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\\n        // string: we instead perform the check ourselves to help in error diagnosis.\\n\\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\\n        // values 0, 1 and 2.\\n        _require(value < 3, Errors.INVALID_POOL_ID);\\n\\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            specialization := value\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaf06c559c8a964e9b43308003b43cf698bda38d88cc26118b55394017a369327\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolTokens.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./AssetManagers.sol\\\";\\nimport \\\"./PoolRegistry.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\n\\nabstract contract PoolTokens is ReentrancyGuard, PoolRegistry, AssetManagers {\\n    using BalanceAllocation for bytes32;\\n    using BalanceAllocation for bytes32[];\\n\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external override nonReentrant whenNotPaused onlyPool(poolId) {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, assetManagers.length);\\n\\n        // Validates token addresses and assigns Asset Managers\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(token != IERC20(0), Errors.INVALID_TOKEN);\\n\\n            _poolAssetManagers[poolId][token] = assetManagers[i];\\n        }\\n\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\\n            _registerTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _registerMinimalSwapInfoPoolTokens(poolId, tokens);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _registerGeneralPoolTokens(poolId, tokens);\\n        }\\n\\n        emit TokensRegistered(poolId, tokens, assetManagers);\\n    }\\n\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        onlyPool(poolId)\\n    {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\\n            _deregisterTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _deregisterMinimalSwapInfoPoolTokens(poolId, tokens);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _deregisterGeneralPoolTokens(poolId, tokens);\\n        }\\n\\n        // The deregister calls above ensure the total token balance is zero. Therefore it is now safe to remove any\\n        // associated Asset Managers, since they hold no Pool balance.\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            delete _poolAssetManagers[poolId][tokens[i]];\\n        }\\n\\n        emit TokensDeregistered(poolId, tokens);\\n    }\\n\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        )\\n    {\\n        bytes32[] memory rawBalances;\\n        (tokens, rawBalances) = _getPoolTokens(poolId);\\n        (balances, lastChangeBlock) = rawBalances.totalsAndLastChangeBlock();\\n    }\\n\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        )\\n    {\\n        bytes32 balance;\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            balance = _getTwoTokenPoolBalance(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            balance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            balance = _getGeneralPoolBalance(poolId, token);\\n        }\\n\\n        cash = balance.cash();\\n        managed = balance.managed();\\n        lastChangeBlock = balance.lastChangeBlock();\\n        assetManager = _poolAssetManagers[poolId][token];\\n    }\\n\\n    /**\\n     * @dev Returns all of `poolId`'s registered tokens, along with their raw balances.\\n     */\\n    function _getPoolTokens(bytes32 poolId) internal view returns (IERC20[] memory tokens, bytes32[] memory balances) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _getTwoTokenPoolTokens(poolId);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _getMinimalSwapInfoPoolTokens(poolId);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _getGeneralPoolTokens(poolId);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd68fdb5d0d889ebbb8084921492d441792b4eed7164d3ded3cd5f531fe237629\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/Swaps.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/EnumerableMap.sol\\\";\\nimport \\\"../lib/openzeppelin/EnumerableSet.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeCast.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./PoolBalances.sol\\\";\\nimport \\\"./interfaces/IPoolSwapStructs.sol\\\";\\nimport \\\"./interfaces/IGeneralPool.sol\\\";\\nimport \\\"./interfaces/IMinimalSwapInfoPool.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\n\\n/**\\n * Implements the Vault's high-level swap functionality.\\n *\\n * Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. They need not trust the Pool\\n * contracts to do this: all security checks are made by the Vault.\\n *\\n * The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n * In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n * and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n * More complex swaps, such as one 'token in' to multiple tokens out can be achieved by batching together\\n * individual swaps.\\n */\\nabstract contract Swaps is ReentrancyGuard, PoolBalances {\\n    using SafeERC20 for IERC20;\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\\n\\n    using Math for int256;\\n    using Math for uint256;\\n    using SafeCast for uint256;\\n    using BalanceAllocation for bytes32;\\n\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    )\\n        external\\n        payable\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        authenticateFor(funds.sender)\\n        returns (uint256 amountCalculated)\\n    {\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.SWAP_DEADLINE);\\n\\n        // This revert reason is for consistency with `batchSwap`: an equivalent `swap` performed using that function\\n        // would result in this error.\\n        _require(singleSwap.amount > 0, Errors.UNKNOWN_AMOUNT_IN_FIRST_SWAP);\\n\\n        IERC20 tokenIn = _translateToIERC20(singleSwap.assetIn);\\n        IERC20 tokenOut = _translateToIERC20(singleSwap.assetOut);\\n        _require(tokenIn != tokenOut, Errors.CANNOT_SWAP_SAME_TOKEN);\\n\\n        // Initializing each struct field one-by-one uses less gas than setting all at once.\\n        IPoolSwapStructs.SwapRequest memory poolRequest;\\n        poolRequest.poolId = singleSwap.poolId;\\n        poolRequest.kind = singleSwap.kind;\\n        poolRequest.tokenIn = tokenIn;\\n        poolRequest.tokenOut = tokenOut;\\n        poolRequest.amount = singleSwap.amount;\\n        poolRequest.userData = singleSwap.userData;\\n        poolRequest.from = funds.sender;\\n        poolRequest.to = funds.recipient;\\n        // The lastChangeBlock field is left uninitialized.\\n\\n        uint256 amountIn;\\n        uint256 amountOut;\\n\\n        (amountCalculated, amountIn, amountOut) = _swapWithPool(poolRequest);\\n        _require(singleSwap.kind == SwapKind.GIVEN_IN ? amountOut >= limit : amountIn <= limit, Errors.SWAP_LIMIT);\\n\\n        _receiveAsset(singleSwap.assetIn, amountIn, funds.sender, funds.fromInternalBalance);\\n        _sendAsset(singleSwap.assetOut, amountOut, funds.recipient, funds.toInternalBalance);\\n\\n        // If the asset in is ETH, then `amountIn` ETH was wrapped into WETH.\\n        _handleRemainingEth(_isETH(singleSwap.assetIn) ? amountIn : 0);\\n    }\\n\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    )\\n        external\\n        payable\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        authenticateFor(funds.sender)\\n        returns (int256[] memory assetDeltas)\\n    {\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.SWAP_DEADLINE);\\n\\n        InputHelpers.ensureInputLengthMatch(assets.length, limits.length);\\n\\n        // Perform the swaps, updating the Pool token balances and computing the net Vault asset deltas.\\n        assetDeltas = _swapWithPools(swaps, assets, funds, kind);\\n\\n        // Process asset deltas, by either transferring assets from the sender (for positive deltas) or to the recipient\\n        // (for negative deltas).\\n        uint256 wrappedEth = 0;\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            IAsset asset = assets[i];\\n            int256 delta = assetDeltas[i];\\n            _require(delta <= limits[i], Errors.SWAP_LIMIT);\\n\\n            if (delta > 0) {\\n                uint256 toReceive = uint256(delta);\\n                _receiveAsset(asset, toReceive, funds.sender, funds.fromInternalBalance);\\n\\n                if (_isETH(asset)) {\\n                    wrappedEth = wrappedEth.add(toReceive);\\n                }\\n            } else if (delta < 0) {\\n                uint256 toSend = uint256(-delta);\\n                _sendAsset(asset, toSend, funds.recipient, funds.toInternalBalance);\\n            }\\n        }\\n\\n        // Handle any used and remaining ETH.\\n        _handleRemainingEth(wrappedEth);\\n    }\\n\\n    // For `_swapWithPools` to handle both 'given in' and 'given out' swaps, it internally tracks the 'given' amount\\n    // (supplied by the caller), and the 'calculated' amount (returned by the Pool in response to the swap request).\\n\\n    /**\\n     * @dev Given the two swap tokens and the swap kind, returns which one is the 'given' token (the token whose\\n     * amount is supplied by the caller).\\n     */\\n    function _tokenGiven(\\n        SwapKind kind,\\n        IERC20 tokenIn,\\n        IERC20 tokenOut\\n    ) private pure returns (IERC20) {\\n        return kind == SwapKind.GIVEN_IN ? tokenIn : tokenOut;\\n    }\\n\\n    /**\\n     * @dev Given the two swap tokens and the swap kind, returns which one is the 'calculated' token (the token whose\\n     * amount is calculated by the Pool).\\n     */\\n    function _tokenCalculated(\\n        SwapKind kind,\\n        IERC20 tokenIn,\\n        IERC20 tokenOut\\n    ) private pure returns (IERC20) {\\n        return kind == SwapKind.GIVEN_IN ? tokenOut : tokenIn;\\n    }\\n\\n    /**\\n     * @dev Returns an ordered pair (amountIn, amountOut) given the 'given' and 'calculated' amounts, and the swap kind.\\n     */\\n    function _getAmounts(\\n        SwapKind kind,\\n        uint256 amountGiven,\\n        uint256 amountCalculated\\n    ) private pure returns (uint256 amountIn, uint256 amountOut) {\\n        if (kind == SwapKind.GIVEN_IN) {\\n            (amountIn, amountOut) = (amountGiven, amountCalculated);\\n        } else {\\n            // SwapKind.GIVEN_OUT\\n            (amountIn, amountOut) = (amountCalculated, amountGiven);\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs all `swaps`, calling swap hooks on the Pool contracts and updating their balances. Does not cause\\n     * any transfer of tokens - instead it returns the net Vault token deltas: positive if the Vault should receive\\n     * tokens, and negative if it should send them.\\n     */\\n    function _swapWithPools(\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        SwapKind kind\\n    ) private returns (int256[] memory assetDeltas) {\\n        assetDeltas = new int256[](assets.length);\\n\\n        // These variables could be declared inside the loop, but that causes the compiler to allocate memory on each\\n        // loop iteration, increasing gas costs.\\n        BatchSwapStep memory batchSwapStep;\\n        IPoolSwapStructs.SwapRequest memory poolRequest;\\n\\n        // These store data about the previous swap here to implement multihop logic across swaps.\\n        IERC20 previousTokenCalculated;\\n        uint256 previousAmountCalculated;\\n\\n        for (uint256 i = 0; i < swaps.length; ++i) {\\n            batchSwapStep = swaps[i];\\n\\n            bool withinBounds = batchSwapStep.assetInIndex < assets.length &&\\n                batchSwapStep.assetOutIndex < assets.length;\\n            _require(withinBounds, Errors.OUT_OF_BOUNDS);\\n\\n            IERC20 tokenIn = _translateToIERC20(assets[batchSwapStep.assetInIndex]);\\n            IERC20 tokenOut = _translateToIERC20(assets[batchSwapStep.assetOutIndex]);\\n            _require(tokenIn != tokenOut, Errors.CANNOT_SWAP_SAME_TOKEN);\\n\\n            // Sentinel value for multihop logic\\n            if (batchSwapStep.amount == 0) {\\n                // When the amount given is zero, we use the calculated amount for the previous swap, as long as the\\n                // current swap's given token is the previous calculated token. This makes it possible to swap a\\n                // given amount of token A for token B, and then use the resulting token B amount to swap for token C.\\n                _require(i > 0, Errors.UNKNOWN_AMOUNT_IN_FIRST_SWAP);\\n                bool usingPreviousToken = previousTokenCalculated == _tokenGiven(kind, tokenIn, tokenOut);\\n                _require(usingPreviousToken, Errors.MALCONSTRUCTED_MULTIHOP_SWAP);\\n                batchSwapStep.amount = previousAmountCalculated;\\n            }\\n\\n            // Initializing each struct field one-by-one uses less gas than setting all at once\\n            poolRequest.poolId = batchSwapStep.poolId;\\n            poolRequest.kind = kind;\\n            poolRequest.tokenIn = tokenIn;\\n            poolRequest.tokenOut = tokenOut;\\n            poolRequest.amount = batchSwapStep.amount;\\n            poolRequest.userData = batchSwapStep.userData;\\n            poolRequest.from = funds.sender;\\n            poolRequest.to = funds.recipient;\\n            // The lastChangeBlock field is left uninitialized\\n\\n            uint256 amountIn;\\n            uint256 amountOut;\\n            (previousAmountCalculated, amountIn, amountOut) = _swapWithPool(poolRequest);\\n\\n            previousTokenCalculated = _tokenCalculated(kind, tokenIn, tokenOut);\\n\\n            // Accumulate Vault deltas across swaps\\n            assetDeltas[batchSwapStep.assetInIndex] = assetDeltas[batchSwapStep.assetInIndex].add(amountIn.toInt256());\\n            assetDeltas[batchSwapStep.assetOutIndex] = assetDeltas[batchSwapStep.assetOutIndex].sub(\\n                amountOut.toInt256()\\n            );\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs a swap according to the parameters specified in `request`, calling the Pool's contract hook and\\n     * updating the Pool's balance.\\n     *\\n     * Returns the amount of tokens going into or out of the Vault as a result of this swap, depending on the swap kind.\\n     */\\n    function _swapWithPool(IPoolSwapStructs.SwapRequest memory request)\\n        private\\n        returns (\\n            uint256 amountCalculated,\\n            uint256 amountIn,\\n            uint256 amountOut\\n        )\\n    {\\n        // Get the calculated amount from the Pool and update its balances\\n        address pool = _getPoolAddress(request.poolId);\\n        PoolSpecialization specialization = _getPoolSpecialization(request.poolId);\\n\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            amountCalculated = _processTwoTokenPoolSwapRequest(request, IMinimalSwapInfoPool(pool));\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            amountCalculated = _processMinimalSwapInfoPoolSwapRequest(request, IMinimalSwapInfoPool(pool));\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            amountCalculated = _processGeneralPoolSwapRequest(request, IGeneralPool(pool));\\n        }\\n\\n        (amountIn, amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\\n        emit Swap(request.poolId, request.tokenIn, request.tokenOut, amountIn, amountOut);\\n    }\\n\\n    function _processTwoTokenPoolSwapRequest(IPoolSwapStructs.SwapRequest memory request, IMinimalSwapInfoPool pool)\\n        private\\n        returns (uint256 amountCalculated)\\n    {\\n        // For gas efficiency reasons, this function uses low-level knowledge of how Two Token Pool balances are\\n        // stored internally, instead of using getters and setters for all operations.\\n\\n        (\\n            bytes32 tokenABalance,\\n            bytes32 tokenBBalance,\\n            TwoTokenPoolBalances storage poolBalances\\n        ) = _getTwoTokenPoolSharedBalances(request.poolId, request.tokenIn, request.tokenOut);\\n\\n        // We have the two Pool balances, but we don't know which one is 'token in' or 'token out'.\\n        bytes32 tokenInBalance;\\n        bytes32 tokenOutBalance;\\n\\n        // In Two Token Pools, token A has a smaller address than token B\\n        if (request.tokenIn < request.tokenOut) {\\n            // in is A, out is B\\n            tokenInBalance = tokenABalance;\\n            tokenOutBalance = tokenBBalance;\\n        } else {\\n            // in is B, out is A\\n            tokenOutBalance = tokenABalance;\\n            tokenInBalance = tokenBBalance;\\n        }\\n\\n        // Perform the swap request and compute the new balances for 'token in' and 'token out' after the swap\\n        (tokenInBalance, tokenOutBalance, amountCalculated) = _callMinimalSwapInfoPoolOnSwapHook(\\n            request,\\n            pool,\\n            tokenInBalance,\\n            tokenOutBalance\\n        );\\n\\n        // We check the token ordering again to create the new shared cash packed struct\\n        poolBalances.sharedCash = request.tokenIn < request.tokenOut\\n            ? BalanceAllocation.toSharedCash(tokenInBalance, tokenOutBalance) // in is A, out is B\\n            : BalanceAllocation.toSharedCash(tokenOutBalance, tokenInBalance); // in is B, out is A\\n    }\\n\\n    function _processMinimalSwapInfoPoolSwapRequest(\\n        IPoolSwapStructs.SwapRequest memory request,\\n        IMinimalSwapInfoPool pool\\n    ) private returns (uint256 amountCalculated) {\\n        bytes32 tokenInBalance = _getMinimalSwapInfoPoolBalance(request.poolId, request.tokenIn);\\n        bytes32 tokenOutBalance = _getMinimalSwapInfoPoolBalance(request.poolId, request.tokenOut);\\n\\n        // Perform the swap request and compute the new balances for 'token in' and 'token out' after the swap\\n        (tokenInBalance, tokenOutBalance, amountCalculated) = _callMinimalSwapInfoPoolOnSwapHook(\\n            request,\\n            pool,\\n            tokenInBalance,\\n            tokenOutBalance\\n        );\\n\\n        _minimalSwapInfoPoolsBalances[request.poolId][request.tokenIn] = tokenInBalance;\\n        _minimalSwapInfoPoolsBalances[request.poolId][request.tokenOut] = tokenOutBalance;\\n    }\\n\\n    /**\\n     * @dev Calls the onSwap hook for a Pool that implements IMinimalSwapInfoPool: both Minimal Swap Info and Two Token\\n     * Pools do this.\\n     */\\n    function _callMinimalSwapInfoPoolOnSwapHook(\\n        IPoolSwapStructs.SwapRequest memory request,\\n        IMinimalSwapInfoPool pool,\\n        bytes32 tokenInBalance,\\n        bytes32 tokenOutBalance\\n    )\\n        internal\\n        returns (\\n            bytes32 newTokenInBalance,\\n            bytes32 newTokenOutBalance,\\n            uint256 amountCalculated\\n        )\\n    {\\n        uint256 tokenInTotal = tokenInBalance.total();\\n        uint256 tokenOutTotal = tokenOutBalance.total();\\n        request.lastChangeBlock = Math.max(tokenInBalance.lastChangeBlock(), tokenOutBalance.lastChangeBlock());\\n\\n        // Perform the swap request callback, and compute the new balances for 'token in' and 'token out' after the swap\\n        amountCalculated = pool.onSwap(request, tokenInTotal, tokenOutTotal);\\n        (uint256 amountIn, uint256 amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\\n\\n        newTokenInBalance = tokenInBalance.increaseCash(amountIn);\\n        newTokenOutBalance = tokenOutBalance.decreaseCash(amountOut);\\n    }\\n\\n    function _processGeneralPoolSwapRequest(IPoolSwapStructs.SwapRequest memory request, IGeneralPool pool)\\n        private\\n        returns (uint256 amountCalculated)\\n    {\\n        bytes32 tokenInBalance;\\n        bytes32 tokenOutBalance;\\n\\n        // We access both token indexes without checking existence, because we will do it manually immediately after.\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[request.poolId];\\n        uint256 indexIn = poolBalances.unchecked_indexOf(request.tokenIn);\\n        uint256 indexOut = poolBalances.unchecked_indexOf(request.tokenOut);\\n\\n        if (indexIn == 0 || indexOut == 0) {\\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(request.poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        // EnumerableMap stores indices *plus one* to use the zero index as a sentinel value - because these are valid,\\n        // we can undo this.\\n        indexIn -= 1;\\n        indexOut -= 1;\\n\\n        uint256 tokenAmount = poolBalances.length();\\n        uint256[] memory currentBalances = new uint256[](tokenAmount);\\n\\n        request.lastChangeBlock = 0;\\n        for (uint256 i = 0; i < tokenAmount; i++) {\\n            // Because the iteration is bounded by `tokenAmount`, and no tokens are registered or deregistered here, we\\n            // know `i` is a valid token index and can use `unchecked_valueAt` to save storage reads.\\n            bytes32 balance = poolBalances.unchecked_valueAt(i);\\n\\n            currentBalances[i] = balance.total();\\n            request.lastChangeBlock = Math.max(request.lastChangeBlock, balance.lastChangeBlock());\\n\\n            if (i == indexIn) {\\n                tokenInBalance = balance;\\n            } else if (i == indexOut) {\\n                tokenOutBalance = balance;\\n            }\\n        }\\n\\n        // Perform the swap request callback and compute the new balances for 'token in' and 'token out' after the swap\\n        amountCalculated = pool.onSwap(request, currentBalances, indexIn, indexOut);\\n        (uint256 amountIn, uint256 amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\\n        tokenInBalance = tokenInBalance.increaseCash(amountIn);\\n        tokenOutBalance = tokenOutBalance.decreaseCash(amountOut);\\n\\n        // Because no tokens were registered or deregistered between now or when we retrieved the indexes for\\n        // 'token in' and 'token out', we can use `unchecked_setAt` to save storage reads.\\n        poolBalances.unchecked_setAt(indexIn, tokenInBalance);\\n        poolBalances.unchecked_setAt(indexOut, tokenOutBalance);\\n    }\\n\\n    // This function is not marked as `nonReentrant` because the underlying mechanism relies on reentrancy\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external override returns (int256[] memory) {\\n        // In order to accurately 'simulate' swaps, this function actually does perform the swaps, including calling the\\n        // Pool hooks and updating balances in storage. However, once it computes the final Vault Deltas, it\\n        // reverts unconditionally, returning this array as the revert data.\\n        //\\n        // By wrapping this reverting call, we can decode the deltas 'returned' and return them as a normal Solidity\\n        // function would. The only caveat is the function becomes non-view, but off-chain clients can still call it\\n        // via eth_call to get the expected result.\\n        //\\n        // This technique was inspired by the work from the Gnosis team in the Gnosis Safe contract:\\n        // https://github.com/gnosis/safe-contracts/blob/v1.2.0/contracts/GnosisSafe.sol#L265\\n        //\\n        // Most of this function is implemented using inline assembly, as the actual work it needs to do is not\\n        // significant, and Solidity is not particularly well-suited to generate this behavior, resulting in a large\\n        // amount of generated bytecode.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the actual asset deltas from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0xfa61cc1200000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of an array:\\n                        // length + data. We need to return an ABI-encoded representation of this array.\\n                        // An ABI-encoded array contains an additional field when compared to its raw memory\\n                        // representation: an offset to the location of the length. The offset itself is 32 bytes long,\\n                        // so the smallest value we  can use is 32 for the data to be located immediately after it.\\n                        mstore(0, 32)\\n\\n                        // We now copy the raw memory array from returndata into memory. Since the offset takes up 32\\n                        // bytes, we start copying at address 0x20. We also get rid of the error signature, which takes\\n                        // the first four bytes of returndata.\\n                        let size := sub(returndatasize(), 0x04)\\n                        returndatacopy(0x20, 0x04, size)\\n\\n                        // We finally return the ABI-encoded array, which has a total length equal to that of the array\\n                        // (returndata), plus the 32 bytes for the offset.\\n                        return(0, add(size, 32))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            int256[] memory deltas = _swapWithPools(swaps, assets, funds, kind);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of the array in memory, which is composed of a 32 byte length,\\n                // followed by the 32 byte int256 values. Because revert expects a size in bytes, we multiply the array\\n                // length (stored at `deltas`) by 32.\\n                let size := mul(mload(deltas), 32)\\n\\n                // We send one extra value for the error signature \\\"QueryError(int256[])\\\" which is 0xfa61cc12.\\n                // We store it in the previous slot to the `deltas` array. We know there will be at least one available\\n                // slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                mstore(sub(deltas, 0x20), 0x00000000000000000000000000000000000000000000000000000000fa61cc12)\\n                let start := sub(deltas, 0x04)\\n\\n                // When copying from `deltas` into returndata, we copy an additional 36 bytes to also return the array's\\n                // length and the error signature.\\n                revert(start, add(size, 36))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x486518f80d8aca8f3e55d35db8e18323504fc5fbbcfd8fb3483ff25229eb8d27\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/UserBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeCast.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./AssetTransfersHandler.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance.\\n *\\n * Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n * transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n * when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n * gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n *\\n * Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n * operations of different kinds, with different senders and recipients, at once.\\n */\\nabstract contract UserBalance is ReentrancyGuard, AssetTransfersHandler, VaultAuthorization {\\n    using Math for uint256;\\n    using SafeCast for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Internal Balance for each token, for each account.\\n    mapping(address => mapping(IERC20 => uint256)) private _internalTokenBalance;\\n\\n    function getInternalBalance(address user, IERC20[] memory tokens)\\n        external\\n        view\\n        override\\n        returns (uint256[] memory balances)\\n    {\\n        balances = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; i++) {\\n            balances[i] = _getInternalBalance(user, tokens[i]);\\n        }\\n    }\\n\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable override nonReentrant {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 ethWrapped = 0;\\n\\n        // Cache for these checks so we only perform them once (if at all).\\n        bool checkedCallerIsRelayer = false;\\n        bool checkedNotPaused = false;\\n\\n        for (uint256 i = 0; i < ops.length; i++) {\\n            UserBalanceOpKind kind;\\n            IAsset asset;\\n            uint256 amount;\\n            address sender;\\n            address payable recipient;\\n\\n            // This destructuring by calling `_validateUserBalanceOp` seems odd, but results in reduced bytecode size.\\n            (kind, asset, amount, sender, recipient, checkedCallerIsRelayer) = _validateUserBalanceOp(\\n                ops[i],\\n                checkedCallerIsRelayer\\n            );\\n\\n            if (kind == UserBalanceOpKind.WITHDRAW_INTERNAL) {\\n                // Internal Balance withdrawals can always be performed by an authorized account.\\n                _withdrawFromInternalBalance(asset, sender, recipient, amount);\\n            } else {\\n                // All other operations are blocked if the contract is paused.\\n\\n                // We cache the result of the pause check and skip it for other operations in this same transaction\\n                // (if any).\\n                if (!checkedNotPaused) {\\n                    _ensureNotPaused();\\n                    checkedNotPaused = true;\\n                }\\n\\n                if (kind == UserBalanceOpKind.DEPOSIT_INTERNAL) {\\n                    _depositToInternalBalance(asset, sender, recipient, amount);\\n\\n                    // Keep track of all ETH wrapped into WETH as part of a deposit.\\n                    if (_isETH(asset)) {\\n                        ethWrapped = ethWrapped.add(amount);\\n                    }\\n                } else {\\n                    // Transfers don't support ETH.\\n                    _require(!_isETH(asset), Errors.CANNOT_USE_ETH_SENTINEL);\\n                    IERC20 token = _asIERC20(asset);\\n\\n                    if (kind == UserBalanceOpKind.TRANSFER_INTERNAL) {\\n                        _transferInternalBalance(token, sender, recipient, amount);\\n                    } else {\\n                        // TRANSFER_EXTERNAL\\n                        _transferToExternalBalance(token, sender, recipient, amount);\\n                    }\\n                }\\n            }\\n        }\\n\\n        // Handle any remaining ETH.\\n        _handleRemainingEth(ethWrapped);\\n    }\\n\\n    function _depositToInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        _increaseInternalBalance(recipient, _translateToIERC20(asset), amount);\\n        _receiveAsset(asset, amount, sender, false);\\n    }\\n\\n    function _withdrawFromInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address payable recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, _translateToIERC20(asset), amount, false);\\n        _sendAsset(asset, amount, recipient, false);\\n    }\\n\\n    function _transferInternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, token, amount, false);\\n        _increaseInternalBalance(recipient, token, amount);\\n    }\\n\\n    function _transferToExternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        if (amount > 0) {\\n            token.safeTransferFrom(sender, recipient, amount);\\n            emit ExternalBalanceTransfer(token, sender, recipient, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Increases `account`'s Internal Balance for `token` by `amount`.\\n     */\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal override {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        uint256 newBalance = currentBalance.add(amount);\\n        _setInternalBalance(account, token, newBalance, amount.toInt256());\\n    }\\n\\n    /**\\n     * @dev Decreases `account`'s Internal Balance for `token` by `amount`. If `allowPartial` is true, this function\\n     * doesn't revert if `account` doesn't have enough balance, and sets it to zero and returns the deducted amount\\n     * instead.\\n     */\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool allowPartial\\n    ) internal override returns (uint256 deducted) {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        _require(allowPartial || (currentBalance >= amount), Errors.INSUFFICIENT_INTERNAL_BALANCE);\\n\\n        deducted = Math.min(currentBalance, amount);\\n        // By construction, `deducted` is lower or equal to `currentBalance`, so we don't need to use checked\\n        // arithmetic.\\n        uint256 newBalance = currentBalance - deducted;\\n        _setInternalBalance(account, token, newBalance, -(deducted.toInt256()));\\n    }\\n\\n    /**\\n     * @dev Sets `account`'s Internal Balance for `token` to `newBalance`.\\n     *\\n     * Emits an `InternalBalanceChanged` event. This event includes `delta`, which is the amount the balance increased\\n     * (if positive) or decreased (if negative). To avoid reading the current balance in order to compute the delta,\\n     * this function relies on the caller providing it directly.\\n     */\\n    function _setInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 newBalance,\\n        int256 delta\\n    ) private {\\n        _internalTokenBalance[account][token] = newBalance;\\n        emit InternalBalanceChanged(account, token, delta);\\n    }\\n\\n    /**\\n     * @dev Returns `account`'s Internal Balance for `token`.\\n     */\\n    function _getInternalBalance(address account, IERC20 token) internal view returns (uint256) {\\n        return _internalTokenBalance[account][token];\\n    }\\n\\n    /**\\n     * @dev Destructures a User Balance operation, validating that the contract caller is allowed to perform it.\\n     */\\n    function _validateUserBalanceOp(UserBalanceOp memory op, bool checkedCallerIsRelayer)\\n        private\\n        view\\n        returns (\\n            UserBalanceOpKind,\\n            IAsset,\\n            uint256,\\n            address,\\n            address payable,\\n            bool\\n        )\\n    {\\n        // The only argument we need to validate is `sender`, which can only be either the contract caller, or a\\n        // relayer approved by `sender`.\\n        address sender = op.sender;\\n\\n        if (sender != msg.sender) {\\n            // We need to check both that the contract caller is a relayer, and that `sender` approved them.\\n\\n            // Because the relayer check is global (i.e. independent of `sender`), we cache that result and skip it for\\n            // other operations in this same transaction (if any).\\n            if (!checkedCallerIsRelayer) {\\n                _authenticateCaller();\\n                checkedCallerIsRelayer = true;\\n            }\\n\\n            _require(_hasApprovedRelayer(sender, msg.sender), Errors.USER_DOESNT_ALLOW_RELAYER);\\n        }\\n\\n        return (op.kind, op.asset, op.amount, sender, op.recipient, checkedCallerIsRelayer);\\n    }\\n}\\n\",\"keccak256\":\"0x4412e4e084ff3be5b80f421a9fdbc72de7e2fc17a054609f40c32c32fdcaefbd\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/GeneralPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableMap.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\n\\nabstract contract GeneralPoolsBalance {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\\n\\n    // Data for Pools with the General specialization setting\\n    //\\n    // These Pools use the IGeneralPool interface, which means the Vault must query the balance for *all* of their\\n    // tokens in every swap. If we kept a mapping of token to balance plus a set (array) of tokens, it'd be very gas\\n    // intensive to read all token addresses just to then do a lookup on the balance mapping.\\n    //\\n    // Instead, we use our customized EnumerableMap, which lets us read the N balances in N+1 storage accesses (one for\\n    // each token in the Pool), access the index of any 'token in' a single read (required for the IGeneralPool call),\\n    // and update an entry's value given its index.\\n\\n    // Map of token -> balance pairs for each Pool with this specialization. Many functions rely on storage pointers to\\n    // a Pool's EnumerableMap to save gas when computing storage slots.\\n    mapping(bytes32 => EnumerableMap.IERC20ToBytes32Map) internal _generalPoolsBalances;\\n\\n    /**\\n     * @dev Registers a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // EnumerableMaps require an explicit initial value when creating a key-value pair: we use zero, the same\\n            // value that is found in uninitialized storage, which corresponds to an empty balance.\\n            bool added = poolBalances.set(tokens[i], 0);\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n            _require(currentBalance.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // We don't need to check remove's return value, since _getGeneralPoolBalance already checks that the token\\n            // was registered.\\n            poolBalances.remove(token);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a General Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setGeneralPoolBalances(bytes32 poolId, bytes32[] memory balances) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < balances.length; ++i) {\\n            // Since we assume all balances are properly ordered, we can simply use `unchecked_setAt` to avoid one less\\n            // storage read per token.\\n            poolBalances.unchecked_setAt(i, balances[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a General Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setGeneralPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateGeneralPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a General Pool to the result of the `mutation` function when called with the\\n     * current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateGeneralPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        poolBalances.set(token, newBalance);\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a General Pool. The order may change when tokens are\\n     * registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _getGeneralPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        tokens = new IERC20[](poolBalances.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableMap's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            (tokens[i], balances[i]) = poolBalances.unchecked_at(i);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getGeneralPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return _getGeneralPoolBalance(poolBalances, token);\\n    }\\n\\n    /**\\n     * @dev Same as `_getGeneralPoolBalance` but using a Pool's storage pointer, which saves gas in repeated reads and\\n     * writes.\\n     */\\n    function _getGeneralPoolBalance(EnumerableMap.IERC20ToBytes32Map storage poolBalances, IERC20 token)\\n        private\\n        view\\n        returns (bytes32)\\n    {\\n        return poolBalances.get(token, Errors.TOKEN_NOT_REGISTERED);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _isGeneralPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return poolBalances.contains(token);\\n    }\\n}\\n\",\"keccak256\":\"0x534135bd6edee54ffaa785ff26916a2471211c55e718aba84e41961823edfc0c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableSet.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract MinimalSwapInfoPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n\\n    // Data for Pools with the Minimal Swap Info specialization setting\\n    //\\n    // These Pools use the IMinimalSwapInfoPool interface, and so the Vault must read the balance of the two tokens\\n    // in the swap. The best solution is to use a mapping from token to balance, which lets us read or write any token's\\n    // balance in a single storage access.\\n    //\\n    // We also keep a set of registered tokens. Because tokens with non-zero balance are by definition registered, in\\n    // some balance getters we skip checking for token registration if a non-zero balance is found, saving gas by\\n    // performing a single read instead of two.\\n\\n    mapping(bytes32 => mapping(IERC20 => bytes32)) internal _minimalSwapInfoPoolsBalances;\\n    mapping(bytes32 => EnumerableSet.AddressSet) internal _minimalSwapInfoPoolsTokens;\\n\\n    /**\\n     * @dev Registers a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            bool added = poolTokens.add(address(tokens[i]));\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n            // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n            // balance.\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(_minimalSwapInfoPoolsBalances[poolId][token].isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // For consistency with other Pool specialization settings, we explicitly reset the balance (which may have\\n            // a non-zero last change block).\\n            delete _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n            bool removed = poolTokens.remove(address(token));\\n            _require(removed, Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a Minimal Swap Info Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setMinimalSwapInfoPoolBalances(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        bytes32[] memory balances\\n    ) internal {\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            _minimalSwapInfoPoolsBalances[poolId][tokens[i]] = balances[i];\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Minimal Swap Info Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setMinimalSwapInfoPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Minimal Swap Info Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateMinimalSwapInfoPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        bytes32 currentBalance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        _minimalSwapInfoPoolsBalances[poolId][token] = newBalance;\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a Minimal Swap Info Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _getMinimalSwapInfoPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        tokens = new IERC20[](poolTokens.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableSet's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            IERC20 token = IERC20(poolTokens.unchecked_at(i));\\n            tokens[i] = token;\\n            balances[i] = _minimalSwapInfoPoolsBalances[poolId][token];\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Minimal Swap Info Pool.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getMinimalSwapInfoPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        bytes32 balance = _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n        // A non-zero balance guarantees that the token is registered. If zero, we manually check if the token is\\n        // registered in the Pool. Token registration implies that the Pool is registered as well, which lets us save\\n        // gas by not performing the check.\\n        bool tokenRegistered = balance.isNotZero() || _minimalSwapInfoPoolsTokens[poolId].contains(address(token));\\n\\n        if (!tokenRegistered) {\\n            // The token might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        return balance;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _isMinimalSwapInfoPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        return poolTokens.contains(address(token));\\n    }\\n}\\n\",\"keccak256\":\"0x4b002c25bd067d9e1272df67271a0993be4f7f92cae0a0871abc2d52272b10df\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract TwoTokenPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n\\n    // Data for Pools with the Two Token specialization setting\\n    //\\n    // These are similar to the Minimal Swap Info Pool case (because the Pool only has two tokens, and therefore there\\n    // are only two balances to read), but there's a key difference in how data is stored. Keeping a set makes little\\n    // sense, as it will only ever hold two tokens, so we can just store those two directly.\\n    //\\n    // The gas savings associated with using these Pools come from how token balances are stored: cash amounts for token\\n    // A and token B are packed together, as are managed amounts. Because only cash changes in a swap, there's no need\\n    // to write to this second storage slot. A single last change block number for both tokens is stored with the packed\\n    // cash fields.\\n\\n    struct TwoTokenPoolBalances {\\n        bytes32 sharedCash;\\n        bytes32 sharedManaged;\\n    }\\n\\n    // We could just keep a mapping from Pool ID to TwoTokenSharedBalances, but there's an issue: we wouldn't know to\\n    // which tokens those balances correspond. This would mean having to also check which are registered with the Pool.\\n    //\\n    // What we do instead to save those storage reads is keep a nested mapping from the token pair hash to the balances\\n    // struct. The Pool only has two tokens, so only a single entry of this mapping is set (the one that corresponds to\\n    // that pair's hash).\\n    //\\n    // This has the trade-off of making Vault code that interacts with these Pools cumbersome: both balances must be\\n    // accessed at the same time by using both token addresses, and some logic is needed to determine how the pair hash\\n    // is computed. We do this by sorting the tokens, calling the token with the lowest numerical address value token A,\\n    // and the other one token B. In functions where the token arguments could be either A or B, we use X and Y instead.\\n    //\\n    // If users query a token pair containing an unregistered token, the Pool will generate a hash for a mapping entry\\n    // that was not set, and return zero balances. Non-zero balances are only possible if both tokens in the pair\\n    // are registered with the Pool, which means we don't have to check the TwoTokenPoolTokens struct, and can save\\n    // storage reads.\\n\\n    struct TwoTokenPoolTokens {\\n        IERC20 tokenA;\\n        IERC20 tokenB;\\n        mapping(bytes32 => TwoTokenPoolBalances) balances;\\n    }\\n\\n    mapping(bytes32 => TwoTokenPoolTokens) private _twoTokenPoolTokens;\\n\\n    /**\\n     * @dev Registers tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must not be the same\\n     * - The tokens must be ordered: tokenX < tokenY\\n     */\\n    function _registerTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        // Not technically true since we didn't register yet, but this is consistent with the error messages of other\\n        // specialization settings.\\n        _require(tokenX != tokenY, Errors.TOKEN_ALREADY_REGISTERED);\\n\\n        _require(tokenX < tokenY, Errors.UNSORTED_TOKENS);\\n\\n        // A Two Token Pool with no registered tokens is identified by having zero addresses for tokens A and B.\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        _require(poolTokens.tokenA == IERC20(0) && poolTokens.tokenB == IERC20(0), Errors.TOKENS_ALREADY_SET);\\n\\n        // Since tokenX < tokenY, tokenX is A and tokenY is B\\n        poolTokens.tokenA = tokenX;\\n        poolTokens.tokenB = tokenY;\\n\\n        // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n        // balance.\\n    }\\n\\n    /**\\n     * @dev Deregisters tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     * - both tokens must have zero balance in the Vault\\n     */\\n    function _deregisterTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        ) = _getTwoTokenPoolSharedBalances(poolId, tokenX, tokenY);\\n\\n        _require(balanceA.isZero() && balanceB.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n        delete _twoTokenPoolTokens[poolId];\\n\\n        // For consistency with other Pool specialization settings, we explicitly reset the packed cash field (which may\\n        // have a non-zero last change block).\\n        delete poolBalances.sharedCash;\\n    }\\n\\n    /**\\n     * @dev Sets the cash balances of a Two Token Pool's tokens.\\n     *\\n     * WARNING: this assumes `tokenA` and `tokenB` are the Pool's two registered tokens, and are in the correct order.\\n     */\\n    function _setTwoTokenPoolCashBalances(\\n        bytes32 poolId,\\n        IERC20 tokenA,\\n        bytes32 balanceA,\\n        IERC20 tokenB,\\n        bytes32 balanceB\\n    ) internal {\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        TwoTokenPoolBalances storage poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n        poolBalances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Two Token Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setTwoTokenPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Two Token Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateTwoTokenPoolSharedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        (\\n            TwoTokenPoolBalances storage balances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            ,\\n            bytes32 balanceB\\n        ) = _getTwoTokenPoolBalances(poolId);\\n\\n        int256 delta;\\n        if (token == tokenA) {\\n            bytes32 newBalance = mutation(balanceA, amount);\\n            delta = newBalance.managedDelta(balanceA);\\n            balanceA = newBalance;\\n        } else {\\n            // token == tokenB\\n            bytes32 newBalance = mutation(balanceB, amount);\\n            delta = newBalance.managedDelta(balanceB);\\n            balanceB = newBalance;\\n        }\\n\\n        balances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n        balances.sharedManaged = BalanceAllocation.toSharedManaged(balanceA, balanceB);\\n\\n        return delta;\\n    }\\n\\n    /*\\n     * @dev Returns an array with all the tokens and balances in a Two Token Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _getTwoTokenPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        // Both tokens will either be zero (if unregistered) or non-zero (if registered), but we keep the full check for\\n        // clarity.\\n        if (tokenA == IERC20(0) || tokenB == IERC20(0)) {\\n            return (new IERC20[](0), new bytes32[](0));\\n        }\\n\\n        // Note that functions relying on this getter expect tokens to be properly ordered, so we use the (A, B)\\n        // ordering.\\n\\n        tokens = new IERC20[](2);\\n        tokens[0] = tokenA;\\n        tokens[1] = tokenB;\\n\\n        balances = new bytes32[](2);\\n        balances[0] = balanceA;\\n        balances[1] = balanceB;\\n    }\\n\\n    /**\\n     * @dev Same as `_getTwoTokenPoolTokens`, except it returns the two tokens and balances directly instead of using\\n     * an array, as well as a storage pointer to the `TwoTokenPoolBalances` struct, which can be used to update it\\n     * without having to recompute the pair hash and storage slot.\\n     */\\n    function _getTwoTokenPoolBalances(bytes32 poolId)\\n        private\\n        view\\n        returns (\\n            TwoTokenPoolBalances storage poolBalances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            IERC20 tokenB,\\n            bytes32 balanceB\\n        )\\n    {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        tokenA = poolTokens.tokenA;\\n        tokenB = poolTokens.tokenB;\\n\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        poolBalances = poolTokens.balances[pairHash];\\n\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * This function is convenient but not particularly gas efficient, and should be avoided during gas-sensitive\\n     * operations, such as swaps. For those, _getTwoTokenPoolSharedBalances provides a more flexible interface.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        // We can't just read the balance of token, because we need to know the full pair in order to compute the pair\\n        // hash and access the balance mapping. We therefore rely on `_getTwoTokenPoolBalances`.\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        if (token == tokenA) {\\n            return balanceA;\\n        } else if (token == tokenB) {\\n            return balanceB;\\n        } else {\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of the two tokens in a Two Token Pool.\\n     *\\n     * The returned balances are those of token A and token B, where token A is the lowest of token X and token Y, and\\n     * token B the other.\\n     *\\n     * This function also returns a storage pointer to the TwoTokenPoolBalances struct associated with the token pair,\\n     * which can be used to update it without having to recompute the pair hash and storage slot.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolSharedBalances(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    )\\n        internal\\n        view\\n        returns (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        )\\n    {\\n        (IERC20 tokenA, IERC20 tokenB) = _sortTwoTokens(tokenX, tokenY);\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n\\n        poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n\\n        // Because we're reading balances using the pair hash, if either token X or token Y is not registered then\\n        // *both* balance entries will be zero.\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        // A non-zero balance guarantees that both tokens are registered. If zero, we manually check whether each\\n        // token is registered in the Pool. Token registration implies that the Pool is registered as well, which\\n        // lets us save gas by not performing the check.\\n        bool tokensRegistered = sharedCash.isNotZero() ||\\n            sharedManaged.isNotZero() ||\\n            (_isTwoTokenPoolTokenRegistered(poolId, tokenA) && _isTwoTokenPoolTokenRegistered(poolId, tokenB));\\n\\n        if (!tokensRegistered) {\\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _isTwoTokenPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n\\n        // The zero address can never be a registered token.\\n        return (token == poolTokens.tokenA || token == poolTokens.tokenB) && token != IERC20(0);\\n    }\\n\\n    /**\\n     * @dev Returns the hash associated with a given token pair.\\n     */\\n    function _getTwoTokenPairHash(IERC20 tokenA, IERC20 tokenB) private pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(tokenA, tokenB));\\n    }\\n\\n    /**\\n     * @dev Sorts two tokens in ascending order, returning them as a (tokenA, tokenB) tuple.\\n     */\\n    function _sortTwoTokens(IERC20 tokenX, IERC20 tokenY) private pure returns (IERC20, IERC20) {\\n        return tokenX < tokenY ? (tokenX, tokenY) : (tokenY, tokenX);\\n    }\\n}\\n\",\"keccak256\":\"0x2cd5a8f9bee0addefa4e63cb7380f9b133d2e482807603fed931d42e3e1f40f4\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev IPools with the General specialization setting should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\\n * grant to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IGeneralPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7f11733a5cd8f81c123c02f79d94ead7b65217021ebddafda10e796a25e1ef41\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\\n * to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IMinimalSwapInfoPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7469919e147c0db8b4f290d310ca3816dec5d3c6cc6b258cf6e0df820a20a179\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 19073,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_generalPoolsBalances",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "2",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_paused",
                "offset": 0,
                "slot": "3",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_authorizer",
                "offset": 1,
                "slot": "3",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 15355,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_isPoolRegistered",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_bytes32,t_bool)"
              },
              {
                "astId": 15357,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_nextPoolNonce",
                "offset": 0,
                "slot": "6",
                "type": "t_uint256"
              },
              {
                "astId": 19489,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_minimalSwapInfoPoolsBalances",
                "offset": 0,
                "slot": "7",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))"
              },
              {
                "astId": 19493,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_minimalSwapInfoPoolsTokens",
                "offset": 0,
                "slot": "8",
                "type": "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)"
              },
              {
                "astId": 19947,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_twoTokenPoolTokens",
                "offset": 0,
                "slot": "9",
                "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)"
              },
              {
                "astId": 13417,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_poolAssetManagers",
                "offset": 0,
                "slot": "10",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))"
              },
              {
                "astId": 17602,
                "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                "label": "_internalTokenBalance",
                "offset": 0,
                "slot": "11",
                "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)5095,t_uint256))"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_array(t_address)dyn_storage": {
                "base": "t_address",
                "encoding": "dynamic_array",
                "label": "address[]",
                "numberOfBytes": "32"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_mapping(t_contract(IERC20)5095,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(contract IERC20 => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_bool)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => address))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_address)"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => bytes32))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_bytes32)"
              },
              "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)",
                "numberOfBytes": "32",
                "value": "t_struct(AddressSet)4822_storage"
              },
              "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32Map)4479_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolBalances)19934_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolTokens)19943_storage"
              },
              "t_mapping(t_contract(IERC20)5095,t_address)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => address)",
                "numberOfBytes": "32",
                "value": "t_address"
              },
              "t_mapping(t_contract(IERC20)5095,t_bytes32)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => bytes32)",
                "numberOfBytes": "32",
                "value": "t_bytes32"
              },
              "t_mapping(t_contract(IERC20)5095,t_uint256)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)": {
                "encoding": "mapping",
                "key": "t_uint256",
                "label": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32MapEntry)4468_storage"
              },
              "t_struct(AddressSet)4822_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableSet.AddressSet",
                "members": [
                  {
                    "astId": 4817,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "_values",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_array(t_address)dyn_storage"
                  },
                  {
                    "astId": 4821,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_address,t_uint256)"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(IERC20ToBytes32Map)4479_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32Map",
                "members": [
                  {
                    "astId": 4470,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "_length",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_uint256"
                  },
                  {
                    "astId": 4474,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "_entries",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)"
                  },
                  {
                    "astId": 4478,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_contract(IERC20)5095,t_uint256)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_struct(IERC20ToBytes32MapEntry)4468_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32MapEntry",
                "members": [
                  {
                    "astId": 4465,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "_key",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 4467,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "_value",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolBalances)19934_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances",
                "members": [
                  {
                    "astId": 19931,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "sharedCash",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_bytes32"
                  },
                  {
                    "astId": 19933,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "sharedManaged",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolTokens)19943_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens",
                "members": [
                  {
                    "astId": 19936,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "tokenA",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19938,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "tokenB",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19942,
                    "contract": "src.sol/amm/vault/Swaps.sol:Swaps",
                    "label": "balances",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "notice": "Implements the Vault's high-level swap functionality. Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. They need not trust the Pool contracts to do this: all security checks are made by the Vault. The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence. In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'), and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out'). More complex swaps, such as one 'token in' to multiple tokens out can be achieved by batching together individual swaps.",
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/UserBalance.sol": {
        "UserBalance": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "stateMutability": "payable",
              "type": "receive"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance. Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users. Internal Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different senders and recipients, at once.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/UserBalance.sol\":\"UserBalance\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\\n    }\\n}\\n\",\"keccak256\":\"0x5f83465783b239828f83c626bae1ac944cfff074c8919c245d14b208bcf317d5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n    /**\\n     * @dev Converts an unsigned uint256 into a signed int256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be less than or equal to maxInt256.\\n     */\\n    function toInt256(uint256 value) internal pure returns (int256) {\\n        _require(value < 2**255, Errors.SAFE_CAST_VALUE_CANT_FIT_INT256);\\n        return int256(value);\\n    }\\n}\\n\",\"keccak256\":\"0xfefa8c6b6aed0ac9df03ac0c4cce2a94da8d8815bb7f1459fef9f93ada8d316d\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/AssetTransfersHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/AssetHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/Address.sol\\\";\\n\\nimport \\\"./interfaces/IWETH.sol\\\";\\nimport \\\"./interfaces/IAsset.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\nabstract contract AssetTransfersHandler is AssetHelpers {\\n    using SafeERC20 for IERC20;\\n    using Address for address payable;\\n\\n    /**\\n     * @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\\n     * as possible from Internal Balance, then transfers any remaining amount.\\n     *\\n     * If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * will be wrapped into WETH.\\n     *\\n     * WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\\n     * caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\\n     * typically doesn't hold any).\\n     */\\n    function _receiveAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address sender,\\n        bool fromInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            _require(!fromInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // The ETH amount to receive is deposited into the WETH contract, which will in turn mint WETH for\\n            // the Vault at a 1:1 ratio.\\n\\n            // A check for this condition is also introduced by the compiler, but this one provides a revert reason.\\n            // Note we're checking for the Vault's total balance, *not* ETH sent in this transaction.\\n            _require(address(this).balance >= amount, Errors.INSUFFICIENT_ETH);\\n            _WETH().deposit{ value: amount }();\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n\\n            if (fromInternalBalance) {\\n                // We take as many tokens from Internal Balance as possible: any remaining amounts will be transferred.\\n                uint256 deductedBalance = _decreaseInternalBalance(sender, token, amount, true);\\n                // Because `deductedBalance` will be always the lesser of the current internal balance\\n                // and the amount to decrease, it is safe to perform unchecked arithmetic.\\n                amount -= deductedBalance;\\n            }\\n\\n            if (amount > 0) {\\n                token.safeTransferFrom(sender, address(this), amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\\n     * Balance instead of being transferred.\\n     *\\n     * If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * are instead sent directly after unwrapping WETH.\\n     */\\n    function _sendAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address payable recipient,\\n        bool toInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            // Sending ETH is not as involved as receiving it: the only special behavior is it cannot be\\n            // deposited to Internal Balance.\\n            _require(!toInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // First, the Vault withdraws deposited ETH from the WETH contract, by burning the same amount of WETH\\n            // from the Vault. This receipt will be handled by the Vault's `receive`.\\n            _WETH().withdraw(amount);\\n\\n            // Then, the withdrawn ETH is sent to the recipient.\\n            recipient.sendValue(amount);\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n            if (toInternalBalance) {\\n                _increaseInternalBalance(recipient, token, amount);\\n            } else {\\n                token.safeTransfer(recipient, amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\\n     * if the caller sent less ETH than `amountUsed`.\\n     *\\n     * Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\\n     * Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\\n     * not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\\n     * returned ETH.\\n     */\\n    function _handleRemainingEth(uint256 amountUsed) internal {\\n        _require(msg.value >= amountUsed, Errors.INSUFFICIENT_ETH);\\n\\n        uint256 excess = msg.value - amountUsed;\\n        if (excess > 0) {\\n            msg.sender.sendValue(excess);\\n        }\\n    }\\n\\n    /**\\n     * @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\\n     * caller.\\n     *\\n     * Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\\n     * we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\\n     * ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\\n     * locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\\n     * prevent user error.\\n     */\\n    receive() external payable {\\n        _require(msg.sender == address(_WETH()), Errors.ETH_TRANSFER);\\n    }\\n\\n    // This contract uses virtual internal functions instead of inheriting from the modules that implement them (in\\n    // this case UserBalance) in order to decouple it from the rest of the system and enable standalone testing by\\n    // implementing these with mocks.\\n\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal virtual;\\n\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool capped\\n    ) internal virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x5534195c226355beb7c084ac01ac615920c6f7fbec550dab472827318536c9cb\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/UserBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeCast.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./AssetTransfersHandler.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance.\\n *\\n * Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n * transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n * when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n * gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n *\\n * Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n * operations of different kinds, with different senders and recipients, at once.\\n */\\nabstract contract UserBalance is ReentrancyGuard, AssetTransfersHandler, VaultAuthorization {\\n    using Math for uint256;\\n    using SafeCast for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Internal Balance for each token, for each account.\\n    mapping(address => mapping(IERC20 => uint256)) private _internalTokenBalance;\\n\\n    function getInternalBalance(address user, IERC20[] memory tokens)\\n        external\\n        view\\n        override\\n        returns (uint256[] memory balances)\\n    {\\n        balances = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; i++) {\\n            balances[i] = _getInternalBalance(user, tokens[i]);\\n        }\\n    }\\n\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable override nonReentrant {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 ethWrapped = 0;\\n\\n        // Cache for these checks so we only perform them once (if at all).\\n        bool checkedCallerIsRelayer = false;\\n        bool checkedNotPaused = false;\\n\\n        for (uint256 i = 0; i < ops.length; i++) {\\n            UserBalanceOpKind kind;\\n            IAsset asset;\\n            uint256 amount;\\n            address sender;\\n            address payable recipient;\\n\\n            // This destructuring by calling `_validateUserBalanceOp` seems odd, but results in reduced bytecode size.\\n            (kind, asset, amount, sender, recipient, checkedCallerIsRelayer) = _validateUserBalanceOp(\\n                ops[i],\\n                checkedCallerIsRelayer\\n            );\\n\\n            if (kind == UserBalanceOpKind.WITHDRAW_INTERNAL) {\\n                // Internal Balance withdrawals can always be performed by an authorized account.\\n                _withdrawFromInternalBalance(asset, sender, recipient, amount);\\n            } else {\\n                // All other operations are blocked if the contract is paused.\\n\\n                // We cache the result of the pause check and skip it for other operations in this same transaction\\n                // (if any).\\n                if (!checkedNotPaused) {\\n                    _ensureNotPaused();\\n                    checkedNotPaused = true;\\n                }\\n\\n                if (kind == UserBalanceOpKind.DEPOSIT_INTERNAL) {\\n                    _depositToInternalBalance(asset, sender, recipient, amount);\\n\\n                    // Keep track of all ETH wrapped into WETH as part of a deposit.\\n                    if (_isETH(asset)) {\\n                        ethWrapped = ethWrapped.add(amount);\\n                    }\\n                } else {\\n                    // Transfers don't support ETH.\\n                    _require(!_isETH(asset), Errors.CANNOT_USE_ETH_SENTINEL);\\n                    IERC20 token = _asIERC20(asset);\\n\\n                    if (kind == UserBalanceOpKind.TRANSFER_INTERNAL) {\\n                        _transferInternalBalance(token, sender, recipient, amount);\\n                    } else {\\n                        // TRANSFER_EXTERNAL\\n                        _transferToExternalBalance(token, sender, recipient, amount);\\n                    }\\n                }\\n            }\\n        }\\n\\n        // Handle any remaining ETH.\\n        _handleRemainingEth(ethWrapped);\\n    }\\n\\n    function _depositToInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        _increaseInternalBalance(recipient, _translateToIERC20(asset), amount);\\n        _receiveAsset(asset, amount, sender, false);\\n    }\\n\\n    function _withdrawFromInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address payable recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, _translateToIERC20(asset), amount, false);\\n        _sendAsset(asset, amount, recipient, false);\\n    }\\n\\n    function _transferInternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, token, amount, false);\\n        _increaseInternalBalance(recipient, token, amount);\\n    }\\n\\n    function _transferToExternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        if (amount > 0) {\\n            token.safeTransferFrom(sender, recipient, amount);\\n            emit ExternalBalanceTransfer(token, sender, recipient, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Increases `account`'s Internal Balance for `token` by `amount`.\\n     */\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal override {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        uint256 newBalance = currentBalance.add(amount);\\n        _setInternalBalance(account, token, newBalance, amount.toInt256());\\n    }\\n\\n    /**\\n     * @dev Decreases `account`'s Internal Balance for `token` by `amount`. If `allowPartial` is true, this function\\n     * doesn't revert if `account` doesn't have enough balance, and sets it to zero and returns the deducted amount\\n     * instead.\\n     */\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool allowPartial\\n    ) internal override returns (uint256 deducted) {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        _require(allowPartial || (currentBalance >= amount), Errors.INSUFFICIENT_INTERNAL_BALANCE);\\n\\n        deducted = Math.min(currentBalance, amount);\\n        // By construction, `deducted` is lower or equal to `currentBalance`, so we don't need to use checked\\n        // arithmetic.\\n        uint256 newBalance = currentBalance - deducted;\\n        _setInternalBalance(account, token, newBalance, -(deducted.toInt256()));\\n    }\\n\\n    /**\\n     * @dev Sets `account`'s Internal Balance for `token` to `newBalance`.\\n     *\\n     * Emits an `InternalBalanceChanged` event. This event includes `delta`, which is the amount the balance increased\\n     * (if positive) or decreased (if negative). To avoid reading the current balance in order to compute the delta,\\n     * this function relies on the caller providing it directly.\\n     */\\n    function _setInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 newBalance,\\n        int256 delta\\n    ) private {\\n        _internalTokenBalance[account][token] = newBalance;\\n        emit InternalBalanceChanged(account, token, delta);\\n    }\\n\\n    /**\\n     * @dev Returns `account`'s Internal Balance for `token`.\\n     */\\n    function _getInternalBalance(address account, IERC20 token) internal view returns (uint256) {\\n        return _internalTokenBalance[account][token];\\n    }\\n\\n    /**\\n     * @dev Destructures a User Balance operation, validating that the contract caller is allowed to perform it.\\n     */\\n    function _validateUserBalanceOp(UserBalanceOp memory op, bool checkedCallerIsRelayer)\\n        private\\n        view\\n        returns (\\n            UserBalanceOpKind,\\n            IAsset,\\n            uint256,\\n            address,\\n            address payable,\\n            bool\\n        )\\n    {\\n        // The only argument we need to validate is `sender`, which can only be either the contract caller, or a\\n        // relayer approved by `sender`.\\n        address sender = op.sender;\\n\\n        if (sender != msg.sender) {\\n            // We need to check both that the contract caller is a relayer, and that `sender` approved them.\\n\\n            // Because the relayer check is global (i.e. independent of `sender`), we cache that result and skip it for\\n            // other operations in this same transaction (if any).\\n            if (!checkedCallerIsRelayer) {\\n                _authenticateCaller();\\n                checkedCallerIsRelayer = true;\\n            }\\n\\n            _require(_hasApprovedRelayer(sender, msg.sender), Errors.USER_DOESNT_ALLOW_RELAYER);\\n        }\\n\\n        return (op.kind, op.asset, op.amount, sender, op.recipient, checkedCallerIsRelayer);\\n    }\\n}\\n\",\"keccak256\":\"0x4412e4e084ff3be5b80f421a9fdbc72de7e2fc17a054609f40c32c32fdcaefbd\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/UserBalance.sol:UserBalance",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/UserBalance.sol:UserBalance",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/UserBalance.sol:UserBalance",
                "label": "_paused",
                "offset": 0,
                "slot": "2",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/UserBalance.sol:UserBalance",
                "label": "_authorizer",
                "offset": 1,
                "slot": "2",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/UserBalance.sol:UserBalance",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "3",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 17602,
                "contract": "src.sol/amm/vault/UserBalance.sol:UserBalance",
                "label": "_internalTokenBalance",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)5095,t_uint256))"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_mapping(t_contract(IERC20)5095,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(contract IERC20 => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_contract(IERC20)5095,t_uint256)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "notice": "Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance. Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users. Internal Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different senders and recipients, at once.",
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/Vault.sol": {
        "Vault": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "authorizer",
                  "type": "address"
                },
                {
                  "internalType": "contract IWETH",
                  "name": "weth",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowDuration",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodDuration",
                  "type": "uint256"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "constructor"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "amountCalculated",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "stateMutability": "payable",
              "type": "receive"
            }
          ],
          "devdoc": {
            "details": "The `Vault` is Balancer V2's core contract. A single instance of it exists for the entire network, and it is the entity used to interact with Pools by Liquidity Providers who join and exit them, Traders who swap, and Asset Managers who withdraw and deposit tokens. The `Vault`'s source code is split among a number of sub-contracts, with the goal of improving readability and making understanding the system easier. Most sub-contracts have been marked as `abstract` to explicitly indicate that only the full `Vault` is meant to be deployed. Roughly speaking, these are the contents of each sub-contract:  - `AssetManagers`: Pool token Asset Manager registry, and Asset Manager interactions.  - `Fees`: set and compute protocol fees.  - `FlashLoans`: flash loan transfers and fees.  - `PoolBalances`: Pool joins and exits.  - `PoolRegistry`: Pool registration, ID management, and basic queries.  - `PoolTokens`: Pool token registration and registration, and balance queries.  - `Swaps`: Pool swaps.  - `UserBalance`: manage user balances (Internal Balance operations and external balance transfers)  - `VaultAuthorization`: access control, relayers and signature validation. Additionally, the different Pool specializations are handled by the `GeneralPoolsBalance`, `MinimalSwapInfoPoolsBalance` and `TwoTokenPoolsBalance` sub-contracts, which in turn make use of the `BalanceAllocation` library. The most important goal of the `Vault` is to make token swaps use as little gas as possible. This is reflected in a multitude of design decisions, from minor things like the format used to store Pool IDs, to major features such as the different Pool specialization settings. Finally, the large number of tasks carried out by the Vault means its bytecode is very large, close to exceeding the contract size limit imposed by EIP 170 (https://eips.ethereum.org/EIPS/eip-170). Manual tuning of the source code was required to improve code generation and bring the bytecode size below this limit. This includes extensive utilization of `internal` functions (particularly inside modifiers), usage of named return arguments, dedicated storage access methods, dynamic revert reason generation, and usage of inline assembly, to name a few.",
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "6101806040523480156200001257600080fd5b5060405162006c0f38038062006c0f833981016040819052620000359162000212565b8382826040518060400160405280601181526020017010985b185b98d95c88158c8815985d5b1d607a1b81525080604051806040016040528060018152602001603160f81b815250306001600160a01b031660001b89806001600160a01b03166080816001600160a01b031660601b815250505030604051620000b89062000204565b620000c491906200025e565b604051809103906000f080158015620000e1573d6000803e3d6000fd5b5060601b6001600160601b03191660a052600160005560c052815160209283012060e052805191012061010052507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61012052620001486276a7008311156101946200019c565b6200015c62278d008211156101956200019c565b429091016101408190520161016052600380546001600160a01b0390921661010002610100600160a81b0319909216919091179055506200028b92505050565b81620001ad57620001ad81620001b1565b5050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b610b4780620060c883390190565b6000806000806080858703121562000228578384fd5b8451620002358162000272565b6020860151909450620002488162000272565b6040860151606090960151949790965092505050565b6001600160a01b0391909116815260200190565b6001600160a01b03811681146200028857600080fd5b50565b60805160601c60a05160601c60c05160e05161010051610120516101405161016051615dd9620002ef60003980611a075250806119e35250806127955250806127d75250806127b65250806110bd5250806113715250806105085250615dd96000f3fe6080604052600436106101855760003560e01c8063945bcec9116100d1578063e6c460921161008a578063f84d066e11610064578063f84d066e1461046a578063f94d46681461048a578063fa6e671d146104b9578063fec90d72146104d9576101b3565b8063e6c4609214610407578063ed24911d14610427578063f6c009271461043c576101b3565b8063945bcec914610365578063aaabadc514610378578063ad5c46481461039a578063b05f8e48146103af578063b95cac28146103df578063d2946c2b146103f2576101b3565b806352bbbe291161013e5780637d3aeb96116101185780637d3aeb96146102e5578063851c1bb3146103055780638bdb39131461032557806390193b7c14610345576101b3565b806352bbbe29146102925780635c38449e146102a557806366a9c7d2146102c5576101b3565b806309b2760f146101b85780630e8e3e84146101ee5780630e9e98cf146102015780630f5a6efa1461022157806316c38b3c1461024e5780631c0de0511461026e576101b3565b366101b3576101b1610195610506565b6001600160a01b0316336001600160a01b03161461020661052b565b005b600080fd5b3480156101c457600080fd5b506101d86101d336600461553f565b61053d565b6040516101e59190615b08565b60405180910390f35b6101b16101fc36600461517d565b6105ec565b34801561020d57600080fd5b506101b161021c366004614fb8565b61072b565b34801561022d57600080fd5b5061024161023c366004615056565b6107a2565b6040516101e59190615ad2565b34801561025a57600080fd5b506101b16102693660046152b9565b610837565b34801561027a57600080fd5b50610283610858565b6040516101e593929190615af0565b6101d86102a03660046156e6565b610881565b3480156102b157600080fd5b506101b16102c03660046154b5565b610a22565b3480156102d157600080fd5b506101b16102e03660046153a0565b610dc4565b3480156102f157600080fd5b506101b1610300366004615372565b610f64565b34801561031157600080fd5b506101d861032036600461548d565b6110b9565b34801561033157600080fd5b506101b1610340366004615309565b61110b565b34801561035157600080fd5b506101d8610360366004614fb8565b611121565b6102416103733660046155de565b61113c565b34801561038457600080fd5b5061038d611270565b6040516101e5919061599e565b3480156103a657600080fd5b5061038d611284565b3480156103bb57600080fd5b506103cf6103ca366004615469565b611293565b6040516101e59493929190615cde565b6101b16103ed366004615309565b611356565b3480156103fe57600080fd5b5061038d61136f565b34801561041357600080fd5b506101b16104223660046150a3565b611393565b34801561043357600080fd5b506101d86114af565b34801561044857600080fd5b5061045c6104573660046152f1565b6114b9565b6040516101e59291906159d6565b34801561047657600080fd5b5061024161048536600461555b565b6114e3565b34801561049657600080fd5b506104aa6104a53660046152f1565b6115c7565b6040516101e593929190615a9c565b3480156104c557600080fd5b506101b16104d436600461500c565b6115fb565b3480156104e557600080fd5b506104f96104f4366004614fd4565b61168d565b6040516101e59190615ae5565b7f00000000000000000000000000000000000000000000000000000000000000005b90565b8161053957610539816116a2565b5050565b60006105476116f5565b61054f61170e565b600061055e3384600654611723565b6000818152600560205260409020549091506105809060ff16156101f461052b565b60008181526005602052604090819020805460ff19166001908117909155600680549091019055517f43641244aeefd8de6827c26f36450aa6165c9fef65ddfa7262da93ba648464d2906105d5908390615b08565b60405180910390a190506105e7611762565b919050565b6105f46116f5565b6000806000805b84518110156107135760008060008060006106298a878151811061061b57fe5b602002602001015189611769565b9c50939850919650945092509050600185600381111561064557fe5b141561065c57610657848383866117e1565b610702565b8661066e5761066961170e565b600196505b600085600381111561067c57fe5b14156106ad5761068e84838386611804565b61069784611824565b15610657576106a68984611831565b9850610702565b6106c26106b985611824565b1561020761052b565b60006106cd85610528565b905060028660038111156106dd57fe5b14156106f4576106ef81848487611843565b610700565b6107008184848761185c565b505b5050600190930192506105fb915050565b5061071d836118ca565b505050610728611762565b50565b6107336116f5565b61073b6118ed565b6003546040516001600160a01b0380841692610100900416907f662d2b49e91208da36bd4107560100ec490758ac0639152fae6a64fca5ef9aee90600090a360038054610100600160a81b0319166101006001600160a01b03841602179055610728611762565b606081516001600160401b03811180156107bb57600080fd5b506040519080825280602002602001820160405280156107e5578160200160208202803683370190505b50905060005b8251811015610830576108118484838151811061080457fe5b602002602001015161191b565b82828151811061081d57fe5b60209081029190910101526001016107eb565b5092915050565b61083f6116f5565b6108476118ed565b61085081611946565b610728611762565b60008060006108656119c4565b1592506108706119e1565b915061087a611a05565b9050909192565b600061088b6116f5565b61089361170e565b835161089e81611a29565b6108ad834211156101fc61052b565b6108c060008760800151116101fe61052b565b60006108cf8760400151611a5b565b905060006108e08860600151611a5b565b9050610903816001600160a01b0316836001600160a01b031614156101fd61052b565b61090b614b45565b8851608082015260208901518190600181111561092457fe5b9081600181111561093157fe5b9052506001600160a01b03808416602083015282811660408084019190915260808b0151606084015260a08b01516101008401528951821660c08401528901511660e082015260008061098383611a80565b919850925090506109ba60008c60200151600181111561099f57fe5b146109ad57898311156109b2565b898210155b6101fb61052b565b6109d28b60400151838c600001518d60200151611b74565b6109ea8b60600151828c604001518d60600151611c52565b610a0c6109fa8c60400151611824565b610a05576000610a07565b825b6118ca565b505050505050610a1a611762565b949350505050565b610a2a6116f5565b610a3261170e565b610a3e83518351611d2c565b606083516001600160401b0381118015610a5757600080fd5b50604051908082528060200260200182016040528015610a81578160200160208202803683370190505b509050606084516001600160401b0381118015610a9d57600080fd5b50604051908082528060200260200182016040528015610ac7578160200160208202803683370190505b5090506000805b8651811015610c40576000878281518110610ae557fe5b602002602001015190506000878381518110610afd57fe5b60200260200101519050610b48846001600160a01b0316836001600160a01b03161160006001600160a01b0316846001600160a01b031614610b40576066610b43565b60685b61052b565b819350816001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401610b77919061599e565b60206040518083038186803b158015610b8f57600080fd5b505afa158015610ba3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc791906157be565b858481518110610bd357fe5b602002602001018181525050610be881611d39565b868481518110610bf457fe5b602002602001018181525050610c2281868581518110610c1057fe5b6020026020010151101561021061052b565b610c366001600160a01b0383168b83611dc0565b5050600101610ace565b5060405163f04f270760e01b81526001600160a01b0388169063f04f270790610c73908990899088908a90600401615a4f565b600060405180830381600087803b158015610c8d57600080fd5b505af1158015610ca1573d6000803e3d6000fd5b5050505060005b8651811015610db2576000878281518110610cbf57fe5b602002602001015190506000848381518110610cd757fe5b602002602001015190506000826001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401610d0f919061599e565b60206040518083038186803b158015610d2757600080fd5b505afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5f91906157be565b9050610d708282101561020361052b565b60008282039050610d99888681518110610d8657fe5b602002602001015182101561025a61052b565b610da38482611e16565b50505050806001019050610ca8565b50505050610dbe611762565b50505050565b610dcc6116f5565b610dd461170e565b82610dde81611e38565b610dea83518351611d2c565b60005b8351811015610e88576000848281518110610e0457fe5b60200260200101519050610e3060006001600160a01b0316826001600160a01b0316141561013561052b565b838281518110610e3c57fe5b6020908102919091018101516000888152600a835260408082206001600160a01b0395861683529093529190912080546001600160a01b03191692909116919091179055600101610ded565b506000610e9485611e69565b90506002816002811115610ea457fe5b1415610ef257610eba845160021461020c61052b565b610eed8585600081518110610ecb57fe5b602002602001015186600181518110610ee057fe5b6020026020010151611e83565b610f1a565b6001816002811115610f0057fe5b1415610f1057610eed8585611f2f565b610f1a8585611f87565b7ff5847d3f2197b16cdcd2098ec95d0905cd1abdaf415f07bb7cef2bba8ac5dec4858585604051610f4d93929190615ba7565b60405180910390a15050610f5f611762565b505050565b610f6c6116f5565b610f7461170e565b81610f7e81611e38565b6000610f8984611e69565b90506002816002811115610f9957fe5b1415610fe757610faf835160021461020c61052b565b610fe28484600081518110610fc057fe5b602002602001015185600181518110610fd557fe5b6020026020010151611fdc565b61100f565b6001816002811115610ff557fe5b141561100557610fe2848461204a565b61100f8484612104565b60005b835181101561107557600a6000868152602001908152602001600020600085838151811061103c57fe5b6020908102919091018101516001600160a01b0316825281019190915260400160002080546001600160a01b0319169055600101611012565b507f7dcdc6d02ef40c7c1a7046a011b058bd7f988fa14e20a66344f9d4e60657d61084846040516110a7929190615b8e565b60405180910390a15050610539611762565b60007f0000000000000000000000000000000000000000000000000000000000000000826040516020016110ee929190615918565b604051602081830303815290604052805190602001209050919050565b610dbe600185858561111c86612167565b612173565b6001600160a01b031660009081526002602052604090205490565b60606111466116f5565b61114e61170e565b835161115981611a29565b611168834211156101fc61052b565b61117486518551611d2c565b6111808787878b6122f9565b91506000805b875181101561125257600088828151811061119d57fe5b6020026020010151905060008583815181106111b557fe5b602002602001015190506111e18884815181106111ce57fe5b60200260200101518213156101fb61052b565b600081131561122157885160208a015182916112009185918491611b74565b61120983611824565b1561121b576112188582611831565b94505b50611248565b600081121561124857600081600003905061124683828c604001518d60600151611c52565b505b5050600101611186565b5061125c816118ca565b5050611266611762565b9695505050505050565b60035461010090046001600160a01b031690565b600061128e610506565b905090565b600080600080856112a381612587565b6000806112af89611e69565b905060028160028111156112bf57fe5b14156112d6576112cf89896125a5565b9150611301565b60018160028111156112e457fe5b14156112f4576112cf898961261f565b6112fe898961268d565b91505b61130a826126a5565b9650611315826126b1565b9550611320826126c0565b6000998a52600a60209081526040808c206001600160a01b039b8c168d5290915290992054969995989796909616955050505050565b61135e61170e565b610dbe600085858561111c86612167565b7f000000000000000000000000000000000000000000000000000000000000000090565b61139b6116f5565b6113a361170e565b6113ab614b95565b60005b82518110156114a5578281815181106113c357fe5b602002602001015191506000826020015190506113df81612587565b60408301516113f96113f183836126c6565b61020961052b565b6000828152600a602090815260408083206001600160a01b03858116855292529091205461142c911633146101f661052b565b8351606085015160008061144284878786612722565b91509150846001600160a01b0316336001600160a01b0316877f6edcaf6241105b4c94c2efdbf3a6b12458eb3d07be3a0e81d24b13c44045fe7a858560405161148c929190615c72565b60405180910390a45050505050508060010190506113ae565b5050610728611762565b600061128e612791565b600080826114c681612587565b6114cf8461282e565b6114d885611e69565b925092505b50915091565b606033301461159d576000306001600160a01b0316600036604051611509929190615930565b6000604051808303816000865af19150503d8060008114611546576040519150601f19603f3d011682016040523d82523d6000602084013e61154b565b606091505b50509050806000811461155a57fe5b60046000803e6000516001600160e01b031916637d30e60960e11b8114611585573d6000803e3d6000fd5b50602060005260043d0380600460203e602081016000f35b60606115ab858585896122f9565b9050602081510263fa61cc126020830352600482036024820181fd5b6060806000836115d681612587565b60606115e186612834565b90955090506115ef81612896565b95979096509350505050565b6116036116f5565b61160b61170e565b8261161581611a29565b6001600160a01b0384811660008181526004602090815260408083209488168084529490915290819020805460ff1916861515179055519091907f46961fdb4502b646d5095fba7600486a8ac05041d55cdf0f16ed677180b5cad89061167c908690615ae5565b60405180910390a350610f5f611762565b60006116998383612944565b90505b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6117076002600054141561019061052b565b6002600055565b6117216117196119c4565b61019261052b565b565b600069ffffffffffffffffffff8216605084600281111561174057fe5b901b17606085901b6bffffffffffffffffffffffff19161790505b9392505050565b6001600055565b600080600080600080600088606001519050336001600160a01b0316816001600160a01b0316146117bb57876117a6576117a16118ed565b600197505b6117bb6117b38233612944565b6101f761052b565b885160208a015160408b01516080909b0151919b909a9992985090965090945092505050565b6117f6836117ee86611a5b565b836000612972565b50610dbe8482846000611c52565b6118178261181186611a5b565b836129c8565b610dbe8482856000611b74565b6001600160a01b03161590565b6000828201611699848210158361052b565b6118508385836000612972565b50610dbe8285836129c8565b8015610dbe576118776001600160a01b0385168484846129f8565b826001600160a01b0316846001600160a01b03167f540a1a3f28340caec336c81d8d7b3df139ee5cdc1839a4f283d7ebb7eaae2d5c84846040516118bc9291906159fd565b60405180910390a350505050565b6118d98134101561020461052b565b348190038015610539576105393382612a19565b60006119046000356001600160e01b0319166110b9565b90506107286119138233612a93565b61019161052b565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b8015611966576119616119576119e1565b421061019361052b565b61197b565b61197b611971611a05565b42106101a961052b565b6003805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64906119b9908390615ae5565b60405180910390a150565b60006119ce611a05565b42118061128e57505060035460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b336001600160a01b0382161461072857611a416118ed565b611a4b8133612944565b61072857610728816101f7612b1d565b6000611a6682611824565b611a7857611a7382610528565b61169c565b61169c610506565b600080600080611a93856080015161282e565b90506000611aa48660800151611e69565b90506002816002811115611ab457fe5b1415611acb57611ac48683612b51565b9450611af6565b6001816002811115611ad957fe5b1415611ae957611ac48683612c01565b611af38683612c94565b94505b611b098660000151876060015187612eb8565b809450819550505085604001516001600160a01b031686602001516001600160a01b031687608001517f2170c741c41531aec20e7c107c24eecfdd15e69c9bb0a8dd37b1840b9e0b207b8787604051611b63929190615c72565b60405180910390a450509193909250565b82611b7e57610dbe565b611b8784611824565b15611c0857611b99811561020261052b565b611ba88347101561020461052b565b611bb0610506565b6001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b158015611bea57600080fd5b505af1158015611bfe573d6000803e3d6000fd5b5050505050610dbe565b6000611c1385610528565b90508115611c30576000611c2a8483876001612972565b90940393505b8315611c4b57611c4b6001600160a01b0382168430876129f8565b5050505050565b82611c5c57610dbe565b611c6584611824565b15611cf557611c77811561020261052b565b611c7f610506565b6001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b8152600401611caa9190615b08565b600060405180830381600087803b158015611cc457600080fd5b505af1158015611cd8573d6000803e3d6000fd5b50611cf0925050506001600160a01b03831684612a19565b610dbe565b6000611d0085610528565b90508115611d1857611d138382866129c8565b611c4b565b611c4b6001600160a01b0382168486611dc0565b610539818314606761052b565b600080611d4461136f565b6001600160a01b031663d877845c6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7c57600080fd5b505afa158015611d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db491906157be565b905061175b8382612ee6565b610f5f8363a9059cbb60e01b8484604051602401611ddf9291906159fd565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f33565b801561053957610539611e2761136f565b6001600160a01b0384169083611dc0565b611e4181612587565b610728611e4d8261282e565b6001600160a01b0316336001600160a01b0316146101f561052b565b600061ffff605083901c1661169c600382106101f461052b565b611ea4816001600160a01b0316836001600160a01b0316141561020a61052b565b611ec3816001600160a01b0316836001600160a01b031610606661052b565b60008381526009602052604090208054611f00906001600160a01b0316158015611ef8575060018201546001600160a01b0316155b61020b61052b565b80546001600160a01b039384166001600160a01b03199182161782556001909101805492909316911617905550565b6000828152600860205260408120905b8251811015610dbe576000611f70848381518110611f5957fe5b602002602001015184612fd390919063ffffffff16565b9050611f7e8161020a61052b565b50600101611f3f565b6000828152600160205260408120905b8251811015610dbe576000611fc5848381518110611fb157fe5b602090810291909101015184906000613036565b9050611fd38161020a61052b565b50600101611f97565b6000806000611fec8686866130e3565b925092509250612016611ffe846131aa565b801561200e575061200e836131aa565b61020d61052b565b600095865260096020526040862080546001600160a01b031990811682556001909101805490911690559490945550505050565b6000828152600860205260408120905b8251811015610dbe57600083828151811061207157fe5b602002602001015190506120bd61200e600760008881526020019081526020016000206000846001600160a01b03166001600160a01b03168152602001908152602001600020546131aa565b60008581526007602090815260408083206001600160a01b038516845290915281208190556120ec84836131b7565b90506120fa8161020961052b565b505060010161205a565b6000828152600160205260408120905b8251811015610dbe57600083828151811061212b57fe5b60200260200101519050600061214184836132be565b905061214f61200e826131aa565b61215984836132cd565b505050806001019050612114565b61216f614bbe565b5090565b61217b6116f5565b8361218581612587565b8361218f81611a29565b6121a3836000015151846020015151611d2c565b60606121b2846000015161336f565b905060606121c088836133fd565b905060608060606121d58c8c8c8c8c8961348e565b92509250925060006121e68c611e69565b905060028160028111156121f657fe5b141561225e576122598c8760008151811061220d57fe5b60200260200101518660008151811061222257fe5b60200260200101518960018151811061223757fe5b60200260200101518860018151811061224c57fe5b6020026020010151613653565b612287565b600181600281111561226c57fe5b141561227d576122598c8786613692565b6122878c856136ff565b6000808e600181111561229657fe5b1490508b6001600160a01b03168d7fe5ce249087ce04f05a957192435400fd97868dba0e6a4b4c049abf8af80dae78896122d08886613748565b876040516122e093929190615a16565b60405180910390a3505050505050505050611c4b611762565b606083516001600160401b038111801561231257600080fd5b5060405190808252806020026020018201604052801561233c578160200160208202803683370190505b509050612347614be8565b61234f614b45565b60008060005b895181101561257a5789818151811061236a57fe5b6020026020010151945060008951866020015110801561238e575089518660400151105b905061239b81606461052b565b60006123bd8b8860200151815181106123b057fe5b6020026020010151611a5b565b905060006123d48c8960400151815181106123b057fe5b90506123f7816001600160a01b0316836001600160a01b031614156101fd61052b565b60608801516124475761240f600085116101fe61052b565b600061241c8b84846137ef565b6001600160a01b0316876001600160a01b031614905061243e816101ff61052b565b50606088018590525b87516080880152868a600181111561245b57fe5b9081600181111561246857fe5b9052506001600160a01b0380831660208901528181166040808a01919091526060808b0151908a015260808a01516101008a01528c51821660c08a01528c01511660e08801526000806124ba89611a80565b919850925090506124cc8c8585613811565b97506125006124da8361382b565b8c8c60200151815181106124ea57fe5b602002602001015161383f90919063ffffffff16565b8b8b602001518151811061251057fe5b60200260200101818152505061254e6125288261382b565b8c8c604001518151811061253857fe5b602002602001015161387390919063ffffffff16565b8b8b604001518151811061255e57fe5b6020026020010181815250505050505050806001019050612355565b5050505050949350505050565b6000818152600560205260409020546107289060ff166101f461052b565b60008060008060006125b6876138a7565b945094509450945050836001600160a01b0316866001600160a01b031614156125e5578294505050505061169c565b816001600160a01b0316866001600160a01b0316141561260a57935061169c92505050565b6126156102096116a2565b5050505092915050565b60008281526007602090815260408083206001600160a01b03851684529091528120548161264c8261391d565b8061266a5750600085815260086020526040902061266a908561392f565b9050806126855761267a85612587565b6126856102096116a2565b509392505050565b6000828152600160205260408120610a1a81846132be565b6001600160701b031690565b60701c6001600160701b031690565b60e01c90565b6000806126d284611e69565b905060028160028111156126e257fe5b14156126fa576126f28484613950565b91505061169c565b600181600281111561270857fe5b1415612718576126f284846139a1565b6126f284846139b9565b600080600061273086611e69565b9050600087600281111561274057fe5b141561275c57612752868287876139d1565b9250925050612788565b600187600281111561276a57fe5b141561277c5761275286828787613a4c565b61275286828787613ac8565b94509492505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006127fe613b2b565b30604051602001612813959493929190615c28565b60405160208183030381529060405280519060200120905090565b60601c90565b606080600061284284611e69565b9050600281600281111561285257fe5b141561286b5761286184613b2f565b9250925050612891565b600181600281111561287957fe5b14156128885761286184613c64565b61286184613d89565b915091565b6060600082516001600160401b03811180156128b157600080fd5b506040519080825280602002602001820160405280156128db578160200160208202803683370190505b5091506000905060005b82518110156114dd5760008482815181106128fc57fe5b6020026020010151905061290f81613e83565b84838151811061291b57fe5b60200260200101818152505061293983612934836126c0565b613e9e565b9250506001016128e5565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b60008061297f868661191b565b905061299883806129905750848210155b61020161052b565b6129a28185613eb5565b91508181036129be8787836129b68761382b565b600003613ec4565b5050949350505050565b60006129d4848461191b565b905060006129e28284611831565b9050611c4b8585836129f38761382b565b613ec4565b610dbe846323b872dd60e01b858585604051602401611ddf939291906159b2565b612a28814710156101a361052b565b6000826001600160a01b031682604051612a4190610528565b60006040518083038185875af1925050503d8060008114612a7e576040519150601f19603f3d011682016040523d82523d6000602084013e612a83565b606091505b50509050610f5f816101a461052b565b6003546040516326f8aa2160e21b815260009161010090046001600160a01b031690639be2a88490612acd90869086903090600401615b11565b60206040518083038186803b158015612ae557600080fd5b505afa158015612af9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169991906152d5565b6001600160a01b0382166000908152600260205260409020805460018101909155610f5f612b4b8483613f1f565b8361052b565b600080600080612b6e8660800151876020015188604001516130e3565b92509250925060008087604001516001600160a01b031688602001516001600160a01b03161015612ba3575083905082612ba9565b50829050835b612bb588888484614045565b60408b015160208c01519199509294509092506001600160a01b03918216911610612be957612be48183614142565b612bf3565b612bf38282614142565b909255509295945050505050565b600080612c168460800151856020015161261f565b90506000612c2c8560800151866040015161261f565b9050612c3a85858484614045565b6080880180516000908152600760208181526040808420828e01516001600160a01b03908116865290835281852098909855935183529081528282209a830151909516815298909352919096209590955550929392505050565b60808201516000908152600160209081526040822090840151829182918290612cbe90839061417d565b90506000612cd988604001518461417d90919063ffffffff16565b9050811580612ce6575080155b15612d0357612cf88860800151612587565b612d036102096116a2565b60001991820191016000612d168461419c565b90506060816001600160401b0381118015612d3057600080fd5b50604051908082528060200260200182016040528015612d5a578160200160208202803683370190505b50600060a08c018190529091505b82811015612dda576000612d7c87836141a0565b9050612d8781613e83565b838381518110612d9357fe5b602002602001018181525050612db08c60a00151612934836126c0565b60a08d015281861415612dc557809850612dd1565b84821415612dd1578097505b50600101612d68565b5060405162f64aa560e11b81526001600160a01b038a16906301ec954a90612e0c908d90859089908990600401615c80565b602060405180830381600087803b158015612e2657600080fd5b505af1158015612e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e5e91906157be565b9750600080612e768c600001518d606001518c612eb8565b9092509050612e8589836141b6565b9850612e9188826141e7565b9750612e9e87878b6141fd565b612ea987868a6141fd565b50505050505050505092915050565b60008080856001811115612ec857fe5b1415612ed8575082905081612ede565b50819050825b935093915050565b6000828202612f0a841580612f03575083858381612f0057fe5b04145b600361052b565b80612f1957600091505061169c565b670de0b6b3a764000060001982010460010191505061169c565b60006060836001600160a01b031683604051612f4f9190615940565b6000604051808303816000865af19150503d8060008114612f8c576040519150601f19603f3d011682016040523d82523d6000602084013e612f91565b606091505b50915091506000821415612fa9573d6000803e3d6000fd5b610dbe815160001480612fcb575081806020019051810190612fcb91906152d5565b6101a261052b565b6000612fdf838361392f565b61302e57508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b0386169081179091558554908252828601909352604090209190915561169c565b50600061169c565b6001600160a01b0382166000908152600284016020526040812054806130c357505082546040805180820182526001600160a01b03858116808352602080840187815260008781526001808c018452878220965187546001600160a01b0319169616959095178655905194840194909455948201808955908352600288019094529190209190915561175b565b60001901600090815260018086016020526040822001839055905061175b565b60008060008060006130f58787614215565b9150915060006131058383614246565b60008a8152600960209081526040808320848452600201909152812080546001820154919750929350906131388361391d565b8061314757506131478261391d565b8061316857506131578c87613950565b801561316857506131688c86613950565b905080613183576131788c612587565b6131836102096116a2565b61318d8383614279565b9850613199838361429e565b975050505050505093509350939050565b6001600160e01b03161590565b6001600160a01b038116600090815260018301602052604081205480156132b457835460001980830191908101906000908790839081106131f457fe5b60009182526020909120015487546001600160a01b039091169150819088908590811061321d57fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905591831681526001898101909252604090209084019055865487908061326657fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260018981019091526040822091909155945061169c9350505050565b600091505061169c565b600061169983836102096142b5565b6001600160a01b038116600090815260028301602052604081205480156132b457835460001990810160008181526001878101602090815260408084209587018452808420865481546001600160a01b03199081166001600160a01b0392831617835588860180549387019390935588548216875260028d018086528488209a909a55885416909755849055938955938716825293909252812055905061169c565b60608082516001600160401b038111801561338957600080fd5b506040519080825280602002602001820160405280156133b3578160200160208202803683370190505b50905060005b8351811015610830576133d18482815181106123b057fe5b8282815181106133dd57fe5b6001600160a01b03909216602092830291909101909101526001016133b9565b606080606061340b85612834565b9150915061341b82518551611d2c565b61342b600083511161020f61052b565b60005b82518110156134855761347d85828151811061344657fe5b60200260200101516001600160a01b031684838151811061346357fe5b60200260200101516001600160a01b03161461020861052b565b60010161342e565b50949350505050565b606080606080600061349f86612896565b9150915060006134ae8b61282e565b905060008c60018111156134be57fe5b1461356157806001600160a01b03166374f3b0098c8c8c87876134df6142f2565b8f604001516040518863ffffffff1660e01b81526004016135069796959493929190615b30565b600060405180830381600087803b15801561352057600080fd5b505af1158015613534573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261355c9190810190615263565b6135fa565b806001600160a01b031663d5c096c48c8c8c878761357d6142f2565b8f604001516040518863ffffffff1660e01b81526004016135a49796959493929190615b30565b600060405180830381600087803b1580156135be57600080fd5b505af11580156135d2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526135fa9190810190615263565b809550819650505061361087518651865161436c565b60008c600181111561361e57fe5b14613635576136308989898888614384565b613642565b6136428a898988886144ca565b955050505096509650969350505050565b600061365f8584614246565b600087815260096020908152604080832084845260020190915290209091506136888584614142565b9055505050505050565b60005b8251811015610dbe578181815181106136aa57fe5b60200260200101516007600086815260200190815260200160002060008584815181106136d357fe5b6020908102919091018101516001600160a01b0316825281019190915260400160002055600101613695565b6000828152600160205260408120905b8251811015610dbe576137408184838151811061372857fe5b6020026020010151846141fd9092919063ffffffff16565b60010161370f565b606082516001600160401b038111801561376157600080fd5b5060405190808252806020026020018201604052801561378b578160200160208202803683370190505b50905060005b835181101561083057826137bb578381815181106137ab57fe5b60200260200101516000036137d0565b8381815181106137c757fe5b60200260200101515b8282815181106137dc57fe5b6020908102919091010152600101613791565b6000808460018111156137fe57fe5b146138095781610a1a565b509092915050565b60008084600181111561382057fe5b146108305782610a1a565b600061216f600160ff1b83106101a561052b565b60008282016116998284128015906138575750848212155b8061386c575060008412801561386c57508482125b600061052b565b600081830361169982841280159061388b5750848213155b806138a057506000841280156138a057508482135b600161052b565b6000818152600960205260408120805460018201546001600160a01b03918216928492909116908290816138db8685614246565b60008181526002840160205260409020805460018201549199509192506139028282614279565b965061390e828261429e565b94505050505091939590929450565b6000613928826131aa565b1592915050565b6001600160a01b031660009081526001919091016020526040902054151590565b600082815260096020526040812080546001600160a01b0384811691161480613988575060018101546001600160a01b038481169116145b8015610a1a575050506001600160a01b03161515919050565b6000828152600860205260408120610a1a818461392f565b6000828152600160205260408120610a1a818461463f565b60008060028560028111156139e257fe5b14156139f8576139f3868585614660565b613a22565b6001856002811115613a0657fe5b1415613a17576139f386858561466e565b613a2286858561467c565b8215613a3c57613a3c6001600160a01b0385163385611dc0565b5050600081900394909350915050565b6000806002856002811115613a5d57fe5b1415613a7357613a6e86858561468a565b613a9d565b6001856002811115613a8157fe5b1415613a9257613a6e868585614698565b613a9d8685856146a6565b8215613ab857613ab86001600160a01b0385163330866129f8565b5090946000869003945092505050565b6000806002856002811115613ad957fe5b1415613af157613aea8685856146b4565b9050613b1e565b6001856002811115613aff57fe5b1415613b1057613aea8685856146c4565b613b1b8685856146d4565b90505b6000915094509492505050565b4690565b606080600080600080613b41876138a7565b92975090955093509150506001600160a01b0384161580613b6957506001600160a01b038216155b15613b925750506040805160008082526020820190815281830190925294509250612891915050565b60408051600280825260608201835290916020830190803683370190505095508386600081518110613bc057fe5b60200260200101906001600160a01b031690816001600160a01b0316815250508186600181518110613bee57fe5b6001600160a01b03929092166020928302919091018201526040805160028082526060820183529092909190830190803683370190505094508285600081518110613c3557fe5b6020026020010181815250508085600181518110613c4f57fe5b60200260200101818152505050505050915091565b60008181526008602052604090206060908190613c808161419c565b6001600160401b0381118015613c9557600080fd5b50604051908082528060200260200182016040528015613cbf578160200160208202803683370190505b50925082516001600160401b0381118015613cd957600080fd5b50604051908082528060200260200182016040528015613d03578160200160208202803683370190505b50915060005b8351811015613d82576000613d1e83836146e4565b905080858381518110613d2d57fe5b6001600160a01b03928316602091820292909201810191909152600088815260078252604080822093851682529290915220548451859084908110613d6e57fe5b602090810291909101015250600101613d09565b5050915091565b60008181526001602052604090206060908190613da58161419c565b6001600160401b0381118015613dba57600080fd5b50604051908082528060200260200182016040528015613de4578160200160208202803683370190505b50925082516001600160401b0381118015613dfe57600080fd5b50604051908082528060200260200182016040528015613e28578160200160208202803683370190505b50915060005b8351811015613d8257613e418282614711565b858381518110613e4d57fe5b60200260200101858481518110613e6057fe5b60209081029190910101919091526001600160a01b039091169052600101613e2e565b6000613e8e826126b1565b613e97836126a5565b0192915050565b600081831015613eae5781611699565b5090919050565b6000818310613eae5781611699565b6001600160a01b038085166000818152600b602090815260408083209488168084529490915290819020859055517f18e1ea4139e68413d7d08aa752e71568e36b2c5bf940893314c2c5b01eaa0c42906118bc908590615b08565b600080613f2a614735565b905042811015613f3e57600091505061169c565b6000613f48614741565b905080613f5a5760009250505061169c565b600081613f65614852565b8051602091820120604051613f81939233918a91899101615bfc565b6040516020818303038152906040528051906020012090506000613fa4826148a1565b90506000806000613fb36148bd565b925092509250600060018585858560405160008152602001604052604051613fde9493929190615c54565b6020604051602081039080840390855afa158015614000573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061403657508a6001600160a01b0316816001600160a01b0316145b9b9a5050505050505050505050565b60008060008061405486613e83565b9050600061406186613e83565b905061407861406f886126c0565b612934886126c0565b60a08a015260405163274b044360e21b81526001600160a01b03891690639d2c110c906140ad908c9086908690600401615cb9565b602060405180830381600087803b1580156140c757600080fd5b505af11580156140db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140ff91906157be565b92506000806141178b600001518c6060015187612eb8565b909250905061412689836141b6565b965061413288826141e7565b9550505050509450945094915050565b60008061415a614151856126c0565b612934856126c0565b9050610a1a614168856126a5565b614171856126a5565b8363ffffffff166148e4565b6001600160a01b03166000908152600291909101602052604090205490565b5490565b6000908152600191820160205260409020015490565b6000806141cc836141c6866126a5565b90611831565b905060006141d9856126b1565b9050436112668383836148f2565b6000806141cc836141f7866126a5565b90614920565b60009182526001928301602052604090912090910155565b600080826001600160a01b0316846001600160a01b03161061423857828461423b565b83835b915091509250929050565b6000828260405160200161425b92919061595c565b60405160208183030381529060405280519060200120905092915050565b6000611699614287846126a5565b614290846126a5565b614299866126c0565b6148f2565b60006116996142ac846126b1565b614290846126b1565b6001600160a01b03821660009081526002840160205260408120546142dc8115158461052b565b6142e985600183036141a0565b95945050505050565b60006142fc61136f565b6001600160a01b03166355c676286040518163ffffffff1660e01b815260040160206040518083038186803b15801561433457600080fd5b505afa158015614348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128e91906157be565b610f5f828414801561437d57508183145b606761052b565b606083516001600160401b038111801561439d57600080fd5b506040519080825280602002602001820160405280156143c7578160200160208202803683370190505b50905060005b8551518110156144c05760008482815181106143e557fe5b602002602001015190506144158760200151838151811061440257fe5b60200260200101518210156101f961052b565b60008760000151838151811061442757fe5b6020026020010151905061444181838b8b60600151611c52565b600085848151811061444f57fe5b6020026020010151905061446b61446583611a5b565b82611e16565b61449a6144788483611831565b89868151811061448457fe5b60200260200101516141e790919063ffffffff16565b8585815181106144a657fe5b6020026020010181815250505050508060010190506143cd565b5095945050505050565b6060600084516001600160401b03811180156144e557600080fd5b5060405190808252806020026020018201604052801561450f578160200160208202803683370190505b50915060005b86515181101561463557600085828151811061452d57fe5b6020026020010151905061455d8860200151838151811061454a57fe5b60200260200101518211156101fa61052b565b60008860000151838151811061456f57fe5b6020026020010151905061458981838c8c60600151611b74565b61459281611824565b156145a4576145a18483611831565b93505b60008684815181106145b257fe5b602002602001015190506145c861446583611a5b565b808310156145e7576145e28382038a868151811061448457fe5b61460f565b61460f8184038a86815181106145f957fe5b60200260200101516141b690919063ffffffff16565b86858151811061461b57fe5b602002602001018181525050505050806001019050614515565b506144c0816118ca565b6001600160a01b031660009081526002919091016020526040902054151590565b610dbe838361493684614971565b610dbe838361493684614a1c565b610dbe838361493684614a77565b610dbe8383614ac684614971565b610dbe8383614ac684614a1c565b610dbe8383614ac684614a77565b6000610a1a8484614ae785614971565b6000610a1a8484614ae785614a1c565b6000610a1a8484614ae785614a77565b60008260000182815481106146f557fe5b6000918252602090912001546001600160a01b03169392505050565b600090815260019182016020526040902080549101546001600160a01b0390911691565b600061128e6000614b01565b6000803560e01c8063b95cac28811461478957638bdb391381146147b1576352bbbe2981146147d95763945bcec981146148015763fa6e671d8114614829576000925061484d565b7f3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58925061484d565b7f8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353925061484d565b7fe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe925061484d565b7f9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a925061484d565b7fa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a92505b505090565b60606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505082519293505050608010156105285760803603815290565b60006148ab612791565b826040516020016110ee929190615983565b60008060006148cc6020614b01565b92506148d86040614b01565b915061087a6060614b01565b60e01b60709190911b010190565b600083830161491585821080159061490d5750600160701b82105b61020e61052b565b6142e98585856148e4565b600061493083831115600161052b565b50900390565b600080614946836141f7866126a5565b90506000614957846141c6876126b1565b90506000614964866126c0565b90506112668383836148f2565b6000806000806000614982896138a7565b9450509350935093506000836001600160a01b0316896001600160a01b031614156149cd5760006149b784898b63ffffffff16565b90506149c38185614b0b565b90935090506149ef565b60006149dd83898b63ffffffff16565b90506149e98184614b0b565b90925090505b6149f98383614142565b8555614a058383614b27565b600190950194909455509192505050949350505050565b600080614a29868661261f565b90506000614a3b82858763ffffffff16565b60008881526007602090815260408083206001600160a01b038b16845290915290208190559050614a6c8183614b0b565b979650505050505050565b600084815260016020526040812081614a9082876132be565b90506000614aa282868863ffffffff16565b9050614aaf838883613036565b50614aba8183614b0b565b98975050505050505050565b600080614ad6836141c6866126a5565b90506000614957846141f7876126b1565b600080614af3846126a5565b9050436142e98285836148f2565b3601607f19013590565b6000614b16826126b1565b614b1f846126b1565b039392505050565b6000611699614b35846126b1565b614b3e846126b1565b60006148e4565b60408051610120810190915280600081526000602082018190526040820181905260608083018290526080830182905260a0830182905260c0830182905260e08301919091526101009091015290565b604080516080810190915280600081526000602082018190526040820181905260609091015290565b60405180608001604052806060815260200160608152602001606081526020016000151581525090565b6040518060a0016040528060008019168152602001600081526020016000815260200160008152602001606081525090565b803561169c81615d73565b600082601f830112614c35578081fd5b8135614c48614c4382615d28565b615d02565b818152915060208083019084810181840286018201871015614c6957600080fd5b60005b84811015614c91578135614c7f81615d73565b84529282019290820190600101614c6c565b505050505092915050565b600082601f830112614cac578081fd5b8135614cba614c4382615d28565b818152915060208083019084810160005b84811015614c91578135870160a080601f19838c03011215614cec57600080fd5b614cf581615d02565b8583013581526040808401358783015260608085013582840152608091508185013581840152508284013592506001600160401b03831115614d3657600080fd5b614d448c8885870101614e23565b90820152865250509282019290820190600101614ccb565b600082601f830112614d6c578081fd5b8135614d7a614c4382615d28565b818152915060208083019084810181840286018201871015614d9b57600080fd5b60005b84811015614c9157813584529282019290820190600101614d9e565b600082601f830112614dca578081fd5b8151614dd8614c4382615d28565b818152915060208083019084810181840286018201871015614df957600080fd5b60005b84811015614c9157815184529282019290820190600101614dfc565b803561169c81615d88565b600082601f830112614e33578081fd5b81356001600160401b03811115614e48578182fd5b614e5b601f8201601f1916602001615d02565b9150808252836020828501011115614e7257600080fd5b8060208401602084013760009082016020015292915050565b803561169c81615d96565b80356002811061169c57600080fd5b80356004811061169c57600080fd5b600060808284031215614ec5578081fd5b614ecf6080615d02565b905081356001600160401b0380821115614ee857600080fd5b614ef485838601614c25565b83526020840135915080821115614f0a57600080fd5b614f1685838601614d5c565b60208401526040840135915080821115614f2f57600080fd5b50614f3c84828501614e23565b604083015250614f4f8360608401614e18565b606082015292915050565b600060808284031215614f6b578081fd5b614f756080615d02565b90508135614f8281615d73565b81526020820135614f9281615d88565b60208201526040820135614fa581615d73565b60408201526060820135614f4f81615d88565b600060208284031215614fc9578081fd5b813561169981615d73565b60008060408385031215614fe6578081fd5b8235614ff181615d73565b9150602083013561500181615d73565b809150509250929050565b600080600060608486031215615020578081fd5b833561502b81615d73565b9250602084013561503b81615d73565b9150604084013561504b81615d88565b809150509250925092565b60008060408385031215615068578182fd5b823561507381615d73565b915060208301356001600160401b0381111561508d578182fd5b61509985828601614c25565b9150509250929050565b600060208083850312156150b5578182fd5b82356001600160401b038111156150ca578283fd5b8301601f810185136150da578283fd5b80356150e8614c4382615d28565b818152838101908385016080808502860187018a1015615106578788fd5b8795505b8486101561516f5780828b031215615120578788fd5b61512981615d02565b6151338b84614e8b565b81528783013588820152604061514b8c828601614c1a565b9082015260608381013590820152845260019590950194928601929081019061510a565b509098975050505050505050565b6000602080838503121561518f578182fd5b82356001600160401b038111156151a4578283fd5b8301601f810185136151b4578283fd5b80356151c2614c4382615d28565b8181528381019083850160a0808502860187018a10156151e0578788fd5b8795505b8486101561516f5780828b0312156151fa578788fd5b61520381615d02565b61520d8b84614ea5565b815261521b8b898501614c1a565b818901526040838101359082015260606152378c828601614c1a565b9082015260806152498c858301614c1a565b9082015284526001959095019492860192908101906151e4565b60008060408385031215615275578182fd5b82516001600160401b038082111561528b578384fd5b61529786838701614dba565b935060208501519150808211156152ac578283fd5b5061509985828601614dba565b6000602082840312156152ca578081fd5b813561169981615d88565b6000602082840312156152e6578081fd5b815161169981615d88565b600060208284031215615302578081fd5b5035919050565b6000806000806080858703121561531e578182fd5b84359350602085013561533081615d73565b9250604085013561534081615d73565b915060608501356001600160401b0381111561535a578182fd5b61536687828801614eb4565b91505092959194509250565b60008060408385031215615384578182fd5b8235915060208301356001600160401b0381111561508d578182fd5b6000806000606084860312156153b4578081fd5b833592506020808501356001600160401b03808211156153d2578384fd5b6153de88838901614c25565b945060408701359150808211156153f3578384fd5b508501601f81018713615404578283fd5b8035615412614c4382615d28565b81815283810190838501858402850186018b101561542e578687fd5b8694505b8385101561545957803561544581615d73565b835260019490940193918501918501615432565b5080955050505050509250925092565b6000806040838503121561547b578182fd5b82359150602083013561500181615d73565b60006020828403121561549e578081fd5b81356001600160e01b031981168114611699578182fd5b600080600080608085870312156154ca578182fd5b84356154d581615d73565b935060208501356001600160401b03808211156154f0578384fd5b6154fc88838901614c25565b94506040870135915080821115615511578384fd5b61551d88838901614d5c565b93506060870135915080821115615532578283fd5b5061536687828801614e23565b600060208284031215615550578081fd5b813561169981615d96565b60008060008060e08587031215615570578182fd5b61557a8686614e96565b935060208501356001600160401b0380821115615595578384fd5b6155a188838901614c9c565b945060408701359150808211156155b6578384fd5b506155c387828801614c25565b9250506155d38660608701614f5a565b905092959194509250565b60008060008060008061012087890312156155f7578384fd5b6156018888614e96565b95506020808801356001600160401b038082111561561d578687fd5b6156298b838c01614c9c565b975060408a013591508082111561563e578687fd5b61564a8b838c01614c25565b96506156598b60608c01614f5a565b955060e08a013591508082111561566e578485fd5b508801601f81018a1361567f578384fd5b803561568d614c4382615d28565b81815283810190838501858402850186018e10156156a9578788fd5b8794505b838510156156cb5780358352600194909401939185019185016156ad565b50809650505050505061010087013590509295509295509295565b60008060008060e085870312156156fb578182fd5b84356001600160401b0380821115615711578384fd5b9086019060c08289031215615724578384fd5b61572e60c0615d02565b8235815261573f8960208501614e96565b6020820152604083013561575281615d73565b60408201526157648960608501614c1a565b60608201526080830135608082015260a083013582811115615784578586fd5b6157908a828601614e23565b60a0830152508096505050506157a98660208701614f5a565b939693955050505060a08201359160c0013590565b6000602082840312156157cf578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561581b5781516001600160a01b0316875295820195908201906001016157f6565b509495945050505050565b6000815180845260208085019450808401835b8381101561581b57815187529582019590820190600101615839565b6000815180845261586d816020860160208601615d47565b601f01601f19169290920160200192915050565b600061012082516002811061589257fe5b8085525060208301516158a860208601826157d6565b5060408301516158bb60408601826157d6565b50606083015160608501526080830151608085015260a083015160a085015260c08301516158ec60c08601826157d6565b5060e08301516158ff60e08601826157d6565b5061010080840151828287015261126683870182615855565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b60008251615952818460208701615d47565b9190910192915050565b6bffffffffffffffffffffffff19606093841b811682529190921b16601482015260280190565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038316815260408101600383106159f057fe5b8260208301529392505050565b6001600160a01b03929092168252602082015260400190565b600060608252615a2960608301866157e3565b8281036020840152615a3b8186615826565b905082810360408401526112668185615826565b600060808252615a6260808301876157e3565b8281036020840152615a748187615826565b90508281036040840152615a888186615826565b90508281036060840152614a6c8185615855565b600060608252615aaf60608301866157e3565b8281036020840152615ac18186615826565b915050826040830152949350505050565b6000602082526116996020830184615826565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b8781526001600160a01b0387811660208301528616604082015260e060608201819052600090615b6290830187615826565b8560808401528460a084015282810360c0840152615b808185615855565b9a9950505050505050505050565b600083825260406020830152610a1a60408301846157e3565b60008482526020606081840152615bc160608401866157e3565b8381036040850152845180825282860191830190845b8181101561516f5783516001600160a01b031683529284019291840191600101615bd7565b94855260208501939093526001600160a01b039190911660408401526060830152608082015260a00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b918252602082015260400190565b600060808252615c936080830187615881565b8281036020840152615ca58187615826565b604084019590955250506060015292915050565b600060608252615ccc6060830186615881565b60208301949094525060400152919050565b938452602084019290925260408301526001600160a01b0316606082015260800190565b6040518181016001600160401b0381118282101715615d2057600080fd5b604052919050565b60006001600160401b03821115615d3d578081fd5b5060209081020190565b60005b83811015615d62578181015183820152602001615d4a565b83811115610dbe5750506000910152565b6001600160a01b038116811461072857600080fd5b801515811461072857600080fd5b6003811061072857600080fdfea2646970667358221220f53e4d85aa8252d2da6dcf83a0e84884e356e79a1bf3d0379d11486d3335e56064736f6c6343000701003360c060405234801561001057600080fd5b50604051610b47380380610b4783398101604081905261002f9161004d565b30608052600160005560601b6001600160601b03191660a05261007b565b60006020828403121561005e578081fd5b81516001600160a01b0381168114610074578182fd5b9392505050565b60805160a05160601c610aa16100a66000398061040352806104f45250806102975250610aa16000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063851c1bb311610066578063851c1bb3146100f1578063aaabadc514610104578063d877845c14610119578063e42abf3514610121578063fbfa77cf1461014157610093565b806338e9922e1461009857806355c67628146100ad5780636b6b9f69146100cb5780636daefab6146100de575b600080fd5b6100ab6100a6366004610915565b610149565b005b6100b56101a8565b6040516100c29190610a07565b60405180910390f35b6100ab6100d9366004610915565b6101ae565b6100ab6100ec366004610762565b610201565b6100b56100ff3660046108b5565b610293565b61010c6102e5565b6040516100c29190610996565b6100b56102f4565b61013461012f3660046107e3565b6102fa565b6040516100c291906109c3565b61010c610401565b610151610425565b6101686706f05b59d3b20000821115610258610456565b60018190556040517fa9ba3ffe0b6c366b81232caab38605a0699ad5398d6cce76f91ee809e322dafc9061019d908390610a07565b60405180910390a150565b60015490565b6101b6610425565b6101cc662386f26fc10000821115610259610456565b60028190556040517f5a0b7386237e7f07fa741efc64e59c9387d2cccafec760efed4d53387f20e19a9061019d908390610a07565b610209610468565b610211610425565b61021b8483610481565b60005b8481101561028357600086868381811061023457fe5b905060200201602081019061024991906108f9565b9050600085858481811061025957fe5b6020029190910135915061027990506001600160a01b038316858361048e565b505060010161021e565b5061028c6104e9565b5050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000826040516020016102c8929190610945565b604051602081830303815290604052805190602001209050919050565b60006102ef6104f0565b905090565b60025490565b6060815167ffffffffffffffff8111801561031457600080fd5b5060405190808252806020026020018201604052801561033e578160200160208202803683370190505b50905060005b82518110156103fb5782818151811061035957fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161038c9190610996565b60206040518083038186803b1580156103a457600080fd5b505afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc919061092d565b8282815181106103e857fe5b6020908102919091010152600101610344565b50919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061043c6000356001600160e01b031916610293565b905061045361044b8233610583565b610191610456565b50565b816104645761046481610615565b5050565b61047a60026000541415610190610456565b6002600055565b6104648183146067610456565b6104e48363a9059cbb60e01b84846040516024016104ad9291906109aa565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610668565b505050565b6001600055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b15801561054b57600080fd5b505afa15801561055f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ef91906108dd565b600061058d6104f0565b6001600160a01b0316639be2a8848484306040518463ffffffff1660e01b81526004016105bc93929190610a10565b60206040518083038186803b1580156105d457600080fd5b505afa1580156105e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060c919061088e565b90505b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b60006060836001600160a01b031683604051610684919061095d565b6000604051808303816000865af19150503d80600081146106c1576040519150601f19603f3d011682016040523d82523d6000602084013e6106c6565b606091505b509150915060008214156106de573d6000803e3d6000fd5b610708815160001480610700575081806020019051810190610700919061088e565b6101a2610456565b50505050565b60008083601f84011261071f578182fd5b50813567ffffffffffffffff811115610736578182fd5b602083019150836020808302850101111561075057600080fd5b9250929050565b803561060f81610a56565b600080600080600060608688031215610779578081fd5b853567ffffffffffffffff80821115610790578283fd5b61079c89838a0161070e565b909750955060208801359150808211156107b4578283fd5b506107c18882890161070e565b90945092505060408601356107d581610a56565b809150509295509295909350565b600060208083850312156107f5578182fd5b823567ffffffffffffffff8082111561080c578384fd5b818501915085601f83011261081f578384fd5b81358181111561082d578485fd5b838102915061083d848301610a2f565b8181528481019084860184860187018a1015610857578788fd5b8795505b838610156108815761086d8a82610757565b83526001959095019491860191860161085b565b5098975050505050505050565b60006020828403121561089f578081fd5b815180151581146108ae578182fd5b9392505050565b6000602082840312156108c6578081fd5b81356001600160e01b0319811681146108ae578182fd5b6000602082840312156108ee578081fd5b81516108ae81610a56565b60006020828403121561090a578081fd5b81356108ae81610a56565b600060208284031215610926578081fd5b5035919050565b60006020828403121561093e578081fd5b5051919050565b9182526001600160e01b031916602082015260240190565b60008251815b8181101561097d5760208186018101518583015201610963565b8181111561098b5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156109fb578351835292840192918401916001016109df565b50909695505050505050565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b60405181810167ffffffffffffffff81118282101715610a4e57600080fd5b604052919050565b6001600160a01b038116811461045357600080fdfea26469706673582212205cd8324bedf0f162cae9e752d3763f56b4bc85ff58eab3a6dc5d842ef61cd1a064736f6c63430007010033",
              "opcodes": "PUSH2 0x180 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x12 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x6C0F CODESIZE SUB DUP1 PUSH3 0x6C0F DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH3 0x35 SWAP2 PUSH3 0x212 JUMP JUMPDEST DUP4 DUP3 DUP3 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x11 DUP2 MSTORE PUSH1 0x20 ADD PUSH17 0x10985B185B98D95C88158C8815985D5B1D PUSH1 0x7A SHL DUP2 MSTORE POP DUP1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x31 PUSH1 0xF8 SHL DUP2 MSTORE POP ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SHL DUP10 DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x60 SHL DUP2 MSTORE POP POP POP ADDRESS PUSH1 0x40 MLOAD PUSH3 0xB8 SWAP1 PUSH3 0x204 JUMP JUMPDEST PUSH3 0xC4 SWAP2 SWAP1 PUSH3 0x25E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 PUSH1 0x0 CREATE DUP1 ISZERO DUP1 ISZERO PUSH3 0xE1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0xA0 MSTORE PUSH1 0x1 PUSH1 0x0 SSTORE PUSH1 0xC0 MSTORE DUP2 MLOAD PUSH1 0x20 SWAP3 DUP4 ADD KECCAK256 PUSH1 0xE0 MSTORE DUP1 MLOAD SWAP2 ADD KECCAK256 PUSH2 0x100 MSTORE POP PUSH32 0x8B73C3C69BB8FE3D512ECC4CF759CC79239F7B179B0FFACAA9A75D522B39400F PUSH2 0x120 MSTORE PUSH3 0x148 PUSH3 0x76A700 DUP4 GT ISZERO PUSH2 0x194 PUSH3 0x19C JUMP JUMPDEST PUSH3 0x15C PUSH3 0x278D00 DUP3 GT ISZERO PUSH2 0x195 PUSH3 0x19C JUMP JUMPDEST TIMESTAMP SWAP1 SWAP2 ADD PUSH2 0x140 DUP2 SWAP1 MSTORE ADD PUSH2 0x160 MSTORE PUSH1 0x3 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND PUSH2 0x100 MUL PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE POP PUSH3 0x28B SWAP3 POP POP POP JUMP JUMPDEST DUP2 PUSH3 0x1AD JUMPI PUSH3 0x1AD DUP2 PUSH3 0x1B1 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH2 0xB47 DUP1 PUSH3 0x60C8 DUP4 CODECOPY ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH3 0x228 JUMPI DUP4 DUP5 REVERT JUMPDEST DUP5 MLOAD PUSH3 0x235 DUP2 PUSH3 0x272 JUMP JUMPDEST PUSH1 0x20 DUP7 ADD MLOAD SWAP1 SWAP5 POP PUSH3 0x248 DUP2 PUSH3 0x272 JUMP JUMPDEST PUSH1 0x40 DUP7 ADD MLOAD PUSH1 0x60 SWAP1 SWAP7 ADD MLOAD SWAP5 SWAP8 SWAP1 SWAP7 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH3 0x288 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0x60 SHR PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH1 0xC0 MLOAD PUSH1 0xE0 MLOAD PUSH2 0x100 MLOAD PUSH2 0x120 MLOAD PUSH2 0x140 MLOAD PUSH2 0x160 MLOAD PUSH2 0x5DD9 PUSH3 0x2EF PUSH1 0x0 CODECOPY DUP1 PUSH2 0x1A07 MSTORE POP DUP1 PUSH2 0x19E3 MSTORE POP DUP1 PUSH2 0x2795 MSTORE POP DUP1 PUSH2 0x27D7 MSTORE POP DUP1 PUSH2 0x27B6 MSTORE POP DUP1 PUSH2 0x10BD MSTORE POP DUP1 PUSH2 0x1371 MSTORE POP DUP1 PUSH2 0x508 MSTORE POP PUSH2 0x5DD9 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x185 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x945BCEC9 GT PUSH2 0xD1 JUMPI DUP1 PUSH4 0xE6C46092 GT PUSH2 0x8A JUMPI DUP1 PUSH4 0xF84D066E GT PUSH2 0x64 JUMPI DUP1 PUSH4 0xF84D066E EQ PUSH2 0x46A JUMPI DUP1 PUSH4 0xF94D4668 EQ PUSH2 0x48A JUMPI DUP1 PUSH4 0xFA6E671D EQ PUSH2 0x4B9 JUMPI DUP1 PUSH4 0xFEC90D72 EQ PUSH2 0x4D9 JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0xE6C46092 EQ PUSH2 0x407 JUMPI DUP1 PUSH4 0xED24911D EQ PUSH2 0x427 JUMPI DUP1 PUSH4 0xF6C00927 EQ PUSH2 0x43C JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0x945BCEC9 EQ PUSH2 0x365 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x378 JUMPI DUP1 PUSH4 0xAD5C4648 EQ PUSH2 0x39A JUMPI DUP1 PUSH4 0xB05F8E48 EQ PUSH2 0x3AF JUMPI DUP1 PUSH4 0xB95CAC28 EQ PUSH2 0x3DF JUMPI DUP1 PUSH4 0xD2946C2B EQ PUSH2 0x3F2 JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0x52BBBE29 GT PUSH2 0x13E JUMPI DUP1 PUSH4 0x7D3AEB96 GT PUSH2 0x118 JUMPI DUP1 PUSH4 0x7D3AEB96 EQ PUSH2 0x2E5 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0x8BDB3913 EQ PUSH2 0x325 JUMPI DUP1 PUSH4 0x90193B7C EQ PUSH2 0x345 JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0x52BBBE29 EQ PUSH2 0x292 JUMPI DUP1 PUSH4 0x5C38449E EQ PUSH2 0x2A5 JUMPI DUP1 PUSH4 0x66A9C7D2 EQ PUSH2 0x2C5 JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0x9B2760F EQ PUSH2 0x1B8 JUMPI DUP1 PUSH4 0xE8E3E84 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0xE9E98CF EQ PUSH2 0x201 JUMPI DUP1 PUSH4 0xF5A6EFA EQ PUSH2 0x221 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x24E JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x26E JUMPI PUSH2 0x1B3 JUMP JUMPDEST CALLDATASIZE PUSH2 0x1B3 JUMPI PUSH2 0x1B1 PUSH2 0x195 PUSH2 0x506 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x206 PUSH2 0x52B JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1C4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D8 PUSH2 0x1D3 CALLDATASIZE PUSH1 0x4 PUSH2 0x553F JUMP JUMPDEST PUSH2 0x53D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0x5B08 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1B1 PUSH2 0x1FC CALLDATASIZE PUSH1 0x4 PUSH2 0x517D JUMP JUMPDEST PUSH2 0x5EC JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x20D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x21C CALLDATASIZE PUSH1 0x4 PUSH2 0x4FB8 JUMP JUMPDEST PUSH2 0x72B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x22D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x241 PUSH2 0x23C CALLDATASIZE PUSH1 0x4 PUSH2 0x5056 JUMP JUMPDEST PUSH2 0x7A2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0x5AD2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x25A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x269 CALLDATASIZE PUSH1 0x4 PUSH2 0x52B9 JUMP JUMPDEST PUSH2 0x837 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x27A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x283 PUSH2 0x858 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5AF0 JUMP JUMPDEST PUSH2 0x1D8 PUSH2 0x2A0 CALLDATASIZE PUSH1 0x4 PUSH2 0x56E6 JUMP JUMPDEST PUSH2 0x881 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x2C0 CALLDATASIZE PUSH1 0x4 PUSH2 0x54B5 JUMP JUMPDEST PUSH2 0xA22 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2D1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x2E0 CALLDATASIZE PUSH1 0x4 PUSH2 0x53A0 JUMP JUMPDEST PUSH2 0xDC4 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2F1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x300 CALLDATASIZE PUSH1 0x4 PUSH2 0x5372 JUMP JUMPDEST PUSH2 0xF64 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x311 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D8 PUSH2 0x320 CALLDATASIZE PUSH1 0x4 PUSH2 0x548D JUMP JUMPDEST PUSH2 0x10B9 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x331 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x340 CALLDATASIZE PUSH1 0x4 PUSH2 0x5309 JUMP JUMPDEST PUSH2 0x110B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x351 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D8 PUSH2 0x360 CALLDATASIZE PUSH1 0x4 PUSH2 0x4FB8 JUMP JUMPDEST PUSH2 0x1121 JUMP JUMPDEST PUSH2 0x241 PUSH2 0x373 CALLDATASIZE PUSH1 0x4 PUSH2 0x55DE JUMP JUMPDEST PUSH2 0x113C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x384 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x38D PUSH2 0x1270 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0x599E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3A6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x38D PUSH2 0x1284 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3CF PUSH2 0x3CA CALLDATASIZE PUSH1 0x4 PUSH2 0x5469 JUMP JUMPDEST PUSH2 0x1293 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5CDE JUMP JUMPDEST PUSH2 0x1B1 PUSH2 0x3ED CALLDATASIZE PUSH1 0x4 PUSH2 0x5309 JUMP JUMPDEST PUSH2 0x1356 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x38D PUSH2 0x136F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x413 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x422 CALLDATASIZE PUSH1 0x4 PUSH2 0x50A3 JUMP JUMPDEST PUSH2 0x1393 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x433 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D8 PUSH2 0x14AF JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x448 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x457 CALLDATASIZE PUSH1 0x4 PUSH2 0x52F1 JUMP JUMPDEST PUSH2 0x14B9 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP3 SWAP2 SWAP1 PUSH2 0x59D6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x476 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x241 PUSH2 0x485 CALLDATASIZE PUSH1 0x4 PUSH2 0x555B JUMP JUMPDEST PUSH2 0x14E3 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x496 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4AA PUSH2 0x4A5 CALLDATASIZE PUSH1 0x4 PUSH2 0x52F1 JUMP JUMPDEST PUSH2 0x15C7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5A9C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x4D4 CALLDATASIZE PUSH1 0x4 PUSH2 0x500C JUMP JUMPDEST PUSH2 0x15FB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4F9 PUSH2 0x4F4 CALLDATASIZE PUSH1 0x4 PUSH2 0x4FD4 JUMP JUMPDEST PUSH2 0x168D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0x5AE5 JUMP JUMPDEST PUSH32 0x0 JUMPDEST SWAP1 JUMP JUMPDEST DUP2 PUSH2 0x539 JUMPI PUSH2 0x539 DUP2 PUSH2 0x16A2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x547 PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x54F PUSH2 0x170E JUMP JUMPDEST PUSH1 0x0 PUSH2 0x55E CALLER DUP5 PUSH1 0x6 SLOAD PUSH2 0x1723 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 SWAP2 POP PUSH2 0x580 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x1F4 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x6 DUP1 SLOAD SWAP1 SWAP2 ADD SWAP1 SSTORE MLOAD PUSH32 0x43641244AEEFD8DE6827C26F36450AA6165C9FEF65DDFA7262DA93BA648464D2 SWAP1 PUSH2 0x5D5 SWAP1 DUP4 SWAP1 PUSH2 0x5B08 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 SWAP1 POP PUSH2 0x5E7 PUSH2 0x1762 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x5F4 PUSH2 0x16F5 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0x713 JUMPI PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x629 DUP11 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x61B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP10 PUSH2 0x1769 JUMP JUMPDEST SWAP13 POP SWAP4 SWAP9 POP SWAP2 SWAP7 POP SWAP5 POP SWAP3 POP SWAP1 POP PUSH1 0x1 DUP6 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x645 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x65C JUMPI PUSH2 0x657 DUP5 DUP4 DUP4 DUP7 PUSH2 0x17E1 JUMP JUMPDEST PUSH2 0x702 JUMP JUMPDEST DUP7 PUSH2 0x66E JUMPI PUSH2 0x669 PUSH2 0x170E JUMP JUMPDEST PUSH1 0x1 SWAP7 POP JUMPDEST PUSH1 0x0 DUP6 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x67C JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x6AD JUMPI PUSH2 0x68E DUP5 DUP4 DUP4 DUP7 PUSH2 0x1804 JUMP JUMPDEST PUSH2 0x697 DUP5 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x657 JUMPI PUSH2 0x6A6 DUP10 DUP5 PUSH2 0x1831 JUMP JUMPDEST SWAP9 POP PUSH2 0x702 JUMP JUMPDEST PUSH2 0x6C2 PUSH2 0x6B9 DUP6 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x207 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6CD DUP6 PUSH2 0x528 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP7 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x6DD JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x6F4 JUMPI PUSH2 0x6EF DUP2 DUP5 DUP5 DUP8 PUSH2 0x1843 JUMP JUMPDEST PUSH2 0x700 JUMP JUMPDEST PUSH2 0x700 DUP2 DUP5 DUP5 DUP8 PUSH2 0x185C JUMP JUMPDEST POP JUMPDEST POP POP PUSH1 0x1 SWAP1 SWAP4 ADD SWAP3 POP PUSH2 0x5FB SWAP2 POP POP JUMP JUMPDEST POP PUSH2 0x71D DUP4 PUSH2 0x18CA JUMP JUMPDEST POP POP POP PUSH2 0x728 PUSH2 0x1762 JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x733 PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x73B PUSH2 0x18ED JUMP JUMPDEST PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND SWAP3 PUSH2 0x100 SWAP1 DIV AND SWAP1 PUSH32 0x662D2B49E91208DA36BD4107560100EC490758AC0639152FAE6A64FCA5EF9AEE SWAP1 PUSH1 0x0 SWAP1 LOG3 PUSH1 0x3 DUP1 SLOAD PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT AND PUSH2 0x100 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND MUL OR SWAP1 SSTORE PUSH2 0x728 PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x7BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x7E5 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x830 JUMPI PUSH2 0x811 DUP5 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x804 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x191B JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x81D JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x7EB JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x83F PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x847 PUSH2 0x18ED JUMP JUMPDEST PUSH2 0x850 DUP2 PUSH2 0x1946 JUMP JUMPDEST PUSH2 0x728 PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x865 PUSH2 0x19C4 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x870 PUSH2 0x19E1 JUMP JUMPDEST SWAP2 POP PUSH2 0x87A PUSH2 0x1A05 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x88B PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x893 PUSH2 0x170E JUMP JUMPDEST DUP4 MLOAD PUSH2 0x89E DUP2 PUSH2 0x1A29 JUMP JUMPDEST PUSH2 0x8AD DUP4 TIMESTAMP GT ISZERO PUSH2 0x1FC PUSH2 0x52B JUMP JUMPDEST PUSH2 0x8C0 PUSH1 0x0 DUP8 PUSH1 0x80 ADD MLOAD GT PUSH2 0x1FE PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x8CF DUP8 PUSH1 0x40 ADD MLOAD PUSH2 0x1A5B JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x8E0 DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x1A5B JUMP JUMPDEST SWAP1 POP PUSH2 0x903 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1FD PUSH2 0x52B JUMP JUMPDEST PUSH2 0x90B PUSH2 0x4B45 JUMP JUMPDEST DUP9 MLOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0x20 DUP10 ADD MLOAD DUP2 SWAP1 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x924 JUMPI INVALID JUMPDEST SWAP1 DUP2 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x931 JUMPI INVALID JUMPDEST SWAP1 MSTORE POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x20 DUP4 ADD MSTORE DUP3 DUP2 AND PUSH1 0x40 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x80 DUP12 ADD MLOAD PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0xA0 DUP12 ADD MLOAD PUSH2 0x100 DUP5 ADD MSTORE DUP10 MLOAD DUP3 AND PUSH1 0xC0 DUP5 ADD MSTORE DUP10 ADD MLOAD AND PUSH1 0xE0 DUP3 ADD MSTORE PUSH1 0x0 DUP1 PUSH2 0x983 DUP4 PUSH2 0x1A80 JUMP JUMPDEST SWAP2 SWAP9 POP SWAP3 POP SWAP1 POP PUSH2 0x9BA PUSH1 0x0 DUP13 PUSH1 0x20 ADD MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x99F JUMPI INVALID JUMPDEST EQ PUSH2 0x9AD JUMPI DUP10 DUP4 GT ISZERO PUSH2 0x9B2 JUMP JUMPDEST DUP10 DUP3 LT ISZERO JUMPDEST PUSH2 0x1FB PUSH2 0x52B JUMP JUMPDEST PUSH2 0x9D2 DUP12 PUSH1 0x40 ADD MLOAD DUP4 DUP13 PUSH1 0x0 ADD MLOAD DUP14 PUSH1 0x20 ADD MLOAD PUSH2 0x1B74 JUMP JUMPDEST PUSH2 0x9EA DUP12 PUSH1 0x60 ADD MLOAD DUP3 DUP13 PUSH1 0x40 ADD MLOAD DUP14 PUSH1 0x60 ADD MLOAD PUSH2 0x1C52 JUMP JUMPDEST PUSH2 0xA0C PUSH2 0x9FA DUP13 PUSH1 0x40 ADD MLOAD PUSH2 0x1824 JUMP JUMPDEST PUSH2 0xA05 JUMPI PUSH1 0x0 PUSH2 0xA07 JUMP JUMPDEST DUP3 JUMPDEST PUSH2 0x18CA JUMP JUMPDEST POP POP POP POP POP POP PUSH2 0xA1A PUSH2 0x1762 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xA2A PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0xA32 PUSH2 0x170E JUMP JUMPDEST PUSH2 0xA3E DUP4 MLOAD DUP4 MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xA57 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xA81 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xA9D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xAC7 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0xC40 JUMPI PUSH1 0x0 DUP8 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xAE5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP8 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xAFD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0xB48 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND GT PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xB40 JUMPI PUSH1 0x66 PUSH2 0xB43 JUMP JUMPDEST PUSH1 0x68 JUMPDEST PUSH2 0x52B JUMP JUMPDEST DUP2 SWAP4 POP DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xB77 SWAP2 SWAP1 PUSH2 0x599E JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xB8F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBA3 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xBC7 SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0xBD3 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0xBE8 DUP2 PUSH2 0x1D39 JUMP JUMPDEST DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0xBF4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0xC22 DUP2 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0xC10 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD LT ISZERO PUSH2 0x210 PUSH2 0x52B JUMP JUMPDEST PUSH2 0xC36 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP12 DUP4 PUSH2 0x1DC0 JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0xACE JUMP JUMPDEST POP PUSH1 0x40 MLOAD PUSH4 0xF04F2707 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND SWAP1 PUSH4 0xF04F2707 SWAP1 PUSH2 0xC73 SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP11 SWAP1 PUSH1 0x4 ADD PUSH2 0x5A4F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xC8D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xCA1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0xDB2 JUMPI PUSH1 0x0 DUP8 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xCBF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xCD7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD0F SWAP2 SWAP1 PUSH2 0x599E JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xD27 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xD3B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xD5F SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST SWAP1 POP PUSH2 0xD70 DUP3 DUP3 LT ISZERO PUSH2 0x203 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 SUB SWAP1 POP PUSH2 0xD99 DUP9 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0xD86 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 LT ISZERO PUSH2 0x25A PUSH2 0x52B JUMP JUMPDEST PUSH2 0xDA3 DUP5 DUP3 PUSH2 0x1E16 JUMP JUMPDEST POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0xCA8 JUMP JUMPDEST POP POP POP POP PUSH2 0xDBE PUSH2 0x1762 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0xDCC PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0xDD4 PUSH2 0x170E JUMP JUMPDEST DUP3 PUSH2 0xDDE DUP2 PUSH2 0x1E38 JUMP JUMPDEST PUSH2 0xDEA DUP4 MLOAD DUP4 MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0xE88 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xE04 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0xE30 PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x135 PUSH2 0x52B JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xE3C JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x0 DUP9 DUP2 MSTORE PUSH1 0xA DUP4 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP6 DUP7 AND DUP4 MSTORE SWAP1 SWAP4 MSTORE SWAP2 SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP3 SWAP1 SWAP2 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x1 ADD PUSH2 0xDED JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0xE94 DUP6 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0xEA4 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xEF2 JUMPI PUSH2 0xEBA DUP5 MLOAD PUSH1 0x2 EQ PUSH2 0x20C PUSH2 0x52B JUMP JUMPDEST PUSH2 0xEED DUP6 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0xECB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0xEE0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1E83 JUMP JUMPDEST PUSH2 0xF1A JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0xF00 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xF10 JUMPI PUSH2 0xEED DUP6 DUP6 PUSH2 0x1F2F JUMP JUMPDEST PUSH2 0xF1A DUP6 DUP6 PUSH2 0x1F87 JUMP JUMPDEST PUSH32 0xF5847D3F2197B16CDCD2098EC95D0905CD1ABDAF415F07BB7CEF2BBA8AC5DEC4 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH2 0xF4D SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5BA7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP PUSH2 0xF5F PUSH2 0x1762 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xF6C PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0xF74 PUSH2 0x170E JUMP JUMPDEST DUP2 PUSH2 0xF7E DUP2 PUSH2 0x1E38 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xF89 DUP5 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0xF99 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xFE7 JUMPI PUSH2 0xFAF DUP4 MLOAD PUSH1 0x2 EQ PUSH2 0x20C PUSH2 0x52B JUMP JUMPDEST PUSH2 0xFE2 DUP5 DUP5 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0xFC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0xFD5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1FDC JUMP JUMPDEST PUSH2 0x100F JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0xFF5 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1005 JUMPI PUSH2 0xFE2 DUP5 DUP5 PUSH2 0x204A JUMP JUMPDEST PUSH2 0x100F DUP5 DUP5 PUSH2 0x2104 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x1075 JUMPI PUSH1 0xA PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x103C JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 MSTORE DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 ADD PUSH1 0x0 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE PUSH1 0x1 ADD PUSH2 0x1012 JUMP JUMPDEST POP PUSH32 0x7DCDC6D02EF40C7C1A7046A011B058BD7F988FA14E20A66344F9D4E60657D610 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x10A7 SWAP3 SWAP2 SWAP1 PUSH2 0x5B8E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP PUSH2 0x539 PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10EE SWAP3 SWAP2 SWAP1 PUSH2 0x5918 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xDBE PUSH1 0x1 DUP6 DUP6 DUP6 PUSH2 0x111C DUP7 PUSH2 0x2167 JUMP JUMPDEST PUSH2 0x2173 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1146 PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x114E PUSH2 0x170E JUMP JUMPDEST DUP4 MLOAD PUSH2 0x1159 DUP2 PUSH2 0x1A29 JUMP JUMPDEST PUSH2 0x1168 DUP4 TIMESTAMP GT ISZERO PUSH2 0x1FC PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1174 DUP7 MLOAD DUP6 MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH2 0x1180 DUP8 DUP8 DUP8 DUP12 PUSH2 0x22F9 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x1252 JUMPI PUSH1 0x0 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x119D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x11B5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x11E1 DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x11CE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 SGT ISZERO PUSH2 0x1FB PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP2 SGT ISZERO PUSH2 0x1221 JUMPI DUP9 MLOAD PUSH1 0x20 DUP11 ADD MLOAD DUP3 SWAP2 PUSH2 0x1200 SWAP2 DUP6 SWAP2 DUP5 SWAP2 PUSH2 0x1B74 JUMP JUMPDEST PUSH2 0x1209 DUP4 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x121B JUMPI PUSH2 0x1218 DUP6 DUP3 PUSH2 0x1831 JUMP JUMPDEST SWAP5 POP JUMPDEST POP PUSH2 0x1248 JUMP JUMPDEST PUSH1 0x0 DUP2 SLT ISZERO PUSH2 0x1248 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SUB SWAP1 POP PUSH2 0x1246 DUP4 DUP3 DUP13 PUSH1 0x40 ADD MLOAD DUP14 PUSH1 0x60 ADD MLOAD PUSH2 0x1C52 JUMP JUMPDEST POP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x1186 JUMP JUMPDEST POP PUSH2 0x125C DUP2 PUSH2 0x18CA JUMP JUMPDEST POP POP PUSH2 0x1266 PUSH2 0x1762 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x128E PUSH2 0x506 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 DUP6 PUSH2 0x12A3 DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x12AF DUP10 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x12BF JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x12D6 JUMPI PUSH2 0x12CF DUP10 DUP10 PUSH2 0x25A5 JUMP JUMPDEST SWAP2 POP PUSH2 0x1301 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x12E4 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x12F4 JUMPI PUSH2 0x12CF DUP10 DUP10 PUSH2 0x261F JUMP JUMPDEST PUSH2 0x12FE DUP10 DUP10 PUSH2 0x268D JUMP JUMPDEST SWAP2 POP JUMPDEST PUSH2 0x130A DUP3 PUSH2 0x26A5 JUMP JUMPDEST SWAP7 POP PUSH2 0x1315 DUP3 PUSH2 0x26B1 JUMP JUMPDEST SWAP6 POP PUSH2 0x1320 DUP3 PUSH2 0x26C0 JUMP JUMPDEST PUSH1 0x0 SWAP10 DUP11 MSTORE PUSH1 0xA PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP13 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP12 DUP13 AND DUP14 MSTORE SWAP1 SWAP2 MSTORE SWAP1 SWAP10 KECCAK256 SLOAD SWAP7 SWAP10 SWAP6 SWAP9 SWAP8 SWAP7 SWAP1 SWAP7 AND SWAP6 POP POP POP POP POP JUMP JUMPDEST PUSH2 0x135E PUSH2 0x170E JUMP JUMPDEST PUSH2 0xDBE PUSH1 0x0 DUP6 DUP6 DUP6 PUSH2 0x111C DUP7 PUSH2 0x2167 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0x139B PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x13A3 PUSH2 0x170E JUMP JUMPDEST PUSH2 0x13AB PUSH2 0x4B95 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x14A5 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x13C3 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP2 POP PUSH1 0x0 DUP3 PUSH1 0x20 ADD MLOAD SWAP1 POP PUSH2 0x13DF DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0x13F9 PUSH2 0x13F1 DUP4 DUP4 PUSH2 0x26C6 JUMP JUMPDEST PUSH2 0x209 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xA PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 DUP2 AND DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD PUSH2 0x142C SWAP2 AND CALLER EQ PUSH2 0x1F6 PUSH2 0x52B JUMP JUMPDEST DUP4 MLOAD PUSH1 0x60 DUP6 ADD MLOAD PUSH1 0x0 DUP1 PUSH2 0x1442 DUP5 DUP8 DUP8 DUP7 PUSH2 0x2722 JUMP JUMPDEST SWAP2 POP SWAP2 POP DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 PUSH32 0x6EDCAF6241105B4C94C2EFDBF3A6B12458EB3D07BE3A0E81D24B13C44045FE7A DUP6 DUP6 PUSH1 0x40 MLOAD PUSH2 0x148C SWAP3 SWAP2 SWAP1 PUSH2 0x5C72 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x13AE JUMP JUMPDEST POP POP PUSH2 0x728 PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x128E PUSH2 0x2791 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH2 0x14C6 DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x14CF DUP5 PUSH2 0x282E JUMP JUMPDEST PUSH2 0x14D8 DUP6 PUSH2 0x1E69 JUMP JUMPDEST SWAP3 POP SWAP3 POP JUMPDEST POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x60 CALLER ADDRESS EQ PUSH2 0x159D JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x1509 SWAP3 SWAP2 SWAP1 PUSH2 0x5930 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1546 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x154B JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x155A JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x7D30E609 PUSH1 0xE1 SHL DUP2 EQ PUSH2 0x1585 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x0 MSTORE PUSH1 0x4 RETURNDATASIZE SUB DUP1 PUSH1 0x4 PUSH1 0x20 RETURNDATACOPY PUSH1 0x20 DUP2 ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x15AB DUP6 DUP6 DUP6 DUP10 PUSH2 0x22F9 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 MLOAD MUL PUSH4 0xFA61CC12 PUSH1 0x20 DUP4 SUB MSTORE PUSH1 0x4 DUP3 SUB PUSH1 0x24 DUP3 ADD DUP2 REVERT JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP4 PUSH2 0x15D6 DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x15E1 DUP7 PUSH2 0x2834 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP1 POP PUSH2 0x15EF DUP2 PUSH2 0x2896 JUMP JUMPDEST SWAP6 SWAP8 SWAP1 SWAP7 POP SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x1603 PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x160B PUSH2 0x170E JUMP JUMPDEST DUP3 PUSH2 0x1615 DUP2 PUSH2 0x1A29 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP9 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND DUP7 ISZERO ISZERO OR SWAP1 SSTORE MLOAD SWAP1 SWAP2 SWAP1 PUSH32 0x46961FDB4502B646D5095FBA7600486A8AC05041D55CDF0F16ED677180B5CAD8 SWAP1 PUSH2 0x167C SWAP1 DUP7 SWAP1 PUSH2 0x5AE5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP PUSH2 0xF5F PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 DUP4 DUP4 PUSH2 0x2944 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH2 0x1707 PUSH1 0x2 PUSH1 0x0 SLOAD EQ ISZERO PUSH2 0x190 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x2 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH2 0x1721 PUSH2 0x1719 PUSH2 0x19C4 JUMP JUMPDEST PUSH2 0x192 PUSH2 0x52B JUMP JUMPDEST JUMP JUMPDEST PUSH1 0x0 PUSH10 0xFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x50 DUP5 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1740 JUMPI INVALID JUMPDEST SWAP1 SHL OR PUSH1 0x60 DUP6 SWAP1 SHL PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT AND OR SWAP1 POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP9 PUSH1 0x60 ADD MLOAD SWAP1 POP CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x17BB JUMPI DUP8 PUSH2 0x17A6 JUMPI PUSH2 0x17A1 PUSH2 0x18ED JUMP JUMPDEST PUSH1 0x1 SWAP8 POP JUMPDEST PUSH2 0x17BB PUSH2 0x17B3 DUP3 CALLER PUSH2 0x2944 JUMP JUMPDEST PUSH2 0x1F7 PUSH2 0x52B JUMP JUMPDEST DUP9 MLOAD PUSH1 0x20 DUP11 ADD MLOAD PUSH1 0x40 DUP12 ADD MLOAD PUSH1 0x80 SWAP1 SWAP12 ADD MLOAD SWAP2 SWAP12 SWAP1 SWAP11 SWAP10 SWAP3 SWAP9 POP SWAP1 SWAP7 POP SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x17F6 DUP4 PUSH2 0x17EE DUP7 PUSH2 0x1A5B JUMP JUMPDEST DUP4 PUSH1 0x0 PUSH2 0x2972 JUMP JUMPDEST POP PUSH2 0xDBE DUP5 DUP3 DUP5 PUSH1 0x0 PUSH2 0x1C52 JUMP JUMPDEST PUSH2 0x1817 DUP3 PUSH2 0x1811 DUP7 PUSH2 0x1A5B JUMP JUMPDEST DUP4 PUSH2 0x29C8 JUMP JUMPDEST PUSH2 0xDBE DUP5 DUP3 DUP6 PUSH1 0x0 PUSH2 0x1B74 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x1699 DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1850 DUP4 DUP6 DUP4 PUSH1 0x0 PUSH2 0x2972 JUMP JUMPDEST POP PUSH2 0xDBE DUP3 DUP6 DUP4 PUSH2 0x29C8 JUMP JUMPDEST DUP1 ISZERO PUSH2 0xDBE JUMPI PUSH2 0x1877 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND DUP5 DUP5 DUP5 PUSH2 0x29F8 JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x540A1A3F28340CAEC336C81D8D7B3DF139EE5CDC1839A4F283D7EBB7EAAE2D5C DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x18BC SWAP3 SWAP2 SWAP1 PUSH2 0x59FD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH2 0x18D9 DUP2 CALLVALUE LT ISZERO PUSH2 0x204 PUSH2 0x52B JUMP JUMPDEST CALLVALUE DUP2 SWAP1 SUB DUP1 ISZERO PUSH2 0x539 JUMPI PUSH2 0x539 CALLER DUP3 PUSH2 0x2A19 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1904 PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x10B9 JUMP JUMPDEST SWAP1 POP PUSH2 0x728 PUSH2 0x1913 DUP3 CALLER PUSH2 0x2A93 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xB PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x1966 JUMPI PUSH2 0x1961 PUSH2 0x1957 PUSH2 0x19E1 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x197B JUMP JUMPDEST PUSH2 0x197B PUSH2 0x1971 PUSH2 0x1A05 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x19B9 SWAP1 DUP4 SWAP1 PUSH2 0x5AE5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19CE PUSH2 0x1A05 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x128E JUMPI POP POP PUSH1 0x3 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND EQ PUSH2 0x728 JUMPI PUSH2 0x1A41 PUSH2 0x18ED JUMP JUMPDEST PUSH2 0x1A4B DUP2 CALLER PUSH2 0x2944 JUMP JUMPDEST PUSH2 0x728 JUMPI PUSH2 0x728 DUP2 PUSH2 0x1F7 PUSH2 0x2B1D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1A66 DUP3 PUSH2 0x1824 JUMP JUMPDEST PUSH2 0x1A78 JUMPI PUSH2 0x1A73 DUP3 PUSH2 0x528 JUMP JUMPDEST PUSH2 0x169C JUMP JUMPDEST PUSH2 0x169C PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x1A93 DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x282E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1AA4 DUP7 PUSH1 0x80 ADD MLOAD PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1AB4 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1ACB JUMPI PUSH2 0x1AC4 DUP7 DUP4 PUSH2 0x2B51 JUMP JUMPDEST SWAP5 POP PUSH2 0x1AF6 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1AD9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1AE9 JUMPI PUSH2 0x1AC4 DUP7 DUP4 PUSH2 0x2C01 JUMP JUMPDEST PUSH2 0x1AF3 DUP7 DUP4 PUSH2 0x2C94 JUMP JUMPDEST SWAP5 POP JUMPDEST PUSH2 0x1B09 DUP7 PUSH1 0x0 ADD MLOAD DUP8 PUSH1 0x60 ADD MLOAD DUP8 PUSH2 0x2EB8 JUMP JUMPDEST DUP1 SWAP5 POP DUP2 SWAP6 POP POP POP DUP6 PUSH1 0x40 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x20 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 PUSH1 0x80 ADD MLOAD PUSH32 0x2170C741C41531AEC20E7C107C24EECFDD15E69C9BB0A8DD37B1840B9E0B207B DUP8 DUP8 PUSH1 0x40 MLOAD PUSH2 0x1B63 SWAP3 SWAP2 SWAP1 PUSH2 0x5C72 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP SWAP2 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST DUP3 PUSH2 0x1B7E JUMPI PUSH2 0xDBE JUMP JUMPDEST PUSH2 0x1B87 DUP5 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x1C08 JUMPI PUSH2 0x1B99 DUP2 ISZERO PUSH2 0x202 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1BA8 DUP4 SELFBALANCE LT ISZERO PUSH2 0x204 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1BB0 PUSH2 0x506 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD0E30DB0 DUP5 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1BEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1BFE JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP PUSH2 0xDBE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C13 DUP6 PUSH2 0x528 JUMP JUMPDEST SWAP1 POP DUP2 ISZERO PUSH2 0x1C30 JUMPI PUSH1 0x0 PUSH2 0x1C2A DUP5 DUP4 DUP8 PUSH1 0x1 PUSH2 0x2972 JUMP JUMPDEST SWAP1 SWAP5 SUB SWAP4 POP JUMPDEST DUP4 ISZERO PUSH2 0x1C4B JUMPI PUSH2 0x1C4B PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND DUP5 ADDRESS DUP8 PUSH2 0x29F8 JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST DUP3 PUSH2 0x1C5C JUMPI PUSH2 0xDBE JUMP JUMPDEST PUSH2 0x1C65 DUP5 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x1CF5 JUMPI PUSH2 0x1C77 DUP2 ISZERO PUSH2 0x202 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1C7F PUSH2 0x506 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x2E1A7D4D DUP5 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1CAA SWAP2 SWAP1 PUSH2 0x5B08 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1CC4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1CD8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH2 0x1CF0 SWAP3 POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP5 PUSH2 0x2A19 JUMP JUMPDEST PUSH2 0xDBE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D00 DUP6 PUSH2 0x528 JUMP JUMPDEST SWAP1 POP DUP2 ISZERO PUSH2 0x1D18 JUMPI PUSH2 0x1D13 DUP4 DUP3 DUP7 PUSH2 0x29C8 JUMP JUMPDEST PUSH2 0x1C4B JUMP JUMPDEST PUSH2 0x1C4B PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND DUP5 DUP7 PUSH2 0x1DC0 JUMP JUMPDEST PUSH2 0x539 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1D44 PUSH2 0x136F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD877845C PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1D7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1D90 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1DB4 SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST SWAP1 POP PUSH2 0x175B DUP4 DUP3 PUSH2 0x2EE6 JUMP JUMPDEST PUSH2 0xF5F DUP4 PUSH4 0xA9059CBB PUSH1 0xE0 SHL DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x1DDF SWAP3 SWAP2 SWAP1 PUSH2 0x59FD JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE PUSH2 0x2F33 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x539 JUMPI PUSH2 0x539 PUSH2 0x1E27 PUSH2 0x136F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 DUP4 PUSH2 0x1DC0 JUMP JUMPDEST PUSH2 0x1E41 DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x728 PUSH2 0x1E4D DUP3 PUSH2 0x282E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x1F5 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0xFFFF PUSH1 0x50 DUP4 SWAP1 SHR AND PUSH2 0x169C PUSH1 0x3 DUP3 LT PUSH2 0x1F4 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1EA4 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x20A PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1EC3 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x66 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH2 0x1F00 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO DUP1 ISZERO PUSH2 0x1EF8 JUMPI POP PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO JUMPDEST PUSH2 0x20B PUSH2 0x52B JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 DUP5 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP2 DUP3 AND OR DUP3 SSTORE PUSH1 0x1 SWAP1 SWAP2 ADD DUP1 SLOAD SWAP3 SWAP1 SWAP4 AND SWAP2 AND OR SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH1 0x0 PUSH2 0x1F70 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F59 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x2FD3 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x1F7E DUP2 PUSH2 0x20A PUSH2 0x52B JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1F3F JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH1 0x0 PUSH2 0x1FC5 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1FB1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MLOAD DUP5 SWAP1 PUSH1 0x0 PUSH2 0x3036 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FD3 DUP2 PUSH2 0x20A PUSH2 0x52B JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1F97 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x1FEC DUP7 DUP7 DUP7 PUSH2 0x30E3 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x2016 PUSH2 0x1FFE DUP5 PUSH2 0x31AA JUMP JUMPDEST DUP1 ISZERO PUSH2 0x200E JUMPI POP PUSH2 0x200E DUP4 PUSH2 0x31AA JUMP JUMPDEST PUSH2 0x20D PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 SWAP6 DUP7 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 DUP7 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP1 DUP2 AND DUP3 SSTORE PUSH1 0x1 SWAP1 SWAP2 ADD DUP1 SLOAD SWAP1 SWAP2 AND SWAP1 SSTORE SWAP5 SWAP1 SWAP5 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2071 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x20BD PUSH2 0x200E PUSH1 0x7 PUSH1 0x0 DUP9 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH2 0x31AA JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 DUP2 SWAP1 SSTORE PUSH2 0x20EC DUP5 DUP4 PUSH2 0x31B7 JUMP JUMPDEST SWAP1 POP PUSH2 0x20FA DUP2 PUSH2 0x209 PUSH2 0x52B JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x205A JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x212B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH2 0x2141 DUP5 DUP4 PUSH2 0x32BE JUMP JUMPDEST SWAP1 POP PUSH2 0x214F PUSH2 0x200E DUP3 PUSH2 0x31AA JUMP JUMPDEST PUSH2 0x2159 DUP5 DUP4 PUSH2 0x32CD JUMP JUMPDEST POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x2114 JUMP JUMPDEST PUSH2 0x216F PUSH2 0x4BBE JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH2 0x217B PUSH2 0x16F5 JUMP JUMPDEST DUP4 PUSH2 0x2185 DUP2 PUSH2 0x2587 JUMP JUMPDEST DUP4 PUSH2 0x218F DUP2 PUSH2 0x1A29 JUMP JUMPDEST PUSH2 0x21A3 DUP4 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH1 0x20 ADD MLOAD MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH1 0x60 PUSH2 0x21B2 DUP5 PUSH1 0x0 ADD MLOAD PUSH2 0x336F JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x21C0 DUP9 DUP4 PUSH2 0x33FD JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP1 PUSH1 0x60 PUSH2 0x21D5 DUP13 DUP13 DUP13 DUP13 DUP13 DUP10 PUSH2 0x348E JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH1 0x0 PUSH2 0x21E6 DUP13 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x21F6 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x225E JUMPI PUSH2 0x2259 DUP13 DUP8 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x220D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x2222 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP10 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x2237 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x224C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x3653 JUMP JUMPDEST PUSH2 0x2287 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x226C JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x227D JUMPI PUSH2 0x2259 DUP13 DUP8 DUP7 PUSH2 0x3692 JUMP JUMPDEST PUSH2 0x2287 DUP13 DUP6 PUSH2 0x36FF JUMP JUMPDEST PUSH1 0x0 DUP1 DUP15 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x2296 JUMPI INVALID JUMPDEST EQ SWAP1 POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP14 PUSH32 0xE5CE249087CE04F05A957192435400FD97868DBA0E6A4B4C049ABF8AF80DAE78 DUP10 PUSH2 0x22D0 DUP9 DUP7 PUSH2 0x3748 JUMP JUMPDEST DUP8 PUSH1 0x40 MLOAD PUSH2 0x22E0 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5A16 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP POP POP POP POP POP PUSH2 0x1C4B PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2312 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x233C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2347 PUSH2 0x4BE8 JUMP JUMPDEST PUSH2 0x234F PUSH2 0x4B45 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x257A JUMPI DUP10 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x236A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP5 POP PUSH1 0x0 DUP10 MLOAD DUP7 PUSH1 0x20 ADD MLOAD LT DUP1 ISZERO PUSH2 0x238E JUMPI POP DUP10 MLOAD DUP7 PUSH1 0x40 ADD MLOAD LT JUMPDEST SWAP1 POP PUSH2 0x239B DUP2 PUSH1 0x64 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x23BD DUP12 DUP9 PUSH1 0x20 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x23B0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1A5B JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x23D4 DUP13 DUP10 PUSH1 0x40 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x23B0 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x23F7 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1FD PUSH2 0x52B JUMP JUMPDEST PUSH1 0x60 DUP9 ADD MLOAD PUSH2 0x2447 JUMPI PUSH2 0x240F PUSH1 0x0 DUP6 GT PUSH2 0x1FE PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x241C DUP12 DUP5 DUP5 PUSH2 0x37EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x243E DUP2 PUSH2 0x1FF PUSH2 0x52B JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD DUP6 SWAP1 MSTORE JUMPDEST DUP8 MLOAD PUSH1 0x80 DUP9 ADD MSTORE DUP7 DUP11 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x245B JUMPI INVALID JUMPDEST SWAP1 DUP2 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x2468 JUMPI INVALID JUMPDEST SWAP1 MSTORE POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP4 AND PUSH1 0x20 DUP10 ADD MSTORE DUP2 DUP2 AND PUSH1 0x40 DUP1 DUP11 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP1 DUP12 ADD MLOAD SWAP1 DUP11 ADD MSTORE PUSH1 0x80 DUP11 ADD MLOAD PUSH2 0x100 DUP11 ADD MSTORE DUP13 MLOAD DUP3 AND PUSH1 0xC0 DUP11 ADD MSTORE DUP13 ADD MLOAD AND PUSH1 0xE0 DUP9 ADD MSTORE PUSH1 0x0 DUP1 PUSH2 0x24BA DUP10 PUSH2 0x1A80 JUMP JUMPDEST SWAP2 SWAP9 POP SWAP3 POP SWAP1 POP PUSH2 0x24CC DUP13 DUP6 DUP6 PUSH2 0x3811 JUMP JUMPDEST SWAP8 POP PUSH2 0x2500 PUSH2 0x24DA DUP4 PUSH2 0x382B JUMP JUMPDEST DUP13 DUP13 PUSH1 0x20 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x24EA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x383F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP12 DUP12 PUSH1 0x20 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x2510 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x254E PUSH2 0x2528 DUP3 PUSH2 0x382B JUMP JUMPDEST DUP13 DUP13 PUSH1 0x40 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x2538 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x3873 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP12 DUP12 PUSH1 0x40 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x255E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x2355 JUMP JUMPDEST POP POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x728 SWAP1 PUSH1 0xFF AND PUSH2 0x1F4 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x25B6 DUP8 PUSH2 0x38A7 JUMP JUMPDEST SWAP5 POP SWAP5 POP SWAP5 POP SWAP5 POP POP DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x25E5 JUMPI DUP3 SWAP5 POP POP POP POP POP PUSH2 0x169C JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x260A JUMPI SWAP4 POP PUSH2 0x169C SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x2615 PUSH2 0x209 PUSH2 0x16A2 JUMP JUMPDEST POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP2 PUSH2 0x264C DUP3 PUSH2 0x391D JUMP JUMPDEST DUP1 PUSH2 0x266A JUMPI POP PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x266A SWAP1 DUP6 PUSH2 0x392F JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x2685 JUMPI PUSH2 0x267A DUP6 PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x2685 PUSH2 0x209 PUSH2 0x16A2 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0xA1A DUP2 DUP5 PUSH2 0x32BE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x70 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x70 SHR PUSH1 0x1 PUSH1 0x1 PUSH1 0x70 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0xE0 SHR SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x26D2 DUP5 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x26E2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x26FA JUMPI PUSH2 0x26F2 DUP5 DUP5 PUSH2 0x3950 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2708 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2718 JUMPI PUSH2 0x26F2 DUP5 DUP5 PUSH2 0x39A1 JUMP JUMPDEST PUSH2 0x26F2 DUP5 DUP5 PUSH2 0x39B9 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x2730 DUP7 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP8 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2740 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x275C JUMPI PUSH2 0x2752 DUP7 DUP3 DUP8 DUP8 PUSH2 0x39D1 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x2788 JUMP JUMPDEST PUSH1 0x1 DUP8 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x276A JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x277C JUMPI PUSH2 0x2752 DUP7 DUP3 DUP8 DUP8 PUSH2 0x3A4C JUMP JUMPDEST PUSH2 0x2752 DUP7 DUP3 DUP8 DUP8 PUSH2 0x3AC8 JUMP JUMPDEST SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x27FE PUSH2 0x3B2B JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x2813 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5C28 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 SHR SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x2842 DUP5 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2852 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x286B JUMPI PUSH2 0x2861 DUP5 PUSH2 0x3B2F JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x2891 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2879 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2888 JUMPI PUSH2 0x2861 DUP5 PUSH2 0x3C64 JUMP JUMPDEST PUSH2 0x2861 DUP5 PUSH2 0x3D89 JUMP JUMPDEST SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x28B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x28DB JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x0 SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x14DD JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x28FC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x290F DUP2 PUSH2 0x3E83 JUMP JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x291B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2939 DUP4 PUSH2 0x2934 DUP4 PUSH2 0x26C0 JUMP JUMPDEST PUSH2 0x3E9E JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x28E5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x297F DUP7 DUP7 PUSH2 0x191B JUMP JUMPDEST SWAP1 POP PUSH2 0x2998 DUP4 DUP1 PUSH2 0x2990 JUMPI POP DUP5 DUP3 LT ISZERO JUMPDEST PUSH2 0x201 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x29A2 DUP2 DUP6 PUSH2 0x3EB5 JUMP JUMPDEST SWAP2 POP DUP2 DUP2 SUB PUSH2 0x29BE DUP8 DUP8 DUP4 PUSH2 0x29B6 DUP8 PUSH2 0x382B JUMP JUMPDEST PUSH1 0x0 SUB PUSH2 0x3EC4 JUMP JUMPDEST POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x29D4 DUP5 DUP5 PUSH2 0x191B JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29E2 DUP3 DUP5 PUSH2 0x1831 JUMP JUMPDEST SWAP1 POP PUSH2 0x1C4B DUP6 DUP6 DUP4 PUSH2 0x29F3 DUP8 PUSH2 0x382B JUMP JUMPDEST PUSH2 0x3EC4 JUMP JUMPDEST PUSH2 0xDBE DUP5 PUSH4 0x23B872DD PUSH1 0xE0 SHL DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x1DDF SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x59B2 JUMP JUMPDEST PUSH2 0x2A28 DUP2 SELFBALANCE LT ISZERO PUSH2 0x1A3 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x40 MLOAD PUSH2 0x2A41 SWAP1 PUSH2 0x528 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x2A7E JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x2A83 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP PUSH2 0xF5F DUP2 PUSH2 0x1A4 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH4 0x26F8AA21 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x0 SWAP2 PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x9BE2A884 SWAP1 PUSH2 0x2ACD SWAP1 DUP7 SWAP1 DUP7 SWAP1 ADDRESS SWAP1 PUSH1 0x4 ADD PUSH2 0x5B11 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2AE5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x2AF9 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1699 SWAP2 SWAP1 PUSH2 0x52D5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP2 ADD SWAP1 SWAP2 SSTORE PUSH2 0xF5F PUSH2 0x2B4B DUP5 DUP4 PUSH2 0x3F1F JUMP JUMPDEST DUP4 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x2B6E DUP7 PUSH1 0x80 ADD MLOAD DUP8 PUSH1 0x20 ADD MLOAD DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x30E3 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH1 0x0 DUP1 DUP8 PUSH1 0x40 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP9 PUSH1 0x20 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT ISZERO PUSH2 0x2BA3 JUMPI POP DUP4 SWAP1 POP DUP3 PUSH2 0x2BA9 JUMP JUMPDEST POP DUP3 SWAP1 POP DUP4 JUMPDEST PUSH2 0x2BB5 DUP9 DUP9 DUP5 DUP5 PUSH2 0x4045 JUMP JUMPDEST PUSH1 0x40 DUP12 ADD MLOAD PUSH1 0x20 DUP13 ADD MLOAD SWAP2 SWAP10 POP SWAP3 SWAP5 POP SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND SWAP2 AND LT PUSH2 0x2BE9 JUMPI PUSH2 0x2BE4 DUP2 DUP4 PUSH2 0x4142 JUMP JUMPDEST PUSH2 0x2BF3 JUMP JUMPDEST PUSH2 0x2BF3 DUP3 DUP3 PUSH2 0x4142 JUMP JUMPDEST SWAP1 SWAP3 SSTORE POP SWAP3 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2C16 DUP5 PUSH1 0x80 ADD MLOAD DUP6 PUSH1 0x20 ADD MLOAD PUSH2 0x261F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2C2C DUP6 PUSH1 0x80 ADD MLOAD DUP7 PUSH1 0x40 ADD MLOAD PUSH2 0x261F JUMP JUMPDEST SWAP1 POP PUSH2 0x2C3A DUP6 DUP6 DUP5 DUP5 PUSH2 0x4045 JUMP JUMPDEST PUSH1 0x80 DUP9 ADD DUP1 MLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 DUP3 DUP15 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP7 MSTORE SWAP1 DUP4 MSTORE DUP2 DUP6 KECCAK256 SWAP9 SWAP1 SWAP9 SSTORE SWAP4 MLOAD DUP4 MSTORE SWAP1 DUP2 MSTORE DUP3 DUP3 KECCAK256 SWAP11 DUP4 ADD MLOAD SWAP1 SWAP6 AND DUP2 MSTORE SWAP9 SWAP1 SWAP4 MSTORE SWAP2 SWAP1 SWAP7 KECCAK256 SWAP6 SWAP1 SWAP6 SSTORE POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP1 DUP5 ADD MLOAD DUP3 SWAP2 DUP3 SWAP2 DUP3 SWAP1 PUSH2 0x2CBE SWAP1 DUP4 SWAP1 PUSH2 0x417D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2CD9 DUP9 PUSH1 0x40 ADD MLOAD DUP5 PUSH2 0x417D SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP DUP2 ISZERO DUP1 PUSH2 0x2CE6 JUMPI POP DUP1 ISZERO JUMPDEST ISZERO PUSH2 0x2D03 JUMPI PUSH2 0x2CF8 DUP9 PUSH1 0x80 ADD MLOAD PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x2D03 PUSH2 0x209 PUSH2 0x16A2 JUMP JUMPDEST PUSH1 0x0 NOT SWAP2 DUP3 ADD SWAP2 ADD PUSH1 0x0 PUSH2 0x2D16 DUP5 PUSH2 0x419C JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2D30 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2D5A JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP PUSH1 0x0 PUSH1 0xA0 DUP13 ADD DUP2 SWAP1 MSTORE SWAP1 SWAP2 POP JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x2DDA JUMPI PUSH1 0x0 PUSH2 0x2D7C DUP8 DUP4 PUSH2 0x41A0 JUMP JUMPDEST SWAP1 POP PUSH2 0x2D87 DUP2 PUSH2 0x3E83 JUMP JUMPDEST DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2D93 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2DB0 DUP13 PUSH1 0xA0 ADD MLOAD PUSH2 0x2934 DUP4 PUSH2 0x26C0 JUMP JUMPDEST PUSH1 0xA0 DUP14 ADD MSTORE DUP2 DUP7 EQ ISZERO PUSH2 0x2DC5 JUMPI DUP1 SWAP9 POP PUSH2 0x2DD1 JUMP JUMPDEST DUP5 DUP3 EQ ISZERO PUSH2 0x2DD1 JUMPI DUP1 SWAP8 POP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x2D68 JUMP JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0xF64AA5 PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP11 AND SWAP1 PUSH4 0x1EC954A SWAP1 PUSH2 0x2E0C SWAP1 DUP14 SWAP1 DUP6 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x5C80 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2E26 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2E3A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2E5E SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST SWAP8 POP PUSH1 0x0 DUP1 PUSH2 0x2E76 DUP13 PUSH1 0x0 ADD MLOAD DUP14 PUSH1 0x60 ADD MLOAD DUP13 PUSH2 0x2EB8 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH2 0x2E85 DUP10 DUP4 PUSH2 0x41B6 JUMP JUMPDEST SWAP9 POP PUSH2 0x2E91 DUP9 DUP3 PUSH2 0x41E7 JUMP JUMPDEST SWAP8 POP PUSH2 0x2E9E DUP8 DUP8 DUP12 PUSH2 0x41FD JUMP JUMPDEST PUSH2 0x2EA9 DUP8 DUP7 DUP11 PUSH2 0x41FD JUMP JUMPDEST POP POP POP POP POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 DUP6 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x2EC8 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2ED8 JUMPI POP DUP3 SWAP1 POP DUP2 PUSH2 0x2EDE JUMP JUMPDEST POP DUP2 SWAP1 POP DUP3 JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2F0A DUP5 ISZERO DUP1 PUSH2 0x2F03 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2F00 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0x52B JUMP JUMPDEST DUP1 PUSH2 0x2F19 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x2F4F SWAP2 SWAP1 PUSH2 0x5940 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x2F8C JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x2F91 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH1 0x0 DUP3 EQ ISZERO PUSH2 0x2FA9 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH2 0xDBE DUP2 MLOAD PUSH1 0x0 EQ DUP1 PUSH2 0x2FCB JUMPI POP DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2FCB SWAP2 SWAP1 PUSH2 0x52D5 JUMP JUMPDEST PUSH2 0x1A2 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2FDF DUP4 DUP4 PUSH2 0x392F JUMP JUMPDEST PUSH2 0x302E JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP6 SLOAD SWAP1 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x169C JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x169C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 PUSH2 0x30C3 JUMPI POP POP DUP3 SLOAD PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 DUP2 AND DUP1 DUP4 MSTORE PUSH1 0x20 DUP1 DUP5 ADD DUP8 DUP2 MSTORE PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x1 DUP1 DUP13 ADD DUP5 MSTORE DUP8 DUP3 KECCAK256 SWAP7 MLOAD DUP8 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP7 AND SWAP6 SWAP1 SWAP6 OR DUP7 SSTORE SWAP1 MLOAD SWAP5 DUP5 ADD SWAP5 SWAP1 SWAP5 SSTORE SWAP5 DUP3 ADD DUP1 DUP10 SSTORE SWAP1 DUP4 MSTORE PUSH1 0x2 DUP9 ADD SWAP1 SWAP5 MSTORE SWAP2 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x175B JUMP JUMPDEST PUSH1 0x0 NOT ADD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 DUP1 DUP7 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP3 KECCAK256 ADD DUP4 SWAP1 SSTORE SWAP1 POP PUSH2 0x175B JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x30F5 DUP8 DUP8 PUSH2 0x4215 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH2 0x3105 DUP4 DUP4 PUSH2 0x4246 JUMP JUMPDEST PUSH1 0x0 DUP11 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE PUSH1 0x2 ADD SWAP1 SWAP2 MSTORE DUP2 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP3 ADD SLOAD SWAP2 SWAP8 POP SWAP3 SWAP4 POP SWAP1 PUSH2 0x3138 DUP4 PUSH2 0x391D JUMP JUMPDEST DUP1 PUSH2 0x3147 JUMPI POP PUSH2 0x3147 DUP3 PUSH2 0x391D JUMP JUMPDEST DUP1 PUSH2 0x3168 JUMPI POP PUSH2 0x3157 DUP13 DUP8 PUSH2 0x3950 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x3168 JUMPI POP PUSH2 0x3168 DUP13 DUP7 PUSH2 0x3950 JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x3183 JUMPI PUSH2 0x3178 DUP13 PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x3183 PUSH2 0x209 PUSH2 0x16A2 JUMP JUMPDEST PUSH2 0x318D DUP4 DUP4 PUSH2 0x4279 JUMP JUMPDEST SWAP9 POP PUSH2 0x3199 DUP4 DUP4 PUSH2 0x429E JUMP JUMPDEST SWAP8 POP POP POP POP POP POP POP SWAP4 POP SWAP4 POP SWAP4 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x32B4 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x31F4 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP8 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 POP DUP2 SWAP1 DUP9 SWAP1 DUP6 SWAP1 DUP2 LT PUSH2 0x321D JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP2 SWAP1 SWAP2 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND OR SWAP1 SSTORE SWAP2 DUP4 AND DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x3266 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 DUP4 ADD PUSH1 0x0 NOT SWAP1 DUP2 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE SWAP1 SWAP3 ADD SWAP1 SWAP3 SSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP3 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE SWAP5 POP PUSH2 0x169C SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 DUP4 DUP4 PUSH2 0x209 PUSH2 0x42B5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x32B4 JUMPI DUP4 SLOAD PUSH1 0x0 NOT SWAP1 DUP2 ADD PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP8 DUP2 ADD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP6 DUP8 ADD DUP5 MSTORE DUP1 DUP5 KECCAK256 DUP7 SLOAD DUP2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP1 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 DUP4 AND OR DUP4 SSTORE DUP9 DUP7 ADD DUP1 SLOAD SWAP4 DUP8 ADD SWAP4 SWAP1 SWAP4 SSTORE DUP9 SLOAD DUP3 AND DUP8 MSTORE PUSH1 0x2 DUP14 ADD DUP1 DUP7 MSTORE DUP5 DUP9 KECCAK256 SWAP11 SWAP1 SWAP11 SSTORE DUP9 SLOAD AND SWAP1 SWAP8 SSTORE DUP5 SWAP1 SSTORE SWAP4 DUP10 SSTORE SWAP4 DUP8 AND DUP3 MSTORE SWAP4 SWAP1 SWAP3 MSTORE DUP2 KECCAK256 SSTORE SWAP1 POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x60 DUP1 DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3389 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x33B3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x830 JUMPI PUSH2 0x33D1 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x23B0 JUMPI INVALID JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x33DD JUMPI INVALID JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 ADD PUSH2 0x33B9 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x60 PUSH2 0x340B DUP6 PUSH2 0x2834 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x341B DUP3 MLOAD DUP6 MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH2 0x342B PUSH1 0x0 DUP4 MLOAD GT PUSH2 0x20F PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x3485 JUMPI PUSH2 0x347D DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3446 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3463 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x208 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x342E JUMP JUMPDEST POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x349F DUP7 PUSH2 0x2896 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH2 0x34AE DUP12 PUSH2 0x282E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP13 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x34BE JUMPI INVALID JUMPDEST EQ PUSH2 0x3561 JUMPI DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x74F3B009 DUP13 DUP13 DUP13 DUP8 DUP8 PUSH2 0x34DF PUSH2 0x42F2 JUMP JUMPDEST DUP16 PUSH1 0x40 ADD MLOAD PUSH1 0x40 MLOAD DUP9 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3506 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5B30 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3520 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x3534 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x355C SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x5263 JUMP JUMPDEST PUSH2 0x35FA JUMP JUMPDEST DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD5C096C4 DUP13 DUP13 DUP13 DUP8 DUP8 PUSH2 0x357D PUSH2 0x42F2 JUMP JUMPDEST DUP16 PUSH1 0x40 ADD MLOAD PUSH1 0x40 MLOAD DUP9 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x35A4 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5B30 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x35BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x35D2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x35FA SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x5263 JUMP JUMPDEST DUP1 SWAP6 POP DUP2 SWAP7 POP POP POP PUSH2 0x3610 DUP8 MLOAD DUP7 MLOAD DUP7 MLOAD PUSH2 0x436C JUMP JUMPDEST PUSH1 0x0 DUP13 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x361E JUMPI INVALID JUMPDEST EQ PUSH2 0x3635 JUMPI PUSH2 0x3630 DUP10 DUP10 DUP10 DUP9 DUP9 PUSH2 0x4384 JUMP JUMPDEST PUSH2 0x3642 JUMP JUMPDEST PUSH2 0x3642 DUP11 DUP10 DUP10 DUP9 DUP9 PUSH2 0x44CA JUMP JUMPDEST SWAP6 POP POP POP POP SWAP7 POP SWAP7 POP SWAP7 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x365F DUP6 DUP5 PUSH2 0x4246 JUMP JUMPDEST PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE PUSH1 0x2 ADD SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SWAP1 SWAP2 POP PUSH2 0x3688 DUP6 DUP5 PUSH2 0x4142 JUMP JUMPDEST SWAP1 SSTORE POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI DUP2 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x36AA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x7 PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x36D3 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 MSTORE DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 ADD PUSH1 0x0 KECCAK256 SSTORE PUSH1 0x1 ADD PUSH2 0x3695 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH2 0x3740 DUP2 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3728 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x41FD SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x370F JUMP JUMPDEST PUSH1 0x60 DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3761 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x378B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x830 JUMPI DUP3 PUSH2 0x37BB JUMPI DUP4 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x37AB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x0 SUB PUSH2 0x37D0 JUMP JUMPDEST DUP4 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x37C7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x37DC JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x3791 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP5 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x37FE JUMPI INVALID JUMPDEST EQ PUSH2 0x3809 JUMPI DUP2 PUSH2 0xA1A JUMP JUMPDEST POP SWAP1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP5 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x3820 JUMPI INVALID JUMPDEST EQ PUSH2 0x830 JUMPI DUP3 PUSH2 0xA1A JUMP JUMPDEST PUSH1 0x0 PUSH2 0x216F PUSH1 0x1 PUSH1 0xFF SHL DUP4 LT PUSH2 0x1A5 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x1699 DUP3 DUP5 SLT DUP1 ISZERO SWAP1 PUSH2 0x3857 JUMPI POP DUP5 DUP3 SLT ISZERO JUMPDEST DUP1 PUSH2 0x386C JUMPI POP PUSH1 0x0 DUP5 SLT DUP1 ISZERO PUSH2 0x386C JUMPI POP DUP5 DUP3 SLT JUMPDEST PUSH1 0x0 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 SUB PUSH2 0x1699 DUP3 DUP5 SLT DUP1 ISZERO SWAP1 PUSH2 0x388B JUMPI POP DUP5 DUP3 SGT ISZERO JUMPDEST DUP1 PUSH2 0x38A0 JUMPI POP PUSH1 0x0 DUP5 SLT DUP1 ISZERO PUSH2 0x38A0 JUMPI POP DUP5 DUP3 SGT JUMPDEST PUSH1 0x1 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND SWAP3 DUP5 SWAP3 SWAP1 SWAP2 AND SWAP1 DUP3 SWAP1 DUP2 PUSH2 0x38DB DUP7 DUP6 PUSH2 0x4246 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP3 ADD SLOAD SWAP2 SWAP10 POP SWAP2 SWAP3 POP PUSH2 0x3902 DUP3 DUP3 PUSH2 0x4279 JUMP JUMPDEST SWAP7 POP PUSH2 0x390E DUP3 DUP3 PUSH2 0x429E JUMP JUMPDEST SWAP5 POP POP POP POP POP SWAP2 SWAP4 SWAP6 SWAP1 SWAP3 SWAP5 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3928 DUP3 PUSH2 0x31AA JUMP JUMPDEST ISZERO SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 DUP2 AND SWAP2 AND EQ DUP1 PUSH2 0x3988 JUMPI POP PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 DUP2 AND SWAP2 AND EQ JUMPDEST DUP1 ISZERO PUSH2 0xA1A JUMPI POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO ISZERO SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0xA1A DUP2 DUP5 PUSH2 0x392F JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0xA1A DUP2 DUP5 PUSH2 0x463F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x2 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x39E2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x39F8 JUMPI PUSH2 0x39F3 DUP7 DUP6 DUP6 PUSH2 0x4660 JUMP JUMPDEST PUSH2 0x3A22 JUMP JUMPDEST PUSH1 0x1 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3A06 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3A17 JUMPI PUSH2 0x39F3 DUP7 DUP6 DUP6 PUSH2 0x466E JUMP JUMPDEST PUSH2 0x3A22 DUP7 DUP6 DUP6 PUSH2 0x467C JUMP JUMPDEST DUP3 ISZERO PUSH2 0x3A3C JUMPI PUSH2 0x3A3C PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND CALLER DUP6 PUSH2 0x1DC0 JUMP JUMPDEST POP POP PUSH1 0x0 DUP2 SWAP1 SUB SWAP5 SWAP1 SWAP4 POP SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x2 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3A5D JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3A73 JUMPI PUSH2 0x3A6E DUP7 DUP6 DUP6 PUSH2 0x468A JUMP JUMPDEST PUSH2 0x3A9D JUMP JUMPDEST PUSH1 0x1 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3A81 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3A92 JUMPI PUSH2 0x3A6E DUP7 DUP6 DUP6 PUSH2 0x4698 JUMP JUMPDEST PUSH2 0x3A9D DUP7 DUP6 DUP6 PUSH2 0x46A6 JUMP JUMPDEST DUP3 ISZERO PUSH2 0x3AB8 JUMPI PUSH2 0x3AB8 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND CALLER ADDRESS DUP7 PUSH2 0x29F8 JUMP JUMPDEST POP SWAP1 SWAP5 PUSH1 0x0 DUP7 SWAP1 SUB SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x2 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3AD9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3AF1 JUMPI PUSH2 0x3AEA DUP7 DUP6 DUP6 PUSH2 0x46B4 JUMP JUMPDEST SWAP1 POP PUSH2 0x3B1E JUMP JUMPDEST PUSH1 0x1 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3AFF JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3B10 JUMPI PUSH2 0x3AEA DUP7 DUP6 DUP6 PUSH2 0x46C4 JUMP JUMPDEST PUSH2 0x3B1B DUP7 DUP6 DUP6 PUSH2 0x46D4 JUMP JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 SWAP2 POP SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x3B41 DUP8 PUSH2 0x38A7 JUMP JUMPDEST SWAP3 SWAP8 POP SWAP1 SWAP6 POP SWAP4 POP SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO DUP1 PUSH2 0x3B69 JUMPI POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO JUMPDEST ISZERO PUSH2 0x3B92 JUMPI POP POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 DUP2 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE SWAP5 POP SWAP3 POP PUSH2 0x2891 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 ADD DUP4 MSTORE SWAP1 SWAP2 PUSH1 0x20 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP6 POP DUP4 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x3BC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE POP POP DUP2 DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x3BEE JUMPI INVALID JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD DUP3 ADD MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 ADD DUP4 MSTORE SWAP1 SWAP3 SWAP1 SWAP2 SWAP1 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP5 POP DUP3 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x3C35 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP DUP1 DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x3C4F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x60 SWAP1 DUP2 SWAP1 PUSH2 0x3C80 DUP2 PUSH2 0x419C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3C95 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3CBF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3CD9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3D03 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x3D82 JUMPI PUSH1 0x0 PUSH2 0x3D1E DUP4 DUP4 PUSH2 0x46E4 JUMP JUMPDEST SWAP1 POP DUP1 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3D2D JUMPI INVALID JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 DUP4 AND PUSH1 0x20 SWAP2 DUP3 MUL SWAP3 SWAP1 SWAP3 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP9 DUP2 MSTORE PUSH1 0x7 DUP3 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP4 DUP6 AND DUP3 MSTORE SWAP3 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD DUP5 MLOAD DUP6 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x3D6E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP PUSH1 0x1 ADD PUSH2 0x3D09 JUMP JUMPDEST POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x60 SWAP1 DUP2 SWAP1 PUSH2 0x3DA5 DUP2 PUSH2 0x419C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3DBA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3DE4 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3DFE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3E28 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x3D82 JUMPI PUSH2 0x3E41 DUP3 DUP3 PUSH2 0x4711 JUMP JUMPDEST DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3E4D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3E60 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 MSTORE PUSH1 0x1 ADD PUSH2 0x3E2E JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3E8E DUP3 PUSH2 0x26B1 JUMP JUMPDEST PUSH2 0x3E97 DUP4 PUSH2 0x26A5 JUMP JUMPDEST ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT ISZERO PUSH2 0x3EAE JUMPI DUP2 PUSH2 0x1699 JUMP JUMPDEST POP SWAP1 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT PUSH2 0x3EAE JUMPI DUP2 PUSH2 0x1699 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0xB PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP9 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE MLOAD PUSH32 0x18E1EA4139E68413D7D08AA752E71568E36B2C5BF940893314C2C5B01EAA0C42 SWAP1 PUSH2 0x18BC SWAP1 DUP6 SWAP1 PUSH2 0x5B08 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x3F2A PUSH2 0x4735 JUMP JUMPDEST SWAP1 POP TIMESTAMP DUP2 LT ISZERO PUSH2 0x3F3E JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3F48 PUSH2 0x4741 JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x3F5A JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x3F65 PUSH2 0x4852 JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD KECCAK256 PUSH1 0x40 MLOAD PUSH2 0x3F81 SWAP4 SWAP3 CALLER SWAP2 DUP11 SWAP2 DUP10 SWAP2 ADD PUSH2 0x5BFC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0x3FA4 DUP3 PUSH2 0x48A1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x3FB3 PUSH2 0x48BD JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH1 0x0 PUSH1 0x1 DUP6 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x3FDE SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5C54 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x4000 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0x4036 JUMPI POP DUP11 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x4054 DUP7 PUSH2 0x3E83 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4061 DUP7 PUSH2 0x3E83 JUMP JUMPDEST SWAP1 POP PUSH2 0x4078 PUSH2 0x406F DUP9 PUSH2 0x26C0 JUMP JUMPDEST PUSH2 0x2934 DUP9 PUSH2 0x26C0 JUMP JUMPDEST PUSH1 0xA0 DUP11 ADD MSTORE PUSH1 0x40 MLOAD PUSH4 0x274B0443 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND SWAP1 PUSH4 0x9D2C110C SWAP1 PUSH2 0x40AD SWAP1 DUP13 SWAP1 DUP7 SWAP1 DUP7 SWAP1 PUSH1 0x4 ADD PUSH2 0x5CB9 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x40C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x40DB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x40FF SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST SWAP3 POP PUSH1 0x0 DUP1 PUSH2 0x4117 DUP12 PUSH1 0x0 ADD MLOAD DUP13 PUSH1 0x60 ADD MLOAD DUP8 PUSH2 0x2EB8 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH2 0x4126 DUP10 DUP4 PUSH2 0x41B6 JUMP JUMPDEST SWAP7 POP PUSH2 0x4132 DUP9 DUP3 PUSH2 0x41E7 JUMP JUMPDEST SWAP6 POP POP POP POP POP SWAP5 POP SWAP5 POP SWAP5 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x415A PUSH2 0x4151 DUP6 PUSH2 0x26C0 JUMP JUMPDEST PUSH2 0x2934 DUP6 PUSH2 0x26C0 JUMP JUMPDEST SWAP1 POP PUSH2 0xA1A PUSH2 0x4168 DUP6 PUSH2 0x26A5 JUMP JUMPDEST PUSH2 0x4171 DUP6 PUSH2 0x26A5 JUMP JUMPDEST DUP4 PUSH4 0xFFFFFFFF AND PUSH2 0x48E4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 DUP3 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x41CC DUP4 PUSH2 0x41C6 DUP7 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 PUSH2 0x1831 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x41D9 DUP6 PUSH2 0x26B1 JUMP JUMPDEST SWAP1 POP NUMBER PUSH2 0x1266 DUP4 DUP4 DUP4 PUSH2 0x48F2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x41CC DUP4 PUSH2 0x41F7 DUP7 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 PUSH2 0x4920 JUMP JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x1 SWAP3 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 SWAP1 SWAP2 ADD SSTORE JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH2 0x4238 JUMPI DUP3 DUP5 PUSH2 0x423B JUMP JUMPDEST DUP4 DUP4 JUMPDEST SWAP2 POP SWAP2 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x425B SWAP3 SWAP2 SWAP1 PUSH2 0x595C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 PUSH2 0x4287 DUP5 PUSH2 0x26A5 JUMP JUMPDEST PUSH2 0x4290 DUP5 PUSH2 0x26A5 JUMP JUMPDEST PUSH2 0x4299 DUP7 PUSH2 0x26C0 JUMP JUMPDEST PUSH2 0x48F2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 PUSH2 0x42AC DUP5 PUSH2 0x26B1 JUMP JUMPDEST PUSH2 0x4290 DUP5 PUSH2 0x26B1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH2 0x42DC DUP2 ISZERO ISZERO DUP5 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x42E9 DUP6 PUSH1 0x1 DUP4 SUB PUSH2 0x41A0 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x42FC PUSH2 0x136F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x55C67628 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4334 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x4348 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x128E SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST PUSH2 0xF5F DUP3 DUP5 EQ DUP1 ISZERO PUSH2 0x437D JUMPI POP DUP2 DUP4 EQ JUMPDEST PUSH1 0x67 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x439D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x43C7 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP6 MLOAD MLOAD DUP2 LT ISZERO PUSH2 0x44C0 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x43E5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x4415 DUP8 PUSH1 0x20 ADD MLOAD DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x4402 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 LT ISZERO PUSH2 0x1F9 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP8 PUSH1 0x0 ADD MLOAD DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x4427 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x4441 DUP2 DUP4 DUP12 DUP12 PUSH1 0x60 ADD MLOAD PUSH2 0x1C52 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x444F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x446B PUSH2 0x4465 DUP4 PUSH2 0x1A5B JUMP JUMPDEST DUP3 PUSH2 0x1E16 JUMP JUMPDEST PUSH2 0x449A PUSH2 0x4478 DUP5 DUP4 PUSH2 0x1831 JUMP JUMPDEST DUP10 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x4484 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x41E7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x44A6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x43CD JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x44E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x450F JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD MLOAD DUP2 LT ISZERO PUSH2 0x4635 JUMPI PUSH1 0x0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x452D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x455D DUP9 PUSH1 0x20 ADD MLOAD DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x454A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 GT ISZERO PUSH2 0x1FA PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP9 PUSH1 0x0 ADD MLOAD DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x456F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x4589 DUP2 DUP4 DUP13 DUP13 PUSH1 0x60 ADD MLOAD PUSH2 0x1B74 JUMP JUMPDEST PUSH2 0x4592 DUP2 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x45A4 JUMPI PUSH2 0x45A1 DUP5 DUP4 PUSH2 0x1831 JUMP JUMPDEST SWAP4 POP JUMPDEST PUSH1 0x0 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x45B2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x45C8 PUSH2 0x4465 DUP4 PUSH2 0x1A5B JUMP JUMPDEST DUP1 DUP4 LT ISZERO PUSH2 0x45E7 JUMPI PUSH2 0x45E2 DUP4 DUP3 SUB DUP11 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x4484 JUMPI INVALID JUMPDEST PUSH2 0x460F JUMP JUMPDEST PUSH2 0x460F DUP2 DUP5 SUB DUP11 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x45F9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x41B6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x461B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x4515 JUMP JUMPDEST POP PUSH2 0x44C0 DUP2 PUSH2 0x18CA JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4936 DUP5 PUSH2 0x4971 JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4936 DUP5 PUSH2 0x4A1C JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4936 DUP5 PUSH2 0x4A77 JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4AC6 DUP5 PUSH2 0x4971 JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4AC6 DUP5 PUSH2 0x4A1C JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4AC6 DUP5 PUSH2 0x4A77 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xA1A DUP5 DUP5 PUSH2 0x4AE7 DUP6 PUSH2 0x4971 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xA1A DUP5 DUP5 PUSH2 0x4AE7 DUP6 PUSH2 0x4A1C JUMP JUMPDEST PUSH1 0x0 PUSH2 0xA1A DUP5 DUP5 PUSH2 0x4AE7 DUP6 PUSH2 0x4A77 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x46F5 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 DUP3 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD SWAP2 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x128E PUSH1 0x0 PUSH2 0x4B01 JUMP JUMPDEST PUSH1 0x0 DUP1 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xB95CAC28 DUP2 EQ PUSH2 0x4789 JUMPI PUSH4 0x8BDB3913 DUP2 EQ PUSH2 0x47B1 JUMPI PUSH4 0x52BBBE29 DUP2 EQ PUSH2 0x47D9 JUMPI PUSH4 0x945BCEC9 DUP2 EQ PUSH2 0x4801 JUMPI PUSH4 0xFA6E671D DUP2 EQ PUSH2 0x4829 JUMPI PUSH1 0x0 SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0x3F7B71252BD19113FF48C19C6E004A9BCFCCA320A0D74D58E85877CBD7DCAE58 SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0x8BBC57F66EA936902F50A71CE12B92C43F3C5340BB40C27C4E90AB84EEAE3353 SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0xE192DCBC143B1E244AD73B813FD3C097B832AD260A157340B4E5E5BEDA067ABE SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0x9BFC43A4D98313C6766986FFD7C916C7481566D9F224C6819AF0A53388ACED3A SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0xA3F865AA351E51CFEB40F5178D1564BB629FE9030B83CAF6361D1BAAF5B90B5A SWAP3 POP JUMPDEST POP POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP POP DUP3 MLOAD SWAP3 SWAP4 POP POP POP PUSH1 0x80 LT ISZERO PUSH2 0x528 JUMPI PUSH1 0x80 CALLDATASIZE SUB DUP2 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x48AB PUSH2 0x2791 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10EE SWAP3 SWAP2 SWAP1 PUSH2 0x5983 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x48CC PUSH1 0x20 PUSH2 0x4B01 JUMP JUMPDEST SWAP3 POP PUSH2 0x48D8 PUSH1 0x40 PUSH2 0x4B01 JUMP JUMPDEST SWAP2 POP PUSH2 0x87A PUSH1 0x60 PUSH2 0x4B01 JUMP JUMPDEST PUSH1 0xE0 SHL PUSH1 0x70 SWAP2 SWAP1 SWAP2 SHL ADD ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP4 ADD PUSH2 0x4915 DUP6 DUP3 LT DUP1 ISZERO SWAP1 PUSH2 0x490D JUMPI POP PUSH1 0x1 PUSH1 0x70 SHL DUP3 LT JUMPDEST PUSH2 0x20E PUSH2 0x52B JUMP JUMPDEST PUSH2 0x42E9 DUP6 DUP6 DUP6 PUSH2 0x48E4 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4930 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x52B JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x4946 DUP4 PUSH2 0x41F7 DUP7 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4957 DUP5 PUSH2 0x41C6 DUP8 PUSH2 0x26B1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4964 DUP7 PUSH2 0x26C0 JUMP JUMPDEST SWAP1 POP PUSH2 0x1266 DUP4 DUP4 DUP4 PUSH2 0x48F2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x4982 DUP10 PUSH2 0x38A7 JUMP JUMPDEST SWAP5 POP POP SWAP4 POP SWAP4 POP SWAP4 POP PUSH1 0x0 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x49CD JUMPI PUSH1 0x0 PUSH2 0x49B7 DUP5 DUP10 DUP12 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x49C3 DUP2 DUP6 PUSH2 0x4B0B JUMP JUMPDEST SWAP1 SWAP4 POP SWAP1 POP PUSH2 0x49EF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x49DD DUP4 DUP10 DUP12 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x49E9 DUP2 DUP5 PUSH2 0x4B0B JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP JUMPDEST PUSH2 0x49F9 DUP4 DUP4 PUSH2 0x4142 JUMP JUMPDEST DUP6 SSTORE PUSH2 0x4A05 DUP4 DUP4 PUSH2 0x4B27 JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP6 ADD SWAP5 SWAP1 SWAP5 SSTORE POP SWAP2 SWAP3 POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x4A29 DUP7 DUP7 PUSH2 0x261F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4A3B DUP3 DUP6 DUP8 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 DUP9 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 DUP2 SWAP1 SSTORE SWAP1 POP PUSH2 0x4A6C DUP2 DUP4 PUSH2 0x4B0B JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP2 PUSH2 0x4A90 DUP3 DUP8 PUSH2 0x32BE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4AA2 DUP3 DUP7 DUP9 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x4AAF DUP4 DUP9 DUP4 PUSH2 0x3036 JUMP JUMPDEST POP PUSH2 0x4ABA DUP2 DUP4 PUSH2 0x4B0B JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x4AD6 DUP4 PUSH2 0x41C6 DUP7 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4957 DUP5 PUSH2 0x41F7 DUP8 PUSH2 0x26B1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x4AF3 DUP5 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 POP NUMBER PUSH2 0x42E9 DUP3 DUP6 DUP4 PUSH2 0x48F2 JUMP JUMPDEST CALLDATASIZE ADD PUSH1 0x7F NOT ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4B16 DUP3 PUSH2 0x26B1 JUMP JUMPDEST PUSH2 0x4B1F DUP5 PUSH2 0x26B1 JUMP JUMPDEST SUB SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 PUSH2 0x4B35 DUP5 PUSH2 0x26B1 JUMP JUMPDEST PUSH2 0x4B3E DUP5 PUSH2 0x26B1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x48E4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0x120 DUP2 ADD SWAP1 SWAP2 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x60 DUP1 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0x80 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0xA0 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0xC0 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0xE0 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH2 0x100 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD SWAP1 SWAP2 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x60 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 ISZERO ISZERO DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x169C DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4C35 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x4C48 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST PUSH2 0x5D02 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x4C69 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x4C91 JUMPI DUP2 CALLDATALOAD PUSH2 0x4C7F DUP2 PUSH2 0x5D73 JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x4C6C JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4CAC JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x4CBA PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x4C91 JUMPI DUP2 CALLDATALOAD DUP8 ADD PUSH1 0xA0 DUP1 PUSH1 0x1F NOT DUP4 DUP13 SUB ADD SLT ISZERO PUSH2 0x4CEC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4CF5 DUP2 PUSH2 0x5D02 JUMP JUMPDEST DUP6 DUP4 ADD CALLDATALOAD DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 ADD CALLDATALOAD DUP8 DUP4 ADD MSTORE PUSH1 0x60 DUP1 DUP6 ADD CALLDATALOAD DUP3 DUP5 ADD MSTORE PUSH1 0x80 SWAP2 POP DUP2 DUP6 ADD CALLDATALOAD DUP2 DUP5 ADD MSTORE POP DUP3 DUP5 ADD CALLDATALOAD SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP4 GT ISZERO PUSH2 0x4D36 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4D44 DUP13 DUP9 DUP6 DUP8 ADD ADD PUSH2 0x4E23 JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE DUP7 MSTORE POP POP SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x4CCB JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4D6C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x4D7A PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x4D9B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x4C91 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x4D9E JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4DCA JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x4DD8 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x4DF9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x4C91 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x4DFC JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x169C DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4E33 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x4E48 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x4E5B PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x5D02 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x4E72 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x169C DUP2 PUSH2 0x5D96 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x169C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH1 0x4 DUP2 LT PUSH2 0x169C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4EC5 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x4ECF PUSH1 0x80 PUSH2 0x5D02 JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4EE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4EF4 DUP6 DUP4 DUP7 ADD PUSH2 0x4C25 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x20 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x4F0A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4F16 DUP6 DUP4 DUP7 ADD PUSH2 0x4D5C JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x4F2F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4F3C DUP5 DUP3 DUP6 ADD PUSH2 0x4E23 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP PUSH2 0x4F4F DUP4 PUSH1 0x60 DUP5 ADD PUSH2 0x4E18 JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4F6B JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x4F75 PUSH1 0x80 PUSH2 0x5D02 JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH2 0x4F82 DUP2 PUSH2 0x5D73 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 DUP3 ADD CALLDATALOAD PUSH2 0x4F92 DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH2 0x4FA5 DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD CALLDATALOAD PUSH2 0x4F4F DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4FC9 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1699 DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x4FE6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x4FF1 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x5001 DUP2 PUSH2 0x5D73 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x5020 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x502B DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x503B DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP2 POP PUSH1 0x40 DUP5 ADD CALLDATALOAD PUSH2 0x504B DUP2 PUSH2 0x5D88 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x5068 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x5073 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x508D JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x5099 DUP6 DUP3 DUP7 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x50B5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x50CA JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x50DA JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x50E8 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP4 DUP6 ADD PUSH1 0x80 DUP1 DUP6 MUL DUP7 ADD DUP8 ADD DUP11 LT ISZERO PUSH2 0x5106 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP5 DUP7 LT ISZERO PUSH2 0x516F JUMPI DUP1 DUP3 DUP12 SUB SLT ISZERO PUSH2 0x5120 JUMPI DUP8 DUP9 REVERT JUMPDEST PUSH2 0x5129 DUP2 PUSH2 0x5D02 JUMP JUMPDEST PUSH2 0x5133 DUP12 DUP5 PUSH2 0x4E8B JUMP JUMPDEST DUP2 MSTORE DUP8 DUP4 ADD CALLDATALOAD DUP9 DUP3 ADD MSTORE PUSH1 0x40 PUSH2 0x514B DUP13 DUP3 DUP7 ADD PUSH2 0x4C1A JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP4 DUP2 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE DUP5 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP3 DUP7 ADD SWAP3 SWAP1 DUP2 ADD SWAP1 PUSH2 0x510A JUMP JUMPDEST POP SWAP1 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x518F JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x51A4 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x51B4 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x51C2 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP4 DUP6 ADD PUSH1 0xA0 DUP1 DUP6 MUL DUP7 ADD DUP8 ADD DUP11 LT ISZERO PUSH2 0x51E0 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP5 DUP7 LT ISZERO PUSH2 0x516F JUMPI DUP1 DUP3 DUP12 SUB SLT ISZERO PUSH2 0x51FA JUMPI DUP8 DUP9 REVERT JUMPDEST PUSH2 0x5203 DUP2 PUSH2 0x5D02 JUMP JUMPDEST PUSH2 0x520D DUP12 DUP5 PUSH2 0x4EA5 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x521B DUP12 DUP10 DUP6 ADD PUSH2 0x4C1A JUMP JUMPDEST DUP2 DUP10 ADD MSTORE PUSH1 0x40 DUP4 DUP2 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE PUSH1 0x60 PUSH2 0x5237 DUP13 DUP3 DUP7 ADD PUSH2 0x4C1A JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH1 0x80 PUSH2 0x5249 DUP13 DUP6 DUP4 ADD PUSH2 0x4C1A JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE DUP5 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP3 DUP7 ADD SWAP3 SWAP1 DUP2 ADD SWAP1 PUSH2 0x51E4 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x5275 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x528B JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x5297 DUP7 DUP4 DUP8 ADD PUSH2 0x4DBA JUMP JUMPDEST SWAP4 POP PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x52AC JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x5099 DUP6 DUP3 DUP7 ADD PUSH2 0x4DBA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x52CA JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1699 DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x52E6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1699 DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5302 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x531E JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH2 0x5330 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP3 POP PUSH1 0x40 DUP6 ADD CALLDATALOAD PUSH2 0x5340 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP2 POP PUSH1 0x60 DUP6 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x535A JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x5366 DUP8 DUP3 DUP9 ADD PUSH2 0x4EB4 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x5384 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x508D JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x53B4 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP1 DUP6 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x53D2 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x53DE DUP9 DUP4 DUP10 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x53F3 JUMPI DUP4 DUP5 REVERT JUMPDEST POP DUP6 ADD PUSH1 0x1F DUP2 ADD DUP8 SGT PUSH2 0x5404 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x5412 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP4 DUP6 ADD DUP6 DUP5 MUL DUP6 ADD DUP7 ADD DUP12 LT ISZERO PUSH2 0x542E JUMPI DUP7 DUP8 REVERT JUMPDEST DUP7 SWAP5 POP JUMPDEST DUP4 DUP6 LT ISZERO PUSH2 0x5459 JUMPI DUP1 CALLDATALOAD PUSH2 0x5445 DUP2 PUSH2 0x5D73 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x1 SWAP5 SWAP1 SWAP5 ADD SWAP4 SWAP2 DUP6 ADD SWAP2 DUP6 ADD PUSH2 0x5432 JUMP JUMPDEST POP DUP1 SWAP6 POP POP POP POP POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x547B JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x5001 DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x549E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x1699 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x54CA JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH2 0x54D5 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x54F0 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x54FC DUP9 DUP4 DUP10 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x5511 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x551D DUP9 DUP4 DUP10 ADD PUSH2 0x4D5C JUMP JUMPDEST SWAP4 POP PUSH1 0x60 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x5532 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x5366 DUP8 DUP3 DUP9 ADD PUSH2 0x4E23 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5550 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1699 DUP2 PUSH2 0x5D96 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xE0 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x5570 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x557A DUP7 DUP7 PUSH2 0x4E96 JUMP JUMPDEST SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x5595 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x55A1 DUP9 DUP4 DUP10 ADD PUSH2 0x4C9C JUMP JUMPDEST SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x55B6 JUMPI DUP4 DUP5 REVERT JUMPDEST POP PUSH2 0x55C3 DUP8 DUP3 DUP9 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP3 POP POP PUSH2 0x55D3 DUP7 PUSH1 0x60 DUP8 ADD PUSH2 0x4F5A JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x120 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x55F7 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x5601 DUP9 DUP9 PUSH2 0x4E96 JUMP JUMPDEST SWAP6 POP PUSH1 0x20 DUP1 DUP9 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x561D JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH2 0x5629 DUP12 DUP4 DUP13 ADD PUSH2 0x4C9C JUMP JUMPDEST SWAP8 POP PUSH1 0x40 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x563E JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH2 0x564A DUP12 DUP4 DUP13 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP7 POP PUSH2 0x5659 DUP12 PUSH1 0x60 DUP13 ADD PUSH2 0x4F5A JUMP JUMPDEST SWAP6 POP PUSH1 0xE0 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x566E JUMPI DUP5 DUP6 REVERT JUMPDEST POP DUP9 ADD PUSH1 0x1F DUP2 ADD DUP11 SGT PUSH2 0x567F JUMPI DUP4 DUP5 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x568D PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP4 DUP6 ADD DUP6 DUP5 MUL DUP6 ADD DUP7 ADD DUP15 LT ISZERO PUSH2 0x56A9 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP5 POP JUMPDEST DUP4 DUP6 LT ISZERO PUSH2 0x56CB JUMPI DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x1 SWAP5 SWAP1 SWAP5 ADD SWAP4 SWAP2 DUP6 ADD SWAP2 DUP6 ADD PUSH2 0x56AD JUMP JUMPDEST POP DUP1 SWAP7 POP POP POP POP POP POP PUSH2 0x100 DUP8 ADD CALLDATALOAD SWAP1 POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xE0 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x56FB JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x5711 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP1 DUP7 ADD SWAP1 PUSH1 0xC0 DUP3 DUP10 SUB SLT ISZERO PUSH2 0x5724 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x572E PUSH1 0xC0 PUSH2 0x5D02 JUMP JUMPDEST DUP3 CALLDATALOAD DUP2 MSTORE PUSH2 0x573F DUP10 PUSH1 0x20 DUP6 ADD PUSH2 0x4E96 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP4 ADD CALLDATALOAD PUSH2 0x5752 DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x5764 DUP10 PUSH1 0x60 DUP6 ADD PUSH2 0x4C1A JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0x5784 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH2 0x5790 DUP11 DUP3 DUP7 ADD PUSH2 0x4E23 JUMP JUMPDEST PUSH1 0xA0 DUP4 ADD MSTORE POP DUP1 SWAP7 POP POP POP POP PUSH2 0x57A9 DUP7 PUSH1 0x20 DUP8 ADD PUSH2 0x4F5A JUMP JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0xA0 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0xC0 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x57CF JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x581B JUMPI DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x57F6 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x581B JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x5839 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x586D DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x5D47 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x120 DUP3 MLOAD PUSH1 0x2 DUP2 LT PUSH2 0x5892 JUMPI INVALID JUMPDEST DUP1 DUP6 MSTORE POP PUSH1 0x20 DUP4 ADD MLOAD PUSH2 0x58A8 PUSH1 0x20 DUP7 ADD DUP3 PUSH2 0x57D6 JUMP JUMPDEST POP PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0x58BB PUSH1 0x40 DUP7 ADD DUP3 PUSH2 0x57D6 JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH1 0x60 DUP6 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH1 0xA0 DUP6 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH2 0x58EC PUSH1 0xC0 DUP7 ADD DUP3 PUSH2 0x57D6 JUMP JUMPDEST POP PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0x58FF PUSH1 0xE0 DUP7 ADD DUP3 PUSH2 0x57D6 JUMP JUMPDEST POP PUSH2 0x100 DUP1 DUP5 ADD MLOAD DUP3 DUP3 DUP8 ADD MSTORE PUSH2 0x1266 DUP4 DUP8 ADD DUP3 PUSH2 0x5855 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0x5952 DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0x5D47 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT PUSH1 0x60 SWAP4 DUP5 SHL DUP2 AND DUP3 MSTORE SWAP2 SWAP1 SWAP3 SHL AND PUSH1 0x14 DUP3 ADD MSTORE PUSH1 0x28 ADD SWAP1 JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 DUP5 AND DUP2 MSTORE SWAP2 SWAP1 SWAP3 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP2 MSTORE PUSH1 0x40 DUP2 ADD PUSH1 0x3 DUP4 LT PUSH2 0x59F0 JUMPI INVALID JUMPDEST DUP3 PUSH1 0x20 DUP4 ADD MSTORE SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x5A29 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0x57E3 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x5A3B DUP2 DUP7 PUSH2 0x5826 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x1266 DUP2 DUP6 PUSH2 0x5826 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 MSTORE PUSH2 0x5A62 PUSH1 0x80 DUP4 ADD DUP8 PUSH2 0x57E3 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x5A74 DUP2 DUP8 PUSH2 0x5826 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x5A88 DUP2 DUP7 PUSH2 0x5826 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x4A6C DUP2 DUP6 PUSH2 0x5855 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x5AAF PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0x57E3 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x5AC1 DUP2 DUP7 PUSH2 0x5826 JUMP JUMPDEST SWAP2 POP POP DUP3 PUSH1 0x40 DUP4 ADD MSTORE SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1699 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x5826 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST DUP8 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x20 DUP4 ADD MSTORE DUP7 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0xE0 PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x5B62 SWAP1 DUP4 ADD DUP8 PUSH2 0x5826 JUMP JUMPDEST DUP6 PUSH1 0x80 DUP5 ADD MSTORE DUP5 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 DUP2 SUB PUSH1 0xC0 DUP5 ADD MSTORE PUSH2 0x5B80 DUP2 DUP6 PUSH2 0x5855 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xA1A PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x57E3 JUMP JUMPDEST PUSH1 0x0 DUP5 DUP3 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP5 ADD MSTORE PUSH2 0x5BC1 PUSH1 0x60 DUP5 ADD DUP7 PUSH2 0x57E3 JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE DUP3 DUP7 ADD SWAP2 DUP4 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x516F JUMPI DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x5BD7 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 MSTORE PUSH2 0x5C93 PUSH1 0x80 DUP4 ADD DUP8 PUSH2 0x5881 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x5CA5 DUP2 DUP8 PUSH2 0x5826 JUMP JUMPDEST PUSH1 0x40 DUP5 ADD SWAP6 SWAP1 SWAP6 MSTORE POP POP PUSH1 0x60 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x5CCC PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0x5881 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD SWAP5 SWAP1 SWAP5 MSTORE POP PUSH1 0x40 ADD MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x5D20 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x5D3D JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x5D62 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x5D4A JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0xDBE JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x728 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x728 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x728 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CREATE2 RETURNDATACOPY 0x4D DUP6 0xAA DUP3 MSTORE 0xD2 0xDA PUSH14 0xCF83A0E84884E356E79A1BF3D037 SWAP14 GT 0x48 PUSH14 0x3335E56064736F6C634300070100 CALLER PUSH1 0xC0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0xB47 CODESIZE SUB DUP1 PUSH2 0xB47 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x4D JUMP JUMPDEST ADDRESS PUSH1 0x80 MSTORE PUSH1 0x1 PUSH1 0x0 SSTORE PUSH1 0x60 SHL PUSH1 0x1 PUSH1 0x1 PUSH1 0x60 SHL SUB NOT AND PUSH1 0xA0 MSTORE PUSH2 0x7B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x74 JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH1 0xA0 MLOAD PUSH1 0x60 SHR PUSH2 0xAA1 PUSH2 0xA6 PUSH1 0x0 CODECOPY DUP1 PUSH2 0x403 MSTORE DUP1 PUSH2 0x4F4 MSTORE POP DUP1 PUSH2 0x297 MSTORE POP PUSH2 0xAA1 PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x93 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x851C1BB3 GT PUSH2 0x66 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0xF1 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x104 JUMPI DUP1 PUSH4 0xD877845C EQ PUSH2 0x119 JUMPI DUP1 PUSH4 0xE42ABF35 EQ PUSH2 0x121 JUMPI DUP1 PUSH4 0xFBFA77CF EQ PUSH2 0x141 JUMPI PUSH2 0x93 JUMP JUMPDEST DUP1 PUSH4 0x38E9922E EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x55C67628 EQ PUSH2 0xAD JUMPI DUP1 PUSH4 0x6B6B9F69 EQ PUSH2 0xCB JUMPI DUP1 PUSH4 0x6DAEFAB6 EQ PUSH2 0xDE JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAB PUSH2 0xA6 CALLDATASIZE PUSH1 0x4 PUSH2 0x915 JUMP JUMPDEST PUSH2 0x149 JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB5 PUSH2 0x1A8 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xAB PUSH2 0xD9 CALLDATASIZE PUSH1 0x4 PUSH2 0x915 JUMP JUMPDEST PUSH2 0x1AE JUMP JUMPDEST PUSH2 0xAB PUSH2 0xEC CALLDATASIZE PUSH1 0x4 PUSH2 0x762 JUMP JUMPDEST PUSH2 0x201 JUMP JUMPDEST PUSH2 0xB5 PUSH2 0xFF CALLDATASIZE PUSH1 0x4 PUSH2 0x8B5 JUMP JUMPDEST PUSH2 0x293 JUMP JUMPDEST PUSH2 0x10C PUSH2 0x2E5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0x996 JUMP JUMPDEST PUSH2 0xB5 PUSH2 0x2F4 JUMP JUMPDEST PUSH2 0x134 PUSH2 0x12F CALLDATASIZE PUSH1 0x4 PUSH2 0x7E3 JUMP JUMPDEST PUSH2 0x2FA JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC2 SWAP2 SWAP1 PUSH2 0x9C3 JUMP JUMPDEST PUSH2 0x10C PUSH2 0x401 JUMP JUMPDEST PUSH2 0x151 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x168 PUSH8 0x6F05B59D3B20000 DUP3 GT ISZERO PUSH2 0x258 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x1 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0xA9BA3FFE0B6C366B81232CAAB38605A0699AD5398D6CCE76F91EE809E322DAFC SWAP1 PUSH2 0x19D SWAP1 DUP4 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x1 SLOAD SWAP1 JUMP JUMPDEST PUSH2 0x1B6 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x1CC PUSH7 0x2386F26FC10000 DUP3 GT ISZERO PUSH2 0x259 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x2 DUP2 SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x5A0B7386237E7F07FA741EFC64E59C9387D2CCCAFEC760EFED4D53387F20E19A SWAP1 PUSH2 0x19D SWAP1 DUP4 SWAP1 PUSH2 0xA07 JUMP JUMPDEST PUSH2 0x209 PUSH2 0x468 JUMP JUMPDEST PUSH2 0x211 PUSH2 0x425 JUMP JUMPDEST PUSH2 0x21B DUP5 DUP4 PUSH2 0x481 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x283 JUMPI PUSH1 0x0 DUP7 DUP7 DUP4 DUP2 DUP2 LT PUSH2 0x234 JUMPI INVALID JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x249 SWAP2 SWAP1 PUSH2 0x8F9 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP6 DUP6 DUP5 DUP2 DUP2 LT PUSH2 0x259 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL SWAP2 SWAP1 SWAP2 ADD CALLDATALOAD SWAP2 POP PUSH2 0x279 SWAP1 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP6 DUP4 PUSH2 0x48E JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x21E JUMP JUMPDEST POP PUSH2 0x28C PUSH2 0x4E9 JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x2C8 SWAP3 SWAP2 SWAP1 PUSH2 0x945 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2EF PUSH2 0x4F0 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP1 ISZERO PUSH2 0x314 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x33E JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x3FB JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x359 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x38C SWAP2 SWAP1 PUSH2 0x996 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3B8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x3DC SWAP2 SWAP1 PUSH2 0x92D JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3E8 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x344 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x43C PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x293 JUMP JUMPDEST SWAP1 POP PUSH2 0x453 PUSH2 0x44B DUP3 CALLER PUSH2 0x583 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x456 JUMP JUMPDEST POP JUMP JUMPDEST DUP2 PUSH2 0x464 JUMPI PUSH2 0x464 DUP2 PUSH2 0x615 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH2 0x47A PUSH1 0x2 PUSH1 0x0 SLOAD EQ ISZERO PUSH2 0x190 PUSH2 0x456 JUMP JUMPDEST PUSH1 0x2 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH2 0x464 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x456 JUMP JUMPDEST PUSH2 0x4E4 DUP4 PUSH4 0xA9059CBB PUSH1 0xE0 SHL DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x4AD SWAP3 SWAP2 SWAP1 PUSH2 0x9AA JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE PUSH2 0x668 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xAAABADC5 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x54B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x55F JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2EF SWAP2 SWAP1 PUSH2 0x8DD JUMP JUMPDEST PUSH1 0x0 PUSH2 0x58D PUSH2 0x4F0 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x9BE2A884 DUP5 DUP5 ADDRESS PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x5BC SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0xA10 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x5D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x5E8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x60C SWAP2 SWAP1 PUSH2 0x88E JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x684 SWAP2 SWAP1 PUSH2 0x95D JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x6C1 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x6C6 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH1 0x0 DUP3 EQ ISZERO PUSH2 0x6DE JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH2 0x708 DUP2 MLOAD PUSH1 0x0 EQ DUP1 PUSH2 0x700 JUMPI POP DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x700 SWAP2 SWAP1 PUSH2 0x88E JUMP JUMPDEST PUSH2 0x1A2 PUSH2 0x456 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 PUSH1 0x1F DUP5 ADD SLT PUSH2 0x71F JUMPI DUP2 DUP3 REVERT JUMPDEST POP DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x736 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP2 POP DUP4 PUSH1 0x20 DUP1 DUP4 MUL DUP6 ADD ADD GT ISZERO PUSH2 0x750 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x60F DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP7 DUP9 SUB SLT ISZERO PUSH2 0x779 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP6 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x790 JUMPI DUP3 DUP4 REVERT JUMPDEST PUSH2 0x79C DUP10 DUP4 DUP11 ADD PUSH2 0x70E JUMP JUMPDEST SWAP1 SWAP8 POP SWAP6 POP PUSH1 0x20 DUP9 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x7B4 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x7C1 DUP9 DUP3 DUP10 ADD PUSH2 0x70E JUMP JUMPDEST SWAP1 SWAP5 POP SWAP3 POP POP PUSH1 0x40 DUP7 ADD CALLDATALOAD PUSH2 0x7D5 DUP2 PUSH2 0xA56 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 SWAP6 POP SWAP3 SWAP6 SWAP1 SWAP4 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x7F5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0x80C JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 DUP6 ADD SWAP2 POP DUP6 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x81F JUMPI DUP4 DUP5 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x82D JUMPI DUP5 DUP6 REVERT JUMPDEST DUP4 DUP2 MUL SWAP2 POP PUSH2 0x83D DUP5 DUP4 ADD PUSH2 0xA2F JUMP JUMPDEST DUP2 DUP2 MSTORE DUP5 DUP2 ADD SWAP1 DUP5 DUP7 ADD DUP5 DUP7 ADD DUP8 ADD DUP11 LT ISZERO PUSH2 0x857 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP4 DUP7 LT ISZERO PUSH2 0x881 JUMPI PUSH2 0x86D DUP11 DUP3 PUSH2 0x757 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP2 DUP7 ADD SWAP2 DUP7 ADD PUSH2 0x85B JUMP JUMPDEST POP SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x89F JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x8AE JUMPI DUP2 DUP3 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x8C6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x8AE JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x8EE JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x8AE DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x90A JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x8AE DUP2 PUSH2 0xA56 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x926 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x93E JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD DUP2 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x97D JUMPI PUSH1 0x20 DUP2 DUP7 ADD DUP2 ADD MLOAD DUP6 DUP4 ADD MSTORE ADD PUSH2 0x963 JUMP JUMPDEST DUP2 DUP2 GT ISZERO PUSH2 0x98B JUMPI DUP3 DUP3 DUP6 ADD MSTORE JUMPDEST POP SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x9FB JUMPI DUP4 MLOAD DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x9DF JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0xA4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x453 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x5C 0xD8 ORIGIN 0x4B 0xED CREATE CALL PUSH3 0xCAE9E7 MSTORE 0xD3 PUSH23 0x3F56B4BC85FF58EAB3A6DC5D842EF61CD1A064736F6C63 NUMBER STOP SMOD ADD STOP CALLER ",
              "sourceMap": "3244:648:52:-:0;;;3306:322;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3470:10;3521:19;3542:20;1653:114:7;;;;;;;;;;;;;-1:-1:-1;;;1653:114:7;;;1692:4;2020:280:15;;;;;;;;;;;;;-1:-1:-1;;;2020:280:15;;;3654:4:53;-1:-1:-1;;;;;3638:22:53;3630:31;;3495:4:52;1350::1;-1:-1:-1;;;;;1342:12:1;;;-1:-1:-1;;;;;1342:12:1;;;;;;;1308:53;1443:4:44;1410:39;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1385:64:44;;-1:-1:-1;;;;;;1385:64:44;;;2018:1:22;2123:7;:22;1929:46:2;;2100:22:15;;;;;;;2085:37;;2150:25;;;;;2132:43;;-1:-1:-1;2198:95:15;2185:108;;2441:93:8;2103:7;2450:49;;;6544:3:3;2441:8:8;:93::i;:::-;2544:96;2171:7;2553:51;;;6608:3:3;2544:8:8;:96::i;:::-;2680:15;:37;;;2728:40;;;;2801:41;2778:64;;3726:11:53::2;:24:::0;;-1:-1:-1;;;;;3726:24:53;;::::2;;;-1:-1:-1::0;;;;;;3726:24:53;;::::2;::::0;;;::::2;::::0;;-1:-1:-1;3244:648:52;;-1:-1:-1;;;3244:648:52;866:101:3;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;1074:3172::-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2999:73;2210:2;2243:18;;;2288;;;2215:4;2284:29;;;3040:1;3036:14;2195:18;;;;3025:26;;;;2336:18;;;;2383;;;2379:29;;;3057:2;3053:17;3021:50;;;;2999:73;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;3244:648:52;;;;;;;;:::o;500:744:-1:-;;;;;702:3;690:9;681:7;677:23;673:33;670:2;;;-1:-1;;709:12;670:2;110:6;104:13;122:54;170:5;122:54;:::i;:::-;893:2;958:22;;281:13;761:95;;-1:-1;299:48;281:13;299:48;:::i;:::-;1027:2;1077:22;;437:13;1146:2;1196:22;;;437:13;664:580;;901:89;;-1:-1;664:580;-1:-1;;;664:580::o;1416:254::-;-1:-1;;;;;2069:54;;;;1338:66;;1559:2;1544:18;;1530:140::o;2505:159::-;-1:-1;;;;;2069:54;;2585:56;;2575:2;;2655:1;;2645:12;2575:2;2569:95;:::o;:::-;3244:648:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {
                "143": [
                  {
                    "length": 32,
                    "start": 1288
                  }
                ],
                "275": [
                  {
                    "length": 32,
                    "start": 4285
                  }
                ],
                "1305": [
                  {
                    "length": 32,
                    "start": 6627
                  }
                ],
                "1307": [
                  {
                    "length": 32,
                    "start": 6663
                  }
                ],
                "3802": [
                  {
                    "length": 32,
                    "start": 10166
                  }
                ],
                "3804": [
                  {
                    "length": 32,
                    "start": 10199
                  }
                ],
                "3806": [
                  {
                    "length": 32,
                    "start": 10133
                  }
                ],
                "14291": [
                  {
                    "length": 32,
                    "start": 4977
                  }
                ]
              },
              "linkReferences": {},
              "object": "6080604052600436106101855760003560e01c8063945bcec9116100d1578063e6c460921161008a578063f84d066e11610064578063f84d066e1461046a578063f94d46681461048a578063fa6e671d146104b9578063fec90d72146104d9576101b3565b8063e6c4609214610407578063ed24911d14610427578063f6c009271461043c576101b3565b8063945bcec914610365578063aaabadc514610378578063ad5c46481461039a578063b05f8e48146103af578063b95cac28146103df578063d2946c2b146103f2576101b3565b806352bbbe291161013e5780637d3aeb96116101185780637d3aeb96146102e5578063851c1bb3146103055780638bdb39131461032557806390193b7c14610345576101b3565b806352bbbe29146102925780635c38449e146102a557806366a9c7d2146102c5576101b3565b806309b2760f146101b85780630e8e3e84146101ee5780630e9e98cf146102015780630f5a6efa1461022157806316c38b3c1461024e5780631c0de0511461026e576101b3565b366101b3576101b1610195610506565b6001600160a01b0316336001600160a01b03161461020661052b565b005b600080fd5b3480156101c457600080fd5b506101d86101d336600461553f565b61053d565b6040516101e59190615b08565b60405180910390f35b6101b16101fc36600461517d565b6105ec565b34801561020d57600080fd5b506101b161021c366004614fb8565b61072b565b34801561022d57600080fd5b5061024161023c366004615056565b6107a2565b6040516101e59190615ad2565b34801561025a57600080fd5b506101b16102693660046152b9565b610837565b34801561027a57600080fd5b50610283610858565b6040516101e593929190615af0565b6101d86102a03660046156e6565b610881565b3480156102b157600080fd5b506101b16102c03660046154b5565b610a22565b3480156102d157600080fd5b506101b16102e03660046153a0565b610dc4565b3480156102f157600080fd5b506101b1610300366004615372565b610f64565b34801561031157600080fd5b506101d861032036600461548d565b6110b9565b34801561033157600080fd5b506101b1610340366004615309565b61110b565b34801561035157600080fd5b506101d8610360366004614fb8565b611121565b6102416103733660046155de565b61113c565b34801561038457600080fd5b5061038d611270565b6040516101e5919061599e565b3480156103a657600080fd5b5061038d611284565b3480156103bb57600080fd5b506103cf6103ca366004615469565b611293565b6040516101e59493929190615cde565b6101b16103ed366004615309565b611356565b3480156103fe57600080fd5b5061038d61136f565b34801561041357600080fd5b506101b16104223660046150a3565b611393565b34801561043357600080fd5b506101d86114af565b34801561044857600080fd5b5061045c6104573660046152f1565b6114b9565b6040516101e59291906159d6565b34801561047657600080fd5b5061024161048536600461555b565b6114e3565b34801561049657600080fd5b506104aa6104a53660046152f1565b6115c7565b6040516101e593929190615a9c565b3480156104c557600080fd5b506101b16104d436600461500c565b6115fb565b3480156104e557600080fd5b506104f96104f4366004614fd4565b61168d565b6040516101e59190615ae5565b7f00000000000000000000000000000000000000000000000000000000000000005b90565b8161053957610539816116a2565b5050565b60006105476116f5565b61054f61170e565b600061055e3384600654611723565b6000818152600560205260409020549091506105809060ff16156101f461052b565b60008181526005602052604090819020805460ff19166001908117909155600680549091019055517f43641244aeefd8de6827c26f36450aa6165c9fef65ddfa7262da93ba648464d2906105d5908390615b08565b60405180910390a190506105e7611762565b919050565b6105f46116f5565b6000806000805b84518110156107135760008060008060006106298a878151811061061b57fe5b602002602001015189611769565b9c50939850919650945092509050600185600381111561064557fe5b141561065c57610657848383866117e1565b610702565b8661066e5761066961170e565b600196505b600085600381111561067c57fe5b14156106ad5761068e84838386611804565b61069784611824565b15610657576106a68984611831565b9850610702565b6106c26106b985611824565b1561020761052b565b60006106cd85610528565b905060028660038111156106dd57fe5b14156106f4576106ef81848487611843565b610700565b6107008184848761185c565b505b5050600190930192506105fb915050565b5061071d836118ca565b505050610728611762565b50565b6107336116f5565b61073b6118ed565b6003546040516001600160a01b0380841692610100900416907f662d2b49e91208da36bd4107560100ec490758ac0639152fae6a64fca5ef9aee90600090a360038054610100600160a81b0319166101006001600160a01b03841602179055610728611762565b606081516001600160401b03811180156107bb57600080fd5b506040519080825280602002602001820160405280156107e5578160200160208202803683370190505b50905060005b8251811015610830576108118484838151811061080457fe5b602002602001015161191b565b82828151811061081d57fe5b60209081029190910101526001016107eb565b5092915050565b61083f6116f5565b6108476118ed565b61085081611946565b610728611762565b60008060006108656119c4565b1592506108706119e1565b915061087a611a05565b9050909192565b600061088b6116f5565b61089361170e565b835161089e81611a29565b6108ad834211156101fc61052b565b6108c060008760800151116101fe61052b565b60006108cf8760400151611a5b565b905060006108e08860600151611a5b565b9050610903816001600160a01b0316836001600160a01b031614156101fd61052b565b61090b614b45565b8851608082015260208901518190600181111561092457fe5b9081600181111561093157fe5b9052506001600160a01b03808416602083015282811660408084019190915260808b0151606084015260a08b01516101008401528951821660c08401528901511660e082015260008061098383611a80565b919850925090506109ba60008c60200151600181111561099f57fe5b146109ad57898311156109b2565b898210155b6101fb61052b565b6109d28b60400151838c600001518d60200151611b74565b6109ea8b60600151828c604001518d60600151611c52565b610a0c6109fa8c60400151611824565b610a05576000610a07565b825b6118ca565b505050505050610a1a611762565b949350505050565b610a2a6116f5565b610a3261170e565b610a3e83518351611d2c565b606083516001600160401b0381118015610a5757600080fd5b50604051908082528060200260200182016040528015610a81578160200160208202803683370190505b509050606084516001600160401b0381118015610a9d57600080fd5b50604051908082528060200260200182016040528015610ac7578160200160208202803683370190505b5090506000805b8651811015610c40576000878281518110610ae557fe5b602002602001015190506000878381518110610afd57fe5b60200260200101519050610b48846001600160a01b0316836001600160a01b03161160006001600160a01b0316846001600160a01b031614610b40576066610b43565b60685b61052b565b819350816001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401610b77919061599e565b60206040518083038186803b158015610b8f57600080fd5b505afa158015610ba3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc791906157be565b858481518110610bd357fe5b602002602001018181525050610be881611d39565b868481518110610bf457fe5b602002602001018181525050610c2281868581518110610c1057fe5b6020026020010151101561021061052b565b610c366001600160a01b0383168b83611dc0565b5050600101610ace565b5060405163f04f270760e01b81526001600160a01b0388169063f04f270790610c73908990899088908a90600401615a4f565b600060405180830381600087803b158015610c8d57600080fd5b505af1158015610ca1573d6000803e3d6000fd5b5050505060005b8651811015610db2576000878281518110610cbf57fe5b602002602001015190506000848381518110610cd757fe5b602002602001015190506000826001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401610d0f919061599e565b60206040518083038186803b158015610d2757600080fd5b505afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5f91906157be565b9050610d708282101561020361052b565b60008282039050610d99888681518110610d8657fe5b602002602001015182101561025a61052b565b610da38482611e16565b50505050806001019050610ca8565b50505050610dbe611762565b50505050565b610dcc6116f5565b610dd461170e565b82610dde81611e38565b610dea83518351611d2c565b60005b8351811015610e88576000848281518110610e0457fe5b60200260200101519050610e3060006001600160a01b0316826001600160a01b0316141561013561052b565b838281518110610e3c57fe5b6020908102919091018101516000888152600a835260408082206001600160a01b0395861683529093529190912080546001600160a01b03191692909116919091179055600101610ded565b506000610e9485611e69565b90506002816002811115610ea457fe5b1415610ef257610eba845160021461020c61052b565b610eed8585600081518110610ecb57fe5b602002602001015186600181518110610ee057fe5b6020026020010151611e83565b610f1a565b6001816002811115610f0057fe5b1415610f1057610eed8585611f2f565b610f1a8585611f87565b7ff5847d3f2197b16cdcd2098ec95d0905cd1abdaf415f07bb7cef2bba8ac5dec4858585604051610f4d93929190615ba7565b60405180910390a15050610f5f611762565b505050565b610f6c6116f5565b610f7461170e565b81610f7e81611e38565b6000610f8984611e69565b90506002816002811115610f9957fe5b1415610fe757610faf835160021461020c61052b565b610fe28484600081518110610fc057fe5b602002602001015185600181518110610fd557fe5b6020026020010151611fdc565b61100f565b6001816002811115610ff557fe5b141561100557610fe2848461204a565b61100f8484612104565b60005b835181101561107557600a6000868152602001908152602001600020600085838151811061103c57fe5b6020908102919091018101516001600160a01b0316825281019190915260400160002080546001600160a01b0319169055600101611012565b507f7dcdc6d02ef40c7c1a7046a011b058bd7f988fa14e20a66344f9d4e60657d61084846040516110a7929190615b8e565b60405180910390a15050610539611762565b60007f0000000000000000000000000000000000000000000000000000000000000000826040516020016110ee929190615918565b604051602081830303815290604052805190602001209050919050565b610dbe600185858561111c86612167565b612173565b6001600160a01b031660009081526002602052604090205490565b60606111466116f5565b61114e61170e565b835161115981611a29565b611168834211156101fc61052b565b61117486518551611d2c565b6111808787878b6122f9565b91506000805b875181101561125257600088828151811061119d57fe5b6020026020010151905060008583815181106111b557fe5b602002602001015190506111e18884815181106111ce57fe5b60200260200101518213156101fb61052b565b600081131561122157885160208a015182916112009185918491611b74565b61120983611824565b1561121b576112188582611831565b94505b50611248565b600081121561124857600081600003905061124683828c604001518d60600151611c52565b505b5050600101611186565b5061125c816118ca565b5050611266611762565b9695505050505050565b60035461010090046001600160a01b031690565b600061128e610506565b905090565b600080600080856112a381612587565b6000806112af89611e69565b905060028160028111156112bf57fe5b14156112d6576112cf89896125a5565b9150611301565b60018160028111156112e457fe5b14156112f4576112cf898961261f565b6112fe898961268d565b91505b61130a826126a5565b9650611315826126b1565b9550611320826126c0565b6000998a52600a60209081526040808c206001600160a01b039b8c168d5290915290992054969995989796909616955050505050565b61135e61170e565b610dbe600085858561111c86612167565b7f000000000000000000000000000000000000000000000000000000000000000090565b61139b6116f5565b6113a361170e565b6113ab614b95565b60005b82518110156114a5578281815181106113c357fe5b602002602001015191506000826020015190506113df81612587565b60408301516113f96113f183836126c6565b61020961052b565b6000828152600a602090815260408083206001600160a01b03858116855292529091205461142c911633146101f661052b565b8351606085015160008061144284878786612722565b91509150846001600160a01b0316336001600160a01b0316877f6edcaf6241105b4c94c2efdbf3a6b12458eb3d07be3a0e81d24b13c44045fe7a858560405161148c929190615c72565b60405180910390a45050505050508060010190506113ae565b5050610728611762565b600061128e612791565b600080826114c681612587565b6114cf8461282e565b6114d885611e69565b925092505b50915091565b606033301461159d576000306001600160a01b0316600036604051611509929190615930565b6000604051808303816000865af19150503d8060008114611546576040519150601f19603f3d011682016040523d82523d6000602084013e61154b565b606091505b50509050806000811461155a57fe5b60046000803e6000516001600160e01b031916637d30e60960e11b8114611585573d6000803e3d6000fd5b50602060005260043d0380600460203e602081016000f35b60606115ab858585896122f9565b9050602081510263fa61cc126020830352600482036024820181fd5b6060806000836115d681612587565b60606115e186612834565b90955090506115ef81612896565b95979096509350505050565b6116036116f5565b61160b61170e565b8261161581611a29565b6001600160a01b0384811660008181526004602090815260408083209488168084529490915290819020805460ff1916861515179055519091907f46961fdb4502b646d5095fba7600486a8ac05041d55cdf0f16ed677180b5cad89061167c908690615ae5565b60405180910390a350610f5f611762565b60006116998383612944565b90505b92915050565b62461bcd60e51b6000908152602060045260076024526642414c23000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6117076002600054141561019061052b565b6002600055565b6117216117196119c4565b61019261052b565b565b600069ffffffffffffffffffff8216605084600281111561174057fe5b901b17606085901b6bffffffffffffffffffffffff19161790505b9392505050565b6001600055565b600080600080600080600088606001519050336001600160a01b0316816001600160a01b0316146117bb57876117a6576117a16118ed565b600197505b6117bb6117b38233612944565b6101f761052b565b885160208a015160408b01516080909b0151919b909a9992985090965090945092505050565b6117f6836117ee86611a5b565b836000612972565b50610dbe8482846000611c52565b6118178261181186611a5b565b836129c8565b610dbe8482856000611b74565b6001600160a01b03161590565b6000828201611699848210158361052b565b6118508385836000612972565b50610dbe8285836129c8565b8015610dbe576118776001600160a01b0385168484846129f8565b826001600160a01b0316846001600160a01b03167f540a1a3f28340caec336c81d8d7b3df139ee5cdc1839a4f283d7ebb7eaae2d5c84846040516118bc9291906159fd565b60405180910390a350505050565b6118d98134101561020461052b565b348190038015610539576105393382612a19565b60006119046000356001600160e01b0319166110b9565b90506107286119138233612a93565b61019161052b565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b8015611966576119616119576119e1565b421061019361052b565b61197b565b61197b611971611a05565b42106101a961052b565b6003805460ff19168215151790556040517f9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64906119b9908390615ae5565b60405180910390a150565b60006119ce611a05565b42118061128e57505060035460ff161590565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b336001600160a01b0382161461072857611a416118ed565b611a4b8133612944565b61072857610728816101f7612b1d565b6000611a6682611824565b611a7857611a7382610528565b61169c565b61169c610506565b600080600080611a93856080015161282e565b90506000611aa48660800151611e69565b90506002816002811115611ab457fe5b1415611acb57611ac48683612b51565b9450611af6565b6001816002811115611ad957fe5b1415611ae957611ac48683612c01565b611af38683612c94565b94505b611b098660000151876060015187612eb8565b809450819550505085604001516001600160a01b031686602001516001600160a01b031687608001517f2170c741c41531aec20e7c107c24eecfdd15e69c9bb0a8dd37b1840b9e0b207b8787604051611b63929190615c72565b60405180910390a450509193909250565b82611b7e57610dbe565b611b8784611824565b15611c0857611b99811561020261052b565b611ba88347101561020461052b565b611bb0610506565b6001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b158015611bea57600080fd5b505af1158015611bfe573d6000803e3d6000fd5b5050505050610dbe565b6000611c1385610528565b90508115611c30576000611c2a8483876001612972565b90940393505b8315611c4b57611c4b6001600160a01b0382168430876129f8565b5050505050565b82611c5c57610dbe565b611c6584611824565b15611cf557611c77811561020261052b565b611c7f610506565b6001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b8152600401611caa9190615b08565b600060405180830381600087803b158015611cc457600080fd5b505af1158015611cd8573d6000803e3d6000fd5b50611cf0925050506001600160a01b03831684612a19565b610dbe565b6000611d0085610528565b90508115611d1857611d138382866129c8565b611c4b565b611c4b6001600160a01b0382168486611dc0565b610539818314606761052b565b600080611d4461136f565b6001600160a01b031663d877845c6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7c57600080fd5b505afa158015611d90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db491906157be565b905061175b8382612ee6565b610f5f8363a9059cbb60e01b8484604051602401611ddf9291906159fd565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f33565b801561053957610539611e2761136f565b6001600160a01b0384169083611dc0565b611e4181612587565b610728611e4d8261282e565b6001600160a01b0316336001600160a01b0316146101f561052b565b600061ffff605083901c1661169c600382106101f461052b565b611ea4816001600160a01b0316836001600160a01b0316141561020a61052b565b611ec3816001600160a01b0316836001600160a01b031610606661052b565b60008381526009602052604090208054611f00906001600160a01b0316158015611ef8575060018201546001600160a01b0316155b61020b61052b565b80546001600160a01b039384166001600160a01b03199182161782556001909101805492909316911617905550565b6000828152600860205260408120905b8251811015610dbe576000611f70848381518110611f5957fe5b602002602001015184612fd390919063ffffffff16565b9050611f7e8161020a61052b565b50600101611f3f565b6000828152600160205260408120905b8251811015610dbe576000611fc5848381518110611fb157fe5b602090810291909101015184906000613036565b9050611fd38161020a61052b565b50600101611f97565b6000806000611fec8686866130e3565b925092509250612016611ffe846131aa565b801561200e575061200e836131aa565b61020d61052b565b600095865260096020526040862080546001600160a01b031990811682556001909101805490911690559490945550505050565b6000828152600860205260408120905b8251811015610dbe57600083828151811061207157fe5b602002602001015190506120bd61200e600760008881526020019081526020016000206000846001600160a01b03166001600160a01b03168152602001908152602001600020546131aa565b60008581526007602090815260408083206001600160a01b038516845290915281208190556120ec84836131b7565b90506120fa8161020961052b565b505060010161205a565b6000828152600160205260408120905b8251811015610dbe57600083828151811061212b57fe5b60200260200101519050600061214184836132be565b905061214f61200e826131aa565b61215984836132cd565b505050806001019050612114565b61216f614bbe565b5090565b61217b6116f5565b8361218581612587565b8361218f81611a29565b6121a3836000015151846020015151611d2c565b60606121b2846000015161336f565b905060606121c088836133fd565b905060608060606121d58c8c8c8c8c8961348e565b92509250925060006121e68c611e69565b905060028160028111156121f657fe5b141561225e576122598c8760008151811061220d57fe5b60200260200101518660008151811061222257fe5b60200260200101518960018151811061223757fe5b60200260200101518860018151811061224c57fe5b6020026020010151613653565b612287565b600181600281111561226c57fe5b141561227d576122598c8786613692565b6122878c856136ff565b6000808e600181111561229657fe5b1490508b6001600160a01b03168d7fe5ce249087ce04f05a957192435400fd97868dba0e6a4b4c049abf8af80dae78896122d08886613748565b876040516122e093929190615a16565b60405180910390a3505050505050505050611c4b611762565b606083516001600160401b038111801561231257600080fd5b5060405190808252806020026020018201604052801561233c578160200160208202803683370190505b509050612347614be8565b61234f614b45565b60008060005b895181101561257a5789818151811061236a57fe5b6020026020010151945060008951866020015110801561238e575089518660400151105b905061239b81606461052b565b60006123bd8b8860200151815181106123b057fe5b6020026020010151611a5b565b905060006123d48c8960400151815181106123b057fe5b90506123f7816001600160a01b0316836001600160a01b031614156101fd61052b565b60608801516124475761240f600085116101fe61052b565b600061241c8b84846137ef565b6001600160a01b0316876001600160a01b031614905061243e816101ff61052b565b50606088018590525b87516080880152868a600181111561245b57fe5b9081600181111561246857fe5b9052506001600160a01b0380831660208901528181166040808a01919091526060808b0151908a015260808a01516101008a01528c51821660c08a01528c01511660e08801526000806124ba89611a80565b919850925090506124cc8c8585613811565b97506125006124da8361382b565b8c8c60200151815181106124ea57fe5b602002602001015161383f90919063ffffffff16565b8b8b602001518151811061251057fe5b60200260200101818152505061254e6125288261382b565b8c8c604001518151811061253857fe5b602002602001015161387390919063ffffffff16565b8b8b604001518151811061255e57fe5b6020026020010181815250505050505050806001019050612355565b5050505050949350505050565b6000818152600560205260409020546107289060ff166101f461052b565b60008060008060006125b6876138a7565b945094509450945050836001600160a01b0316866001600160a01b031614156125e5578294505050505061169c565b816001600160a01b0316866001600160a01b0316141561260a57935061169c92505050565b6126156102096116a2565b5050505092915050565b60008281526007602090815260408083206001600160a01b03851684529091528120548161264c8261391d565b8061266a5750600085815260086020526040902061266a908561392f565b9050806126855761267a85612587565b6126856102096116a2565b509392505050565b6000828152600160205260408120610a1a81846132be565b6001600160701b031690565b60701c6001600160701b031690565b60e01c90565b6000806126d284611e69565b905060028160028111156126e257fe5b14156126fa576126f28484613950565b91505061169c565b600181600281111561270857fe5b1415612718576126f284846139a1565b6126f284846139b9565b600080600061273086611e69565b9050600087600281111561274057fe5b141561275c57612752868287876139d1565b9250925050612788565b600187600281111561276a57fe5b141561277c5761275286828787613a4c565b61275286828787613ac8565b94509492505050565b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006127fe613b2b565b30604051602001612813959493929190615c28565b60405160208183030381529060405280519060200120905090565b60601c90565b606080600061284284611e69565b9050600281600281111561285257fe5b141561286b5761286184613b2f565b9250925050612891565b600181600281111561287957fe5b14156128885761286184613c64565b61286184613d89565b915091565b6060600082516001600160401b03811180156128b157600080fd5b506040519080825280602002602001820160405280156128db578160200160208202803683370190505b5091506000905060005b82518110156114dd5760008482815181106128fc57fe5b6020026020010151905061290f81613e83565b84838151811061291b57fe5b60200260200101818152505061293983612934836126c0565b613e9e565b9250506001016128e5565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b60008061297f868661191b565b905061299883806129905750848210155b61020161052b565b6129a28185613eb5565b91508181036129be8787836129b68761382b565b600003613ec4565b5050949350505050565b60006129d4848461191b565b905060006129e28284611831565b9050611c4b8585836129f38761382b565b613ec4565b610dbe846323b872dd60e01b858585604051602401611ddf939291906159b2565b612a28814710156101a361052b565b6000826001600160a01b031682604051612a4190610528565b60006040518083038185875af1925050503d8060008114612a7e576040519150601f19603f3d011682016040523d82523d6000602084013e612a83565b606091505b50509050610f5f816101a461052b565b6003546040516326f8aa2160e21b815260009161010090046001600160a01b031690639be2a88490612acd90869086903090600401615b11565b60206040518083038186803b158015612ae557600080fd5b505afa158015612af9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169991906152d5565b6001600160a01b0382166000908152600260205260409020805460018101909155610f5f612b4b8483613f1f565b8361052b565b600080600080612b6e8660800151876020015188604001516130e3565b92509250925060008087604001516001600160a01b031688602001516001600160a01b03161015612ba3575083905082612ba9565b50829050835b612bb588888484614045565b60408b015160208c01519199509294509092506001600160a01b03918216911610612be957612be48183614142565b612bf3565b612bf38282614142565b909255509295945050505050565b600080612c168460800151856020015161261f565b90506000612c2c8560800151866040015161261f565b9050612c3a85858484614045565b6080880180516000908152600760208181526040808420828e01516001600160a01b03908116865290835281852098909855935183529081528282209a830151909516815298909352919096209590955550929392505050565b60808201516000908152600160209081526040822090840151829182918290612cbe90839061417d565b90506000612cd988604001518461417d90919063ffffffff16565b9050811580612ce6575080155b15612d0357612cf88860800151612587565b612d036102096116a2565b60001991820191016000612d168461419c565b90506060816001600160401b0381118015612d3057600080fd5b50604051908082528060200260200182016040528015612d5a578160200160208202803683370190505b50600060a08c018190529091505b82811015612dda576000612d7c87836141a0565b9050612d8781613e83565b838381518110612d9357fe5b602002602001018181525050612db08c60a00151612934836126c0565b60a08d015281861415612dc557809850612dd1565b84821415612dd1578097505b50600101612d68565b5060405162f64aa560e11b81526001600160a01b038a16906301ec954a90612e0c908d90859089908990600401615c80565b602060405180830381600087803b158015612e2657600080fd5b505af1158015612e3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e5e91906157be565b9750600080612e768c600001518d606001518c612eb8565b9092509050612e8589836141b6565b9850612e9188826141e7565b9750612e9e87878b6141fd565b612ea987868a6141fd565b50505050505050505092915050565b60008080856001811115612ec857fe5b1415612ed8575082905081612ede565b50819050825b935093915050565b6000828202612f0a841580612f03575083858381612f0057fe5b04145b600361052b565b80612f1957600091505061169c565b670de0b6b3a764000060001982010460010191505061169c565b60006060836001600160a01b031683604051612f4f9190615940565b6000604051808303816000865af19150503d8060008114612f8c576040519150601f19603f3d011682016040523d82523d6000602084013e612f91565b606091505b50915091506000821415612fa9573d6000803e3d6000fd5b610dbe815160001480612fcb575081806020019051810190612fcb91906152d5565b6101a261052b565b6000612fdf838361392f565b61302e57508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b0386169081179091558554908252828601909352604090209190915561169c565b50600061169c565b6001600160a01b0382166000908152600284016020526040812054806130c357505082546040805180820182526001600160a01b03858116808352602080840187815260008781526001808c018452878220965187546001600160a01b0319169616959095178655905194840194909455948201808955908352600288019094529190209190915561175b565b60001901600090815260018086016020526040822001839055905061175b565b60008060008060006130f58787614215565b9150915060006131058383614246565b60008a8152600960209081526040808320848452600201909152812080546001820154919750929350906131388361391d565b8061314757506131478261391d565b8061316857506131578c87613950565b801561316857506131688c86613950565b905080613183576131788c612587565b6131836102096116a2565b61318d8383614279565b9850613199838361429e565b975050505050505093509350939050565b6001600160e01b03161590565b6001600160a01b038116600090815260018301602052604081205480156132b457835460001980830191908101906000908790839081106131f457fe5b60009182526020909120015487546001600160a01b039091169150819088908590811061321d57fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905591831681526001898101909252604090209084019055865487908061326657fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260018981019091526040822091909155945061169c9350505050565b600091505061169c565b600061169983836102096142b5565b6001600160a01b038116600090815260028301602052604081205480156132b457835460001990810160008181526001878101602090815260408084209587018452808420865481546001600160a01b03199081166001600160a01b0392831617835588860180549387019390935588548216875260028d018086528488209a909a55885416909755849055938955938716825293909252812055905061169c565b60608082516001600160401b038111801561338957600080fd5b506040519080825280602002602001820160405280156133b3578160200160208202803683370190505b50905060005b8351811015610830576133d18482815181106123b057fe5b8282815181106133dd57fe5b6001600160a01b03909216602092830291909101909101526001016133b9565b606080606061340b85612834565b9150915061341b82518551611d2c565b61342b600083511161020f61052b565b60005b82518110156134855761347d85828151811061344657fe5b60200260200101516001600160a01b031684838151811061346357fe5b60200260200101516001600160a01b03161461020861052b565b60010161342e565b50949350505050565b606080606080600061349f86612896565b9150915060006134ae8b61282e565b905060008c60018111156134be57fe5b1461356157806001600160a01b03166374f3b0098c8c8c87876134df6142f2565b8f604001516040518863ffffffff1660e01b81526004016135069796959493929190615b30565b600060405180830381600087803b15801561352057600080fd5b505af1158015613534573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261355c9190810190615263565b6135fa565b806001600160a01b031663d5c096c48c8c8c878761357d6142f2565b8f604001516040518863ffffffff1660e01b81526004016135a49796959493929190615b30565b600060405180830381600087803b1580156135be57600080fd5b505af11580156135d2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526135fa9190810190615263565b809550819650505061361087518651865161436c565b60008c600181111561361e57fe5b14613635576136308989898888614384565b613642565b6136428a898988886144ca565b955050505096509650969350505050565b600061365f8584614246565b600087815260096020908152604080832084845260020190915290209091506136888584614142565b9055505050505050565b60005b8251811015610dbe578181815181106136aa57fe5b60200260200101516007600086815260200190815260200160002060008584815181106136d357fe5b6020908102919091018101516001600160a01b0316825281019190915260400160002055600101613695565b6000828152600160205260408120905b8251811015610dbe576137408184838151811061372857fe5b6020026020010151846141fd9092919063ffffffff16565b60010161370f565b606082516001600160401b038111801561376157600080fd5b5060405190808252806020026020018201604052801561378b578160200160208202803683370190505b50905060005b835181101561083057826137bb578381815181106137ab57fe5b60200260200101516000036137d0565b8381815181106137c757fe5b60200260200101515b8282815181106137dc57fe5b6020908102919091010152600101613791565b6000808460018111156137fe57fe5b146138095781610a1a565b509092915050565b60008084600181111561382057fe5b146108305782610a1a565b600061216f600160ff1b83106101a561052b565b60008282016116998284128015906138575750848212155b8061386c575060008412801561386c57508482125b600061052b565b600081830361169982841280159061388b5750848213155b806138a057506000841280156138a057508482135b600161052b565b6000818152600960205260408120805460018201546001600160a01b03918216928492909116908290816138db8685614246565b60008181526002840160205260409020805460018201549199509192506139028282614279565b965061390e828261429e565b94505050505091939590929450565b6000613928826131aa565b1592915050565b6001600160a01b031660009081526001919091016020526040902054151590565b600082815260096020526040812080546001600160a01b0384811691161480613988575060018101546001600160a01b038481169116145b8015610a1a575050506001600160a01b03161515919050565b6000828152600860205260408120610a1a818461392f565b6000828152600160205260408120610a1a818461463f565b60008060028560028111156139e257fe5b14156139f8576139f3868585614660565b613a22565b6001856002811115613a0657fe5b1415613a17576139f386858561466e565b613a2286858561467c565b8215613a3c57613a3c6001600160a01b0385163385611dc0565b5050600081900394909350915050565b6000806002856002811115613a5d57fe5b1415613a7357613a6e86858561468a565b613a9d565b6001856002811115613a8157fe5b1415613a9257613a6e868585614698565b613a9d8685856146a6565b8215613ab857613ab86001600160a01b0385163330866129f8565b5090946000869003945092505050565b6000806002856002811115613ad957fe5b1415613af157613aea8685856146b4565b9050613b1e565b6001856002811115613aff57fe5b1415613b1057613aea8685856146c4565b613b1b8685856146d4565b90505b6000915094509492505050565b4690565b606080600080600080613b41876138a7565b92975090955093509150506001600160a01b0384161580613b6957506001600160a01b038216155b15613b925750506040805160008082526020820190815281830190925294509250612891915050565b60408051600280825260608201835290916020830190803683370190505095508386600081518110613bc057fe5b60200260200101906001600160a01b031690816001600160a01b0316815250508186600181518110613bee57fe5b6001600160a01b03929092166020928302919091018201526040805160028082526060820183529092909190830190803683370190505094508285600081518110613c3557fe5b6020026020010181815250508085600181518110613c4f57fe5b60200260200101818152505050505050915091565b60008181526008602052604090206060908190613c808161419c565b6001600160401b0381118015613c9557600080fd5b50604051908082528060200260200182016040528015613cbf578160200160208202803683370190505b50925082516001600160401b0381118015613cd957600080fd5b50604051908082528060200260200182016040528015613d03578160200160208202803683370190505b50915060005b8351811015613d82576000613d1e83836146e4565b905080858381518110613d2d57fe5b6001600160a01b03928316602091820292909201810191909152600088815260078252604080822093851682529290915220548451859084908110613d6e57fe5b602090810291909101015250600101613d09565b5050915091565b60008181526001602052604090206060908190613da58161419c565b6001600160401b0381118015613dba57600080fd5b50604051908082528060200260200182016040528015613de4578160200160208202803683370190505b50925082516001600160401b0381118015613dfe57600080fd5b50604051908082528060200260200182016040528015613e28578160200160208202803683370190505b50915060005b8351811015613d8257613e418282614711565b858381518110613e4d57fe5b60200260200101858481518110613e6057fe5b60209081029190910101919091526001600160a01b039091169052600101613e2e565b6000613e8e826126b1565b613e97836126a5565b0192915050565b600081831015613eae5781611699565b5090919050565b6000818310613eae5781611699565b6001600160a01b038085166000818152600b602090815260408083209488168084529490915290819020859055517f18e1ea4139e68413d7d08aa752e71568e36b2c5bf940893314c2c5b01eaa0c42906118bc908590615b08565b600080613f2a614735565b905042811015613f3e57600091505061169c565b6000613f48614741565b905080613f5a5760009250505061169c565b600081613f65614852565b8051602091820120604051613f81939233918a91899101615bfc565b6040516020818303038152906040528051906020012090506000613fa4826148a1565b90506000806000613fb36148bd565b925092509250600060018585858560405160008152602001604052604051613fde9493929190615c54565b6020604051602081039080840390855afa158015614000573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061403657508a6001600160a01b0316816001600160a01b0316145b9b9a5050505050505050505050565b60008060008061405486613e83565b9050600061406186613e83565b905061407861406f886126c0565b612934886126c0565b60a08a015260405163274b044360e21b81526001600160a01b03891690639d2c110c906140ad908c9086908690600401615cb9565b602060405180830381600087803b1580156140c757600080fd5b505af11580156140db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140ff91906157be565b92506000806141178b600001518c6060015187612eb8565b909250905061412689836141b6565b965061413288826141e7565b9550505050509450945094915050565b60008061415a614151856126c0565b612934856126c0565b9050610a1a614168856126a5565b614171856126a5565b8363ffffffff166148e4565b6001600160a01b03166000908152600291909101602052604090205490565b5490565b6000908152600191820160205260409020015490565b6000806141cc836141c6866126a5565b90611831565b905060006141d9856126b1565b9050436112668383836148f2565b6000806141cc836141f7866126a5565b90614920565b60009182526001928301602052604090912090910155565b600080826001600160a01b0316846001600160a01b03161061423857828461423b565b83835b915091509250929050565b6000828260405160200161425b92919061595c565b60405160208183030381529060405280519060200120905092915050565b6000611699614287846126a5565b614290846126a5565b614299866126c0565b6148f2565b60006116996142ac846126b1565b614290846126b1565b6001600160a01b03821660009081526002840160205260408120546142dc8115158461052b565b6142e985600183036141a0565b95945050505050565b60006142fc61136f565b6001600160a01b03166355c676286040518163ffffffff1660e01b815260040160206040518083038186803b15801561433457600080fd5b505afa158015614348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128e91906157be565b610f5f828414801561437d57508183145b606761052b565b606083516001600160401b038111801561439d57600080fd5b506040519080825280602002602001820160405280156143c7578160200160208202803683370190505b50905060005b8551518110156144c05760008482815181106143e557fe5b602002602001015190506144158760200151838151811061440257fe5b60200260200101518210156101f961052b565b60008760000151838151811061442757fe5b6020026020010151905061444181838b8b60600151611c52565b600085848151811061444f57fe5b6020026020010151905061446b61446583611a5b565b82611e16565b61449a6144788483611831565b89868151811061448457fe5b60200260200101516141e790919063ffffffff16565b8585815181106144a657fe5b6020026020010181815250505050508060010190506143cd565b5095945050505050565b6060600084516001600160401b03811180156144e557600080fd5b5060405190808252806020026020018201604052801561450f578160200160208202803683370190505b50915060005b86515181101561463557600085828151811061452d57fe5b6020026020010151905061455d8860200151838151811061454a57fe5b60200260200101518211156101fa61052b565b60008860000151838151811061456f57fe5b6020026020010151905061458981838c8c60600151611b74565b61459281611824565b156145a4576145a18483611831565b93505b60008684815181106145b257fe5b602002602001015190506145c861446583611a5b565b808310156145e7576145e28382038a868151811061448457fe5b61460f565b61460f8184038a86815181106145f957fe5b60200260200101516141b690919063ffffffff16565b86858151811061461b57fe5b602002602001018181525050505050806001019050614515565b506144c0816118ca565b6001600160a01b031660009081526002919091016020526040902054151590565b610dbe838361493684614971565b610dbe838361493684614a1c565b610dbe838361493684614a77565b610dbe8383614ac684614971565b610dbe8383614ac684614a1c565b610dbe8383614ac684614a77565b6000610a1a8484614ae785614971565b6000610a1a8484614ae785614a1c565b6000610a1a8484614ae785614a77565b60008260000182815481106146f557fe5b6000918252602090912001546001600160a01b03169392505050565b600090815260019182016020526040902080549101546001600160a01b0390911691565b600061128e6000614b01565b6000803560e01c8063b95cac28811461478957638bdb391381146147b1576352bbbe2981146147d95763945bcec981146148015763fa6e671d8114614829576000925061484d565b7f3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58925061484d565b7f8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353925061484d565b7fe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe925061484d565b7f9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a925061484d565b7fa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a92505b505090565b60606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505082519293505050608010156105285760803603815290565b60006148ab612791565b826040516020016110ee929190615983565b60008060006148cc6020614b01565b92506148d86040614b01565b915061087a6060614b01565b60e01b60709190911b010190565b600083830161491585821080159061490d5750600160701b82105b61020e61052b565b6142e98585856148e4565b600061493083831115600161052b565b50900390565b600080614946836141f7866126a5565b90506000614957846141c6876126b1565b90506000614964866126c0565b90506112668383836148f2565b6000806000806000614982896138a7565b9450509350935093506000836001600160a01b0316896001600160a01b031614156149cd5760006149b784898b63ffffffff16565b90506149c38185614b0b565b90935090506149ef565b60006149dd83898b63ffffffff16565b90506149e98184614b0b565b90925090505b6149f98383614142565b8555614a058383614b27565b600190950194909455509192505050949350505050565b600080614a29868661261f565b90506000614a3b82858763ffffffff16565b60008881526007602090815260408083206001600160a01b038b16845290915290208190559050614a6c8183614b0b565b979650505050505050565b600084815260016020526040812081614a9082876132be565b90506000614aa282868863ffffffff16565b9050614aaf838883613036565b50614aba8183614b0b565b98975050505050505050565b600080614ad6836141c6866126a5565b90506000614957846141f7876126b1565b600080614af3846126a5565b9050436142e98285836148f2565b3601607f19013590565b6000614b16826126b1565b614b1f846126b1565b039392505050565b6000611699614b35846126b1565b614b3e846126b1565b60006148e4565b60408051610120810190915280600081526000602082018190526040820181905260608083018290526080830182905260a0830182905260c0830182905260e08301919091526101009091015290565b604080516080810190915280600081526000602082018190526040820181905260609091015290565b60405180608001604052806060815260200160608152602001606081526020016000151581525090565b6040518060a0016040528060008019168152602001600081526020016000815260200160008152602001606081525090565b803561169c81615d73565b600082601f830112614c35578081fd5b8135614c48614c4382615d28565b615d02565b818152915060208083019084810181840286018201871015614c6957600080fd5b60005b84811015614c91578135614c7f81615d73565b84529282019290820190600101614c6c565b505050505092915050565b600082601f830112614cac578081fd5b8135614cba614c4382615d28565b818152915060208083019084810160005b84811015614c91578135870160a080601f19838c03011215614cec57600080fd5b614cf581615d02565b8583013581526040808401358783015260608085013582840152608091508185013581840152508284013592506001600160401b03831115614d3657600080fd5b614d448c8885870101614e23565b90820152865250509282019290820190600101614ccb565b600082601f830112614d6c578081fd5b8135614d7a614c4382615d28565b818152915060208083019084810181840286018201871015614d9b57600080fd5b60005b84811015614c9157813584529282019290820190600101614d9e565b600082601f830112614dca578081fd5b8151614dd8614c4382615d28565b818152915060208083019084810181840286018201871015614df957600080fd5b60005b84811015614c9157815184529282019290820190600101614dfc565b803561169c81615d88565b600082601f830112614e33578081fd5b81356001600160401b03811115614e48578182fd5b614e5b601f8201601f1916602001615d02565b9150808252836020828501011115614e7257600080fd5b8060208401602084013760009082016020015292915050565b803561169c81615d96565b80356002811061169c57600080fd5b80356004811061169c57600080fd5b600060808284031215614ec5578081fd5b614ecf6080615d02565b905081356001600160401b0380821115614ee857600080fd5b614ef485838601614c25565b83526020840135915080821115614f0a57600080fd5b614f1685838601614d5c565b60208401526040840135915080821115614f2f57600080fd5b50614f3c84828501614e23565b604083015250614f4f8360608401614e18565b606082015292915050565b600060808284031215614f6b578081fd5b614f756080615d02565b90508135614f8281615d73565b81526020820135614f9281615d88565b60208201526040820135614fa581615d73565b60408201526060820135614f4f81615d88565b600060208284031215614fc9578081fd5b813561169981615d73565b60008060408385031215614fe6578081fd5b8235614ff181615d73565b9150602083013561500181615d73565b809150509250929050565b600080600060608486031215615020578081fd5b833561502b81615d73565b9250602084013561503b81615d73565b9150604084013561504b81615d88565b809150509250925092565b60008060408385031215615068578182fd5b823561507381615d73565b915060208301356001600160401b0381111561508d578182fd5b61509985828601614c25565b9150509250929050565b600060208083850312156150b5578182fd5b82356001600160401b038111156150ca578283fd5b8301601f810185136150da578283fd5b80356150e8614c4382615d28565b818152838101908385016080808502860187018a1015615106578788fd5b8795505b8486101561516f5780828b031215615120578788fd5b61512981615d02565b6151338b84614e8b565b81528783013588820152604061514b8c828601614c1a565b9082015260608381013590820152845260019590950194928601929081019061510a565b509098975050505050505050565b6000602080838503121561518f578182fd5b82356001600160401b038111156151a4578283fd5b8301601f810185136151b4578283fd5b80356151c2614c4382615d28565b8181528381019083850160a0808502860187018a10156151e0578788fd5b8795505b8486101561516f5780828b0312156151fa578788fd5b61520381615d02565b61520d8b84614ea5565b815261521b8b898501614c1a565b818901526040838101359082015260606152378c828601614c1a565b9082015260806152498c858301614c1a565b9082015284526001959095019492860192908101906151e4565b60008060408385031215615275578182fd5b82516001600160401b038082111561528b578384fd5b61529786838701614dba565b935060208501519150808211156152ac578283fd5b5061509985828601614dba565b6000602082840312156152ca578081fd5b813561169981615d88565b6000602082840312156152e6578081fd5b815161169981615d88565b600060208284031215615302578081fd5b5035919050565b6000806000806080858703121561531e578182fd5b84359350602085013561533081615d73565b9250604085013561534081615d73565b915060608501356001600160401b0381111561535a578182fd5b61536687828801614eb4565b91505092959194509250565b60008060408385031215615384578182fd5b8235915060208301356001600160401b0381111561508d578182fd5b6000806000606084860312156153b4578081fd5b833592506020808501356001600160401b03808211156153d2578384fd5b6153de88838901614c25565b945060408701359150808211156153f3578384fd5b508501601f81018713615404578283fd5b8035615412614c4382615d28565b81815283810190838501858402850186018b101561542e578687fd5b8694505b8385101561545957803561544581615d73565b835260019490940193918501918501615432565b5080955050505050509250925092565b6000806040838503121561547b578182fd5b82359150602083013561500181615d73565b60006020828403121561549e578081fd5b81356001600160e01b031981168114611699578182fd5b600080600080608085870312156154ca578182fd5b84356154d581615d73565b935060208501356001600160401b03808211156154f0578384fd5b6154fc88838901614c25565b94506040870135915080821115615511578384fd5b61551d88838901614d5c565b93506060870135915080821115615532578283fd5b5061536687828801614e23565b600060208284031215615550578081fd5b813561169981615d96565b60008060008060e08587031215615570578182fd5b61557a8686614e96565b935060208501356001600160401b0380821115615595578384fd5b6155a188838901614c9c565b945060408701359150808211156155b6578384fd5b506155c387828801614c25565b9250506155d38660608701614f5a565b905092959194509250565b60008060008060008061012087890312156155f7578384fd5b6156018888614e96565b95506020808801356001600160401b038082111561561d578687fd5b6156298b838c01614c9c565b975060408a013591508082111561563e578687fd5b61564a8b838c01614c25565b96506156598b60608c01614f5a565b955060e08a013591508082111561566e578485fd5b508801601f81018a1361567f578384fd5b803561568d614c4382615d28565b81815283810190838501858402850186018e10156156a9578788fd5b8794505b838510156156cb5780358352600194909401939185019185016156ad565b50809650505050505061010087013590509295509295509295565b60008060008060e085870312156156fb578182fd5b84356001600160401b0380821115615711578384fd5b9086019060c08289031215615724578384fd5b61572e60c0615d02565b8235815261573f8960208501614e96565b6020820152604083013561575281615d73565b60408201526157648960608501614c1a565b60608201526080830135608082015260a083013582811115615784578586fd5b6157908a828601614e23565b60a0830152508096505050506157a98660208701614f5a565b939693955050505060a08201359160c0013590565b6000602082840312156157cf578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b8381101561581b5781516001600160a01b0316875295820195908201906001016157f6565b509495945050505050565b6000815180845260208085019450808401835b8381101561581b57815187529582019590820190600101615839565b6000815180845261586d816020860160208601615d47565b601f01601f19169290920160200192915050565b600061012082516002811061589257fe5b8085525060208301516158a860208601826157d6565b5060408301516158bb60408601826157d6565b50606083015160608501526080830151608085015260a083015160a085015260c08301516158ec60c08601826157d6565b5060e08301516158ff60e08601826157d6565b5061010080840151828287015261126683870182615855565b9182526001600160e01b031916602082015260240190565b6000828483379101908152919050565b60008251615952818460208701615d47565b9190910192915050565b6bffffffffffffffffffffffff19606093841b811682529190921b16601482015260280190565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038316815260408101600383106159f057fe5b8260208301529392505050565b6001600160a01b03929092168252602082015260400190565b600060608252615a2960608301866157e3565b8281036020840152615a3b8186615826565b905082810360408401526112668185615826565b600060808252615a6260808301876157e3565b8281036020840152615a748187615826565b90508281036040840152615a888186615826565b90508281036060840152614a6c8185615855565b600060608252615aaf60608301866157e3565b8281036020840152615ac18186615826565b915050826040830152949350505050565b6000602082526116996020830184615826565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b9283526001600160a01b03918216602084015216604082015260600190565b8781526001600160a01b0387811660208301528616604082015260e060608201819052600090615b6290830187615826565b8560808401528460a084015282810360c0840152615b808185615855565b9a9950505050505050505050565b600083825260406020830152610a1a60408301846157e3565b60008482526020606081840152615bc160608401866157e3565b8381036040850152845180825282860191830190845b8181101561516f5783516001600160a01b031683529284019291840191600101615bd7565b94855260208501939093526001600160a01b039190911660408401526060830152608082015260a00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b918252602082015260400190565b600060808252615c936080830187615881565b8281036020840152615ca58187615826565b604084019590955250506060015292915050565b600060608252615ccc6060830186615881565b60208301949094525060400152919050565b938452602084019290925260408301526001600160a01b0316606082015260800190565b6040518181016001600160401b0381118282101715615d2057600080fd5b604052919050565b60006001600160401b03821115615d3d578081fd5b5060209081020190565b60005b83811015615d62578181015183820152602001615d4a565b83811115610dbe5750506000910152565b6001600160a01b038116811461072857600080fd5b801515811461072857600080fd5b6003811061072857600080fdfea2646970667358221220f53e4d85aa8252d2da6dcf83a0e84884e356e79a1bf3d0379d11486d3335e56064736f6c63430007010033",
              "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x185 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x945BCEC9 GT PUSH2 0xD1 JUMPI DUP1 PUSH4 0xE6C46092 GT PUSH2 0x8A JUMPI DUP1 PUSH4 0xF84D066E GT PUSH2 0x64 JUMPI DUP1 PUSH4 0xF84D066E EQ PUSH2 0x46A JUMPI DUP1 PUSH4 0xF94D4668 EQ PUSH2 0x48A JUMPI DUP1 PUSH4 0xFA6E671D EQ PUSH2 0x4B9 JUMPI DUP1 PUSH4 0xFEC90D72 EQ PUSH2 0x4D9 JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0xE6C46092 EQ PUSH2 0x407 JUMPI DUP1 PUSH4 0xED24911D EQ PUSH2 0x427 JUMPI DUP1 PUSH4 0xF6C00927 EQ PUSH2 0x43C JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0x945BCEC9 EQ PUSH2 0x365 JUMPI DUP1 PUSH4 0xAAABADC5 EQ PUSH2 0x378 JUMPI DUP1 PUSH4 0xAD5C4648 EQ PUSH2 0x39A JUMPI DUP1 PUSH4 0xB05F8E48 EQ PUSH2 0x3AF JUMPI DUP1 PUSH4 0xB95CAC28 EQ PUSH2 0x3DF JUMPI DUP1 PUSH4 0xD2946C2B EQ PUSH2 0x3F2 JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0x52BBBE29 GT PUSH2 0x13E JUMPI DUP1 PUSH4 0x7D3AEB96 GT PUSH2 0x118 JUMPI DUP1 PUSH4 0x7D3AEB96 EQ PUSH2 0x2E5 JUMPI DUP1 PUSH4 0x851C1BB3 EQ PUSH2 0x305 JUMPI DUP1 PUSH4 0x8BDB3913 EQ PUSH2 0x325 JUMPI DUP1 PUSH4 0x90193B7C EQ PUSH2 0x345 JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0x52BBBE29 EQ PUSH2 0x292 JUMPI DUP1 PUSH4 0x5C38449E EQ PUSH2 0x2A5 JUMPI DUP1 PUSH4 0x66A9C7D2 EQ PUSH2 0x2C5 JUMPI PUSH2 0x1B3 JUMP JUMPDEST DUP1 PUSH4 0x9B2760F EQ PUSH2 0x1B8 JUMPI DUP1 PUSH4 0xE8E3E84 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0xE9E98CF EQ PUSH2 0x201 JUMPI DUP1 PUSH4 0xF5A6EFA EQ PUSH2 0x221 JUMPI DUP1 PUSH4 0x16C38B3C EQ PUSH2 0x24E JUMPI DUP1 PUSH4 0x1C0DE051 EQ PUSH2 0x26E JUMPI PUSH2 0x1B3 JUMP JUMPDEST CALLDATASIZE PUSH2 0x1B3 JUMPI PUSH2 0x1B1 PUSH2 0x195 PUSH2 0x506 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x206 PUSH2 0x52B JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1C4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D8 PUSH2 0x1D3 CALLDATASIZE PUSH1 0x4 PUSH2 0x553F JUMP JUMPDEST PUSH2 0x53D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0x5B08 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1B1 PUSH2 0x1FC CALLDATASIZE PUSH1 0x4 PUSH2 0x517D JUMP JUMPDEST PUSH2 0x5EC JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x20D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x21C CALLDATASIZE PUSH1 0x4 PUSH2 0x4FB8 JUMP JUMPDEST PUSH2 0x72B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x22D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x241 PUSH2 0x23C CALLDATASIZE PUSH1 0x4 PUSH2 0x5056 JUMP JUMPDEST PUSH2 0x7A2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0x5AD2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x25A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x269 CALLDATASIZE PUSH1 0x4 PUSH2 0x52B9 JUMP JUMPDEST PUSH2 0x837 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x27A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x283 PUSH2 0x858 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5AF0 JUMP JUMPDEST PUSH2 0x1D8 PUSH2 0x2A0 CALLDATASIZE PUSH1 0x4 PUSH2 0x56E6 JUMP JUMPDEST PUSH2 0x881 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x2C0 CALLDATASIZE PUSH1 0x4 PUSH2 0x54B5 JUMP JUMPDEST PUSH2 0xA22 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2D1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x2E0 CALLDATASIZE PUSH1 0x4 PUSH2 0x53A0 JUMP JUMPDEST PUSH2 0xDC4 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2F1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x300 CALLDATASIZE PUSH1 0x4 PUSH2 0x5372 JUMP JUMPDEST PUSH2 0xF64 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x311 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D8 PUSH2 0x320 CALLDATASIZE PUSH1 0x4 PUSH2 0x548D JUMP JUMPDEST PUSH2 0x10B9 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x331 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x340 CALLDATASIZE PUSH1 0x4 PUSH2 0x5309 JUMP JUMPDEST PUSH2 0x110B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x351 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D8 PUSH2 0x360 CALLDATASIZE PUSH1 0x4 PUSH2 0x4FB8 JUMP JUMPDEST PUSH2 0x1121 JUMP JUMPDEST PUSH2 0x241 PUSH2 0x373 CALLDATASIZE PUSH1 0x4 PUSH2 0x55DE JUMP JUMPDEST PUSH2 0x113C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x384 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x38D PUSH2 0x1270 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0x599E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3A6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x38D PUSH2 0x1284 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3CF PUSH2 0x3CA CALLDATASIZE PUSH1 0x4 PUSH2 0x5469 JUMP JUMPDEST PUSH2 0x1293 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5CDE JUMP JUMPDEST PUSH2 0x1B1 PUSH2 0x3ED CALLDATASIZE PUSH1 0x4 PUSH2 0x5309 JUMP JUMPDEST PUSH2 0x1356 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x38D PUSH2 0x136F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x413 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x422 CALLDATASIZE PUSH1 0x4 PUSH2 0x50A3 JUMP JUMPDEST PUSH2 0x1393 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x433 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D8 PUSH2 0x14AF JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x448 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x45C PUSH2 0x457 CALLDATASIZE PUSH1 0x4 PUSH2 0x52F1 JUMP JUMPDEST PUSH2 0x14B9 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP3 SWAP2 SWAP1 PUSH2 0x59D6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x476 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x241 PUSH2 0x485 CALLDATASIZE PUSH1 0x4 PUSH2 0x555B JUMP JUMPDEST PUSH2 0x14E3 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x496 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4AA PUSH2 0x4A5 CALLDATASIZE PUSH1 0x4 PUSH2 0x52F1 JUMP JUMPDEST PUSH2 0x15C7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5A9C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 PUSH2 0x4D4 CALLDATASIZE PUSH1 0x4 PUSH2 0x500C JUMP JUMPDEST PUSH2 0x15FB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4F9 PUSH2 0x4F4 CALLDATASIZE PUSH1 0x4 PUSH2 0x4FD4 JUMP JUMPDEST PUSH2 0x168D JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x1E5 SWAP2 SWAP1 PUSH2 0x5AE5 JUMP JUMPDEST PUSH32 0x0 JUMPDEST SWAP1 JUMP JUMPDEST DUP2 PUSH2 0x539 JUMPI PUSH2 0x539 DUP2 PUSH2 0x16A2 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x547 PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x54F PUSH2 0x170E JUMP JUMPDEST PUSH1 0x0 PUSH2 0x55E CALLER DUP5 PUSH1 0x6 SLOAD PUSH2 0x1723 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 SWAP2 POP PUSH2 0x580 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x1F4 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x6 DUP1 SLOAD SWAP1 SWAP2 ADD SWAP1 SSTORE MLOAD PUSH32 0x43641244AEEFD8DE6827C26F36450AA6165C9FEF65DDFA7262DA93BA648464D2 SWAP1 PUSH2 0x5D5 SWAP1 DUP4 SWAP1 PUSH2 0x5B08 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 SWAP1 POP PUSH2 0x5E7 PUSH2 0x1762 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x5F4 PUSH2 0x16F5 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 JUMPDEST DUP5 MLOAD DUP2 LT ISZERO PUSH2 0x713 JUMPI PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x629 DUP11 DUP8 DUP2 MLOAD DUP2 LT PUSH2 0x61B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP10 PUSH2 0x1769 JUMP JUMPDEST SWAP13 POP SWAP4 SWAP9 POP SWAP2 SWAP7 POP SWAP5 POP SWAP3 POP SWAP1 POP PUSH1 0x1 DUP6 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x645 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x65C JUMPI PUSH2 0x657 DUP5 DUP4 DUP4 DUP7 PUSH2 0x17E1 JUMP JUMPDEST PUSH2 0x702 JUMP JUMPDEST DUP7 PUSH2 0x66E JUMPI PUSH2 0x669 PUSH2 0x170E JUMP JUMPDEST PUSH1 0x1 SWAP7 POP JUMPDEST PUSH1 0x0 DUP6 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x67C JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x6AD JUMPI PUSH2 0x68E DUP5 DUP4 DUP4 DUP7 PUSH2 0x1804 JUMP JUMPDEST PUSH2 0x697 DUP5 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x657 JUMPI PUSH2 0x6A6 DUP10 DUP5 PUSH2 0x1831 JUMP JUMPDEST SWAP9 POP PUSH2 0x702 JUMP JUMPDEST PUSH2 0x6C2 PUSH2 0x6B9 DUP6 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x207 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6CD DUP6 PUSH2 0x528 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP7 PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x6DD JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x6F4 JUMPI PUSH2 0x6EF DUP2 DUP5 DUP5 DUP8 PUSH2 0x1843 JUMP JUMPDEST PUSH2 0x700 JUMP JUMPDEST PUSH2 0x700 DUP2 DUP5 DUP5 DUP8 PUSH2 0x185C JUMP JUMPDEST POP JUMPDEST POP POP PUSH1 0x1 SWAP1 SWAP4 ADD SWAP3 POP PUSH2 0x5FB SWAP2 POP POP JUMP JUMPDEST POP PUSH2 0x71D DUP4 PUSH2 0x18CA JUMP JUMPDEST POP POP POP PUSH2 0x728 PUSH2 0x1762 JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x733 PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x73B PUSH2 0x18ED JUMP JUMPDEST PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND SWAP3 PUSH2 0x100 SWAP1 DIV AND SWAP1 PUSH32 0x662D2B49E91208DA36BD4107560100EC490758AC0639152FAE6A64FCA5EF9AEE SWAP1 PUSH1 0x0 SWAP1 LOG3 PUSH1 0x3 DUP1 SLOAD PUSH2 0x100 PUSH1 0x1 PUSH1 0xA8 SHL SUB NOT AND PUSH2 0x100 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND MUL OR SWAP1 SSTORE PUSH2 0x728 PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x60 DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x7BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x7E5 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x830 JUMPI PUSH2 0x811 DUP5 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x804 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x191B JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x81D JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x7EB JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x83F PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x847 PUSH2 0x18ED JUMP JUMPDEST PUSH2 0x850 DUP2 PUSH2 0x1946 JUMP JUMPDEST PUSH2 0x728 PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x865 PUSH2 0x19C4 JUMP JUMPDEST ISZERO SWAP3 POP PUSH2 0x870 PUSH2 0x19E1 JUMP JUMPDEST SWAP2 POP PUSH2 0x87A PUSH2 0x1A05 JUMP JUMPDEST SWAP1 POP SWAP1 SWAP2 SWAP3 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x88B PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x893 PUSH2 0x170E JUMP JUMPDEST DUP4 MLOAD PUSH2 0x89E DUP2 PUSH2 0x1A29 JUMP JUMPDEST PUSH2 0x8AD DUP4 TIMESTAMP GT ISZERO PUSH2 0x1FC PUSH2 0x52B JUMP JUMPDEST PUSH2 0x8C0 PUSH1 0x0 DUP8 PUSH1 0x80 ADD MLOAD GT PUSH2 0x1FE PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x8CF DUP8 PUSH1 0x40 ADD MLOAD PUSH2 0x1A5B JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x8E0 DUP9 PUSH1 0x60 ADD MLOAD PUSH2 0x1A5B JUMP JUMPDEST SWAP1 POP PUSH2 0x903 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1FD PUSH2 0x52B JUMP JUMPDEST PUSH2 0x90B PUSH2 0x4B45 JUMP JUMPDEST DUP9 MLOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0x20 DUP10 ADD MLOAD DUP2 SWAP1 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x924 JUMPI INVALID JUMPDEST SWAP1 DUP2 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x931 JUMPI INVALID JUMPDEST SWAP1 MSTORE POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP5 AND PUSH1 0x20 DUP4 ADD MSTORE DUP3 DUP2 AND PUSH1 0x40 DUP1 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x80 DUP12 ADD MLOAD PUSH1 0x60 DUP5 ADD MSTORE PUSH1 0xA0 DUP12 ADD MLOAD PUSH2 0x100 DUP5 ADD MSTORE DUP10 MLOAD DUP3 AND PUSH1 0xC0 DUP5 ADD MSTORE DUP10 ADD MLOAD AND PUSH1 0xE0 DUP3 ADD MSTORE PUSH1 0x0 DUP1 PUSH2 0x983 DUP4 PUSH2 0x1A80 JUMP JUMPDEST SWAP2 SWAP9 POP SWAP3 POP SWAP1 POP PUSH2 0x9BA PUSH1 0x0 DUP13 PUSH1 0x20 ADD MLOAD PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x99F JUMPI INVALID JUMPDEST EQ PUSH2 0x9AD JUMPI DUP10 DUP4 GT ISZERO PUSH2 0x9B2 JUMP JUMPDEST DUP10 DUP3 LT ISZERO JUMPDEST PUSH2 0x1FB PUSH2 0x52B JUMP JUMPDEST PUSH2 0x9D2 DUP12 PUSH1 0x40 ADD MLOAD DUP4 DUP13 PUSH1 0x0 ADD MLOAD DUP14 PUSH1 0x20 ADD MLOAD PUSH2 0x1B74 JUMP JUMPDEST PUSH2 0x9EA DUP12 PUSH1 0x60 ADD MLOAD DUP3 DUP13 PUSH1 0x40 ADD MLOAD DUP14 PUSH1 0x60 ADD MLOAD PUSH2 0x1C52 JUMP JUMPDEST PUSH2 0xA0C PUSH2 0x9FA DUP13 PUSH1 0x40 ADD MLOAD PUSH2 0x1824 JUMP JUMPDEST PUSH2 0xA05 JUMPI PUSH1 0x0 PUSH2 0xA07 JUMP JUMPDEST DUP3 JUMPDEST PUSH2 0x18CA JUMP JUMPDEST POP POP POP POP POP POP PUSH2 0xA1A PUSH2 0x1762 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0xA2A PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0xA32 PUSH2 0x170E JUMP JUMPDEST PUSH2 0xA3E DUP4 MLOAD DUP4 MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xA57 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xA81 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x60 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0xA9D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xAC7 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0xC40 JUMPI PUSH1 0x0 DUP8 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xAE5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP8 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xAFD JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0xB48 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND GT PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xB40 JUMPI PUSH1 0x66 PUSH2 0xB43 JUMP JUMPDEST PUSH1 0x68 JUMPDEST PUSH2 0x52B JUMP JUMPDEST DUP2 SWAP4 POP DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xB77 SWAP2 SWAP1 PUSH2 0x599E JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xB8F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xBA3 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xBC7 SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0xBD3 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0xBE8 DUP2 PUSH2 0x1D39 JUMP JUMPDEST DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0xBF4 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0xC22 DUP2 DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0xC10 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD LT ISZERO PUSH2 0x210 PUSH2 0x52B JUMP JUMPDEST PUSH2 0xC36 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP12 DUP4 PUSH2 0x1DC0 JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0xACE JUMP JUMPDEST POP PUSH1 0x40 MLOAD PUSH4 0xF04F2707 PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND SWAP1 PUSH4 0xF04F2707 SWAP1 PUSH2 0xC73 SWAP1 DUP10 SWAP1 DUP10 SWAP1 DUP9 SWAP1 DUP11 SWAP1 PUSH1 0x4 ADD PUSH2 0x5A4F JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xC8D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xCA1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x0 JUMPDEST DUP7 MLOAD DUP2 LT ISZERO PUSH2 0xDB2 JUMPI PUSH1 0x0 DUP8 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xCBF JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xCD7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x70A08231 ADDRESS PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD0F SWAP2 SWAP1 PUSH2 0x599E JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xD27 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xD3B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0xD5F SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST SWAP1 POP PUSH2 0xD70 DUP3 DUP3 LT ISZERO PUSH2 0x203 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 SUB SWAP1 POP PUSH2 0xD99 DUP9 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0xD86 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 LT ISZERO PUSH2 0x25A PUSH2 0x52B JUMP JUMPDEST PUSH2 0xDA3 DUP5 DUP3 PUSH2 0x1E16 JUMP JUMPDEST POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0xCA8 JUMP JUMPDEST POP POP POP POP PUSH2 0xDBE PUSH2 0x1762 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH2 0xDCC PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0xDD4 PUSH2 0x170E JUMP JUMPDEST DUP3 PUSH2 0xDDE DUP2 PUSH2 0x1E38 JUMP JUMPDEST PUSH2 0xDEA DUP4 MLOAD DUP4 MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0xE88 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xE04 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0xE30 PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x135 PUSH2 0x52B JUMP JUMPDEST DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xE3C JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x0 DUP9 DUP2 MSTORE PUSH1 0xA DUP4 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP6 DUP7 AND DUP4 MSTORE SWAP1 SWAP4 MSTORE SWAP2 SWAP1 SWAP2 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP3 SWAP1 SWAP2 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x1 ADD PUSH2 0xDED JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0xE94 DUP6 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0xEA4 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xEF2 JUMPI PUSH2 0xEBA DUP5 MLOAD PUSH1 0x2 EQ PUSH2 0x20C PUSH2 0x52B JUMP JUMPDEST PUSH2 0xEED DUP6 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0xECB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0xEE0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1E83 JUMP JUMPDEST PUSH2 0xF1A JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0xF00 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xF10 JUMPI PUSH2 0xEED DUP6 DUP6 PUSH2 0x1F2F JUMP JUMPDEST PUSH2 0xF1A DUP6 DUP6 PUSH2 0x1F87 JUMP JUMPDEST PUSH32 0xF5847D3F2197B16CDCD2098EC95D0905CD1ABDAF415F07BB7CEF2BBA8AC5DEC4 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH2 0xF4D SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5BA7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP PUSH2 0xF5F PUSH2 0x1762 JUMP JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0xF6C PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0xF74 PUSH2 0x170E JUMP JUMPDEST DUP2 PUSH2 0xF7E DUP2 PUSH2 0x1E38 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xF89 DUP5 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0xF99 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xFE7 JUMPI PUSH2 0xFAF DUP4 MLOAD PUSH1 0x2 EQ PUSH2 0x20C PUSH2 0x52B JUMP JUMPDEST PUSH2 0xFE2 DUP5 DUP5 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0xFC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0xFD5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1FDC JUMP JUMPDEST PUSH2 0x100F JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0xFF5 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1005 JUMPI PUSH2 0xFE2 DUP5 DUP5 PUSH2 0x204A JUMP JUMPDEST PUSH2 0x100F DUP5 DUP5 PUSH2 0x2104 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x1075 JUMPI PUSH1 0xA PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x103C JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 MSTORE DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 ADD PUSH1 0x0 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE PUSH1 0x1 ADD PUSH2 0x1012 JUMP JUMPDEST POP PUSH32 0x7DCDC6D02EF40C7C1A7046A011B058BD7F988FA14E20A66344F9D4E60657D610 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x10A7 SWAP3 SWAP2 SWAP1 PUSH2 0x5B8E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP POP PUSH2 0x539 PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10EE SWAP3 SWAP2 SWAP1 PUSH2 0x5918 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0xDBE PUSH1 0x1 DUP6 DUP6 DUP6 PUSH2 0x111C DUP7 PUSH2 0x2167 JUMP JUMPDEST PUSH2 0x2173 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x1146 PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x114E PUSH2 0x170E JUMP JUMPDEST DUP4 MLOAD PUSH2 0x1159 DUP2 PUSH2 0x1A29 JUMP JUMPDEST PUSH2 0x1168 DUP4 TIMESTAMP GT ISZERO PUSH2 0x1FC PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1174 DUP7 MLOAD DUP6 MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH2 0x1180 DUP8 DUP8 DUP8 DUP12 PUSH2 0x22F9 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 DUP1 JUMPDEST DUP8 MLOAD DUP2 LT ISZERO PUSH2 0x1252 JUMPI PUSH1 0x0 DUP9 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x119D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x11B5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x11E1 DUP9 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x11CE JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 SGT ISZERO PUSH2 0x1FB PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP2 SGT ISZERO PUSH2 0x1221 JUMPI DUP9 MLOAD PUSH1 0x20 DUP11 ADD MLOAD DUP3 SWAP2 PUSH2 0x1200 SWAP2 DUP6 SWAP2 DUP5 SWAP2 PUSH2 0x1B74 JUMP JUMPDEST PUSH2 0x1209 DUP4 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x121B JUMPI PUSH2 0x1218 DUP6 DUP3 PUSH2 0x1831 JUMP JUMPDEST SWAP5 POP JUMPDEST POP PUSH2 0x1248 JUMP JUMPDEST PUSH1 0x0 DUP2 SLT ISZERO PUSH2 0x1248 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SUB SWAP1 POP PUSH2 0x1246 DUP4 DUP3 DUP13 PUSH1 0x40 ADD MLOAD DUP14 PUSH1 0x60 ADD MLOAD PUSH2 0x1C52 JUMP JUMPDEST POP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x1186 JUMP JUMPDEST POP PUSH2 0x125C DUP2 PUSH2 0x18CA JUMP JUMPDEST POP POP PUSH2 0x1266 PUSH2 0x1762 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x128E PUSH2 0x506 JUMP JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 DUP6 PUSH2 0x12A3 DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x12AF DUP10 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x12BF JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x12D6 JUMPI PUSH2 0x12CF DUP10 DUP10 PUSH2 0x25A5 JUMP JUMPDEST SWAP2 POP PUSH2 0x1301 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x12E4 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x12F4 JUMPI PUSH2 0x12CF DUP10 DUP10 PUSH2 0x261F JUMP JUMPDEST PUSH2 0x12FE DUP10 DUP10 PUSH2 0x268D JUMP JUMPDEST SWAP2 POP JUMPDEST PUSH2 0x130A DUP3 PUSH2 0x26A5 JUMP JUMPDEST SWAP7 POP PUSH2 0x1315 DUP3 PUSH2 0x26B1 JUMP JUMPDEST SWAP6 POP PUSH2 0x1320 DUP3 PUSH2 0x26C0 JUMP JUMPDEST PUSH1 0x0 SWAP10 DUP11 MSTORE PUSH1 0xA PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP13 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP12 DUP13 AND DUP14 MSTORE SWAP1 SWAP2 MSTORE SWAP1 SWAP10 KECCAK256 SLOAD SWAP7 SWAP10 SWAP6 SWAP9 SWAP8 SWAP7 SWAP1 SWAP7 AND SWAP6 POP POP POP POP POP JUMP JUMPDEST PUSH2 0x135E PUSH2 0x170E JUMP JUMPDEST PUSH2 0xDBE PUSH1 0x0 DUP6 DUP6 DUP6 PUSH2 0x111C DUP7 PUSH2 0x2167 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH2 0x139B PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x13A3 PUSH2 0x170E JUMP JUMPDEST PUSH2 0x13AB PUSH2 0x4B95 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x14A5 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x13C3 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP2 POP PUSH1 0x0 DUP3 PUSH1 0x20 ADD MLOAD SWAP1 POP PUSH2 0x13DF DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0x13F9 PUSH2 0x13F1 DUP4 DUP4 PUSH2 0x26C6 JUMP JUMPDEST PUSH2 0x209 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0xA PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 DUP2 AND DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD PUSH2 0x142C SWAP2 AND CALLER EQ PUSH2 0x1F6 PUSH2 0x52B JUMP JUMPDEST DUP4 MLOAD PUSH1 0x60 DUP6 ADD MLOAD PUSH1 0x0 DUP1 PUSH2 0x1442 DUP5 DUP8 DUP8 DUP7 PUSH2 0x2722 JUMP JUMPDEST SWAP2 POP SWAP2 POP DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 PUSH32 0x6EDCAF6241105B4C94C2EFDBF3A6B12458EB3D07BE3A0E81D24B13C44045FE7A DUP6 DUP6 PUSH1 0x40 MLOAD PUSH2 0x148C SWAP3 SWAP2 SWAP1 PUSH2 0x5C72 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x13AE JUMP JUMPDEST POP POP PUSH2 0x728 PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x128E PUSH2 0x2791 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH2 0x14C6 DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x14CF DUP5 PUSH2 0x282E JUMP JUMPDEST PUSH2 0x14D8 DUP6 PUSH2 0x1E69 JUMP JUMPDEST SWAP3 POP SWAP3 POP JUMPDEST POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x60 CALLER ADDRESS EQ PUSH2 0x159D JUMPI PUSH1 0x0 ADDRESS PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 CALLDATASIZE PUSH1 0x40 MLOAD PUSH2 0x1509 SWAP3 SWAP2 SWAP1 PUSH2 0x5930 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1546 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x154B JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x155A JUMPI INVALID JUMPDEST PUSH1 0x4 PUSH1 0x0 DUP1 RETURNDATACOPY PUSH1 0x0 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH4 0x7D30E609 PUSH1 0xE1 SHL DUP2 EQ PUSH2 0x1585 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x0 MSTORE PUSH1 0x4 RETURNDATASIZE SUB DUP1 PUSH1 0x4 PUSH1 0x20 RETURNDATACOPY PUSH1 0x20 DUP2 ADD PUSH1 0x0 RETURN JUMPDEST PUSH1 0x60 PUSH2 0x15AB DUP6 DUP6 DUP6 DUP10 PUSH2 0x22F9 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 MLOAD MUL PUSH4 0xFA61CC12 PUSH1 0x20 DUP4 SUB MSTORE PUSH1 0x4 DUP3 SUB PUSH1 0x24 DUP3 ADD DUP2 REVERT JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP4 PUSH2 0x15D6 DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH1 0x60 PUSH2 0x15E1 DUP7 PUSH2 0x2834 JUMP JUMPDEST SWAP1 SWAP6 POP SWAP1 POP PUSH2 0x15EF DUP2 PUSH2 0x2896 JUMP JUMPDEST SWAP6 SWAP8 SWAP1 SWAP7 POP SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x1603 PUSH2 0x16F5 JUMP JUMPDEST PUSH2 0x160B PUSH2 0x170E JUMP JUMPDEST DUP3 PUSH2 0x1615 DUP2 PUSH2 0x1A29 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP9 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND DUP7 ISZERO ISZERO OR SWAP1 SSTORE MLOAD SWAP1 SWAP2 SWAP1 PUSH32 0x46961FDB4502B646D5095FBA7600486A8AC05041D55CDF0F16ED677180B5CAD8 SWAP1 PUSH2 0x167C SWAP1 DUP7 SWAP1 PUSH2 0x5AE5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP PUSH2 0xF5F PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 DUP4 DUP4 PUSH2 0x2944 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH3 0x461BCD PUSH1 0xE5 SHL PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 MSTORE PUSH1 0x7 PUSH1 0x24 MSTORE PUSH7 0x42414C23000030 PUSH1 0xA DUP1 DUP5 DIV DUP2 DUP2 MOD PUSH1 0x30 SWAP1 DUP2 ADD PUSH1 0x8 SHL SWAP6 DUP4 SWAP1 MOD SWAP6 SWAP1 SWAP6 ADD SWAP1 DUP3 SWAP1 DIV SWAP2 DUP3 MOD SWAP1 SWAP5 ADD PUSH1 0x10 SHL SWAP4 SWAP1 SWAP4 ADD ADD PUSH1 0xC8 SHL PUSH1 0x44 MSTORE PUSH1 0x64 SWAP1 REVERT JUMPDEST PUSH2 0x1707 PUSH1 0x2 PUSH1 0x0 SLOAD EQ ISZERO PUSH2 0x190 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x2 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH2 0x1721 PUSH2 0x1719 PUSH2 0x19C4 JUMP JUMPDEST PUSH2 0x192 PUSH2 0x52B JUMP JUMPDEST JUMP JUMPDEST PUSH1 0x0 PUSH10 0xFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x50 DUP5 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1740 JUMPI INVALID JUMPDEST SWAP1 SHL OR PUSH1 0x60 DUP6 SWAP1 SHL PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT AND OR SWAP1 POP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP9 PUSH1 0x60 ADD MLOAD SWAP1 POP CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x17BB JUMPI DUP8 PUSH2 0x17A6 JUMPI PUSH2 0x17A1 PUSH2 0x18ED JUMP JUMPDEST PUSH1 0x1 SWAP8 POP JUMPDEST PUSH2 0x17BB PUSH2 0x17B3 DUP3 CALLER PUSH2 0x2944 JUMP JUMPDEST PUSH2 0x1F7 PUSH2 0x52B JUMP JUMPDEST DUP9 MLOAD PUSH1 0x20 DUP11 ADD MLOAD PUSH1 0x40 DUP12 ADD MLOAD PUSH1 0x80 SWAP1 SWAP12 ADD MLOAD SWAP2 SWAP12 SWAP1 SWAP11 SWAP10 SWAP3 SWAP9 POP SWAP1 SWAP7 POP SWAP1 SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x17F6 DUP4 PUSH2 0x17EE DUP7 PUSH2 0x1A5B JUMP JUMPDEST DUP4 PUSH1 0x0 PUSH2 0x2972 JUMP JUMPDEST POP PUSH2 0xDBE DUP5 DUP3 DUP5 PUSH1 0x0 PUSH2 0x1C52 JUMP JUMPDEST PUSH2 0x1817 DUP3 PUSH2 0x1811 DUP7 PUSH2 0x1A5B JUMP JUMPDEST DUP4 PUSH2 0x29C8 JUMP JUMPDEST PUSH2 0xDBE DUP5 DUP3 DUP6 PUSH1 0x0 PUSH2 0x1B74 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x1699 DUP5 DUP3 LT ISZERO DUP4 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1850 DUP4 DUP6 DUP4 PUSH1 0x0 PUSH2 0x2972 JUMP JUMPDEST POP PUSH2 0xDBE DUP3 DUP6 DUP4 PUSH2 0x29C8 JUMP JUMPDEST DUP1 ISZERO PUSH2 0xDBE JUMPI PUSH2 0x1877 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND DUP5 DUP5 DUP5 PUSH2 0x29F8 JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH32 0x540A1A3F28340CAEC336C81D8D7B3DF139EE5CDC1839A4F283D7EBB7EAAE2D5C DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x18BC SWAP3 SWAP2 SWAP1 PUSH2 0x59FD JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST PUSH2 0x18D9 DUP2 CALLVALUE LT ISZERO PUSH2 0x204 PUSH2 0x52B JUMP JUMPDEST CALLVALUE DUP2 SWAP1 SUB DUP1 ISZERO PUSH2 0x539 JUMPI PUSH2 0x539 CALLER DUP3 PUSH2 0x2A19 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1904 PUSH1 0x0 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH2 0x10B9 JUMP JUMPDEST SWAP1 POP PUSH2 0x728 PUSH2 0x1913 DUP3 CALLER PUSH2 0x2A93 JUMP JUMPDEST PUSH2 0x191 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0xB PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x1966 JUMPI PUSH2 0x1961 PUSH2 0x1957 PUSH2 0x19E1 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x193 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x197B JUMP JUMPDEST PUSH2 0x197B PUSH2 0x1971 PUSH2 0x1A05 JUMP JUMPDEST TIMESTAMP LT PUSH2 0x1A9 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0xFF NOT AND DUP3 ISZERO ISZERO OR SWAP1 SSTORE PUSH1 0x40 MLOAD PUSH32 0x9E3A5E37224532DEA67B89FACE185703738A228A6E8A23DEE546960180D3BE64 SWAP1 PUSH2 0x19B9 SWAP1 DUP4 SWAP1 PUSH2 0x5AE5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x19CE PUSH2 0x1A05 JUMP JUMPDEST TIMESTAMP GT DUP1 PUSH2 0x128E JUMPI POP POP PUSH1 0x3 SLOAD PUSH1 0xFF AND ISZERO SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST PUSH32 0x0 SWAP1 JUMP JUMPDEST CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND EQ PUSH2 0x728 JUMPI PUSH2 0x1A41 PUSH2 0x18ED JUMP JUMPDEST PUSH2 0x1A4B DUP2 CALLER PUSH2 0x2944 JUMP JUMPDEST PUSH2 0x728 JUMPI PUSH2 0x728 DUP2 PUSH2 0x1F7 PUSH2 0x2B1D JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1A66 DUP3 PUSH2 0x1824 JUMP JUMPDEST PUSH2 0x1A78 JUMPI PUSH2 0x1A73 DUP3 PUSH2 0x528 JUMP JUMPDEST PUSH2 0x169C JUMP JUMPDEST PUSH2 0x169C PUSH2 0x506 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x1A93 DUP6 PUSH1 0x80 ADD MLOAD PUSH2 0x282E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x1AA4 DUP7 PUSH1 0x80 ADD MLOAD PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1AB4 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1ACB JUMPI PUSH2 0x1AC4 DUP7 DUP4 PUSH2 0x2B51 JUMP JUMPDEST SWAP5 POP PUSH2 0x1AF6 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x1AD9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x1AE9 JUMPI PUSH2 0x1AC4 DUP7 DUP4 PUSH2 0x2C01 JUMP JUMPDEST PUSH2 0x1AF3 DUP7 DUP4 PUSH2 0x2C94 JUMP JUMPDEST SWAP5 POP JUMPDEST PUSH2 0x1B09 DUP7 PUSH1 0x0 ADD MLOAD DUP8 PUSH1 0x60 ADD MLOAD DUP8 PUSH2 0x2EB8 JUMP JUMPDEST DUP1 SWAP5 POP DUP2 SWAP6 POP POP POP DUP6 PUSH1 0x40 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x20 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 PUSH1 0x80 ADD MLOAD PUSH32 0x2170C741C41531AEC20E7C107C24EECFDD15E69C9BB0A8DD37B1840B9E0B207B DUP8 DUP8 PUSH1 0x40 MLOAD PUSH2 0x1B63 SWAP3 SWAP2 SWAP1 PUSH2 0x5C72 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG4 POP POP SWAP2 SWAP4 SWAP1 SWAP3 POP JUMP JUMPDEST DUP3 PUSH2 0x1B7E JUMPI PUSH2 0xDBE JUMP JUMPDEST PUSH2 0x1B87 DUP5 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x1C08 JUMPI PUSH2 0x1B99 DUP2 ISZERO PUSH2 0x202 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1BA8 DUP4 SELFBALANCE LT ISZERO PUSH2 0x204 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1BB0 PUSH2 0x506 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD0E30DB0 DUP5 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1BEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1BFE JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP POP PUSH2 0xDBE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1C13 DUP6 PUSH2 0x528 JUMP JUMPDEST SWAP1 POP DUP2 ISZERO PUSH2 0x1C30 JUMPI PUSH1 0x0 PUSH2 0x1C2A DUP5 DUP4 DUP8 PUSH1 0x1 PUSH2 0x2972 JUMP JUMPDEST SWAP1 SWAP5 SUB SWAP4 POP JUMPDEST DUP4 ISZERO PUSH2 0x1C4B JUMPI PUSH2 0x1C4B PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND DUP5 ADDRESS DUP8 PUSH2 0x29F8 JUMP JUMPDEST POP POP POP POP POP JUMP JUMPDEST DUP3 PUSH2 0x1C5C JUMPI PUSH2 0xDBE JUMP JUMPDEST PUSH2 0x1C65 DUP5 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x1CF5 JUMPI PUSH2 0x1C77 DUP2 ISZERO PUSH2 0x202 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1C7F PUSH2 0x506 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x2E1A7D4D DUP5 PUSH1 0x40 MLOAD DUP3 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1CAA SWAP2 SWAP1 PUSH2 0x5B08 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1CC4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x1CD8 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH2 0x1CF0 SWAP3 POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP5 PUSH2 0x2A19 JUMP JUMPDEST PUSH2 0xDBE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D00 DUP6 PUSH2 0x528 JUMP JUMPDEST SWAP1 POP DUP2 ISZERO PUSH2 0x1D18 JUMPI PUSH2 0x1D13 DUP4 DUP3 DUP7 PUSH2 0x29C8 JUMP JUMPDEST PUSH2 0x1C4B JUMP JUMPDEST PUSH2 0x1C4B PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND DUP5 DUP7 PUSH2 0x1DC0 JUMP JUMPDEST PUSH2 0x539 DUP2 DUP4 EQ PUSH1 0x67 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x1D44 PUSH2 0x136F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD877845C PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1D7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x1D90 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1DB4 SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST SWAP1 POP PUSH2 0x175B DUP4 DUP3 PUSH2 0x2EE6 JUMP JUMPDEST PUSH2 0xF5F DUP4 PUSH4 0xA9059CBB PUSH1 0xE0 SHL DUP5 DUP5 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x1DDF SWAP3 SWAP2 SWAP1 PUSH2 0x59FD JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE SWAP2 SWAP1 MSTORE PUSH1 0x20 DUP2 ADD DUP1 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP1 SWAP2 MSTORE PUSH2 0x2F33 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x539 JUMPI PUSH2 0x539 PUSH2 0x1E27 PUSH2 0x136F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND SWAP1 DUP4 PUSH2 0x1DC0 JUMP JUMPDEST PUSH2 0x1E41 DUP2 PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x728 PUSH2 0x1E4D DUP3 PUSH2 0x282E JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND CALLER PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x1F5 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0xFFFF PUSH1 0x50 DUP4 SWAP1 SHR AND PUSH2 0x169C PUSH1 0x3 DUP3 LT PUSH2 0x1F4 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1EA4 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x20A PUSH2 0x52B JUMP JUMPDEST PUSH2 0x1EC3 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH1 0x66 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH2 0x1F00 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO DUP1 ISZERO PUSH2 0x1EF8 JUMPI POP PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO JUMPDEST PUSH2 0x20B PUSH2 0x52B JUMP JUMPDEST DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 DUP5 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP2 DUP3 AND OR DUP3 SSTORE PUSH1 0x1 SWAP1 SWAP2 ADD DUP1 SLOAD SWAP3 SWAP1 SWAP4 AND SWAP2 AND OR SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH1 0x0 PUSH2 0x1F70 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1F59 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x2FD3 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x1F7E DUP2 PUSH2 0x20A PUSH2 0x52B JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1F3F JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH1 0x0 PUSH2 0x1FC5 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x1FB1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MLOAD DUP5 SWAP1 PUSH1 0x0 PUSH2 0x3036 JUMP JUMPDEST SWAP1 POP PUSH2 0x1FD3 DUP2 PUSH2 0x20A PUSH2 0x52B JUMP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x1F97 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x1FEC DUP7 DUP7 DUP7 PUSH2 0x30E3 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH2 0x2016 PUSH2 0x1FFE DUP5 PUSH2 0x31AA JUMP JUMPDEST DUP1 ISZERO PUSH2 0x200E JUMPI POP PUSH2 0x200E DUP4 PUSH2 0x31AA JUMP JUMPDEST PUSH2 0x20D PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 SWAP6 DUP7 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 DUP7 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP1 DUP2 AND DUP3 SSTORE PUSH1 0x1 SWAP1 SWAP2 ADD DUP1 SLOAD SWAP1 SWAP2 AND SWAP1 SSTORE SWAP5 SWAP1 SWAP5 SSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x2071 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x20BD PUSH2 0x200E PUSH1 0x7 PUSH1 0x0 DUP9 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH2 0x31AA JUMP JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 DUP2 SWAP1 SSTORE PUSH2 0x20EC DUP5 DUP4 PUSH2 0x31B7 JUMP JUMPDEST SWAP1 POP PUSH2 0x20FA DUP2 PUSH2 0x209 PUSH2 0x52B JUMP JUMPDEST POP POP PUSH1 0x1 ADD PUSH2 0x205A JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH1 0x0 DUP4 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x212B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH1 0x0 PUSH2 0x2141 DUP5 DUP4 PUSH2 0x32BE JUMP JUMPDEST SWAP1 POP PUSH2 0x214F PUSH2 0x200E DUP3 PUSH2 0x31AA JUMP JUMPDEST PUSH2 0x2159 DUP5 DUP4 PUSH2 0x32CD JUMP JUMPDEST POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x2114 JUMP JUMPDEST PUSH2 0x216F PUSH2 0x4BBE JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH2 0x217B PUSH2 0x16F5 JUMP JUMPDEST DUP4 PUSH2 0x2185 DUP2 PUSH2 0x2587 JUMP JUMPDEST DUP4 PUSH2 0x218F DUP2 PUSH2 0x1A29 JUMP JUMPDEST PUSH2 0x21A3 DUP4 PUSH1 0x0 ADD MLOAD MLOAD DUP5 PUSH1 0x20 ADD MLOAD MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH1 0x60 PUSH2 0x21B2 DUP5 PUSH1 0x0 ADD MLOAD PUSH2 0x336F JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH2 0x21C0 DUP9 DUP4 PUSH2 0x33FD JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP1 PUSH1 0x60 PUSH2 0x21D5 DUP13 DUP13 DUP13 DUP13 DUP13 DUP10 PUSH2 0x348E JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH1 0x0 PUSH2 0x21E6 DUP13 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x21F6 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x225E JUMPI PUSH2 0x2259 DUP13 DUP8 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x220D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x2222 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP10 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x2237 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP9 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x224C JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x3653 JUMP JUMPDEST PUSH2 0x2287 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x226C JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x227D JUMPI PUSH2 0x2259 DUP13 DUP8 DUP7 PUSH2 0x3692 JUMP JUMPDEST PUSH2 0x2287 DUP13 DUP6 PUSH2 0x36FF JUMP JUMPDEST PUSH1 0x0 DUP1 DUP15 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x2296 JUMPI INVALID JUMPDEST EQ SWAP1 POP DUP12 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP14 PUSH32 0xE5CE249087CE04F05A957192435400FD97868DBA0E6A4B4C049ABF8AF80DAE78 DUP10 PUSH2 0x22D0 DUP9 DUP7 PUSH2 0x3748 JUMP JUMPDEST DUP8 PUSH1 0x40 MLOAD PUSH2 0x22E0 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5A16 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP POP POP POP POP POP PUSH2 0x1C4B PUSH2 0x1762 JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2312 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x233C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH2 0x2347 PUSH2 0x4BE8 JUMP JUMPDEST PUSH2 0x234F PUSH2 0x4B45 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 JUMPDEST DUP10 MLOAD DUP2 LT ISZERO PUSH2 0x257A JUMPI DUP10 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x236A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP5 POP PUSH1 0x0 DUP10 MLOAD DUP7 PUSH1 0x20 ADD MLOAD LT DUP1 ISZERO PUSH2 0x238E JUMPI POP DUP10 MLOAD DUP7 PUSH1 0x40 ADD MLOAD LT JUMPDEST SWAP1 POP PUSH2 0x239B DUP2 PUSH1 0x64 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x23BD DUP12 DUP9 PUSH1 0x20 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x23B0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x1A5B JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x23D4 DUP13 DUP10 PUSH1 0x40 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x23B0 JUMPI INVALID JUMPDEST SWAP1 POP PUSH2 0x23F7 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x1FD PUSH2 0x52B JUMP JUMPDEST PUSH1 0x60 DUP9 ADD MLOAD PUSH2 0x2447 JUMPI PUSH2 0x240F PUSH1 0x0 DUP6 GT PUSH2 0x1FE PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x241C DUP12 DUP5 DUP5 PUSH2 0x37EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ SWAP1 POP PUSH2 0x243E DUP2 PUSH2 0x1FF PUSH2 0x52B JUMP JUMPDEST POP PUSH1 0x60 DUP9 ADD DUP6 SWAP1 MSTORE JUMPDEST DUP8 MLOAD PUSH1 0x80 DUP9 ADD MSTORE DUP7 DUP11 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x245B JUMPI INVALID JUMPDEST SWAP1 DUP2 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x2468 JUMPI INVALID JUMPDEST SWAP1 MSTORE POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP4 AND PUSH1 0x20 DUP10 ADD MSTORE DUP2 DUP2 AND PUSH1 0x40 DUP1 DUP11 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP1 DUP12 ADD MLOAD SWAP1 DUP11 ADD MSTORE PUSH1 0x80 DUP11 ADD MLOAD PUSH2 0x100 DUP11 ADD MSTORE DUP13 MLOAD DUP3 AND PUSH1 0xC0 DUP11 ADD MSTORE DUP13 ADD MLOAD AND PUSH1 0xE0 DUP9 ADD MSTORE PUSH1 0x0 DUP1 PUSH2 0x24BA DUP10 PUSH2 0x1A80 JUMP JUMPDEST SWAP2 SWAP9 POP SWAP3 POP SWAP1 POP PUSH2 0x24CC DUP13 DUP6 DUP6 PUSH2 0x3811 JUMP JUMPDEST SWAP8 POP PUSH2 0x2500 PUSH2 0x24DA DUP4 PUSH2 0x382B JUMP JUMPDEST DUP13 DUP13 PUSH1 0x20 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x24EA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x383F SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP12 DUP12 PUSH1 0x20 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x2510 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x254E PUSH2 0x2528 DUP3 PUSH2 0x382B JUMP JUMPDEST DUP13 DUP13 PUSH1 0x40 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x2538 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x3873 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP12 DUP12 PUSH1 0x40 ADD MLOAD DUP2 MLOAD DUP2 LT PUSH2 0x255E JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x2355 JUMP JUMPDEST POP POP POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x728 SWAP1 PUSH1 0xFF AND PUSH2 0x1F4 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x25B6 DUP8 PUSH2 0x38A7 JUMP JUMPDEST SWAP5 POP SWAP5 POP SWAP5 POP SWAP5 POP POP DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x25E5 JUMPI DUP3 SWAP5 POP POP POP POP POP PUSH2 0x169C JUMP JUMPDEST DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP7 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x260A JUMPI SWAP4 POP PUSH2 0x169C SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x2615 PUSH2 0x209 PUSH2 0x16A2 JUMP JUMPDEST POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD DUP2 PUSH2 0x264C DUP3 PUSH2 0x391D JUMP JUMPDEST DUP1 PUSH2 0x266A JUMPI POP PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH2 0x266A SWAP1 DUP6 PUSH2 0x392F JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x2685 JUMPI PUSH2 0x267A DUP6 PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x2685 PUSH2 0x209 PUSH2 0x16A2 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0xA1A DUP2 DUP5 PUSH2 0x32BE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x70 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x70 SHR PUSH1 0x1 PUSH1 0x1 PUSH1 0x70 SHL SUB AND SWAP1 JUMP JUMPDEST PUSH1 0xE0 SHR SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x26D2 DUP5 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x26E2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x26FA JUMPI PUSH2 0x26F2 DUP5 DUP5 PUSH2 0x3950 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2708 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2718 JUMPI PUSH2 0x26F2 DUP5 DUP5 PUSH2 0x39A1 JUMP JUMPDEST PUSH2 0x26F2 DUP5 DUP5 PUSH2 0x39B9 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x2730 DUP7 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP8 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2740 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x275C JUMPI PUSH2 0x2752 DUP7 DUP3 DUP8 DUP8 PUSH2 0x39D1 JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x2788 JUMP JUMPDEST PUSH1 0x1 DUP8 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x276A JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x277C JUMPI PUSH2 0x2752 DUP7 DUP3 DUP8 DUP8 PUSH2 0x3A4C JUMP JUMPDEST PUSH2 0x2752 DUP7 DUP3 DUP8 DUP8 PUSH2 0x3AC8 JUMP JUMPDEST SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH32 0x0 PUSH32 0x0 PUSH32 0x0 PUSH2 0x27FE PUSH2 0x3B2B JUMP JUMPDEST ADDRESS PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x2813 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5C28 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x60 SHR SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x2842 DUP5 PUSH2 0x1E69 JUMP JUMPDEST SWAP1 POP PUSH1 0x2 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2852 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x286B JUMPI PUSH2 0x2861 DUP5 PUSH2 0x3B2F JUMP JUMPDEST SWAP3 POP SWAP3 POP POP PUSH2 0x2891 JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x2879 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2888 JUMPI PUSH2 0x2861 DUP5 PUSH2 0x3C64 JUMP JUMPDEST PUSH2 0x2861 DUP5 PUSH2 0x3D89 JUMP JUMPDEST SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x28B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x28DB JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x0 SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x14DD JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x28FC JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x290F DUP2 PUSH2 0x3E83 JUMP JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x291B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2939 DUP4 PUSH2 0x2934 DUP4 PUSH2 0x26C0 JUMP JUMPDEST PUSH2 0x3E9E JUMP JUMPDEST SWAP3 POP POP PUSH1 0x1 ADD PUSH2 0x28E5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x297F DUP7 DUP7 PUSH2 0x191B JUMP JUMPDEST SWAP1 POP PUSH2 0x2998 DUP4 DUP1 PUSH2 0x2990 JUMPI POP DUP5 DUP3 LT ISZERO JUMPDEST PUSH2 0x201 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x29A2 DUP2 DUP6 PUSH2 0x3EB5 JUMP JUMPDEST SWAP2 POP DUP2 DUP2 SUB PUSH2 0x29BE DUP8 DUP8 DUP4 PUSH2 0x29B6 DUP8 PUSH2 0x382B JUMP JUMPDEST PUSH1 0x0 SUB PUSH2 0x3EC4 JUMP JUMPDEST POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x29D4 DUP5 DUP5 PUSH2 0x191B JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x29E2 DUP3 DUP5 PUSH2 0x1831 JUMP JUMPDEST SWAP1 POP PUSH2 0x1C4B DUP6 DUP6 DUP4 PUSH2 0x29F3 DUP8 PUSH2 0x382B JUMP JUMPDEST PUSH2 0x3EC4 JUMP JUMPDEST PUSH2 0xDBE DUP5 PUSH4 0x23B872DD PUSH1 0xE0 SHL DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x24 ADD PUSH2 0x1DDF SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x59B2 JUMP JUMPDEST PUSH2 0x2A28 DUP2 SELFBALANCE LT ISZERO PUSH2 0x1A3 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 PUSH1 0x40 MLOAD PUSH2 0x2A41 SWAP1 PUSH2 0x528 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x2A7E JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x2A83 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP POP SWAP1 POP PUSH2 0xF5F DUP2 PUSH2 0x1A4 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH4 0x26F8AA21 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x0 SWAP2 PUSH2 0x100 SWAP1 DIV PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x9BE2A884 SWAP1 PUSH2 0x2ACD SWAP1 DUP7 SWAP1 DUP7 SWAP1 ADDRESS SWAP1 PUSH1 0x4 ADD PUSH2 0x5B11 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2AE5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x2AF9 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x1699 SWAP2 SWAP1 PUSH2 0x52D5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP2 ADD SWAP1 SWAP2 SSTORE PUSH2 0xF5F PUSH2 0x2B4B DUP5 DUP4 PUSH2 0x3F1F JUMP JUMPDEST DUP4 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x2B6E DUP7 PUSH1 0x80 ADD MLOAD DUP8 PUSH1 0x20 ADD MLOAD DUP9 PUSH1 0x40 ADD MLOAD PUSH2 0x30E3 JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH1 0x0 DUP1 DUP8 PUSH1 0x40 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP9 PUSH1 0x20 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT ISZERO PUSH2 0x2BA3 JUMPI POP DUP4 SWAP1 POP DUP3 PUSH2 0x2BA9 JUMP JUMPDEST POP DUP3 SWAP1 POP DUP4 JUMPDEST PUSH2 0x2BB5 DUP9 DUP9 DUP5 DUP5 PUSH2 0x4045 JUMP JUMPDEST PUSH1 0x40 DUP12 ADD MLOAD PUSH1 0x20 DUP13 ADD MLOAD SWAP2 SWAP10 POP SWAP3 SWAP5 POP SWAP1 SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND SWAP2 AND LT PUSH2 0x2BE9 JUMPI PUSH2 0x2BE4 DUP2 DUP4 PUSH2 0x4142 JUMP JUMPDEST PUSH2 0x2BF3 JUMP JUMPDEST PUSH2 0x2BF3 DUP3 DUP3 PUSH2 0x4142 JUMP JUMPDEST SWAP1 SWAP3 SSTORE POP SWAP3 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x2C16 DUP5 PUSH1 0x80 ADD MLOAD DUP6 PUSH1 0x20 ADD MLOAD PUSH2 0x261F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2C2C DUP6 PUSH1 0x80 ADD MLOAD DUP7 PUSH1 0x40 ADD MLOAD PUSH2 0x261F JUMP JUMPDEST SWAP1 POP PUSH2 0x2C3A DUP6 DUP6 DUP5 DUP5 PUSH2 0x4045 JUMP JUMPDEST PUSH1 0x80 DUP9 ADD DUP1 MLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 DUP3 DUP15 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 DUP2 AND DUP7 MSTORE SWAP1 DUP4 MSTORE DUP2 DUP6 KECCAK256 SWAP9 SWAP1 SWAP9 SSTORE SWAP4 MLOAD DUP4 MSTORE SWAP1 DUP2 MSTORE DUP3 DUP3 KECCAK256 SWAP11 DUP4 ADD MLOAD SWAP1 SWAP6 AND DUP2 MSTORE SWAP9 SWAP1 SWAP4 MSTORE SWAP2 SWAP1 SWAP7 KECCAK256 SWAP6 SWAP1 SWAP6 SSTORE POP SWAP3 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 DUP3 ADD MLOAD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP1 DUP5 ADD MLOAD DUP3 SWAP2 DUP3 SWAP2 DUP3 SWAP1 PUSH2 0x2CBE SWAP1 DUP4 SWAP1 PUSH2 0x417D JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x2CD9 DUP9 PUSH1 0x40 ADD MLOAD DUP5 PUSH2 0x417D SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP DUP2 ISZERO DUP1 PUSH2 0x2CE6 JUMPI POP DUP1 ISZERO JUMPDEST ISZERO PUSH2 0x2D03 JUMPI PUSH2 0x2CF8 DUP9 PUSH1 0x80 ADD MLOAD PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x2D03 PUSH2 0x209 PUSH2 0x16A2 JUMP JUMPDEST PUSH1 0x0 NOT SWAP2 DUP3 ADD SWAP2 ADD PUSH1 0x0 PUSH2 0x2D16 DUP5 PUSH2 0x419C JUMP JUMPDEST SWAP1 POP PUSH1 0x60 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x2D30 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x2D5A JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP PUSH1 0x0 PUSH1 0xA0 DUP13 ADD DUP2 SWAP1 MSTORE SWAP1 SWAP2 POP JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x2DDA JUMPI PUSH1 0x0 PUSH2 0x2D7C DUP8 DUP4 PUSH2 0x41A0 JUMP JUMPDEST SWAP1 POP PUSH2 0x2D87 DUP2 PUSH2 0x3E83 JUMP JUMPDEST DUP4 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x2D93 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP PUSH2 0x2DB0 DUP13 PUSH1 0xA0 ADD MLOAD PUSH2 0x2934 DUP4 PUSH2 0x26C0 JUMP JUMPDEST PUSH1 0xA0 DUP14 ADD MSTORE DUP2 DUP7 EQ ISZERO PUSH2 0x2DC5 JUMPI DUP1 SWAP9 POP PUSH2 0x2DD1 JUMP JUMPDEST DUP5 DUP3 EQ ISZERO PUSH2 0x2DD1 JUMPI DUP1 SWAP8 POP JUMPDEST POP PUSH1 0x1 ADD PUSH2 0x2D68 JUMP JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0xF64AA5 PUSH1 0xE1 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP11 AND SWAP1 PUSH4 0x1EC954A SWAP1 PUSH2 0x2E0C SWAP1 DUP14 SWAP1 DUP6 SWAP1 DUP10 SWAP1 DUP10 SWAP1 PUSH1 0x4 ADD PUSH2 0x5C80 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x2E26 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2E3A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x2E5E SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST SWAP8 POP PUSH1 0x0 DUP1 PUSH2 0x2E76 DUP13 PUSH1 0x0 ADD MLOAD DUP14 PUSH1 0x60 ADD MLOAD DUP13 PUSH2 0x2EB8 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH2 0x2E85 DUP10 DUP4 PUSH2 0x41B6 JUMP JUMPDEST SWAP9 POP PUSH2 0x2E91 DUP9 DUP3 PUSH2 0x41E7 JUMP JUMPDEST SWAP8 POP PUSH2 0x2E9E DUP8 DUP8 DUP12 PUSH2 0x41FD JUMP JUMPDEST PUSH2 0x2EA9 DUP8 DUP7 DUP11 PUSH2 0x41FD JUMP JUMPDEST POP POP POP POP POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 DUP6 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x2EC8 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2ED8 JUMPI POP DUP3 SWAP1 POP DUP2 PUSH2 0x2EDE JUMP JUMPDEST POP DUP2 SWAP1 POP DUP3 JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MUL PUSH2 0x2F0A DUP5 ISZERO DUP1 PUSH2 0x2F03 JUMPI POP DUP4 DUP6 DUP4 DUP2 PUSH2 0x2F00 JUMPI INVALID JUMPDEST DIV EQ JUMPDEST PUSH1 0x3 PUSH2 0x52B JUMP JUMPDEST DUP1 PUSH2 0x2F19 JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 PUSH1 0x0 NOT DUP3 ADD DIV PUSH1 0x1 ADD SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 PUSH1 0x40 MLOAD PUSH2 0x2F4F SWAP2 SWAP1 PUSH2 0x5940 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP7 GAS CALL SWAP2 POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x2F8C JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x2F91 JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP PUSH1 0x0 DUP3 EQ ISZERO PUSH2 0x2FA9 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH2 0xDBE DUP2 MLOAD PUSH1 0x0 EQ DUP1 PUSH2 0x2FCB JUMPI POP DUP2 DUP1 PUSH1 0x20 ADD SWAP1 MLOAD DUP2 ADD SWAP1 PUSH2 0x2FCB SWAP2 SWAP1 PUSH2 0x52D5 JUMP JUMPDEST PUSH2 0x1A2 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2FDF DUP4 DUP4 PUSH2 0x392F JUMP JUMPDEST PUSH2 0x302E JUMPI POP DUP2 SLOAD PUSH1 0x1 DUP1 DUP3 ADD DUP5 SSTORE PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 SWAP1 SWAP4 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP7 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP6 SLOAD SWAP1 DUP3 MSTORE DUP3 DUP7 ADD SWAP1 SWAP4 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x169C JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x169C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 PUSH2 0x30C3 JUMPI POP POP DUP3 SLOAD PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 DUP2 AND DUP1 DUP4 MSTORE PUSH1 0x20 DUP1 DUP5 ADD DUP8 DUP2 MSTORE PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x1 DUP1 DUP13 ADD DUP5 MSTORE DUP8 DUP3 KECCAK256 SWAP7 MLOAD DUP8 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP7 AND SWAP6 SWAP1 SWAP6 OR DUP7 SSTORE SWAP1 MLOAD SWAP5 DUP5 ADD SWAP5 SWAP1 SWAP5 SSTORE SWAP5 DUP3 ADD DUP1 DUP10 SSTORE SWAP1 DUP4 MSTORE PUSH1 0x2 DUP9 ADD SWAP1 SWAP5 MSTORE SWAP2 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE PUSH2 0x175B JUMP JUMPDEST PUSH1 0x0 NOT ADD PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 DUP1 DUP7 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP3 KECCAK256 ADD DUP4 SWAP1 SSTORE SWAP1 POP PUSH2 0x175B JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x30F5 DUP8 DUP8 PUSH2 0x4215 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH2 0x3105 DUP4 DUP4 PUSH2 0x4246 JUMP JUMPDEST PUSH1 0x0 DUP11 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE PUSH1 0x2 ADD SWAP1 SWAP2 MSTORE DUP2 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP3 ADD SLOAD SWAP2 SWAP8 POP SWAP3 SWAP4 POP SWAP1 PUSH2 0x3138 DUP4 PUSH2 0x391D JUMP JUMPDEST DUP1 PUSH2 0x3147 JUMPI POP PUSH2 0x3147 DUP3 PUSH2 0x391D JUMP JUMPDEST DUP1 PUSH2 0x3168 JUMPI POP PUSH2 0x3157 DUP13 DUP8 PUSH2 0x3950 JUMP JUMPDEST DUP1 ISZERO PUSH2 0x3168 JUMPI POP PUSH2 0x3168 DUP13 DUP7 PUSH2 0x3950 JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x3183 JUMPI PUSH2 0x3178 DUP13 PUSH2 0x2587 JUMP JUMPDEST PUSH2 0x3183 PUSH2 0x209 PUSH2 0x16A2 JUMP JUMPDEST PUSH2 0x318D DUP4 DUP4 PUSH2 0x4279 JUMP JUMPDEST SWAP9 POP PUSH2 0x3199 DUP4 DUP4 PUSH2 0x429E JUMP JUMPDEST SWAP8 POP POP POP POP POP POP POP SWAP4 POP SWAP4 POP SWAP4 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB AND ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x32B4 JUMPI DUP4 SLOAD PUSH1 0x0 NOT DUP1 DUP4 ADD SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH1 0x0 SWAP1 DUP8 SWAP1 DUP4 SWAP1 DUP2 LT PUSH2 0x31F4 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP8 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 POP DUP2 SWAP1 DUP9 SWAP1 DUP6 SWAP1 DUP2 LT PUSH2 0x321D JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP2 SWAP1 SWAP2 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP5 DUP6 AND OR SWAP1 SSTORE SWAP2 DUP4 AND DUP2 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP1 DUP5 ADD SWAP1 SSTORE DUP7 SLOAD DUP8 SWAP1 DUP1 PUSH2 0x3266 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 DUP4 ADD PUSH1 0x0 NOT SWAP1 DUP2 ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT AND SWAP1 SSTORE SWAP1 SWAP3 ADD SWAP1 SWAP3 SSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP9 AND DUP3 MSTORE PUSH1 0x1 DUP10 DUP2 ADD SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE SWAP5 POP PUSH2 0x169C SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 DUP4 DUP4 PUSH2 0x209 PUSH2 0x42B5 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD DUP1 ISZERO PUSH2 0x32B4 JUMPI DUP4 SLOAD PUSH1 0x0 NOT SWAP1 DUP2 ADD PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 DUP8 DUP2 ADD PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP6 DUP8 ADD DUP5 MSTORE DUP1 DUP5 KECCAK256 DUP7 SLOAD DUP2 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB NOT SWAP1 DUP2 AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 DUP4 AND OR DUP4 SSTORE DUP9 DUP7 ADD DUP1 SLOAD SWAP4 DUP8 ADD SWAP4 SWAP1 SWAP4 SSTORE DUP9 SLOAD DUP3 AND DUP8 MSTORE PUSH1 0x2 DUP14 ADD DUP1 DUP7 MSTORE DUP5 DUP9 KECCAK256 SWAP11 SWAP1 SWAP11 SSTORE DUP9 SLOAD AND SWAP1 SWAP8 SSTORE DUP5 SWAP1 SSTORE SWAP4 DUP10 SSTORE SWAP4 DUP8 AND DUP3 MSTORE SWAP4 SWAP1 SWAP3 MSTORE DUP2 KECCAK256 SSTORE SWAP1 POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x60 DUP1 DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3389 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x33B3 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x830 JUMPI PUSH2 0x33D1 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x23B0 JUMPI INVALID JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x33DD JUMPI INVALID JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 ADD PUSH2 0x33B9 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x60 PUSH2 0x340B DUP6 PUSH2 0x2834 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0x341B DUP3 MLOAD DUP6 MLOAD PUSH2 0x1D2C JUMP JUMPDEST PUSH2 0x342B PUSH1 0x0 DUP4 MLOAD GT PUSH2 0x20F PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0x3485 JUMPI PUSH2 0x347D DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x3446 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3463 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0x208 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x342E JUMP JUMPDEST POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x60 DUP1 PUSH1 0x0 PUSH2 0x349F DUP7 PUSH2 0x2896 JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH1 0x0 PUSH2 0x34AE DUP12 PUSH2 0x282E JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP13 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x34BE JUMPI INVALID JUMPDEST EQ PUSH2 0x3561 JUMPI DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x74F3B009 DUP13 DUP13 DUP13 DUP8 DUP8 PUSH2 0x34DF PUSH2 0x42F2 JUMP JUMPDEST DUP16 PUSH1 0x40 ADD MLOAD PUSH1 0x40 MLOAD DUP9 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x3506 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5B30 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x3520 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x3534 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x355C SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x5263 JUMP JUMPDEST PUSH2 0x35FA JUMP JUMPDEST DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0xD5C096C4 DUP13 DUP13 DUP13 DUP8 DUP8 PUSH2 0x357D PUSH2 0x42F2 JUMP JUMPDEST DUP16 PUSH1 0x40 ADD MLOAD PUSH1 0x40 MLOAD DUP9 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x35A4 SWAP8 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5B30 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x35BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x35D2 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x35FA SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x5263 JUMP JUMPDEST DUP1 SWAP6 POP DUP2 SWAP7 POP POP POP PUSH2 0x3610 DUP8 MLOAD DUP7 MLOAD DUP7 MLOAD PUSH2 0x436C JUMP JUMPDEST PUSH1 0x0 DUP13 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x361E JUMPI INVALID JUMPDEST EQ PUSH2 0x3635 JUMPI PUSH2 0x3630 DUP10 DUP10 DUP10 DUP9 DUP9 PUSH2 0x4384 JUMP JUMPDEST PUSH2 0x3642 JUMP JUMPDEST PUSH2 0x3642 DUP11 DUP10 DUP10 DUP9 DUP9 PUSH2 0x44CA JUMP JUMPDEST SWAP6 POP POP POP POP SWAP7 POP SWAP7 POP SWAP7 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x365F DUP6 DUP5 PUSH2 0x4246 JUMP JUMPDEST PUSH1 0x0 DUP8 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP5 DUP5 MSTORE PUSH1 0x2 ADD SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SWAP1 SWAP2 POP PUSH2 0x3688 DUP6 DUP5 PUSH2 0x4142 JUMP JUMPDEST SWAP1 SSTORE POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI DUP2 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x36AA JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x7 PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x36D3 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP3 MSTORE DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 ADD PUSH1 0x0 KECCAK256 SSTORE PUSH1 0x1 ADD PUSH2 0x3695 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SWAP1 JUMPDEST DUP3 MLOAD DUP2 LT ISZERO PUSH2 0xDBE JUMPI PUSH2 0x3740 DUP2 DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3728 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP5 PUSH2 0x41FD SWAP1 SWAP3 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x370F JUMP JUMPDEST PUSH1 0x60 DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3761 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x378B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x830 JUMPI DUP3 PUSH2 0x37BB JUMPI DUP4 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x37AB JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x0 SUB PUSH2 0x37D0 JUMP JUMPDEST DUP4 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x37C7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x37DC JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x3791 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP5 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x37FE JUMPI INVALID JUMPDEST EQ PUSH2 0x3809 JUMPI DUP2 PUSH2 0xA1A JUMP JUMPDEST POP SWAP1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP5 PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x3820 JUMPI INVALID JUMPDEST EQ PUSH2 0x830 JUMPI DUP3 PUSH2 0xA1A JUMP JUMPDEST PUSH1 0x0 PUSH2 0x216F PUSH1 0x1 PUSH1 0xFF SHL DUP4 LT PUSH2 0x1A5 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD PUSH2 0x1699 DUP3 DUP5 SLT DUP1 ISZERO SWAP1 PUSH2 0x3857 JUMPI POP DUP5 DUP3 SLT ISZERO JUMPDEST DUP1 PUSH2 0x386C JUMPI POP PUSH1 0x0 DUP5 SLT DUP1 ISZERO PUSH2 0x386C JUMPI POP DUP5 DUP3 SLT JUMPDEST PUSH1 0x0 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 SUB PUSH2 0x1699 DUP3 DUP5 SLT DUP1 ISZERO SWAP1 PUSH2 0x388B JUMPI POP DUP5 DUP3 SGT ISZERO JUMPDEST DUP1 PUSH2 0x38A0 JUMPI POP PUSH1 0x0 DUP5 SLT DUP1 ISZERO PUSH2 0x38A0 JUMPI POP DUP5 DUP3 SGT JUMPDEST PUSH1 0x1 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP3 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND SWAP3 DUP5 SWAP3 SWAP1 SWAP2 AND SWAP1 DUP3 SWAP1 DUP2 PUSH2 0x38DB DUP7 DUP6 PUSH2 0x4246 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP3 ADD SLOAD SWAP2 SWAP10 POP SWAP2 SWAP3 POP PUSH2 0x3902 DUP3 DUP3 PUSH2 0x4279 JUMP JUMPDEST SWAP7 POP PUSH2 0x390E DUP3 DUP3 PUSH2 0x429E JUMP JUMPDEST SWAP5 POP POP POP POP POP SWAP2 SWAP4 SWAP6 SWAP1 SWAP3 SWAP5 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3928 DUP3 PUSH2 0x31AA JUMP JUMPDEST ISZERO SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x9 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP1 SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 DUP2 AND SWAP2 AND EQ DUP1 PUSH2 0x3988 JUMPI POP PUSH1 0x1 DUP2 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 DUP2 AND SWAP2 AND EQ JUMPDEST DUP1 ISZERO PUSH2 0xA1A JUMPI POP POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND ISZERO ISZERO SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0xA1A DUP2 DUP5 PUSH2 0x392F JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH2 0xA1A DUP2 DUP5 PUSH2 0x463F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x2 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x39E2 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x39F8 JUMPI PUSH2 0x39F3 DUP7 DUP6 DUP6 PUSH2 0x4660 JUMP JUMPDEST PUSH2 0x3A22 JUMP JUMPDEST PUSH1 0x1 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3A06 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3A17 JUMPI PUSH2 0x39F3 DUP7 DUP6 DUP6 PUSH2 0x466E JUMP JUMPDEST PUSH2 0x3A22 DUP7 DUP6 DUP6 PUSH2 0x467C JUMP JUMPDEST DUP3 ISZERO PUSH2 0x3A3C JUMPI PUSH2 0x3A3C PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND CALLER DUP6 PUSH2 0x1DC0 JUMP JUMPDEST POP POP PUSH1 0x0 DUP2 SWAP1 SUB SWAP5 SWAP1 SWAP4 POP SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x2 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3A5D JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3A73 JUMPI PUSH2 0x3A6E DUP7 DUP6 DUP6 PUSH2 0x468A JUMP JUMPDEST PUSH2 0x3A9D JUMP JUMPDEST PUSH1 0x1 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3A81 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3A92 JUMPI PUSH2 0x3A6E DUP7 DUP6 DUP6 PUSH2 0x4698 JUMP JUMPDEST PUSH2 0x3A9D DUP7 DUP6 DUP6 PUSH2 0x46A6 JUMP JUMPDEST DUP3 ISZERO PUSH2 0x3AB8 JUMPI PUSH2 0x3AB8 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP6 AND CALLER ADDRESS DUP7 PUSH2 0x29F8 JUMP JUMPDEST POP SWAP1 SWAP5 PUSH1 0x0 DUP7 SWAP1 SUB SWAP5 POP SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x2 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3AD9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3AF1 JUMPI PUSH2 0x3AEA DUP7 DUP6 DUP6 PUSH2 0x46B4 JUMP JUMPDEST SWAP1 POP PUSH2 0x3B1E JUMP JUMPDEST PUSH1 0x1 DUP6 PUSH1 0x2 DUP2 GT ISZERO PUSH2 0x3AFF JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x3B10 JUMPI PUSH2 0x3AEA DUP7 DUP6 DUP6 PUSH2 0x46C4 JUMP JUMPDEST PUSH2 0x3B1B DUP7 DUP6 DUP6 PUSH2 0x46D4 JUMP JUMPDEST SWAP1 POP JUMPDEST PUSH1 0x0 SWAP2 POP SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST CHAINID SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x3B41 DUP8 PUSH2 0x38A7 JUMP JUMPDEST SWAP3 SWAP8 POP SWAP1 SWAP6 POP SWAP4 POP SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP5 AND ISZERO DUP1 PUSH2 0x3B69 JUMPI POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND ISZERO JUMPDEST ISZERO PUSH2 0x3B92 JUMPI POP POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 DUP2 MSTORE DUP2 DUP4 ADD SWAP1 SWAP3 MSTORE SWAP5 POP SWAP3 POP PUSH2 0x2891 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 ADD DUP4 MSTORE SWAP1 SWAP2 PUSH1 0x20 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP6 POP DUP4 DUP7 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x3BC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE POP POP DUP2 DUP7 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x3BEE JUMPI INVALID JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD DUP3 ADD MSTORE PUSH1 0x40 DUP1 MLOAD PUSH1 0x2 DUP1 DUP3 MSTORE PUSH1 0x60 DUP3 ADD DUP4 MSTORE SWAP1 SWAP3 SWAP1 SWAP2 SWAP1 DUP4 ADD SWAP1 DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP POP SWAP5 POP DUP3 DUP6 PUSH1 0x0 DUP2 MLOAD DUP2 LT PUSH2 0x3C35 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP DUP1 DUP6 PUSH1 0x1 DUP2 MLOAD DUP2 LT PUSH2 0x3C4F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x8 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x60 SWAP1 DUP2 SWAP1 PUSH2 0x3C80 DUP2 PUSH2 0x419C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3C95 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3CBF JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3CD9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3D03 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x3D82 JUMPI PUSH1 0x0 PUSH2 0x3D1E DUP4 DUP4 PUSH2 0x46E4 JUMP JUMPDEST SWAP1 POP DUP1 DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3D2D JUMPI INVALID JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 DUP4 AND PUSH1 0x20 SWAP2 DUP3 MUL SWAP3 SWAP1 SWAP3 ADD DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x0 DUP9 DUP2 MSTORE PUSH1 0x7 DUP3 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP4 DUP6 AND DUP3 MSTORE SWAP3 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD DUP5 MLOAD DUP6 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x3D6E JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD MSTORE POP PUSH1 0x1 ADD PUSH2 0x3D09 JUMP JUMPDEST POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x60 SWAP1 DUP2 SWAP1 PUSH2 0x3DA5 DUP2 PUSH2 0x419C JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3DBA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3DE4 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x3DFE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3E28 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x0 JUMPDEST DUP4 MLOAD DUP2 LT ISZERO PUSH2 0x3D82 JUMPI PUSH2 0x3E41 DUP3 DUP3 PUSH2 0x4711 JUMP JUMPDEST DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x3E4D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x3E60 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP1 MSTORE PUSH1 0x1 ADD PUSH2 0x3E2E JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3E8E DUP3 PUSH2 0x26B1 JUMP JUMPDEST PUSH2 0x3E97 DUP4 PUSH2 0x26A5 JUMP JUMPDEST ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT ISZERO PUSH2 0x3EAE JUMPI DUP2 PUSH2 0x1699 JUMP JUMPDEST POP SWAP1 SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP4 LT PUSH2 0x3EAE JUMPI DUP2 PUSH2 0x1699 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP1 DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0xB PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 DUP9 AND DUP1 DUP5 MSTORE SWAP5 SWAP1 SWAP2 MSTORE SWAP1 DUP2 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE MLOAD PUSH32 0x18E1EA4139E68413D7D08AA752E71568E36B2C5BF940893314C2C5B01EAA0C42 SWAP1 PUSH2 0x18BC SWAP1 DUP6 SWAP1 PUSH2 0x5B08 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x3F2A PUSH2 0x4735 JUMP JUMPDEST SWAP1 POP TIMESTAMP DUP2 LT ISZERO PUSH2 0x3F3E JUMPI PUSH1 0x0 SWAP2 POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3F48 PUSH2 0x4741 JUMP JUMPDEST SWAP1 POP DUP1 PUSH2 0x3F5A JUMPI PUSH1 0x0 SWAP3 POP POP POP PUSH2 0x169C JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH2 0x3F65 PUSH2 0x4852 JUMP JUMPDEST DUP1 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD KECCAK256 PUSH1 0x40 MLOAD PUSH2 0x3F81 SWAP4 SWAP3 CALLER SWAP2 DUP11 SWAP2 DUP10 SWAP2 ADD PUSH2 0x5BFC JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP PUSH1 0x0 PUSH2 0x3FA4 DUP3 PUSH2 0x48A1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x3FB3 PUSH2 0x48BD JUMP JUMPDEST SWAP3 POP SWAP3 POP SWAP3 POP PUSH1 0x0 PUSH1 0x1 DUP6 DUP6 DUP6 DUP6 PUSH1 0x40 MLOAD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD PUSH2 0x3FDE SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x5C54 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x4000 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND ISZERO DUP1 ISZERO SWAP1 PUSH2 0x4036 JUMPI POP DUP11 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ JUMPDEST SWAP12 SWAP11 POP POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x4054 DUP7 PUSH2 0x3E83 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4061 DUP7 PUSH2 0x3E83 JUMP JUMPDEST SWAP1 POP PUSH2 0x4078 PUSH2 0x406F DUP9 PUSH2 0x26C0 JUMP JUMPDEST PUSH2 0x2934 DUP9 PUSH2 0x26C0 JUMP JUMPDEST PUSH1 0xA0 DUP11 ADD MSTORE PUSH1 0x40 MLOAD PUSH4 0x274B0443 PUSH1 0xE2 SHL DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP10 AND SWAP1 PUSH4 0x9D2C110C SWAP1 PUSH2 0x40AD SWAP1 DUP13 SWAP1 DUP7 SWAP1 DUP7 SWAP1 PUSH1 0x4 ADD PUSH2 0x5CB9 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x40C7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x40DB JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x40FF SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST SWAP3 POP PUSH1 0x0 DUP1 PUSH2 0x4117 DUP12 PUSH1 0x0 ADD MLOAD DUP13 PUSH1 0x60 ADD MLOAD DUP8 PUSH2 0x2EB8 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH2 0x4126 DUP10 DUP4 PUSH2 0x41B6 JUMP JUMPDEST SWAP7 POP PUSH2 0x4132 DUP9 DUP3 PUSH2 0x41E7 JUMP JUMPDEST SWAP6 POP POP POP POP POP SWAP5 POP SWAP5 POP SWAP5 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x415A PUSH2 0x4151 DUP6 PUSH2 0x26C0 JUMP JUMPDEST PUSH2 0x2934 DUP6 PUSH2 0x26C0 JUMP JUMPDEST SWAP1 POP PUSH2 0xA1A PUSH2 0x4168 DUP6 PUSH2 0x26A5 JUMP JUMPDEST PUSH2 0x4171 DUP6 PUSH2 0x26A5 JUMP JUMPDEST DUP4 PUSH4 0xFFFFFFFF AND PUSH2 0x48E4 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 DUP3 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 ADD SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x41CC DUP4 PUSH2 0x41C6 DUP7 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 PUSH2 0x1831 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x41D9 DUP6 PUSH2 0x26B1 JUMP JUMPDEST SWAP1 POP NUMBER PUSH2 0x1266 DUP4 DUP4 DUP4 PUSH2 0x48F2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x41CC DUP4 PUSH2 0x41F7 DUP7 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 PUSH2 0x4920 JUMP JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x1 SWAP3 DUP4 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 SWAP2 KECCAK256 SWAP1 SWAP2 ADD SSTORE JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP5 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND LT PUSH2 0x4238 JUMPI DUP3 DUP5 PUSH2 0x423B JUMP JUMPDEST DUP4 DUP4 JUMPDEST SWAP2 POP SWAP2 POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x425B SWAP3 SWAP2 SWAP1 PUSH2 0x595C JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 PUSH2 0x4287 DUP5 PUSH2 0x26A5 JUMP JUMPDEST PUSH2 0x4290 DUP5 PUSH2 0x26A5 JUMP JUMPDEST PUSH2 0x4299 DUP7 PUSH2 0x26C0 JUMP JUMPDEST PUSH2 0x48F2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 PUSH2 0x42AC DUP5 PUSH2 0x26B1 JUMP JUMPDEST PUSH2 0x4290 DUP5 PUSH2 0x26B1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 DUP5 ADD PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH2 0x42DC DUP2 ISZERO ISZERO DUP5 PUSH2 0x52B JUMP JUMPDEST PUSH2 0x42E9 DUP6 PUSH1 0x1 DUP4 SUB PUSH2 0x41A0 JUMP JUMPDEST SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x42FC PUSH2 0x136F JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH4 0x55C67628 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 SHL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4334 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x4348 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND DUP3 ADD DUP1 PUSH1 0x40 MSTORE POP DUP2 ADD SWAP1 PUSH2 0x128E SWAP2 SWAP1 PUSH2 0x57BE JUMP JUMPDEST PUSH2 0xF5F DUP3 DUP5 EQ DUP1 ISZERO PUSH2 0x437D JUMPI POP DUP2 DUP4 EQ JUMPDEST PUSH1 0x67 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x60 DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x439D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x43C7 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP6 MLOAD MLOAD DUP2 LT ISZERO PUSH2 0x44C0 JUMPI PUSH1 0x0 DUP5 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x43E5 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x4415 DUP8 PUSH1 0x20 ADD MLOAD DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x4402 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 LT ISZERO PUSH2 0x1F9 PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP8 PUSH1 0x0 ADD MLOAD DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x4427 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x4441 DUP2 DUP4 DUP12 DUP12 PUSH1 0x60 ADD MLOAD PUSH2 0x1C52 JUMP JUMPDEST PUSH1 0x0 DUP6 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x444F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x446B PUSH2 0x4465 DUP4 PUSH2 0x1A5B JUMP JUMPDEST DUP3 PUSH2 0x1E16 JUMP JUMPDEST PUSH2 0x449A PUSH2 0x4478 DUP5 DUP4 PUSH2 0x1831 JUMP JUMPDEST DUP10 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x4484 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x41E7 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP6 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x44A6 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x43CD JUMP JUMPDEST POP SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP5 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP1 ISZERO PUSH2 0x44E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x450F JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH1 0x0 JUMPDEST DUP7 MLOAD MLOAD DUP2 LT ISZERO PUSH2 0x4635 JUMPI PUSH1 0x0 DUP6 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0x452D JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x455D DUP9 PUSH1 0x20 ADD MLOAD DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x454A JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD DUP3 GT ISZERO PUSH2 0x1FA PUSH2 0x52B JUMP JUMPDEST PUSH1 0x0 DUP9 PUSH1 0x0 ADD MLOAD DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x456F JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x4589 DUP2 DUP4 DUP13 DUP13 PUSH1 0x60 ADD MLOAD PUSH2 0x1B74 JUMP JUMPDEST PUSH2 0x4592 DUP2 PUSH2 0x1824 JUMP JUMPDEST ISZERO PUSH2 0x45A4 JUMPI PUSH2 0x45A1 DUP5 DUP4 PUSH2 0x1831 JUMP JUMPDEST SWAP4 POP JUMPDEST PUSH1 0x0 DUP7 DUP5 DUP2 MLOAD DUP2 LT PUSH2 0x45B2 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD SWAP1 POP PUSH2 0x45C8 PUSH2 0x4465 DUP4 PUSH2 0x1A5B JUMP JUMPDEST DUP1 DUP4 LT ISZERO PUSH2 0x45E7 JUMPI PUSH2 0x45E2 DUP4 DUP3 SUB DUP11 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x4484 JUMPI INVALID JUMPDEST PUSH2 0x460F JUMP JUMPDEST PUSH2 0x460F DUP2 DUP5 SUB DUP11 DUP7 DUP2 MLOAD DUP2 LT PUSH2 0x45F9 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH2 0x41B6 SWAP1 SWAP2 SWAP1 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST DUP7 DUP6 DUP2 MLOAD DUP2 LT PUSH2 0x461B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD DUP2 DUP2 MSTORE POP POP POP POP POP DUP1 PUSH1 0x1 ADD SWAP1 POP PUSH2 0x4515 JUMP JUMPDEST POP PUSH2 0x44C0 DUP2 PUSH2 0x18CA JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 SWAP2 SWAP1 SWAP2 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4936 DUP5 PUSH2 0x4971 JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4936 DUP5 PUSH2 0x4A1C JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4936 DUP5 PUSH2 0x4A77 JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4AC6 DUP5 PUSH2 0x4971 JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4AC6 DUP5 PUSH2 0x4A1C JUMP JUMPDEST PUSH2 0xDBE DUP4 DUP4 PUSH2 0x4AC6 DUP5 PUSH2 0x4A77 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xA1A DUP5 DUP5 PUSH2 0x4AE7 DUP6 PUSH2 0x4971 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xA1A DUP5 DUP5 PUSH2 0x4AE7 DUP6 PUSH2 0x4A1C JUMP JUMPDEST PUSH1 0x0 PUSH2 0xA1A DUP5 DUP5 PUSH2 0x4AE7 DUP6 PUSH2 0x4A77 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x0 ADD DUP3 DUP2 SLOAD DUP2 LT PUSH2 0x46F5 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 SWAP2 DUP3 ADD PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD SWAP2 ADD SLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND SWAP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x128E PUSH1 0x0 PUSH2 0x4B01 JUMP JUMPDEST PUSH1 0x0 DUP1 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xB95CAC28 DUP2 EQ PUSH2 0x4789 JUMPI PUSH4 0x8BDB3913 DUP2 EQ PUSH2 0x47B1 JUMPI PUSH4 0x52BBBE29 DUP2 EQ PUSH2 0x47D9 JUMPI PUSH4 0x945BCEC9 DUP2 EQ PUSH2 0x4801 JUMPI PUSH4 0xFA6E671D DUP2 EQ PUSH2 0x4829 JUMPI PUSH1 0x0 SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0x3F7B71252BD19113FF48C19C6E004A9BCFCCA320A0D74D58E85877CBD7DCAE58 SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0x8BBC57F66EA936902F50A71CE12B92C43F3C5340BB40C27C4E90AB84EEAE3353 SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0xE192DCBC143B1E244AD73B813FD3C097B832AD260A157340B4E5E5BEDA067ABE SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0x9BFC43A4D98313C6766986FFD7C916C7481566D9F224C6819AF0A53388ACED3A SWAP3 POP PUSH2 0x484D JUMP JUMPDEST PUSH32 0xA3F865AA351E51CFEB40F5178D1564BB629FE9030B83CAF6361D1BAAF5B90B5A SWAP3 POP JUMPDEST POP POP SWAP1 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP POP DUP3 MLOAD SWAP3 SWAP4 POP POP POP PUSH1 0x80 LT ISZERO PUSH2 0x528 JUMPI PUSH1 0x80 CALLDATASIZE SUB DUP2 MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x48AB PUSH2 0x2791 JUMP JUMPDEST DUP3 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x10EE SWAP3 SWAP2 SWAP1 PUSH2 0x5983 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x48CC PUSH1 0x20 PUSH2 0x4B01 JUMP JUMPDEST SWAP3 POP PUSH2 0x48D8 PUSH1 0x40 PUSH2 0x4B01 JUMP JUMPDEST SWAP2 POP PUSH2 0x87A PUSH1 0x60 PUSH2 0x4B01 JUMP JUMPDEST PUSH1 0xE0 SHL PUSH1 0x70 SWAP2 SWAP1 SWAP2 SHL ADD ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP4 DUP4 ADD PUSH2 0x4915 DUP6 DUP3 LT DUP1 ISZERO SWAP1 PUSH2 0x490D JUMPI POP PUSH1 0x1 PUSH1 0x70 SHL DUP3 LT JUMPDEST PUSH2 0x20E PUSH2 0x52B JUMP JUMPDEST PUSH2 0x42E9 DUP6 DUP6 DUP6 PUSH2 0x48E4 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4930 DUP4 DUP4 GT ISZERO PUSH1 0x1 PUSH2 0x52B JUMP JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x4946 DUP4 PUSH2 0x41F7 DUP7 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4957 DUP5 PUSH2 0x41C6 DUP8 PUSH2 0x26B1 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4964 DUP7 PUSH2 0x26C0 JUMP JUMPDEST SWAP1 POP PUSH2 0x1266 DUP4 DUP4 DUP4 PUSH2 0x48F2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x4982 DUP10 PUSH2 0x38A7 JUMP JUMPDEST SWAP5 POP POP SWAP4 POP SWAP4 POP SWAP4 POP PUSH1 0x0 DUP4 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP10 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ ISZERO PUSH2 0x49CD JUMPI PUSH1 0x0 PUSH2 0x49B7 DUP5 DUP10 DUP12 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x49C3 DUP2 DUP6 PUSH2 0x4B0B JUMP JUMPDEST SWAP1 SWAP4 POP SWAP1 POP PUSH2 0x49EF JUMP JUMPDEST PUSH1 0x0 PUSH2 0x49DD DUP4 DUP10 DUP12 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x49E9 DUP2 DUP5 PUSH2 0x4B0B JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP JUMPDEST PUSH2 0x49F9 DUP4 DUP4 PUSH2 0x4142 JUMP JUMPDEST DUP6 SSTORE PUSH2 0x4A05 DUP4 DUP4 PUSH2 0x4B27 JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP6 ADD SWAP5 SWAP1 SWAP5 SSTORE POP SWAP2 SWAP3 POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x4A29 DUP7 DUP7 PUSH2 0x261F JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4A3B DUP3 DUP6 DUP8 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST PUSH1 0x0 DUP9 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP12 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 DUP2 SWAP1 SSTORE SWAP1 POP PUSH2 0x4A6C DUP2 DUP4 PUSH2 0x4B0B JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP2 PUSH2 0x4A90 DUP3 DUP8 PUSH2 0x32BE JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4AA2 DUP3 DUP7 DUP9 PUSH4 0xFFFFFFFF AND JUMP JUMPDEST SWAP1 POP PUSH2 0x4AAF DUP4 DUP9 DUP4 PUSH2 0x3036 JUMP JUMPDEST POP PUSH2 0x4ABA DUP2 DUP4 PUSH2 0x4B0B JUMP JUMPDEST SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x4AD6 DUP4 PUSH2 0x41C6 DUP7 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 PUSH2 0x4957 DUP5 PUSH2 0x41F7 DUP8 PUSH2 0x26B1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x4AF3 DUP5 PUSH2 0x26A5 JUMP JUMPDEST SWAP1 POP NUMBER PUSH2 0x42E9 DUP3 DUP6 DUP4 PUSH2 0x48F2 JUMP JUMPDEST CALLDATASIZE ADD PUSH1 0x7F NOT ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x4B16 DUP3 PUSH2 0x26B1 JUMP JUMPDEST PUSH2 0x4B1F DUP5 PUSH2 0x26B1 JUMP JUMPDEST SUB SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1699 PUSH2 0x4B35 DUP5 PUSH2 0x26B1 JUMP JUMPDEST PUSH2 0x4B3E DUP5 PUSH2 0x26B1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x48E4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0x120 DUP2 ADD SWAP1 SWAP2 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x60 DUP1 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0x80 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0xA0 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0xC0 DUP4 ADD DUP3 SWAP1 MSTORE PUSH1 0xE0 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH2 0x100 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD SWAP1 SWAP2 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x40 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x60 SWAP1 SWAP2 ADD MSTORE SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 ISZERO ISZERO DUP2 MSTORE POP SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0xA0 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP1 NOT AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x60 DUP2 MSTORE POP SWAP1 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x169C DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4C35 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x4C48 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST PUSH2 0x5D02 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x4C69 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x4C91 JUMPI DUP2 CALLDATALOAD PUSH2 0x4C7F DUP2 PUSH2 0x5D73 JUMP JUMPDEST DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x4C6C JUMP JUMPDEST POP POP POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4CAC JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x4CBA PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x4C91 JUMPI DUP2 CALLDATALOAD DUP8 ADD PUSH1 0xA0 DUP1 PUSH1 0x1F NOT DUP4 DUP13 SUB ADD SLT ISZERO PUSH2 0x4CEC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4CF5 DUP2 PUSH2 0x5D02 JUMP JUMPDEST DUP6 DUP4 ADD CALLDATALOAD DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 ADD CALLDATALOAD DUP8 DUP4 ADD MSTORE PUSH1 0x60 DUP1 DUP6 ADD CALLDATALOAD DUP3 DUP5 ADD MSTORE PUSH1 0x80 SWAP2 POP DUP2 DUP6 ADD CALLDATALOAD DUP2 DUP5 ADD MSTORE POP DUP3 DUP5 ADD CALLDATALOAD SWAP3 POP PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP4 GT ISZERO PUSH2 0x4D36 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4D44 DUP13 DUP9 DUP6 DUP8 ADD ADD PUSH2 0x4E23 JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE DUP7 MSTORE POP POP SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x4CCB JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4D6C JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x4D7A PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x4D9B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x4C91 JUMPI DUP2 CALLDATALOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x4D9E JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4DCA JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x4DD8 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE SWAP2 POP PUSH1 0x20 DUP1 DUP4 ADD SWAP1 DUP5 DUP2 ADD DUP2 DUP5 MUL DUP7 ADD DUP3 ADD DUP8 LT ISZERO PUSH2 0x4DF9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 JUMPDEST DUP5 DUP2 LT ISZERO PUSH2 0x4C91 JUMPI DUP2 MLOAD DUP5 MSTORE SWAP3 DUP3 ADD SWAP3 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x4DFC JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x169C DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x4E33 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x4E48 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x4E5B PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD PUSH2 0x5D02 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE DUP4 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x4E72 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x20 DUP5 ADD PUSH1 0x20 DUP5 ADD CALLDATACOPY PUSH1 0x0 SWAP1 DUP3 ADD PUSH1 0x20 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP1 CALLDATALOAD PUSH2 0x169C DUP2 PUSH2 0x5D96 JUMP JUMPDEST DUP1 CALLDATALOAD PUSH1 0x2 DUP2 LT PUSH2 0x169C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH1 0x4 DUP2 LT PUSH2 0x169C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4EC5 JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x4ECF PUSH1 0x80 PUSH2 0x5D02 JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x4EE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4EF4 DUP6 DUP4 DUP7 ADD PUSH2 0x4C25 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x20 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x4F0A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4F16 DUP6 DUP4 DUP7 ADD PUSH2 0x4D5C JUMP JUMPDEST PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP5 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x4F2F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4F3C DUP5 DUP3 DUP6 ADD PUSH2 0x4E23 JUMP JUMPDEST PUSH1 0x40 DUP4 ADD MSTORE POP PUSH2 0x4F4F DUP4 PUSH1 0x60 DUP5 ADD PUSH2 0x4E18 JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4F6B JUMPI DUP1 DUP2 REVERT JUMPDEST PUSH2 0x4F75 PUSH1 0x80 PUSH2 0x5D02 JUMP JUMPDEST SWAP1 POP DUP2 CALLDATALOAD PUSH2 0x4F82 DUP2 PUSH2 0x5D73 JUMP JUMPDEST DUP2 MSTORE PUSH1 0x20 DUP3 ADD CALLDATALOAD PUSH2 0x4F92 DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP3 ADD CALLDATALOAD PUSH2 0x4FA5 DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 DUP3 ADD CALLDATALOAD PUSH2 0x4F4F DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x4FC9 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1699 DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x4FE6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x4FF1 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x5001 DUP2 PUSH2 0x5D73 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x5020 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH2 0x502B DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH2 0x503B DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP2 POP PUSH1 0x40 DUP5 ADD CALLDATALOAD PUSH2 0x504B DUP2 PUSH2 0x5D88 JUMP JUMPDEST DUP1 SWAP2 POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x5068 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH2 0x5073 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x508D JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x5099 DUP6 DUP3 DUP7 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x50B5 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x50CA JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x50DA JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x50E8 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP4 DUP6 ADD PUSH1 0x80 DUP1 DUP6 MUL DUP7 ADD DUP8 ADD DUP11 LT ISZERO PUSH2 0x5106 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP5 DUP7 LT ISZERO PUSH2 0x516F JUMPI DUP1 DUP3 DUP12 SUB SLT ISZERO PUSH2 0x5120 JUMPI DUP8 DUP9 REVERT JUMPDEST PUSH2 0x5129 DUP2 PUSH2 0x5D02 JUMP JUMPDEST PUSH2 0x5133 DUP12 DUP5 PUSH2 0x4E8B JUMP JUMPDEST DUP2 MSTORE DUP8 DUP4 ADD CALLDATALOAD DUP9 DUP3 ADD MSTORE PUSH1 0x40 PUSH2 0x514B DUP13 DUP3 DUP7 ADD PUSH2 0x4C1A JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH1 0x60 DUP4 DUP2 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE DUP5 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP3 DUP7 ADD SWAP3 SWAP1 DUP2 ADD SWAP1 PUSH2 0x510A JUMP JUMPDEST POP SWAP1 SWAP9 SWAP8 POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x518F JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x51A4 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x51B4 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x51C2 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP4 DUP6 ADD PUSH1 0xA0 DUP1 DUP6 MUL DUP7 ADD DUP8 ADD DUP11 LT ISZERO PUSH2 0x51E0 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP6 POP JUMPDEST DUP5 DUP7 LT ISZERO PUSH2 0x516F JUMPI DUP1 DUP3 DUP12 SUB SLT ISZERO PUSH2 0x51FA JUMPI DUP8 DUP9 REVERT JUMPDEST PUSH2 0x5203 DUP2 PUSH2 0x5D02 JUMP JUMPDEST PUSH2 0x520D DUP12 DUP5 PUSH2 0x4EA5 JUMP JUMPDEST DUP2 MSTORE PUSH2 0x521B DUP12 DUP10 DUP6 ADD PUSH2 0x4C1A JUMP JUMPDEST DUP2 DUP10 ADD MSTORE PUSH1 0x40 DUP4 DUP2 ADD CALLDATALOAD SWAP1 DUP3 ADD MSTORE PUSH1 0x60 PUSH2 0x5237 DUP13 DUP3 DUP7 ADD PUSH2 0x4C1A JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE PUSH1 0x80 PUSH2 0x5249 DUP13 DUP6 DUP4 ADD PUSH2 0x4C1A JUMP JUMPDEST SWAP1 DUP3 ADD MSTORE DUP5 MSTORE PUSH1 0x1 SWAP6 SWAP1 SWAP6 ADD SWAP5 SWAP3 DUP7 ADD SWAP3 SWAP1 DUP2 ADD SWAP1 PUSH2 0x51E4 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x5275 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x528B JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x5297 DUP7 DUP4 DUP8 ADD PUSH2 0x4DBA JUMP JUMPDEST SWAP4 POP PUSH1 0x20 DUP6 ADD MLOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x52AC JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x5099 DUP6 DUP3 DUP7 ADD PUSH2 0x4DBA JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x52CA JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1699 DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x52E6 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 MLOAD PUSH2 0x1699 DUP2 PUSH2 0x5D88 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5302 JUMPI DUP1 DUP2 REVERT JUMPDEST POP CALLDATALOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x531E JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH2 0x5330 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP3 POP PUSH1 0x40 DUP6 ADD CALLDATALOAD PUSH2 0x5340 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP2 POP PUSH1 0x60 DUP6 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x535A JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x5366 DUP8 DUP3 DUP9 ADD PUSH2 0x4EB4 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x5384 JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT ISZERO PUSH2 0x508D JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x53B4 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP4 CALLDATALOAD SWAP3 POP PUSH1 0x20 DUP1 DUP6 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x53D2 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x53DE DUP9 DUP4 DUP10 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x53F3 JUMPI DUP4 DUP5 REVERT JUMPDEST POP DUP6 ADD PUSH1 0x1F DUP2 ADD DUP8 SGT PUSH2 0x5404 JUMPI DUP3 DUP4 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x5412 PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP4 DUP6 ADD DUP6 DUP5 MUL DUP6 ADD DUP7 ADD DUP12 LT ISZERO PUSH2 0x542E JUMPI DUP7 DUP8 REVERT JUMPDEST DUP7 SWAP5 POP JUMPDEST DUP4 DUP6 LT ISZERO PUSH2 0x5459 JUMPI DUP1 CALLDATALOAD PUSH2 0x5445 DUP2 PUSH2 0x5D73 JUMP JUMPDEST DUP4 MSTORE PUSH1 0x1 SWAP5 SWAP1 SWAP5 ADD SWAP4 SWAP2 DUP6 ADD SWAP2 DUP6 ADD PUSH2 0x5432 JUMP JUMPDEST POP DUP1 SWAP6 POP POP POP POP POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x547B JUMPI DUP2 DUP3 REVERT JUMPDEST DUP3 CALLDATALOAD SWAP2 POP PUSH1 0x20 DUP4 ADD CALLDATALOAD PUSH2 0x5001 DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x549E JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT DUP2 AND DUP2 EQ PUSH2 0x1699 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x80 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x54CA JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH2 0x54D5 DUP2 PUSH2 0x5D73 JUMP JUMPDEST SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x54F0 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x54FC DUP9 DUP4 DUP10 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x5511 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x551D DUP9 DUP4 DUP10 ADD PUSH2 0x4D5C JUMP JUMPDEST SWAP4 POP PUSH1 0x60 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x5532 JUMPI DUP3 DUP4 REVERT JUMPDEST POP PUSH2 0x5366 DUP8 DUP3 DUP9 ADD PUSH2 0x4E23 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x5550 JUMPI DUP1 DUP2 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1699 DUP2 PUSH2 0x5D96 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xE0 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x5570 JUMPI DUP2 DUP3 REVERT JUMPDEST PUSH2 0x557A DUP7 DUP7 PUSH2 0x4E96 JUMP JUMPDEST SWAP4 POP PUSH1 0x20 DUP6 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x5595 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x55A1 DUP9 DUP4 DUP10 ADD PUSH2 0x4C9C JUMP JUMPDEST SWAP5 POP PUSH1 0x40 DUP8 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x55B6 JUMPI DUP4 DUP5 REVERT JUMPDEST POP PUSH2 0x55C3 DUP8 DUP3 DUP9 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP3 POP POP PUSH2 0x55D3 DUP7 PUSH1 0x60 DUP8 ADD PUSH2 0x4F5A JUMP JUMPDEST SWAP1 POP SWAP3 SWAP6 SWAP2 SWAP5 POP SWAP3 POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH2 0x120 DUP8 DUP10 SUB SLT ISZERO PUSH2 0x55F7 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x5601 DUP9 DUP9 PUSH2 0x4E96 JUMP JUMPDEST SWAP6 POP PUSH1 0x20 DUP1 DUP9 ADD CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x561D JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH2 0x5629 DUP12 DUP4 DUP13 ADD PUSH2 0x4C9C JUMP JUMPDEST SWAP8 POP PUSH1 0x40 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x563E JUMPI DUP7 DUP8 REVERT JUMPDEST PUSH2 0x564A DUP12 DUP4 DUP13 ADD PUSH2 0x4C25 JUMP JUMPDEST SWAP7 POP PUSH2 0x5659 DUP12 PUSH1 0x60 DUP13 ADD PUSH2 0x4F5A JUMP JUMPDEST SWAP6 POP PUSH1 0xE0 DUP11 ADD CALLDATALOAD SWAP2 POP DUP1 DUP3 GT ISZERO PUSH2 0x566E JUMPI DUP5 DUP6 REVERT JUMPDEST POP DUP9 ADD PUSH1 0x1F DUP2 ADD DUP11 SGT PUSH2 0x567F JUMPI DUP4 DUP5 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH2 0x568D PUSH2 0x4C43 DUP3 PUSH2 0x5D28 JUMP JUMPDEST DUP2 DUP2 MSTORE DUP4 DUP2 ADD SWAP1 DUP4 DUP6 ADD DUP6 DUP5 MUL DUP6 ADD DUP7 ADD DUP15 LT ISZERO PUSH2 0x56A9 JUMPI DUP8 DUP9 REVERT JUMPDEST DUP8 SWAP5 POP JUMPDEST DUP4 DUP6 LT ISZERO PUSH2 0x56CB JUMPI DUP1 CALLDATALOAD DUP4 MSTORE PUSH1 0x1 SWAP5 SWAP1 SWAP5 ADD SWAP4 SWAP2 DUP6 ADD SWAP2 DUP6 ADD PUSH2 0x56AD JUMP JUMPDEST POP DUP1 SWAP7 POP POP POP POP POP POP PUSH2 0x100 DUP8 ADD CALLDATALOAD SWAP1 POP SWAP3 SWAP6 POP SWAP3 SWAP6 POP SWAP3 SWAP6 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0xE0 DUP6 DUP8 SUB SLT ISZERO PUSH2 0x56FB JUMPI DUP2 DUP3 REVERT JUMPDEST DUP5 CALLDATALOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP1 DUP3 GT ISZERO PUSH2 0x5711 JUMPI DUP4 DUP5 REVERT JUMPDEST SWAP1 DUP7 ADD SWAP1 PUSH1 0xC0 DUP3 DUP10 SUB SLT ISZERO PUSH2 0x5724 JUMPI DUP4 DUP5 REVERT JUMPDEST PUSH2 0x572E PUSH1 0xC0 PUSH2 0x5D02 JUMP JUMPDEST DUP3 CALLDATALOAD DUP2 MSTORE PUSH2 0x573F DUP10 PUSH1 0x20 DUP6 ADD PUSH2 0x4E96 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP4 ADD CALLDATALOAD PUSH2 0x5752 DUP2 PUSH2 0x5D73 JUMP JUMPDEST PUSH1 0x40 DUP3 ADD MSTORE PUSH2 0x5764 DUP10 PUSH1 0x60 DUP6 ADD PUSH2 0x4C1A JUMP JUMPDEST PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 DUP4 ADD CALLDATALOAD PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 DUP4 ADD CALLDATALOAD DUP3 DUP2 GT ISZERO PUSH2 0x5784 JUMPI DUP6 DUP7 REVERT JUMPDEST PUSH2 0x5790 DUP11 DUP3 DUP7 ADD PUSH2 0x4E23 JUMP JUMPDEST PUSH1 0xA0 DUP4 ADD MSTORE POP DUP1 SWAP7 POP POP POP POP PUSH2 0x57A9 DUP7 PUSH1 0x20 DUP8 ADD PUSH2 0x4F5A JUMP JUMPDEST SWAP4 SWAP7 SWAP4 SWAP6 POP POP POP POP PUSH1 0xA0 DUP3 ADD CALLDATALOAD SWAP2 PUSH1 0xC0 ADD CALLDATALOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x57CF JUMPI DUP1 DUP2 REVERT JUMPDEST POP MLOAD SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 MSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x581B JUMPI DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x57F6 JUMP JUMPDEST POP SWAP5 SWAP6 SWAP5 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH1 0x20 DUP1 DUP6 ADD SWAP5 POP DUP1 DUP5 ADD DUP4 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x581B JUMPI DUP2 MLOAD DUP8 MSTORE SWAP6 DUP3 ADD SWAP6 SWAP1 DUP3 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x5839 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD DUP1 DUP5 MSTORE PUSH2 0x586D DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x5D47 JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP3 SWAP1 SWAP3 ADD PUSH1 0x20 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x120 DUP3 MLOAD PUSH1 0x2 DUP2 LT PUSH2 0x5892 JUMPI INVALID JUMPDEST DUP1 DUP6 MSTORE POP PUSH1 0x20 DUP4 ADD MLOAD PUSH2 0x58A8 PUSH1 0x20 DUP7 ADD DUP3 PUSH2 0x57D6 JUMP JUMPDEST POP PUSH1 0x40 DUP4 ADD MLOAD PUSH2 0x58BB PUSH1 0x40 DUP7 ADD DUP3 PUSH2 0x57D6 JUMP JUMPDEST POP PUSH1 0x60 DUP4 ADD MLOAD PUSH1 0x60 DUP6 ADD MSTORE PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0xA0 DUP4 ADD MLOAD PUSH1 0xA0 DUP6 ADD MSTORE PUSH1 0xC0 DUP4 ADD MLOAD PUSH2 0x58EC PUSH1 0xC0 DUP7 ADD DUP3 PUSH2 0x57D6 JUMP JUMPDEST POP PUSH1 0xE0 DUP4 ADD MLOAD PUSH2 0x58FF PUSH1 0xE0 DUP7 ADD DUP3 PUSH2 0x57D6 JUMP JUMPDEST POP PUSH2 0x100 DUP1 DUP5 ADD MLOAD DUP3 DUP3 DUP8 ADD MSTORE PUSH2 0x1266 DUP4 DUP8 ADD DUP3 PUSH2 0x5855 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xE0 SHL SUB NOT AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x24 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP5 DUP4 CALLDATACOPY SWAP2 ADD SWAP1 DUP2 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 MLOAD PUSH2 0x5952 DUP2 DUP5 PUSH1 0x20 DUP8 ADD PUSH2 0x5D47 JUMP JUMPDEST SWAP2 SWAP1 SWAP2 ADD SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH12 0xFFFFFFFFFFFFFFFFFFFFFFFF NOT PUSH1 0x60 SWAP4 DUP5 SHL DUP2 AND DUP3 MSTORE SWAP2 SWAP1 SWAP3 SHL AND PUSH1 0x14 DUP3 ADD MSTORE PUSH1 0x28 ADD SWAP1 JUMP JUMPDEST PUSH2 0x1901 PUSH1 0xF0 SHL DUP2 MSTORE PUSH1 0x2 DUP2 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x22 DUP3 ADD MSTORE PUSH1 0x42 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP4 DUP5 AND DUP2 MSTORE SWAP2 SWAP1 SWAP3 AND PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP4 AND DUP2 MSTORE PUSH1 0x40 DUP2 ADD PUSH1 0x3 DUP4 LT PUSH2 0x59F0 JUMPI INVALID JUMPDEST DUP3 PUSH1 0x20 DUP4 ADD MSTORE SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP3 SWAP1 SWAP3 AND DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x5A29 PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0x57E3 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x5A3B DUP2 DUP7 PUSH2 0x5826 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x1266 DUP2 DUP6 PUSH2 0x5826 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 MSTORE PUSH2 0x5A62 PUSH1 0x80 DUP4 ADD DUP8 PUSH2 0x57E3 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x5A74 DUP2 DUP8 PUSH2 0x5826 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x40 DUP5 ADD MSTORE PUSH2 0x5A88 DUP2 DUP7 PUSH2 0x5826 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 SUB PUSH1 0x60 DUP5 ADD MSTORE PUSH2 0x4A6C DUP2 DUP6 PUSH2 0x5855 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x5AAF PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0x57E3 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x5AC1 DUP2 DUP7 PUSH2 0x5826 JUMP JUMPDEST SWAP2 POP POP DUP3 PUSH1 0x40 DUP4 ADD MSTORE SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 MSTORE PUSH2 0x1699 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x5826 JUMP JUMPDEST SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 ISZERO ISZERO DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST SWAP1 DUP2 MSTORE PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST SWAP3 DUP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 DUP3 AND PUSH1 0x20 DUP5 ADD MSTORE AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0x60 ADD SWAP1 JUMP JUMPDEST DUP8 DUP2 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP8 DUP2 AND PUSH1 0x20 DUP4 ADD MSTORE DUP7 AND PUSH1 0x40 DUP3 ADD MSTORE PUSH1 0xE0 PUSH1 0x60 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP1 PUSH2 0x5B62 SWAP1 DUP4 ADD DUP8 PUSH2 0x5826 JUMP JUMPDEST DUP6 PUSH1 0x80 DUP5 ADD MSTORE DUP5 PUSH1 0xA0 DUP5 ADD MSTORE DUP3 DUP2 SUB PUSH1 0xC0 DUP5 ADD MSTORE PUSH2 0x5B80 DUP2 DUP6 PUSH2 0x5855 JUMP JUMPDEST SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 DUP3 MSTORE PUSH1 0x40 PUSH1 0x20 DUP4 ADD MSTORE PUSH2 0xA1A PUSH1 0x40 DUP4 ADD DUP5 PUSH2 0x57E3 JUMP JUMPDEST PUSH1 0x0 DUP5 DUP3 MSTORE PUSH1 0x20 PUSH1 0x60 DUP2 DUP5 ADD MSTORE PUSH2 0x5BC1 PUSH1 0x60 DUP5 ADD DUP7 PUSH2 0x57E3 JUMP JUMPDEST DUP4 DUP2 SUB PUSH1 0x40 DUP6 ADD MSTORE DUP5 MLOAD DUP1 DUP3 MSTORE DUP3 DUP7 ADD SWAP2 DUP4 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x516F JUMPI DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x5BD7 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP2 SWAP1 SWAP2 AND PUSH1 0x40 DUP5 ADD MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP5 DUP6 MSTORE PUSH1 0x20 DUP6 ADD SWAP4 SWAP1 SWAP4 MSTORE PUSH1 0x40 DUP5 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 DUP3 ADD MSTORE PUSH1 0xA0 ADD SWAP1 JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND PUSH1 0x20 DUP5 ADD MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST SWAP2 DUP3 MSTORE PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x40 ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x80 DUP3 MSTORE PUSH2 0x5C93 PUSH1 0x80 DUP4 ADD DUP8 PUSH2 0x5881 JUMP JUMPDEST DUP3 DUP2 SUB PUSH1 0x20 DUP5 ADD MSTORE PUSH2 0x5CA5 DUP2 DUP8 PUSH2 0x5826 JUMP JUMPDEST PUSH1 0x40 DUP5 ADD SWAP6 SWAP1 SWAP6 MSTORE POP POP PUSH1 0x60 ADD MSTORE SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 DUP3 MSTORE PUSH2 0x5CCC PUSH1 0x60 DUP4 ADD DUP7 PUSH2 0x5881 JUMP JUMPDEST PUSH1 0x20 DUP4 ADD SWAP5 SWAP1 SWAP5 MSTORE POP PUSH1 0x40 ADD MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST SWAP4 DUP5 MSTORE PUSH1 0x20 DUP5 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 DUP4 ADD MSTORE PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x60 DUP3 ADD MSTORE PUSH1 0x80 ADD SWAP1 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x5D20 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0x40 SHL SUB DUP3 GT ISZERO PUSH2 0x5D3D JUMPI DUP1 DUP2 REVERT JUMPDEST POP PUSH1 0x20 SWAP1 DUP2 MUL ADD SWAP1 JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x5D62 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x5D4A JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0xDBE JUMPI POP POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x728 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 ISZERO ISZERO DUP2 EQ PUSH2 0x728 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP2 LT PUSH2 0x728 JUMPI PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CREATE2 RETURNDATACOPY 0x4D DUP6 0xAA DUP3 MSTORE 0xD2 0xDA PUSH14 0xCF83A0E84884E356E79A1BF3D037 SWAP14 GT 0x48 PUSH14 0x3335E56064736F6C634300070100 CALLER ",
              "sourceMap": "3244:648:52:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6373:61:42;6404:7;:5;:7::i;:::-;-1:-1:-1;;;;;6382:30:42;:10;-1:-1:-1;;;;;6382:30:42;;9022:3:3;6373:8:42;:61::i;:::-;3244:648:52;;;;;2550:688:47;;;;;;;;;;-1:-1:-1;2550:688:47;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2521:2571:51;;;;;;:::i;:::-;;:::i;3763:201:53:-;;;;;;;;;;-1:-1:-1;3763:201:53;;;;;:::i;:::-;;:::i;2170:345:51:-;;;;;;;;;;-1:-1:-1;2170:345:51;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3634:111:52:-;;;;;;;;;;-1:-1:-1;3634:111:52;;;;;:::i;:::-;;:::i;3137:346:8:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;2389:2144:50:-;;;;;;:::i;:::-;;:::i;1451:2052:45:-;;;;;;;;;;-1:-1:-1;1451:2052:45;;;;;:::i;:::-;;:::i;1113:1188:48:-;;;;;;;;;;-1:-1:-1;1113:1188:48;;;;;:::i;:::-;;:::i;2307:1095::-;;;;;;;;;;-1:-1:-1;2307:1095:48;;;;;:::i;:::-;;:::i;2487:430:2:-;;;;;;;;;;-1:-1:-1;2487:430:2;;;;;:::i;:::-;;:::i;2309:384:46:-;;;;;;;;;;-1:-1:-1;2309:384:46;;;;;:::i;:::-;;:::i;1894:117:7:-;;;;;;;;;;-1:-1:-1;1894:117:7;;;;;:::i;:::-;;:::i;4539:1825:50:-;;;;;;:::i;:::-;;:::i;3970:105:53:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;3804:86:52:-;;;;;;;;;;;;;:::i;3857:984:48:-;;;;;;;;;;-1:-1:-1;3857:984:48;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;:::i;1741:562:46:-;;;;;;:::i;:::-;;:::i;1462:135:44:-;;;;;;;;;;;;;:::i;1564:1096:41:-;;;;;;;;;;-1:-1:-1;1564:1096:41;;;;;:::i;:::-;;:::i;1773:115:7:-;;;;;;;;;;;;;:::i;3244:246:47:-;;;;;;;;;;-1:-1:-1;3244:246:47;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;19634:5730:50:-;;;;;;;;;;-1:-1:-1;19634:5730:50;;;;;:::i;:::-;;:::i;3408:443:48:-;;;;;;;;;;-1:-1:-1;3408:443:48;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;:::i;4081:301:53:-;;;;;;;;;;-1:-1:-1;4081:301:53;;;;;:::i;:::-;;:::i;4388:155::-;;;;;;;;;;-1:-1:-1;4388:155:53;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1420:76:1:-;1484:5;1420:76;;:::o;866:101:3:-;935:9;930:34;;946:18;954:9;946:7;:18::i;:::-;866:101;;:::o;2550:688:47:-;2701:7;2561:20:22;:18;:20::i;:::-;2953:18:8::1;:16;:18::i;:::-;2902:14:47::2;2919:61;2929:10;2941:14;2964;;2919:9;:61::i;:::-;3001:25;::::0;;;:17:::2;:25;::::0;;;;;2902:78;;-1:-1:-1;2991:60:47::2;::::0;3001:25:::2;;3000:26;7978:3:3;2991:8:47;:60::i;:::-;3108:25;::::0;;;:17:::2;:25;::::0;;;;;;:32;;-1:-1:-1;;3108:32:47::2;3136:4;3108:32:::0;;::::2;::::0;;;3151:14:::2;:19:::0;;;;::::2;::::0;;3186:22;::::2;::::0;::::2;::::0;3126:6;;3186:22:::2;:::i;:::-;;;;;;;;3225:6:::0;-1:-1:-1;2602:19:22;:17;:19::i;:::-;2550:688:47;;;:::o;2521:2571:51:-;2561:20:22;:18;:20::i;:::-;2735:18:51::1;2844:27:::0;2889:21:::1;2934:9:::0;2929:2078:::1;2953:3;:10;2949:1;:14;2929:2078;;;2984:22;3020:12:::0;3046:14:::1;3074::::0;3102:25:::1;3328:100;3368:3;3372:1;3368:6;;;;;;;;;;;;;;3392:22;3328;:100::i;:::-;3261:167:::0;-1:-1:-1;3261:167:51;;-1:-1:-1;3261:167:51;;-1:-1:-1;3261:167:51;-1:-1:-1;3261:167:51;-1:-1:-1;3261:167:51;-1:-1:-1;3455:35:51::1;3447:4;:43;;;;;;;;;3443:1554;;;3608:62;3637:5;3644:6;3652:9;3663:6;3608:28;:62::i;:::-;3443:1554;;;3939:16;3934:127;;3979:18;:16;:18::i;:::-;4038:4;4019:23;;3934:127;4091:34;4083:4;:42;;;;;;;;;4079:904;;;4149:59;4175:5;4182:6;4190:9;4201:6;4149:25;:59::i;:::-;4320:13;4327:5;4320:6;:13::i;:::-;4316:103;;;4374:22;:10:::0;4389:6;4374:14:::1;:22::i;:::-;4361:35;;4079:904;;;4517:56;4527:13;4534:5;4527:6;:13::i;:::-;4526:14;9083:3:3;4517:8:51;:56::i;:::-;4595:12;4610:16;4620:5;4610:9;:16::i;:::-;4595:31:::0;-1:-1:-1;4661:35:51::1;4653:4;:43;;;;;;;;;4649:316;;;4724:58;4749:5;4756:6;4764:9;4775:6;4724:24;:58::i;:::-;4649:316;;;4882:60;4909:5;4916:6;4924:9;4935:6;4882:26;:60::i;:::-;4079:904;;-1:-1:-1::0;;2965:3:51::1;::::0;;::::1;::::0;-1:-1:-1;2929:2078:51::1;::::0;-1:-1:-1;;2929:2078:51::1;;;5054:31;5074:10;5054:19;:31::i;:::-;2591:1:22;;;2602:19:::0;:17;:19::i;:::-;2521:2571:51;:::o;3763:201:53:-;2561:20:22;:18;:20::i;:::-;2156:21:2::1;:19;:21::i;:::-;3893:11:53::2;::::0;3875:45:::2;::::0;-1:-1:-1;;;;;3875:45:53;;::::2;::::0;3893:11:::2;::::0;::::2;;::::0;3875:45:::2;::::0;;;::::2;3930:11;:27:::0;;-1:-1:-1;;;;;;3930:27:53::2;;-1:-1:-1::0;;;;;3930:27:53;::::2;;;::::0;;2602:19:22;:17;:19::i;2170:345:51:-;2300:25;2366:6;:13;-1:-1:-1;;;;;2352:28:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2352:28:51;;2341:39;;2395:9;2390:119;2414:6;:13;2410:1;:17;2390:119;;;2462:36;2482:4;2488:6;2495:1;2488:9;;;;;;;;;;;;;;2462:19;:36::i;:::-;2448:8;2457:1;2448:11;;;;;;;;;;;;;;;;;:50;2429:3;;2390:119;;;;2170:345;;;;:::o;3634:111:52:-;2561:20:22;:18;:20::i;:::-;2156:21:2::1;:19;:21::i;:::-;3720:18:52::2;3731:6;3720:10;:18::i;:::-;2602:19:22::0;:17;:19::i;3137:346:8:-;3223:11;3248:26;3288:27;3350:14;:12;:14::i;:::-;3349:15;3340:24;;3395;:22;:24::i;:::-;3374:45;;3451:25;:23;:25::i;:::-;3429:47;;3137:346;;;:::o;2389:2144:50:-;2681:24;2561:20:22;:18;:20::i;:::-;2953:18:8::1;:16;:18::i;:::-;2650:12:50::0;;3418:22:53::2;2650:12:50::0;3418:16:53::2;:22::i;:::-;2873:59:50::3;2901:8;2882:15;:27;;8414:3:3;2873:8:50;:59::i;:::-;3100:68;3129:1;3109:10;:17;;;:21;8540:3:3;3100:8:50;:68::i;:::-;3179:14;3196:38;3215:10;:18;;;3196;:38::i;:::-;3179:55;;3244:15;3262:39;3281:10;:19;;;3262:18;:39::i;:::-;3244:57;;3311:60;3331:8;-1:-1:-1::0;;;;;3320:19:50::3;:7;-1:-1:-1::0;;;;;3320:19:50::3;;;8474:3:3;3311:8:50;:60::i;:::-;3475:47;;:::i;:::-;3553:17:::0;;3532:18:::3;::::0;::::3;:38:::0;3599:15:::3;::::0;::::3;::::0;3532:11;;3580:34:::3;::::0;::::3;;;;;;;;;;;;;;;;::::0;;-1:-1:-1;;;;;;3624:29:50;;::::3;:19;::::0;::::3;:29:::0;3663:31;;::::3;:20;::::0;;::::3;:31:::0;;;;3725:17:::3;::::0;::::3;::::0;3704:18:::3;::::0;::::3;:38:::0;3775:19:::3;::::0;::::3;::::0;3752:20:::3;::::0;::::3;:42:::0;3823:12;;3804:31;::::3;:16;::::0;::::3;:31:::0;3862:15;::::3;::::0;3845:32:::3;:14;::::0;::::3;:32:::0;-1:-1:-1;;4044:26:50::3;3624:11:::0;4044:13:::3;:26::i;:::-;4002:68:::0;;-1:-1:-1;4002:68:50;-1:-1:-1;4002:68:50;-1:-1:-1;4080:106:50::3;4108:17;4089:10;:15;;;:36;;;;;;;;;:77;;4161:5;4149:8;:17;;4089:77;;;4141:5;4128:9;:18;;4089:77;8363:3:3;4080:8:50;:106::i;:::-;4197:84;4211:10;:18;;;4231:8;4241:5;:12;;;4255:5;:25;;;4197:13;:84::i;:::-;4291;4302:10;:19;;;4323:9;4334:5;:15;;;4351:5;:23;;;4291:10;:84::i;:::-;4464:62;4484:26;4491:10;:18;;;4484:6;:26::i;:::-;:41;;4524:1;4484:41;;;4513:8;4484:41;4464:19;:62::i;:::-;3450:1:53;;;;;2981::8::2;2602:19:22::0;:17;:19::i;:::-;2389:2144:50;;;;;;:::o;1451:2052:45:-;2561:20:22;:18;:20::i;:::-;2953:18:8::1;:16;:18::i;:::-;1667:66:45::2;1703:6;:13;1718:7;:14;1667:35;:66::i;:::-;1744:27;1788:6;:13;-1:-1:-1::0;;;;;1774:28:45::2;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;1774:28:45::2;;1744:58;;1812:32;1861:6;:13;-1:-1:-1::0;;;;;1847:28:45::2;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;1847:28:45::2;;1812:63;;1983:20;2031:9:::0;2026:565:::2;2050:6;:13;2046:1;:17;2026:565;;;2084:12;2099:6;2106:1;2099:9;;;;;;;;;;;;;;2084:24;;2122:14;2139:7;2147:1;2139:10;;;;;;;;;;;;;;2122:27;;2164:96;2181:13;-1:-1:-1::0;;;;;2173:21:45::2;:5;-1:-1:-1::0;;;;;2173:21:45::2;;2212:1;-1:-1:-1::0;;;;;2196:18:45::2;:5;-1:-1:-1::0;;;;;2196:18:45::2;;:63;;4943:3:3;2196:63:45;;;5050:3:3;2196:63:45;2164:8;:96::i;:::-;2290:5;2274:21;;2331:5;-1:-1:-1::0;;;;;2331:15:45::2;;2355:4;2331:30;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2310:15;2326:1;2310:18;;;;;;;;;;;;;:51;;;::::0;::::2;2391:36;2420:6;2391:28;:36::i;:::-;2375:10;2386:1;2375:13;;;;;;;;;;;;;:52;;;::::0;::::2;2442:78;2473:6;2451:15;2467:1;2451:18;;;;;;;;;;;;;;:28;;9613:3:3;2442:8:45;:78::i;:::-;2534:46;-1:-1:-1::0;;;;;2534:18:45;::::2;2561:9:::0;2573:6;2534:18:::2;:46::i;:::-;-1:-1:-1::0;;2065:3:45::2;;2026:565;;;-1:-1:-1::0;2601:65:45::2;::::0;-1:-1:-1;;;2601:65:45;;-1:-1:-1;;;;;2601:26:45;::::2;::::0;::::2;::::0;:65:::2;::::0;2628:6;;2636:7;;2645:10;;2657:8;;2601:65:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;2682:9;2677:820;2701:6;:13;2697:1;:17;2677:820;;;2735:12;2750:6;2757:1;2750:9;;;;;;;;;;;;;;2735:24;;2773:22;2798:15;2814:1;2798:18;;;;;;;;;;;;;;2773:43;;3049:23;3075:5;-1:-1:-1::0;;;;;3075:15:45::2;;3099:4;3075:30;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3049:56;;3119:77;3147:14;3128:15;:33;;8865:3:3;3119:8:45;:77::i;:::-;3298:20;3339:14;3321:15;:32;3298:55;;3367:76;3392:10;3403:1;3392:13;;;;;;;;;;;;;;3376:12;:29;;9830:3:3;3367:8:45;:76::i;:::-;3458:28;3466:5;3473:12;3458:7;:28::i;:::-;2677:820;;;;2716:3;;;;;2677:820;;;;2981:1:8;;;2602:19:22::0;:17;:19::i;:::-;1451:2052:45;;;;:::o;1113:1188:48:-;2561:20:22;:18;:20::i;:::-;2953:18:8::1;:16;:18::i;:::-;1293:6:48::2;1954:27:47;1974:6;1954:19;:27::i;:::-;1311:72:48::3;1347:6;:13;1362;:20;1311:35;:72::i;:::-;1463:9;1458:224;1482:6;:13;1478:1;:17;1458:224;;;1516:12;1531:6;1538:1;1531:9;;;;;;;;;;;;;;1516:24;;1554:50;1579:1;-1:-1:-1::0;;;;;1563:18:48::3;:5;-1:-1:-1::0;;;;;1563:18:48::3;;;6154:3:3;1554:8:48;:50::i;:::-;1655:13;1669:1;1655:16;;;;;;;;;::::0;;::::3;::::0;;;;;;;1619:26:::3;::::0;;;:18:::3;:26:::0;;;;;;-1:-1:-1;;;;;1619:33:48;;::::3;::::0;;;;;;;;;:52;;-1:-1:-1;;;;;;1619:52:48::3;::::0;;;::::3;::::0;;;::::3;::::0;;-1:-1:-1;1497:3:48::3;1458:224;;;;1692:33;1728:30;1751:6;1728:22;:30::i;:::-;1692:66:::0;-1:-1:-1;1790:28:48::3;1772:14;:46;;;;;;;;;1768:464;;;1834:60;1843:6;:13;1860:1;1843:18;9373:3:3;1834:8:48;:60::i;:::-;1908:57;1936:6;1944;1951:1;1944:9;;;;;;;;;;;;;;1955:6;1962:1;1955:9;;;;;;;;;;;;;;1908:27;:57::i;:::-;1768:464;;;2004:36;1986:14;:54;;;;;;;;;1982:250;;;2056:50;2091:6;2099;2056:34;:50::i;1982:250::-;2179:42;2206:6;2214;2179:26;:42::i;:::-;2247:47;2264:6;2272;2280:13;2247:47;;;;;;;;:::i;:::-;;;;;;;;1991:1:47;2981::8::2;2602:19:22::0;:17;:19::i;:::-;1113:1188:48;;;:::o;2307:1095::-;2561:20:22;:18;:20::i;:::-;2953:18:8::1;:16;:18::i;:::-;2467:6:48::2;1954:27:47;1974:6;1954:19;:27::i;:::-;2489:33:48::3;2525:30;2548:6;2525:22;:30::i;:::-;2489:66:::0;-1:-1:-1;2587:28:48::3;2569:14;:46;;;;;;;;;2565:470;;;2631:60;2640:6;:13;2657:1;2640:18;9373:3:3;2631:8:48;:60::i;:::-;2705:59;2735:6;2743;2750:1;2743:9;;;;;;;;;;;;;;2754:6;2761:1;2754:9;;;;;;;;;;;;;;2705:29;:59::i;:::-;2565:470;;;2803:36;2785:14;:54;;;;;;;;;2781:254;;;2855:52;2892:6;2900;2855:36;:52::i;2781:254::-;2980:44;3009:6;3017;2980:28;:44::i;:::-;3238:9;3233:113;3257:6;:13;3253:1;:17;3233:113;;;3298:18;:26;3317:6;3298:26;;;;;;;;;;;:37;3325:6;3332:1;3325:9;;;;;;;;;::::0;;::::3;::::0;;;;;;;-1:-1:-1;;;;;3298:37:48::3;::::0;;;::::3;::::0;;;;;;-1:-1:-1;3298:37:48;3291:44;;-1:-1:-1;;;;;;3291:44:48::3;::::0;;;3272:3:::3;3233:113;;;;3361:34;3380:6;3388;3361:34;;;;;;;:::i;:::-;;;;;;;;1991:1:47;2981::8::2;2602:19:22::0;:17;:19::i;2487:430:2:-;2555:7;2876:22;2900:8;2859:50;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2849:61;;;;;;2842:68;;2487:430;;;:::o;2309:384:46:-;2589:97;2601:26;2629:6;2637;2645:9;2656:29;2677:7;2656:20;:29::i;:::-;2589:11;:97::i;1894:117:7:-;-1:-1:-1;;;;;1988:16:7;1962:7;1988:16;;;:10;:16;;;;;;;1894:117::o;4539:1825:50:-;4900:27;2561:20:22;:18;:20::i;:::-;2953:18:8::1;:16;:18::i;:::-;4869:12:50::0;;3418:22:53::2;4869:12:50::0;3418:16:53::2;:22::i;:::-;5095:59:50::3;5123:8;5104:15;:27;;8414:3:3;5095:8:50;:59::i;:::-;5165:65;5201:6;:13;5216:6;:13;5165:35;:65::i;:::-;5360:42;5375:5;5382:6;5390:5;5397:4;5360:14;:42::i;:::-;5346:56;;5568:18;5605:9:::0;5600:670:::3;5624:6;:13;5620:1;:17;5600:670;;;5658:12;5673:6;5680:1;5673:9;;;;;;;;;;;;;;5658:24;;5696:12;5711:11;5723:1;5711:14;;;;;;;;;;;;;;5696:29;;5739:47;5757:6;5764:1;5757:9;;;;;;;;;;;;;;5748:5;:18;;8363:3:3;5739:8:50;:47::i;:::-;5813:1;5805:5;:9;5801:459;;;5918:12:::0;;5932:25:::3;::::0;::::3;::::0;5862:5;;5886:72:::3;::::0;5900:5;;5862;;5886:13:::3;:72::i;:::-;5981:13;5988:5;5981:6;:13::i;:::-;5977:98;;;6031:25;:10:::0;6046:9;6031:14:::3;:25::i;:::-;6018:38;;5977:98;5801:459;;;;6107:1;6099:5;:9;6095:165;;;6128:14;6154:5;6153:6;;6128:32;;6178:67;6189:5;6196:6;6204:5;:15;;;6221:5;:23;;;6178:10;:67::i;:::-;6095:165;;-1:-1:-1::0;;5639:3:50::3;;5600:670;;;;6326:31;6346:10;6326:19;:31::i;:::-;3450:1:53;2981::8::2;2602:19:22::0;:17;:19::i;:::-;4539:1825:50;;;;;;;;:::o;3970:105:53:-;4057:11;;;;;-1:-1:-1;;;;;4057:11:53;;3970:105::o;3804:86:52:-;3852:5;3876:7;:5;:7::i;:::-;3869:14;;3804:86;:::o;3857:984:48:-;4025:12;4051:15;4080:23;4117:20;3987:6;1732:29:47;1754:6;1732:21;:29::i;:::-;4162:15:48::1;4187:33:::0;4223:30:::1;4246:6;4223:22;:30::i;:::-;4187:66:::0;-1:-1:-1;4286:28:48::1;4268:14;:46;;;;;;;;;4264:391;;;4340:38;4364:6;4372:5;4340:23;:38::i;:::-;4330:48;;4264:391;;;4417:36;4399:14;:54;;;;;;;;;4395:260;;;4479:45;4510:6;4518:5;4479:30;:45::i;4395:260::-;4607:37;4630:6;4638:5;4607:22;:37::i;:::-;4597:47;;4395:260;4672:14;:7;:12;:14::i;:::-;4665:21;;4706:17;:7;:15;:17::i;:::-;4696:27;;4751:25;:7;:23;:25::i;:::-;4801:26;::::0;;;:18:::1;:26;::::0;;;;;;;-1:-1:-1;;;;;4801:33:48;;::::1;::::0;;;;;;;;;3857:984;;;;4733:43;4801:33;;;::::1;::::0;-1:-1:-1;;;;;3857:984:48:o;1741:562:46:-;2953:18:8;:16;:18::i;:::-;2190:106:46::1;2202:26;2230:6;2238;2254:9;2266:29;2287:7;2266:20;:29::i;1462:135:44:-:0;1568:22;1462:135;:::o;1564:1096:41:-;2561:20:22;:18;:20::i;:::-;2953:18:8::1;:16;:18::i;:::-;1839:23:41::2;;:::i;:::-;1878:9;1873:781;1897:3;:10;1893:1;:14;1873:781;;;2032:3;2036:1;2032:6;;;;;;;;;;;;;;2027:11;;2053:14;2070:2;:9;;;2053:26;;2093:29;2115:6;2093:21;:29::i;:::-;2152:8;::::0;::::2;::::0;2174:72:::2;2183:33;2202:6:::0;2152:8;2183:18:::2;:33::i;:::-;9194:3:3;2174:8:41;:72::i;:::-;2269:26;::::0;;;:18:::2;:26;::::0;;;;;;;-1:-1:-1;;;;;2269:33:41;;::::2;::::0;;;;;;;;2260:90:::2;::::0;2269:33:::2;2306:10;2269:47;8093:3:3;2260:8:41;:90::i;:::-;2390:7:::0;;2428:9:::2;::::0;::::2;::::0;2365:22:::2;::::0;2493:60:::2;2390:7:::0;2531:6;2539:5;2428:9;2493:31:::2;:60::i;:::-;2451:102;;;;2612:5;-1:-1:-1::0;;;;;2573:70:41::2;2600:10;-1:-1:-1::0;;;;;2573:70:41::2;2592:6;2573:70;2619:9;2630:12;2573:70;;;;;;;:::i;:::-;;;;;;;;1873:781;;;;;;1909:3;;;;;1873:781;;;;2981:1:8;2602:19:22::0;:17;:19::i;1773:115:7:-;1835:7;1861:20;:18;:20::i;3244:246:47:-;3376:7;3385:18;3351:6;1732:29;1754:6;1732:21;:29::i;:::-;3427:23:::1;3443:6;3427:15;:23::i;:::-;3452:30;3475:6;3452:22;:30::i;:::-;3419:64;;;;1771:1;3244:246:::0;;;;:::o;19634:5730:50:-;19821:15;20944:10;20966:4;20944:27;20940:4418;;21240:12;21266:4;-1:-1:-1;;;;;21258:18:50;21277:8;;21258:28;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21239:47;;;21502:7;21535:1;21530:2283;;;;23973:9;21530:2283;22006:4;22003:1;22000;21985:26;22059:1;22053:8;-1:-1:-1;;;;;;22049:81:50;-1:-1:-1;;;22281:77:50;;22275:2;;22414:16;22411:1;22408;22393:38;22470:16;22467:1;22460:27;22275:2;;23120;23117:1;23110:13;23484:4;23466:16;23462:27;23541:4;23535;23529;23514:32;23787:2;23781:4;23777:13;23774:1;23767:24;21370:2648;24048:22;24073:42;24088:5;24095:6;24103:5;24110:4;24073:14;:42::i;:::-;24048:67;;24540:2;24531:6;24525:13;24521:22;25002:66;24995:4;24987:6;24983:17;24976:93;25111:4;25103:6;25099:17;25330:2;25324:4;25320:13;25313:5;25306:28;3408:443:48;3559:22;3595:25;3634:23;3521:6;1732:29:47;1754:6;1732:21;:29::i;:::-;3682:28:48::1;3744:22;3759:6;3744:14;:22::i;:::-;3720:46:::0;;-1:-1:-1;3720:46:48;-1:-1:-1;3806:38:48::1;3720:46:::0;3806:36:::1;:38::i;:::-;3408:443:::0;;3776:68;;-1:-1:-1;3408:443:48;-1:-1:-1;;;;3408:443:48:o;4081:301:53:-;2561:20:22;:18;:20::i;:::-;2953:18:8::1;:16;:18::i;:::-;4248:6:53::2;3418:22;3435:4;3418:16;:22::i;:::-;-1:-1:-1::0;;;;;4266:25:53;;::::3;;::::0;;;:17:::3;:25;::::0;;;;;;;:34;;::::3;::::0;;;;;;;;;;;:45;;-1:-1:-1;;4266:45:53::3;::::0;::::3;;;::::0;;4326:49;4266:25;;:34;4326:49:::3;::::0;::::3;::::0;4266:45;;4326:49:::3;:::i;:::-;;;;;;;;2981:1:8::2;2602:19:22::0;:17;:19::i;4388:155:53:-;4479:4;4502:34;4522:4;4528:7;4502:19;:34::i;:::-;4495:41;;4388:155;;;;;:::o;1074:3172:3:-;-1:-1:-1;;;3588:3:3;3581:79;;;3799:66;3793:4;3786:80;3941:1;3935:4;3928:15;2999:73;2210:2;2243:18;;;2288;;;2215:4;2284:29;;;3040:1;3036:14;2195:18;;;;3025:26;;;;2336:18;;;;2383;;;2379:29;;;3057:2;3053:17;3021:50;;;;2999:73;2994:3;2990:83;4008:4;4001:26;4234:3;;4224:14;2634:271:22;2757:48;2061:1;2766:7;;:19;;6323:3:3;2757:8:22;:48::i;:::-;2061:1;2880:7;:18;2634:271::o;4186:98:8:-;4238:39;4247:14;:12;:14::i;:::-;6423:3:3;4238:8:8;:39::i;:::-;4186:98::o;4362:381:47:-;4497:7;4567:14;;;4643:6;4622:14;4614:23;;;;;;;;4606:44;;4592:58;4701:6;4674:34;;;-1:-1:-1;;4674:34:47;4660:48;;-1:-1:-1;4362:381:47;;;;;;:::o;2911:208:22:-;2018:1;3090:7;:22;2911:208::o;8950:1162:51:-;9095:17;9126:6;9146:7;9167;9188:15;9217:4;9400:14;9417:2;:9;;;9400:26;;9451:10;-1:-1:-1;;;;;9441:20:51;:6;-1:-1:-1;;;;;9441:20:51;;9437:575;;9779:22;9774:130;;9821:21;:19;:21::i;:::-;9885:4;9860:29;;9774:130;9918:83;9927:39;9947:6;9955:10;9927:19;:39::i;:::-;8156:3:3;9918:8:51;:83::i;:::-;10030:7;;10039:8;;;;10049:9;;;;10068:12;;;;;10030:7;;10039:8;;10049:9;10060:6;;-1:-1:-1;10068:12:51;;-1:-1:-1;10082:22:51;;-1:-1:-1;8950:1162:51;-1:-1:-1;;;8950:1162:51:o;5390:404::-;5660:74;5685:6;5693:25;5712:5;5693:18;:25::i;:::-;5720:6;5728:5;5660:24;:74::i;:::-;;5744:43;5755:5;5762:6;5770:9;5781:5;5744:10;:43::i;5098:286::-;5254:70;5279:9;5290:25;5309:5;5290:18;:25::i;:::-;5317:6;5254:24;:70::i;:::-;5334:43;5348:5;5355:6;5363;5371:5;5334:13;:43::i;1597:105:1:-;-1:-1:-1;;;;;1673:22:1;;;1597:105::o;367:166:11:-;425:7;456:5;;;471:37;480:6;;;;425:7;471:8;:37::i;5800:379:51:-;6058:54;6083:6;6091:5;6098:6;6106:5;6058:24;:54::i;:::-;;6122:50;6147:9;6158:5;6165:6;6122:24;:50::i;6185:329::-;6346:10;;6342:166;;6372:49;-1:-1:-1;;;;;6372:22:51;;6395:6;6403:9;6414:6;6372:22;:49::i;:::-;6471:6;-1:-1:-1;;;;;6440:57:51;6464:5;-1:-1:-1;;;;;6440:57:51;;6479:9;6490:6;6440:57;;;;;;;:::i;:::-;;;;;;;;6185:329;;;;:::o;5409:261:42:-;5477:58;5499:10;5486:9;:23;;8919:3:3;5477:8:42;:58::i;:::-;5563:9;:22;;;5599:10;;5595:69;;5625:28;:10;5646:6;5625:20;:28::i;2300:181:2:-;2355:16;2374:20;2386:7;;-1:-1:-1;;;;;;2386:7:2;2374:11;:20::i;:::-;2355:39;;2404:70;2413:33;2425:8;2435:10;2413:11;:33::i;:::-;6379:3:3;2404:8:2;:70::i;8662:153:51:-;-1:-1:-1;;;;;8771:30:51;;;8745:7;8771:30;;;:21;:30;;;;;;;;:37;;;;;;;;;;;;;8662:153::o;3759:358:8:-;3815:6;3811:232;;;3837:81;3864:24;:22;:24::i;:::-;3846:15;:42;6481:3:3;3837:8:8;:81::i;:::-;3811:232;;;3949:83;3976:25;:23;:25::i;:::-;3958:15;:43;7911:3:3;3949:8:8;:83::i;:::-;4053:7;:16;;-1:-1:-1;;4053:16:8;;;;;;;4084:26;;;;;;4053:16;;4084:26;:::i;:::-;;;;;;;;3759:358;:::o;4510:237::-;4557:4;4703:25;:23;:25::i;:::-;4685:15;:43;:55;;;-1:-1:-1;;4733:7:8;;;;4732:8;;4510:237::o;4860:108::-;4942:19;4860:108;:::o;4974:110::-;5057:20;4974:110;:::o;4906:582:53:-;4969:10;-1:-1:-1;;;;;4969:18:53;;;4965:517;;5107:21;:19;:21::i;:::-;5342:37;5362:4;5368:10;5342:19;:37::i;:::-;5337:135;;5399:58;5418:4;8156:3:3;5399:18:53;:58::i;1874:139:1:-;1939:6;1964:13;1971:5;1964:6;:13::i;:::-;:42;;1990:16;2000:5;1990:9;:16::i;:::-;1964:42;;;1980:7;:5;:7::i;11685:1131:50:-;11799:24;11837:16;11867:17;11984:12;11999:31;12015:7;:14;;;11999:15;:31::i;:::-;11984:46;;12040:33;12076:38;12099:7;:14;;;12076:22;:38::i;:::-;12040:74;-1:-1:-1;12147:28:50;12129:14;:46;;;;;;;;;12125:500;;;12210:68;12242:7;12272:4;12210:31;:68::i;:::-;12191:87;;12125:500;;;12317:36;12299:14;:54;;;;;;;;;12295:330;;;12388:75;12427:7;12457:4;12388:38;:75::i;12295:330::-;12555:59;12586:7;12608:4;12555:30;:59::i;:::-;12536:78;;12295:330;12659:59;12671:7;:12;;;12685:7;:14;;;12701:16;12659:11;:59::i;:::-;12635:83;;;;;;;;12771:7;:16;;;-1:-1:-1;;;;;12733:76:50;12754:7;:15;;;-1:-1:-1;;;;;12733:76:50;12738:7;:14;;;12733:76;12789:8;12799:9;12733:76;;;;;;;:::i;:::-;;;;;;;;11685:1131;;;;;;;:::o;1883:1514:42:-;2039:11;2035:48;;2066:7;;2035:48;2097:13;2104:5;2097:6;:13::i;:::-;2093:1298;;;2126:67;2136:19;2135:20;8802:3:3;2126:8:42;:67::i;:::-;2580:66;2614:6;2589:21;:31;;8919:3:3;2580:8:42;:66::i;:::-;2660:7;:5;:7::i;:::-;-1:-1:-1;;;;;2660:15:42;;2684:6;2660:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2093:1298;;;2725:12;2740:16;2750:5;2740:9;:16::i;:::-;2725:31;;2775:19;2771:494;;;2934:23;2960:53;2985:6;2993:5;3000:6;3008:4;2960:24;:53::i;:::-;3225:25;;;;-1:-1:-1;2771:494:42;3283:10;;3279:102;;3313:53;-1:-1:-1;;;;;3313:22:42;;3336:6;3352:4;3359:6;3313:22;:53::i;:::-;2093:1298;1883:1514;;;;:::o;3767:1086::-;3929:11;3925:48;;3956:7;;3925:48;3987:13;3994:5;3987:6;:13::i;:::-;3983:864;;;4167:65;4177:17;4176:18;8802:3:3;4167:8:42;:65::i;:::-;4448:7;:5;:7::i;:::-;-1:-1:-1;;;;;4448:16:42;;4465:6;4448:24;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4552:27:42;;-1:-1:-1;;;;;;;;4552:19:42;;4572:6;4552:19;:27::i;:::-;3983:864;;;4610:12;4625:16;4635:5;4625:9;:16::i;:::-;4610:31;;4659:17;4655:182;;;4696:50;4721:9;4732:5;4739:6;4696:24;:50::i;:::-;4655:182;;;4785:37;-1:-1:-1;;;;;4785:18:42;;4804:9;4815:6;4785:18;:37::i;855:131:6:-;933:46;947:1;942;:6;5002:3:3;933:8:6;:46::i;1925:405:44:-;2002:7;2195:18;2216:26;:24;:26::i;:::-;-1:-1:-1;;;;;2216:52:44;;:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2195:75;;2287:36;2304:6;2312:10;2287:16;:36::i;605:214:24:-;717:95;745:5;776:23;;;801:2;805:5;753:58;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;753:58:24;;;;;;;;;;;;;;-1:-1:-1;;;;;753:58:24;-1:-1:-1;;;;;;753:58:24;;;;;;;;;;717:19;:95::i;2336:176:44:-;2406:10;;2402:104;;2432:63;2459:26;:24;:26::i;:::-;-1:-1:-1;;;;;2432:18:44;;;2488:6;2432:18;:63::i;2359:185:47:-;2427:29;2449:6;2427:21;:29::i;:::-;2466:71;2489:23;2505:6;2489:15;:23::i;:::-;-1:-1:-1;;;;;2475:37:47;:10;-1:-1:-1;;;;;2475:37:47;;8031:3:3;2466:8:47;:71::i;5427:1061::-;5498:33;5698:14;5686:6;5675:18;;;5667:46;6195:43;6212:1;6204:9;;7978:3:3;6195:8:47;:43::i;3805:982:57:-;4091:59;4110:6;-1:-1:-1;;;;;4100:16:57;:6;-1:-1:-1;;;;;4100:16:57;;;9256:3:3;4091:8:57;:59::i;:::-;4161:49;4179:6;-1:-1:-1;;;;;4170:15:57;:6;-1:-1:-1;;;;;4170:15:57;;4943:3:3;4161:8:57;:49::i;:::-;4334:37;4374:27;;;:19;:27;;;;;4420:17;;4411:101;;-1:-1:-1;;;;;4420:17:57;:30;:64;;;;-1:-1:-1;4454:17:57;;;;-1:-1:-1;;;;;4454:17:57;:30;4420:64;9312:3:3;4411:8:57;:101::i;:::-;4585:26;;-1:-1:-1;;;;;4585:26:57;;;-1:-1:-1;;;;;;4585:26:57;;;;;;;4621:17;;;:26;;;;;;;;;;;-1:-1:-1;3805:982:57:o;2280:519:56:-;2383:43;2429:35;;;:27;:35;;;;;;2475:318;2499:6;:13;2495:1;:17;2475:318;;;2533:10;2546:34;2569:6;2576:1;2569:9;;;;;;;;;;;;;;2546:10;:14;;:34;;;;:::i;:::-;2533:47;;2594:48;2603:5;9256:3:3;2594:8:56;:48::i;:::-;-1:-1:-1;2514:3:56;;2475:318;;2330:589:55;2425:53;2481:29;;;:21;:29;;;;;;2521:392;2545:6;:13;2541:1;:17;2521:392;;;2797:10;2810:30;2827:6;2834:1;2827:9;;;;;;;;;;;;;;;;;;2810:12;;2838:1;2810:16;:30::i;:::-;2797:43;;2854:48;2863:5;9256:3:3;2854:8:55;:48::i;:::-;-1:-1:-1;2560:3:55;;2521:392;;5124:666:57;5272:16;5302;5332:41;5386:54;5417:6;5425;5433;5386:30;:54::i;:::-;5258:182;;;;;;5451:78;5460:17;:8;:15;:17::i;:::-;:38;;;;;5481:17;:8;:15;:17::i;:::-;9432:3:3;5451:8:57;:78::i;:::-;5547:27;;;;:19;:27;;;;;5540:34;;-1:-1:-1;;;;;;5540:34:57;;;;;;;;;;;;;;;;5753:30;;;;-1:-1:-1;;;;5124:666:57:o;3192:758:56:-;3297:43;3343:35;;;:27;:35;;;;;;3389:555;3413:6;:13;3409:1;:17;3389:555;;;3447:12;3462:6;3469:1;3462:9;;;;;;;;;;;;;;3447:24;;3485:93;3494:53;:29;:37;3524:6;3494:37;;;;;;;;;;;:44;3532:5;-1:-1:-1;;;;;3494:44:56;-1:-1:-1;;;;;3494:44:56;;;;;;;;;;;;;:51;:53::i;3485:93::-;3766:37;;;;:29;:37;;;;;;;;-1:-1:-1;;;;;3766:44:56;;;;;;;;;3759:51;;;3840:33;:10;3804:5;3840:17;:33::i;:::-;3825:48;;3887:46;3896:7;9194:3:3;3887:8:56;:46::i;:::-;-1:-1:-1;;3428:3:56;;3389:555;;3292:643:55;3389:53;3445:29;;;:21;:29;;;;;;3485:444;3509:6;:13;3505:1;:17;3485:444;;;3543:12;3558:6;3565:1;3558:9;;;;;;;;;;;;;;3543:24;;3581:22;3606:43;3629:12;3643:5;3606:22;:43::i;:::-;3581:68;;3663:63;3672:23;:14;:21;:23::i;3663:63::-;3892:26;:12;3912:5;3892:19;:26::i;:::-;;3485:444;;3524:3;;;;;3485:444;;3614:267:46;3722:31;;:::i;:::-;-1:-1:-1;3858:7:46;3834:41::o;3975:2358::-;2561:20:22;:18;:20::i;:::-;4202:6:46::1;1732:29:47;1754:6;1732:21;:29::i;:::-;4226:6:46::2;3418:22:53;3435:4;3418:16;:22::i;:::-;4533:79:46::3;4569:6;:13;;;:20;4591:6;:13;;;:20;4533:35;:79::i;:::-;4777:22;4802:33;4821:6;:13;;;4802:18;:33::i;:::-;4777:58;;4845:25;4873:45;4903:6;4911;4873:29;:45::i;:::-;4845:73;;5115:30;5159:31:::0;5204:43:::3;5260:73;5283:4;5289:6;5297;5305:9;5316:6;5324:8;5260:22;:73::i;:::-;5101:232;;;;;;5406:33;5442:30;5465:6;5442:22;:30::i;:::-;5406:66:::0;-1:-1:-1;5504:28:46::3;5486:14;:46;;;;;;;;;5482:443;;;5548:94;5577:6;5585;5592:1;5585:9;;;;;;;;;;;;;;5596:13;5610:1;5596:16;;;;;;;;;;;;;;5614:6;5621:1;5614:9;;;;;;;;;;;;;;5625:13;5639:1;5625:16;;;;;;;;;;;;;;5548:28;:94::i;:::-;5482:443;;;5681:36;5663:14;:54;;;;;;;;;5659:266;;;5733:62;5765:6;5773;5781:13;5733:31;:62::i;5659:266::-;5868:46;5892:6;5900:13;5868:23;:46::i;:::-;5935:13;::::0;5951:4:::3;:34;;;;;;;;;5935:50;;6097:6;-1:-1:-1::0;;;;;6045:281:46::3;6077:6;6045:281;6117:6;6231:45;6251:14;6267:8;6231:19;:45::i;:::-;6290:26;6045:281;;;;;;;;:::i;:::-;;;;;;;;3450:1:53;;;;;;;1771::47::2;2591::22::1;2602:19:::0;:17;:19::i;8232:3150:50:-;8409:27;8475:6;:13;-1:-1:-1;;;;;8462:27:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8462:27:50;;8448:41;;8667:34;;:::i;:::-;8711:47;;:::i;:::-;8868:30;8908:32;8956:9;8951:2425;8975:5;:12;8971:1;:16;8951:2425;;;9024:5;9030:1;9024:8;;;;;;;;;;;;;;9008:24;;9047:17;9096:6;:13;9067;:26;;;:42;:105;;;;;9159:6;:13;9129;:27;;;:43;9067:105;9047:125;;9186:44;9195:12;4838:3:3;9186:8:50;:44::i;:::-;9245:14;9262:54;9281:6;9288:13;:26;;;9281:34;;;;;;;;;;;;;;9262:18;:54::i;:::-;9245:71;;9330:15;9348:55;9367:6;9374:13;:27;;;9367:35;;;;;;;9348:55;9330:73;;9417:60;9437:8;-1:-1:-1;;;;;9426:19:50;:7;-1:-1:-1;;;;;9426:19:50;;;8474:3:3;9417:8:50;:60::i;:::-;9545:20;;;;9541:720;;9939:52;9952:1;9948;:5;8540:3:3;9939:8:50;:52::i;:::-;10009:23;10062:36;10074:4;10080:7;10089:8;10062:11;:36::i;:::-;-1:-1:-1;;;;;10035:63:50;:23;-1:-1:-1;;;;;10035:63:50;;10009:89;;10116:65;10125:18;8606:3:3;10116:8:50;:65::i;:::-;-1:-1:-1;10199:20:50;;;:47;;;9541:720;10392:20;;10371:18;;;:41;:11;10445:4;10426:23;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;10463:29:50;;;:19;;;:29;10506:31;;;:20;;;;:31;;;;10572:20;;;;;10551:18;;;:41;10629:22;;;;10606:20;;;:45;10684:12;;10665:31;;:16;;;:31;10727:15;;;10710:32;:14;;;:32;-1:-1:-1;;10931:26:50;10463:11;10931:13;:26::i;:::-;10881:76;;-1:-1:-1;10881:76:50;-1:-1:-1;10881:76:50;-1:-1:-1;10998:41:50;11015:4;11021:7;11030:8;10998:16;:41::i;:::-;10972:67;;11148:64;11192:19;:8;:17;:19::i;:::-;11148:11;11160:13;:26;;;11148:39;;;;;;;;;;;;;;:43;;:64;;;;:::i;:::-;11106:11;11118:13;:26;;;11106:39;;;;;;;;;;;;;:106;;;;;11269:96;11331:20;:9;:18;:20::i;:::-;11269:11;11281:13;:27;;;11269:40;;;;;;;;;;;;;;:44;;:96;;;;:::i;:::-;11226:11;11238:13;:27;;;11226:40;;;;;;;;;;;;;:139;;;;;8951:2425;;;;;8989:3;;;;;8951:2425;;;;8232:3150;;;;;;;;;;:::o;2091:137:47:-;2171:25;;;;:17;:25;;;;;;2162:59;;2171:25;;7978:3:3;2162:8:47;:59::i;12286:636:57:-;12372:7;12610:13;12625:16;12643:13;12658:16;12678:32;12703:6;12678:24;:32::i;:::-;12607:103;;;;;;;;;12734:6;-1:-1:-1;;;;;12725:15:57;:5;-1:-1:-1;;;;;12725:15:57;;12721:195;;;12763:8;12756:15;;;;;;;;12721:195;12801:6;-1:-1:-1;;;;;12792:15:57;:5;-1:-1:-1;;;;;12792:15:57;;12788:128;;;12830:8;-1:-1:-1;12823:15:57;;-1:-1:-1;;;12823:15:57;12788:128;12869:36;9194:3:3;12869:7:57;:36::i;:::-;12286:636;;;;;;;;:::o;8346:898:56:-;8439:7;8476:37;;;:29;:37;;;;;;;;-1:-1:-1;;;;;8476:44:56;;;;;;;;;;8439:7;8830:19;8476:44;8830:17;:19::i;:::-;:83;;;-1:-1:-1;8853:35:56;;;;:27;:35;;;;;:60;;8906:5;8853:44;:60::i;:::-;8807:106;;8929:15;8924:289;;9123:29;9145:6;9123:21;:29::i;:::-;9166:36;9194:3:3;9166:7:56;:36::i;:::-;-1:-1:-1;9230:7:56;8346:898;-1:-1:-1;;;8346:898:56:o;8359:256:55:-;8444:7;8519:29;;;:21;:29;;;;;8565:43;8519:29;8602:5;8565:22;:43::i;3700:147:54:-;-1:-1:-1;;;;;3817:23:54;;3700:147::o;3959:157::-;4098:3;4087:14;-1:-1:-1;;;;;4079:30:54;;3959:157::o;4205:164::-;4351:3;4340:14;;4205:164::o;7130:581:41:-;7210:4;7226:33;7262:30;7285:6;7262:22;:30::i;:::-;7226:66;-1:-1:-1;7324:28:41;7306:14;:46;;;;;;;;;7302:403;;;7375:45;7406:6;7414:5;7375:30;:45::i;:::-;7368:52;;;;;7302:403;7459:36;7441:14;:54;;;;;;;;;7437:268;;;7518:52;7556:6;7564:5;7518:37;:52::i;7437:268::-;7650:44;7680:6;7688:5;7650:29;:44::i;3038:679::-;3204:6;3212;3230:33;3266:30;3289:6;3266:22;:30::i;:::-;3230:66;-1:-1:-1;3319:26:41;3311:4;:34;;;;;;;;;3307:404;;;3368:59;3389:6;3397:14;3413:5;3420:6;3368:20;:59::i;:::-;3361:66;;;;;;;3307:404;3456:25;3448:4;:33;;;;;;;;;3444:267;;;3504:58;3524:6;3532:14;3548:5;3555:6;3504:19;:58::i;3444:267::-;3640:60;3662:6;3670:14;3686:5;3693:6;3640:21;:60::i;3038:679::-;;;;;;;;:::o;2386:188:15:-;2447:7;2494:10;2506:12;2520:15;2537:13;:11;:13::i;:::-;2560:4;2483:83;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;2473:94;;;;;;2466:101;;2386:188;:::o;4926:314:47:-;5225:6;5205:27;;4926:314::o;4951:564:48:-;5014:22;5038:25;5075:33;5111:30;5134:6;5111:22;:30::i;:::-;5075:66;-1:-1:-1;5173:28:48;5155:14;:46;;;;;;;;;5151:358;;;5224:30;5247:6;5224:22;:30::i;:::-;5217:37;;;;;;;5151:358;5293:36;5275:14;:54;;;;;;;;;5271:238;;;5352:37;5382:6;5352:29;:37::i;5271:238::-;5469:29;5491:6;5469:21;:29::i;4951:564::-;;;;:::o;4919:539:54:-;5040:24;5078;5170:8;:15;-1:-1:-1;;;;;5156:30:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5156:30:54;;5146:40;;5215:1;5196:20;;5232:9;5227:225;5251:7;:14;5247:1;:18;5227:225;;;5286:15;5304:8;5313:1;5304:11;;;;;;;;;;;;;;5286:29;;5342:14;5348:7;5342:5;:14::i;:::-;5329:7;5337:1;5329:10;;;;;;;;;;;;;:27;;;;;5389:52;5398:16;5416:24;5432:7;5416:15;:24::i;:::-;5389:8;:52::i;:::-;5370:71;-1:-1:-1;;5267:3:54;;5227:225;;5594:145:53;-1:-1:-1;;;;;5700:23:53;;;5677:4;5700:23;;;:17;:23;;;;;;;;:32;;;;;;;;;;;;;;;5594:145::o;7222:684:51:-;7387:16;7415:22;7440:35;7460:7;7469:5;7440:19;:35::i;:::-;7415:60;;7485:90;7494:12;:42;;;;7529:6;7511:14;:24;;7494:42;8736:3:3;7485:8:51;:90::i;:::-;7597:32;7606:14;7622:6;7597:8;:32::i;:::-;7586:43;-1:-1:-1;7793:25:51;;;7828:71;7848:7;7857:5;7793:25;7878:19;7586:43;7878:17;:19::i;:::-;7876:22;;7828:19;:71::i;:::-;7222:684;;;;;;;;:::o;6612:339::-;6751:22;6776:35;6796:7;6805:5;6776:19;:35::i;:::-;6751:60;-1:-1:-1;6821:18:51;6842:26;6751:60;6861:6;6842:18;:26::i;:::-;6821:47;;6878:66;6898:7;6907:5;6914:10;6926:17;:6;:15;:17::i;:::-;6878:19;:66::i;825:250:24:-;963:105;991:5;1022:27;;;1051:4;1057:2;1061:5;999:68;;;;;;;;;;:::i;2109:369:13:-;2190:78;2224:6;2199:21;:31;;7534:3:3;2190:8:13;:78::i;:::-;2357:12;2375:9;-1:-1:-1;;;;;2375:14:13;2398:6;2375:35;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2356:54;;;2420:51;2429:7;7597:3:3;2420:8:13;:51::i;5745:226:53:-;5911:11;;:53;;-1:-1:-1;;;5911:53:53;;5830:4;;5911:11;;;-1:-1:-1;;;;;5911:11:53;;:22;;:53;;5934:8;;5944:4;;5958;;5911:53;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2136:190:7:-;-1:-1:-1;;;;;2236:16:7;;2216:17;2236:16;;;:10;:16;;;;;:18;;;;;;;;2264:55;2273:34;2247:4;2236:18;2273:17;:34::i;:::-;2309:9;2264:8;:55::i;12822:1849:50:-;12968:24;13223:21;13258;13293:41;13347:81;13378:7;:14;;;13394:7;:15;;;13411:7;:16;;;13347:30;:81::i;:::-;13209:219;;;;;;13539:22;13571:23;13701:7;:16;;;-1:-1:-1;;;;;13683:34:50;:7;:15;;;-1:-1:-1;;;;;13683:34:50;;13679:312;;;-1:-1:-1;13783:13:50;;-1:-1:-1;13828:13:50;13679:312;;;-1:-1:-1;13967:13:50;;-1:-1:-1;13923:13:50;13679:312;14166:140;14214:7;14235:4;14253:14;14281:15;14166:34;:140::i;:::-;14450:16;;;;14432:15;;;;14112:194;;-1:-1:-1;14112:194:50;;-1:-1:-1;14112:194:50;;-1:-1:-1;;;;;;14432:34:50;;;;;;:211;;14580:63;14611:15;14628:14;14580:30;:63::i;:::-;14432:211;;;14481:63;14512:14;14528:15;14481:30;:63::i;:::-;14406:237;;;-1:-1:-1;12822:1849:50;;;-1:-1:-1;;;;;12822:1849:50:o;14677:887::-;14836:24;14872:22;14897:63;14928:7;:14;;;14944:7;:15;;;14897:30;:63::i;:::-;14872:88;;14970:23;14996:64;15027:7;:14;;;15043:7;:16;;;14996:30;:64::i;:::-;14970:90;;15236:140;15284:7;15305:4;15323:14;15351:15;15236:34;:140::i;:::-;15417:14;;;;;15387:45;;;;:29;:45;;;;;;;;15433:15;;;;-1:-1:-1;;;;;15387:62:50;;;;;;;;;;;:79;;;;15506:14;;15476:45;;;;;;;;15522:16;;;;15476:63;;;;;;;;;;;;;:81;;;;-1:-1:-1;15182:194:50;;14677:887;-1:-1:-1;;;14677:887:50:o;16781:2740::-;17220:14;;;;16918:24;17198:37;;;:21;:37;;;;;;;17294:15;;;;16918:24;;;;;;17263:47;;17198:37;;17263:30;:47::i;:::-;17245:65;;17320:16;17339:48;17370:7;:16;;;17339:12;:30;;:48;;;;:::i;:::-;17320:67;-1:-1:-1;17402:12:50;;;:29;;-1:-1:-1;17418:13:50;;17402:29;17398:311;;;17611:37;17633:7;:14;;;17611:21;:37::i;:::-;17662:36;9194:3:3;17662:7:50;:36::i;:::-;-1:-1:-1;;17868:12:50;;;;17890:13;17914:19;17936:21;:12;:19;:21::i;:::-;17914:43;;17967:32;18016:11;-1:-1:-1;;;;;18002:26:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18002:26:50;-1:-1:-1;18065:1:50;18039:23;;;:27;;;17967:61;;-1:-1:-1;18076:663:50;18100:11;18096:1;:15;18076:663;;;18354:15;18372:33;:12;18403:1;18372:30;:33::i;:::-;18354:51;;18441:15;:7;:13;:15::i;:::-;18420;18436:1;18420:18;;;;;;;;;;;;;:36;;;;;18496:60;18505:7;:23;;;18530:25;:7;:23;:25::i;18496:60::-;18470:23;;;:86;18575:12;;;18571:158;;;18624:7;18607:24;;18571:158;;;18661:8;18656:1;:13;18652:77;;;18707:7;18689:25;;18652:77;-1:-1:-1;18113:3:50;;18076:663;;;-1:-1:-1;18888:56:50;;-1:-1:-1;;;18888:56:50;;-1:-1:-1;;;;;18888:11:50;;;;;:56;;18900:7;;18909:15;;18926:7;;18935:8;;18888:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;18869:75;;18955:16;18973:17;18994:59;19006:7;:12;;;19020:7;:14;;;19036:16;18994:11;:59::i;:::-;18954:99;;-1:-1:-1;18954:99:50;-1:-1:-1;19080:37:50;:14;18954:99;19080:27;:37::i;:::-;19063:54;-1:-1:-1;19145:39:50;:15;19174:9;19145:28;:39::i;:::-;19127:57;-1:-1:-1;19396:53:50;:12;19425:7;19434:14;19396:28;:53::i;:::-;19459:55;:12;19488:8;19498:15;19459:28;:55::i;:::-;16781:2740;;;;;;;;;;;;;:::o;7504:419::-;7639:16;;;7690:4;:25;;;;;;;;;7686:231;;;-1:-1:-1;7756:11:50;;-1:-1:-1;7769:16:50;7686:231;;;-1:-1:-1;7876:16:50;;-1:-1:-1;7894:11:50;7686:231;7504:419;;;;;;:::o;1862:617:9:-;1922:7;1959:5;;;1974:57;1983:6;;;:26;;;2008:1;2003;1993:7;:11;;;;;;:16;1983:26;4467:1:3;1974:8:9;:57::i;:::-;2046:12;2042:431;;2081:1;2074:8;;;;;2042:431;893:4;-1:-1:-1;;2439:11:9;;2438:19;2461:1;2437:25;2430:32;;;;;1415:799:24;1658:12;1672:23;1699:5;-1:-1:-1;;;;;1699:10:24;1710:4;1699:16;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1657:58;;;;1853:1;1844:7;1841:14;1838:2;;;1895:16;1892:1;1889;1874:38;1939:16;1936:1;1929:27;1838:2;2110:97;2119:10;:17;2140:1;2119:22;:56;;;;2156:10;2145:30;;;;;;;;;;;;:::i;:::-;7468:3:3;2110:8:24;:97::i;1803:410:19:-;1873:4;1894:20;1903:3;1908:5;1894:8;:20::i;:::-;1889:318;;-1:-1:-1;1930:23:19;;;;;;;;-1:-1:-1;1930:23:19;;;;;;;;;;;;-1:-1:-1;;;;;;1930:23:19;-1:-1:-1;;;;;1930:23:19;;;;;;;;2110:18;;2088:19;;;:12;;;:19;;;;;;:40;;;;2142:11;;1889:318;-1:-1:-1;2191:5:19;2184:12;;2481:859:18;-1:-1:-1;;;;;2734:17:18;;2601:4;2734:17;;;:12;;;:17;;;;;;2811:13;2807:527;;-1:-1:-1;;2865:11:18;;2921:53;;;;;;;;-1:-1:-1;;;;;2921:53:18;;;;;;;;;;;;;-1:-1:-1;2890:28:18;;;:12;;;;:28;;;;;:84;;;;-1:-1:-1;;;;;;2890:84:18;;;;;;;;;;;;;;;;;;3002:18;;;2988:32;;;3162:17;;;:12;;;:17;;;;;;:38;;;;3214:11;;2807:527;-1:-1:-1;;3269:12:18;3256:26;;;;:12;;;;:26;;;;;:33;:41;;;:26;-1:-1:-1;3311:12:18;;13539:1758:57;13715:16;13745;13775:41;13842:13;13857;13874:30;13889:6;13897;13874:14;:30::i;:::-;13841:63;;;;13914:16;13933:36;13954:6;13962;13933:20;:36::i;:::-;13995:27;;;;:19;:27;;;;;;;;:46;;;:36;;:46;;;;;14236:23;;14293:26;;;;13995:46;;-1:-1:-1;13914:55:57;;-1:-1:-1;14293:26:57;14639:22;14236:23;14639:20;:22::i;:::-;:63;;;;14677:25;:13;:23;:25::i;:::-;14639:177;;;;14719:46;14750:6;14758;14719:30;:46::i;:::-;:96;;;;;14769:46;14800:6;14808;14769:30;:46::i;:::-;14615:201;;14832:16;14827:291;;15028:29;15050:6;15028:21;:29::i;:::-;15071:36;9194:3:3;15071:7:57;:36::i;:::-;15139:65;15178:10;15190:13;15139:38;:65::i;:::-;15128:76;;15225:65;15264:10;15276:13;15225:38;:65::i;:::-;15214:76;;13539:1758;;;;;;;;;;;;;:::o;5615:265:54:-;-1:-1:-1;;;;;5844:23:54;5843:30;;5615:265::o;2381:1531:19:-;-1:-1:-1;;;;;2591:19:19;;2454:4;2591:19;;;:12;;;:19;;;;;;2625:15;;2621:1285;;3066:18;;-1:-1:-1;;3018:14:19;;;;3066:22;;;;2994:21;;3066:3;;:22;;3348;;;;;;;;;;;;;;;;3462:26;;-1:-1:-1;;;;;3348:22:19;;;;-1:-1:-1;3348:22:19;;3462:3;;3474:13;;3462:26;;;;;;;;;;;;;;;;;;:38;;-1:-1:-1;;;;;;3462:38:19;-1:-1:-1;;;;;3462:38:19;;;;;;3566:23;;;;;-1:-1:-1;3566:12:19;;;:23;;;;;;3592:17;;;3566:43;;3715:17;;3566:12;;3715:17;;;;;;;;;;;;;;;-1:-1:-1;;3715:17:19;;;;;-1:-1:-1;;;;;;3715:17:19;;;;;;;;;-1:-1:-1;;;;;3807:19:19;;;;3715:17;3807:12;;;:19;;;;;;3800:26;;;;3715:17;-1:-1:-1;3841:11:19;;-1:-1:-1;;;;3841:11:19;2621:1285;3890:5;3883:12;;;;;8771:236:55;8918:7;8948:52;:12;8965:5;9194:3:3;8948:16:55;:52::i;4074:1613:18:-;-1:-1:-1;;;;;4285:17:18;;4152:4;4285:17;;;:12;;;:17;;;;;;4361:13;;4357:1324;;4769:11;;-1:-1:-1;;4769:15:18;;;4699:21;5068:23;;;4734:1;5068:12;;;:23;;;;;;;;4723:12;;;5183:27;;;;;:39;;;;-1:-1:-1;;;;;;5183:39:18;;;-1:-1:-1;;;;;5183:39:18;;;;;;;;;;;;;;;;;;5301:14;;;;5288:28;;:12;;;:28;;;;;;:48;;;;5442:30;;;;;;;;;5486:23;;;5584:17;;;;;;;;;;;5577:24;4734:1;-1:-1:-1;5616:11:18;;2110:303:1;2185:15;2212:22;2250:6;:13;-1:-1:-1;;;;;2237:27:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2237:27:1;;2212:52;;2279:9;2274:110;2298:6;:13;2294:1;:17;2274:110;;;2344:29;2363:6;2370:1;2363:9;;;;;;;2344:29;2332:6;2339:1;2332:9;;;;;;;;-1:-1:-1;;;;;2332:41:1;;;:9;;;;;;;;;;;:41;2313:3;;2274:110;;11946:590:46;12079:16;12112:28;12142:25;12171:22;12186:6;12171:14;:22::i;:::-;12111:82;;;;12203:79;12239:12;:19;12260:14;:21;12203:35;:79::i;:::-;12292:56;12323:1;12301:12;:19;:23;9544:3:3;12292:8:46;:56::i;:::-;12364:9;12359:145;12383:12;:19;12379:1;:23;12359:145;;;12423:70;12451:14;12466:1;12451:17;;;;;;;;;;;;;;-1:-1:-1;;;;;12432:36:46;:12;12445:1;12432:15;;;;;;;;;;;;;;-1:-1:-1;;;;;12432:36:46;;9136:3:3;12423:8:46;:70::i;:::-;12404:3;;12359:145;;;-1:-1:-1;12521:8:46;11946:590;-1:-1:-1;;;;11946:590:46:o;6560:1752::-;6839:30;6883:31;6928:38;6992:30;7024:23;7051:35;:8;:33;:35::i;:::-;6991:95;;;;7097:14;7124:23;7140:6;7124:15;:23::i;:::-;7097:51;-1:-1:-1;7208:26:46;7200:4;:34;;;;;;;;;:564;;7514:4;-1:-1:-1;;;;;7514:15:46;;7547:6;7571;7595:9;7622:13;7653:15;7686:31;:29;:31::i;:::-;7735:6;:15;;;7514:250;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7514:250:46;;;;;;;;;;;;:::i;:::-;7200:564;;;7249:4;-1:-1:-1;;;;;7249:15:46;;7282:6;7306;7330:9;7357:13;7388:15;7421:31;:29;:31::i;:::-;7470:6;:15;;;7249:250;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7249:250:46;;;;;;;;;;;;:::i;:::-;7158:606;;;;;;;;7775:105;7811:8;:15;7828:14;:21;7851;:28;7775:35;:105::i;:::-;8066:26;8058:4;:34;;;;;;;;;:247;;8212:93;8238:9;8249:6;8257:8;8267:14;8283:21;8212:25;:93::i;:::-;8058:247;;;8107:90;8133:6;8141;8149:8;8159:14;8175:21;8107:25;:90::i;:::-;8042:263;;6560:1752;;;;;;;;;;;;;:::o;6003:433:57:-;6188:16;6207:36;6228:6;6236;6207:20;:36::i;:::-;6253:41;6297:27;;;:19;:27;;;;;;;;:46;;;:36;;:46;;;;;6188:55;;-1:-1:-1;6379:50:57;6410:8;6420;6379:30;:50::i;:::-;6353:76;;-1:-1:-1;;;;;;6003:433:57:o;4153:294:56:-;4315:9;4310:131;4334:6;:13;4330:1;:17;4310:131;;;4419:8;4428:1;4419:11;;;;;;;;;;;;;;4368:29;:37;4398:6;4368:37;;;;;;;;;;;:48;4406:6;4413:1;4406:9;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4368:48:56;;;;;;;;;;;-1:-1:-1;4368:48:56;:62;4349:3;;4310:131;;4128:471:55;4223:53;4279:29;;;:21;:29;;;;;;4319:274;4343:8;:15;4339:1;:19;4319:274;;;4538:44;4567:1;4570:8;4579:1;4570:11;;;;;;;;;;;;;;4538:12;:28;;:44;;;;;:::i;:::-;4360:3;;4319:274;;12748:353:46;12863:28;12935:6;:13;-1:-1:-1;;;;;12922:27:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12922:27:46;;12907:42;;12964:9;12959:136;12983:6;:13;12979:1;:17;12959:136;;;13035:8;:49;;13074:6;13081:1;13074:9;;;;;;;;;;;;;;13066:18;;13035:49;;;13053:6;13060:1;13053:9;;;;;;;;;;;;;;13035:49;13017:12;13030:1;13017:15;;;;;;;;;;;;;;;;;:67;12998:3;;12959:136;;6776:199:50;6897:6;;6922:4;:25;;;;;;;;;:46;;6960:8;6922:46;;;-1:-1:-1;6950:7:50;;6915:53;-1:-1:-1;;6776:199:50:o;7157:204::-;7283:6;;7308:4;:25;;;;;;;;;:46;;7347:7;7308:46;;1002:175:23;1058:6;1076:64;-1:-1:-1;;;1085:5:23;:14;7666:3:3;1076:8:23;:64::i;635:194:11:-;691:6;720:5;;;735:69;745:6;;;;;;:16;;;760:1;755;:6;;745:16;744:38;;;;771:1;767;:5;:14;;;;;780:1;776;:5;767:14;4322:1:3;735:8:11;:69::i;1219:194::-;1275:6;1304:5;;;1319:69;1329:6;;;;;;:16;;;1344:1;1339;:6;;1329:16;1328:38;;;;1355:1;1351;:5;:14;;;;;1364:1;1360;:5;1351:14;4370:1:3;1319:8:11;:69::i;10934:843:57:-;11043:41;11263:27;;;:19;:27;;;;;11309:17;;;11345;;;-1:-1:-1;;;;;11309:17:57;;;;11043:41;;11345:17;;;;11043:41;;;11392:36;11309:17;11345;11392:20;:36::i;:::-;11453:29;;;;:19;;;:29;;;;;11514:23;;11571:26;;;;11453:29;;-1:-1:-1;11373:55:57;;-1:-1:-1;11619:65:57;11514:23;11571:26;11619:38;:65::i;:::-;11608:76;;11705:65;11744:10;11756:13;11705:38;:65::i;:::-;11694:76;;10934:843;;;;;;;;;;;:::o;6041:105:54:-;6100:4;6124:15;6131:7;6124:6;:15::i;:::-;6123:16;;6041:105;-1:-1:-1;;6041:105:54:o;3993:134:19:-;-1:-1:-1;;;;;4096:19:19;4073:4;4096:19;;;:12;;;;;:19;;;;;;:24;;;3993:134::o;15499:342:57:-;15592:4;15648:27;;;:19;:27;;;;;15764:17;;-1:-1:-1;;;;;15755:26:57;;;15764:17;;15755:26;;:56;;-1:-1:-1;15794:17:57;;;;-1:-1:-1;;;;;15785:26:57;;;15794:17;;15785:26;15755:56;15754:80;;;;-1:-1:-1;;;;;;;;15816:18:57;;;;15499:342;-1:-1:-1;15499:342:57:o;9462:256:56:-;9562:4;9624:35;;;:27;:35;;;;;9676;9624;9704:5;9676:19;:35::i;9205:245:55:-;9297:4;9369:29;;;:21;:29;;;;;9415:28;9369:29;9437:5;9415:21;:28::i;3967:952:41:-;4133:16;;4204:28;4186:14;:46;;;;;;;;;4182:394;;;4248:49;4275:6;4283:5;4290:6;4248:26;:49::i;:::-;4182:394;;;4336:36;4318:14;:54;;;;;;;;;4314:262;;;4388:56;4422:6;4430:5;4437:6;4388:33;:56::i;4314:262::-;4517:48;4543:6;4551:5;4558:6;4517:25;:48::i;:::-;4590:10;;4586:79;;4616:38;-1:-1:-1;;;;;4616:18:41;;4635:10;4647:6;4616:18;:38::i;:::-;-1:-1:-1;;4865:7:41;;;;;4866:6;;-1:-1:-1;3967:952:41;-1:-1:-1;;3967:952:41:o;5171:970::-;5336:16;;5407:28;5389:14;:46;;;;;;;;;5385:394;;;5451:49;5478:6;5486:5;5493:6;5451:26;:49::i;:::-;5385:394;;;5539:36;5521:14;:54;;;;;;;;;5517:262;;;5591:56;5625:6;5633:5;5640:6;5591:33;:56::i;5517:262::-;5720:48;5746:6;5754:5;5761:6;5720:25;:48::i;:::-;5793:10;;5789:98;;5819:57;-1:-1:-1;;;;;5819:22:41;;5842:10;5862:4;5869:6;5819:22;:57::i;:::-;-1:-1:-1;6087:6:41;;6126:7;;;;;-1:-1:-1;5171:970:41;-1:-1:-1;;;5171:970:41:o;6347:697::-;6514:16;;6585:28;6567:14;:46;;;;;;;;;6563:451;;;6644:53;6675:6;6683:5;6690:6;6644:30;:53::i;:::-;6629:68;;6563:451;;;6736:36;6718:14;:54;;;;;;;;;6714:300;;;6803:60;6841:6;6849:5;6856:6;6803:37;:60::i;6714:300::-;6951:52;6981:6;6989:5;6996:6;6951:29;:52::i;:::-;6936:67;;6714:300;7036:1;7024:13;;6347:697;;;;;;;:::o;3388:427:15:-;3790:9;;3765:44::o;9748:864:57:-;9843:22;9867:25;9911:13;9926:16;9944:13;9959:16;9979:32;10004:6;9979:24;:32::i;:::-;9908:103;;-1:-1:-1;9908:103:57;;-1:-1:-1;9908:103:57;-1:-1:-1;9908:103:57;-1:-1:-1;;;;;;;10167:19:57;;;;:42;;-1:-1:-1;;;;;;10190:19:57;;;10167:42;10163:115;;;-1:-1:-1;;10233:15:57;;;10246:1;10233:15;;;;;;10250:16;;;;;;;;;10233:15;-1:-1:-1;10233:15:57;-1:-1:-1;10225:42:57;;-1:-1:-1;;10225:42:57;10163:115;10432:15;;;10445:1;10432:15;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10432:15:57;10423:24;;10469:6;10457;10464:1;10457:9;;;;;;;;;;;;;:18;-1:-1:-1;;;;;10457:18:57;;;-1:-1:-1;;;;;10457:18:57;;;;;10497:6;10485;10492:1;10485:9;;;;;;;;-1:-1:-1;;;;;10485:18:57;;;;:9;;;;;;;;;;:18;10525:16;;;10539:1;10525:16;;;;;;;;;;10539:1;;10525:16;;;;;;;;;;-1:-1:-1;10525:16:57;10514:27;;10565:8;10551;10560:1;10551:11;;;;;;;;;;;;;:22;;;;;10597:8;10583;10592:1;10583:11;;;;;;;;;;;;;:22;;;;;9748:864;;;;;;;:::o;7319:799:56:-;7486:43;7532:35;;;:27;:35;;;;;7421:22;;;;7599:19;7532:35;7599:17;:19::i;:::-;-1:-1:-1;;;;;7586:33:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7586:33:56;;7577:42;;7654:6;:13;-1:-1:-1;;;;;7640:28:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7640:28:56;;7629:39;;7684:9;7679:433;7703:6;:13;7699:1;:17;7679:433;;;7949:12;7971:26;:10;7995:1;7971:23;:26::i;:::-;7949:49;;8024:5;8012:6;8019:1;8012:9;;;;;;;;-1:-1:-1;;;;;8012:17:56;;;:9;;;;;;;;;;:17;;;;8057:37;;;;:29;:37;;;;;;:44;;;;;;;;;;;8043:11;;:8;;8052:1;;8043:11;;;;;;;;;;;;;;;:58;-1:-1:-1;7718:3:56;;7679:433;;;;7319:799;;;;:::o;7385:700:55:-;7544:53;7600:29;;;:21;:29;;;;;7479:22;;;;7661:21;7600:29;7661:19;:21::i;:::-;-1:-1:-1;;;;;7648:35:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7648:35:55;;7639:44;;7718:6;:13;-1:-1:-1;;;;;7704:28:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7704:28:55;;7693:39;;7748:9;7743:336;7767:6;:13;7763:1;:17;7743:336;;;8040:28;:12;8066:1;8040:25;:28::i;:::-;8014:6;8021:1;8014:9;;;;;;;;;;;;;8025:8;8034:1;8025:11;;;;;;;;;;;;;;;;;8013:55;;;;-1:-1:-1;;;;;8013:55:55;;;;;7782:3;;7743:336;;3313:295:54;3368:7;3585:16;3593:7;3585;:16::i;:::-;3569:13;3574:7;3569:4;:13::i;:::-;:32;;3313:295;-1:-1:-1;;3313:295:54:o;1495:105:11:-;1553:7;1584:1;1579;:6;;:14;;1592:1;1579:14;;;-1:-1:-1;1588:1:11;;1495:105;-1:-1:-1;1495:105:11:o;1683:104::-;1741:7;1771:1;1767;:5;:13;;1779:1;1767:13;;8311:267:51;-1:-1:-1;;;;;8461:30:51;;;;;;;:21;:30;;;;;;;;:37;;;;;;;;;;;;;;:50;;;8526:45;;;;;8565:5;;8526:45;:::i;2332:1170:7:-;2410:4;2426:16;2445:11;:9;:11::i;:::-;2426:30;;2634:15;2623:8;:26;2619:69;;;2672:5;2665:12;;;;;2619:69;2698:16;2717:11;:9;:11::i;:::-;2698:30;-1:-1:-1;2742:22:7;2738:175;;2897:5;2890:12;;;;;;2738:175;3035:18;3077:8;3097:11;:9;:11::i;:::-;3087:22;;;;;;;3066:73;;;;;3111:10;;3123:5;;3130:8;;3066:73;;:::i;:::-;;;;;;;;;;;;;3056:84;;;;;;3035:105;;3150:14;3167:28;3184:10;3167:16;:28::i;:::-;3150:45;;3206:7;3215:9;3226;3239:12;:10;:12::i;:::-;3205:46;;;;;;3262:24;3289:26;3299:6;3307:1;3310;3313;3289:26;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3289:26:7;;-1:-1:-1;;3289:26:7;;;-1:-1:-1;;;;;;;3437:30:7;;;;;;:58;;;3491:4;-1:-1:-1;;;;;3471:24:7;:16;-1:-1:-1;;;;;3471:24:7;;3437:58;3430:65;2332:1170;-1:-1:-1;;;;;;;;;;;2332:1170:7:o;15728:1047:50:-;15978:25;16017:26;16057:24;16106:20;16129:22;:14;:20;:22::i;:::-;16106:45;;16161:21;16185:23;:15;:21;:23::i;:::-;16161:47;;16244:77;16253:32;:14;:30;:32::i;:::-;16287:33;:15;:31;:33::i;16244:77::-;16218:23;;;:103;16472:49;;-1:-1:-1;;;16472:49:50;;-1:-1:-1;;;;;16472:11:50;;;;;:49;;16218:7;;16493:12;;16507:13;;16472:49;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;16453:68;;16532:16;16550:17;16571:59;16583:7;:12;;;16597:7;:14;;;16613:16;16571:11;:59::i;:::-;16531:99;;-1:-1:-1;16531:99:50;-1:-1:-1;16661:37:50;:14;16531:99;16661:27;:37::i;:::-;16641:57;-1:-1:-1;16729:39:50;:15;16758:9;16729:28;:39::i;:::-;16708:60;;15728:1047;;;;;;;;;;;;:::o;12976:506:54:-;13067:7;13282:25;13317:72;13326:30;13342:13;13326:15;:30::i;:::-;13358;13374:13;13358:15;:30::i;13317:72::-;13282:108;;13408:67;13414:19;13419:13;13414:4;:19::i;:::-;13435;13440:13;13435:4;:19::i;:::-;13456:18;13408:67;;:5;:67::i;8138:144:18:-;-1:-1:-1;;;;;8258:17:18;8232:7;8258:17;;;:12;;;;;:17;;;;;;;8138:144::o;5993:115::-;6090:11;;5993:115::o;7365:156::-;7462:7;7488:19;;;:12;;;;:19;;;;;:26;;;7365:156::o;7291:321:54:-;7369:7;7388:15;7406:25;7424:6;7406:13;7411:7;7406:4;:13::i;:::-;:17;;:25::i;:::-;7388:43;;7441:22;7466:16;7474:7;7466;:16::i;:::-;7441:41;-1:-1:-1;7521:12:54;7551:54;7561:7;7441:41;7521:12;7551:9;:54::i;7881:321::-;7959:7;7978:15;7996:25;8014:6;7996:13;8001:7;7996:4;:13::i;:::-;:17;;:25::i;3729:177:18:-;3865:19;;;;:12;;;;:19;;;;;;:26;;;:34;3729:177::o;16201:169:57:-;16277:6;16285;16319;-1:-1:-1;;;;;16310:15:57;:6;-1:-1:-1;;;;;16310:15:57;;:53;;16348:6;16356;16310:53;;;16329:6;16337;16310:53;16303:60;;;;16201:169;;;;;:::o;15928:158::-;16010:7;16063:6;16071;16046:32;;;;;;;;;:::i;:::-;;;;;;;;;;;;;16036:43;;;;;;16029:50;;15928:158;;;;:::o;11934:395:54:-;12030:7;12223:99;12233:27;12249:10;12233:15;:27::i;:::-;12262:30;12278:13;12262:15;:30::i;:::-;12294:27;12310:10;12294:15;:27::i;:::-;12223:9;:99::i;12458:395::-;12554:7;12747:99;12757:27;12773:10;12757:15;:27::i;:::-;12786:30;12802:13;12786:15;:30::i;7708:278:18:-;-1:-1:-1;;;;;7872:17:18;;7837:7;7872:17;;;:12;;;:17;;;;;;7899:30;7908:9;;;7919;7899:8;:30::i;:::-;7946:33;7964:3;7977:1;7969:5;:9;7946:17;:33::i;:::-;7939:40;7708:278;-1:-1:-1;;;;;7708:278:18:o;1673:146:44:-;1737:7;1763:26;:24;:26::i;:::-;-1:-1:-1;;;;;1763:47:44;;:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;992:182:6:-;1111:56;1125:1;1120;:6;:16;;;;;1135:1;1130;:6;1120:16;5002:3:3;1111:8:6;:56::i;10562:1066:46:-;10816:30;10888:8;:15;-1:-1:-1;;;;;10874:30:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10874:30:46;;10858:46;;10919:9;10914:708;10938:13;;:20;10934:24;;10914:708;;;10979:17;10999:10;11010:1;10999:13;;;;;;;;;;;;;;10979:33;;11026:62;11048:6;:13;;;11062:1;11048:16;;;;;;;;;;;;;;11035:9;:29;;8263:3:3;11026:8:46;:62::i;:::-;11178:12;11193:6;:13;;;11207:1;11193:16;;;;;;;;;;;;;;11178:31;;11223:66;11234:5;11241:9;11252;11263:6;:25;;;11223:10;:66::i;:::-;11304:17;11324:21;11346:1;11324:24;;;;;;;;;;;;;;11304:44;;11362:45;11370:25;11389:5;11370:18;:25::i;:::-;11397:9;11362:7;:45::i;:::-;11561:50;11586:24;:9;11600;11586:13;:24::i;:::-;11561:8;11570:1;11561:11;;;;;;;;;;;;;;:24;;:50;;;;:::i;:::-;11542:13;11556:1;11542:16;;;;;;;;;;;;;:69;;;;;10914:708;;;10960:3;;;;;10914:708;;;;10562:1066;;;;;;;:::o;8626:1599::-;8868:30;9020:18;9083:8;:15;-1:-1:-1;;;;;9069:30:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9069:30:46;;9053:46;;9114:9;9109:1022;9133:13;;:20;9129:24;;9109:1022;;;9174:16;9193:9;9203:1;9193:12;;;;;;;;;;;;;;9174:31;;9219:61;9240:6;:13;;;9254:1;9240:16;;;;;;;;;;;;;;9228:8;:28;;8315:3:3;9219:8:46;:61::i;:::-;9375:12;9390:6;:13;;;9404:1;9390:16;;;;;;;;;;;;;;9375:31;;9420:65;9434:5;9441:8;9451:6;9459;:25;;;9420:13;:65::i;:::-;9504:13;9511:5;9504:6;:13::i;:::-;9500:89;;;9550:24;:10;9565:8;9550:14;:24::i;:::-;9537:37;;9500:89;9603:17;9623:21;9645:1;9623:24;;;;;;;;;;;;;;9603:44;;9661:45;9669:25;9688:5;9669:18;:25::i;9661:45::-;9940:9;9928:8;:21;;9927:193;;10074:46;10111:8;10099:9;:20;10074:8;10083:1;10074:11;;;;;;;:46;9927:193;;;10009:46;10045:9;10034:8;:20;10009:8;10018:1;10009:11;;;;;;;;;;;;;;:24;;:46;;;;:::i;:::-;9908:13;9922:1;9908:16;;;;;;;;;;;;;:212;;;;;9109:1022;;;9155:3;;;;;9109:1022;;;;10187:31;10207:10;10187:19;:31::i;5766:137:18:-;-1:-1:-1;;;;;5874:17:18;5851:4;5874:17;;;:12;;;;;:17;;;;;;:22;;;5766:137::o;6714:226:57:-;6845:88;6878:6;6886:5;6893:31;6926:6;6845:32;:88::i;4741:234:56:-;4879:89;4913:6;4921:5;4928:31;4961:6;4879:33;:89::i;4873:218:55:-;5003:81;5029:6;5037:5;5044:31;5077:6;5003:25;:81::i;7218:226:57:-;7349:88;7382:6;7390:5;7397:31;7430:6;7349:32;:88::i;5269:234:56:-;5407:89;5441:6;5449:5;5456:31;5489:6;5407:33;:89::i;5365:218:55:-;5495:81;5521:6;5529:5;5536:31;5569:6;5495:25;:81::i;7775:251:57:-;7909:6;7934:85;7967:6;7975:5;7982:28;8012:6;7934:32;:85::i;5850:259:56:-;5991:6;6016:86;6050:6;6058:5;6065:28;6095:6;6016:33;:86::i;5910:243:55:-;6043:6;6068:78;6094:6;6102:5;6109:28;6139:6;6068:25;:78::i;5175:135:19:-;5259:7;5285:3;:11;;5297:5;5285:18;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5285:18:19;;5175:135;-1:-1:-1;;;5175:135:19:o;6981:228:18:-;7073:6;7140:19;;;:12;;;;:19;;;;;7177:10;;7189:12;;;-1:-1:-1;;;;;7177:10:18;;;;6981:228::o;4120:202:7:-;4164:7;4287:27;4312:1;4287:24;:27::i;5977:1492:53:-;6030:12;6615:1;6602:15;6597:3;6593:25;6813:8;6843:10;6838:79;;;;6939:10;6934:79;;;;7035:10;7030:79;;;;7131:10;7126:85;;;;7233:10;7228:86;;;;7369:66;7361:74;;6806:647;;6838:79;6884:15;6876:23;;6838:79;;6934;6980:15;6972:23;;6934:79;;7030;7076:15;7068:23;;7030:79;;7126:85;7172:21;7164:29;;7126:85;;7228:86;7274:22;7266:30;;6806:647;;;6308:1155;:::o;5174:500:7:-;5218:19;5258:8;;5249:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5366:13:7;;5249:17;;-1:-1:-1;;;1539:6:7;-1:-1:-1;5362:306:7;;;5620:22;5604:14;5600:43;5592:6;5585:59;5174:500;:::o;3199:183:15:-;3276:7;3341:20;:18;:20::i;:::-;3363:10;3312:62;;;;;;;;;:::i;4598:385:7:-;4680:7;4701:9;4724;4856:30;4881:4;4856:24;:30::i;:::-;4848:39;-1:-1:-1;4902:30:7;4927:4;4902:24;:30::i;:::-;4898:34;;4946:30;4971:4;4946:24;:30::i;14005:259:54:-;14205:3;14185:23;14232:3;14213:22;;;;14184:52;:72;;14005:259::o;6377:650::-;6504:7;6540:16;;;6789:75;6798:15;;;;;;:34;;;-1:-1:-1;;;6817:6:54;:15;6798:34;9492:3:3;6789:8:54;:75::i;:::-;6984:36;6990:5;6997:8;7007:12;6984:5;:36::i;948:166:11:-;1006:7;1025:37;1039:1;1034;:6;;4370:1:3;1025:8:11;:37::i;:::-;-1:-1:-1;1084:5:11;;;948:166::o;8366:346:54:-;8445:7;8464:15;8482:25;8500:6;8482:13;8487:7;8482:4;:13::i;:25::-;8464:43;;8517:18;8538:28;8559:6;8538:16;8546:7;8538;:16::i;:28::-;8517:49;;8576:30;8609:24;8625:7;8609:15;:24::i;:::-;8576:57;;8651:54;8661:7;8670:10;8682:22;8651:9;:54::i;8435:1028:57:-;8633:6;8665:37;8716:13;8743:16;8787;8816:32;8841:6;8816:24;:32::i;:::-;8651:197;;;;;;;;;8859:12;8894:6;-1:-1:-1;;;;;8885:15:57;:5;-1:-1:-1;;;;;8885:15:57;;8881:382;;;8916:18;8937:26;8946:8;8956:6;8937:8;:26;;:::i;:::-;8916:47;-1:-1:-1;8985:33:57;8916:47;9009:8;8985:23;:33::i;:::-;9043:10;;-1:-1:-1;8977:41:57;-1:-1:-1;8881:382:57;;;9115:18;9136:26;9145:8;9155:6;9136:8;:26;;:::i;:::-;9115:47;-1:-1:-1;9184:33:57;9115:47;9208:8;9184:23;:33::i;:::-;9242:10;;-1:-1:-1;9176:41:57;-1:-1:-1;8881:382:57;9295:50;9326:8;9336;9295:30;:50::i;:::-;9273:72;;9380:53;9414:8;9424;9380:33;:53::i;:::-;9355:22;;;;:78;;;;-1:-1:-1;9451:5:57;;-1:-1:-1;;;8435:1028:57;;;;;;:::o;6534:483:56:-;6734:6;6752:22;6777:45;6808:6;6816:5;6777:30;:45::i;:::-;6752:70;;6833:18;6854:32;6863:14;6879:6;6854:8;:32;;:::i;:::-;6896:37;;;;:29;:37;;;;;;;;-1:-1:-1;;;;;6896:44:56;;;;;;;;;:57;;;6833:53;-1:-1:-1;6971:39:56;6833:53;6995:14;6971:23;:39::i;:::-;6964:46;6534:483;-1:-1:-1;;;;;;;6534:483:56:o;6558:545:55:-;6749:6;6823:29;;;:21;:29;;;;;6749:6;6887:43;6823:29;6924:5;6887:22;:43::i;:::-;6862:68;;6941:18;6962:32;6971:14;6987:6;6962:8;:32;;:::i;:::-;6941:53;-1:-1:-1;7004:35:55;:12;7021:5;6941:53;7004:16;:35::i;:::-;-1:-1:-1;7057:39:55;:10;7081:14;7057:23;:39::i;:::-;7050:46;6558:545;-1:-1:-1;;;;;;;;6558:545:55:o;8875:346:54:-;8954:7;8973:15;8991:25;9009:6;8991:13;8996:7;8991:4;:13::i;:25::-;8973:43;;9026:18;9047:28;9068:6;9047:16;9055:7;9047;:16::i;9569:263::-;9649:7;9668:19;9690:13;9695:7;9690:4;:13::i;:::-;9668:35;-1:-1:-1;9742:12:54;9771:54;9668:35;9794:10;9742:12;9771:9;:54::i;5893:273:7:-;6101:14;6093:56;-1:-1:-1;;6093:56:7;6080:70;;6056:104::o;4461:279:54:-;4546:6;4713:19;4721:10;4713:7;:19::i;:::-;4683;4691:10;4683:7;:19::i;:::-;4676:57;;4461:279;-1:-1:-1;;;4461:279:54:o;13608:281::-;13702:7;13826:56;13832:22;13840:13;13832:7;:22::i;:::-;13856;13864:13;13856:7;:22::i;:::-;13880:1;13826:5;:56::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:130::-;72:20;;97:33;72:20;97:33;:::i;1054:755::-;;1187:3;1180:4;1172:6;1168:17;1164:27;1154:2;;-1:-1;;1195:12;1154:2;1242:6;1229:20;1264:96;1279:80;1352:6;1279:80;:::i;:::-;1264:96;:::i;:::-;1388:21;;;1255:105;-1:-1;1432:4;1445:14;;;;1420:17;;;1534;;;1525:27;;;;1522:36;-1:-1;1519:2;;;1571:1;;1561:12;1519:2;1596:1;1581:222;1606:6;1603:1;1600:13;1581:222;;;8414:6;8401:20;8426:49;8469:5;8426:49;:::i;:::-;1674:66;;1754:14;;;;1782;;;;1628:1;1621:9;1581:222;;;1585:14;;;;;1147:662;;;;:::o;3370:774::-;;3519:3;3512:4;3504:6;3500:17;3496:27;3486:2;;-1:-1;;3527:12;3486:2;3574:6;3561:20;3596:112;3611:96;3700:6;3611:96;:::i;3596:112::-;3736:21;;;3587:121;-1:-1;3780:4;3793:14;;;;3768:17;;;3888:1;3873:265;3898:6;3895:1;3892:13;3873:265;;;3981:3;3968:17;3772:6;3956:30;10034:4;;10013:19;;3956:30;10017:3;10013:19;;10009:30;10006:2;;;3888:1;;10042:12;10006:2;10070:20;10034:4;10070:20;:::i;:::-;3780:4;3956:30;;7664:20;10156:16;10149:75;10347:22;;3956:30;10347:22;17281:20;3780:4;10312:5;10308:16;10301:75;10500:22;;3956:30;10500:22;17281:20;10347:22;10465:5;10461:16;10454:75;10646:22;;;;3956:30;10646:22;17281:20;10500:22;10611:5;10607:16;10600:75;;10034:4;3956:30;10753:19;10740:33;10726:47;;-1:-1;;;;;10785:6;10782:30;10779:2;;;3888:1;;10815:12;10779:2;10860:58;10914:3;3780:4;10905:6;3956:30;10890:22;;10860:58;:::i;:::-;10842:16;;;10835:84;3993:82;;-1:-1;;4089:14;;;;4117;;;;3920:1;3913:9;3873:265;;5868:707;;5985:3;5978:4;5970:6;5966:17;5962:27;5952:2;;-1:-1;;5993:12;5952:2;6040:6;6027:20;6062:80;6077:64;6134:6;6077:64;:::i;6062:80::-;6170:21;;;6053:89;-1:-1;6214:4;6227:14;;;;6202:17;;;6316;;;6307:27;;;;6304:36;-1:-1;6301:2;;;6353:1;;6343:12;6301:2;6378:1;6363:206;6388:6;6385:1;6382:13;6363:206;;;17281:20;;6456:50;;6520:14;;;;6548;;;;6410:1;6403:9;6363:206;;6601:722;;6729:3;6722:4;6714:6;6710:17;6706:27;6696:2;;-1:-1;;6737:12;6696:2;6777:6;6771:13;6799:80;6814:64;6871:6;6814:64;:::i;6799:80::-;6907:21;;;6790:89;-1:-1;6951:4;6964:14;;;;6939:17;;;7053;;;7044:27;;;;7041:36;-1:-1;7038:2;;;7090:1;;7080:12;7038:2;7115:1;7100:217;7125:6;7122:1;7119:13;7100:217;;;17429:13;;7193:61;;7268:14;;;;7296;;;;7147:1;7140:9;7100:217;;7331:124;7395:20;;7420:30;7395:20;7420:30;:::i;7870:440::-;;7971:3;7964:4;7956:6;7952:17;7948:27;7938:2;;-1:-1;;7979:12;7938:2;8026:6;8013:20;-1:-1;;;;;61159:6;61156:30;61153:2;;;-1:-1;;61189:12;61153:2;8048:64;10013:19;61243:17;;-1:-1;;61239:33;61330:4;61320:15;8048:64;:::i;:::-;8039:73;;8132:6;8125:5;8118:21;8236:3;61330:4;8227:6;8160;8218:16;;8215:25;8212:2;;;8253:1;;8243:12;8212:2;68044:6;61330:4;8160:6;8156:17;61330:4;8194:5;8190:16;68021:30;68100:1;68082:16;;;61330:4;68082:16;68075:27;8194:5;7931:379;-1:-1;;7931:379::o;9028:176::-;9118:20;;9143:56;9118:20;9143:56;:::i;9396:158::-;9477:20;;70811:1;70801:12;;70791:2;;70827:1;;70817:12;9561:176;9651:20;;70935:1;70925:12;;70915:2;;70951:1;;70941:12;10983:1122;;11106:4;11094:9;11089:3;11085:19;11081:30;11078:2;;;-1:-1;;11114:12;11078:2;11142:20;11106:4;11142:20;:::i;:::-;11133:29;;11227:17;11214:31;-1:-1;;;;;11265:18;11257:6;11254:30;11251:2;;;11242:1;;11287:12;11251:2;11332:90;11418:3;11409:6;11398:9;11394:22;11332:90;:::i;:::-;11314:16;11307:116;11521:2;11510:9;11506:18;11493:32;11479:46;;11265:18;11537:6;11534:30;11531:2;;;11242:1;;11567:12;11531:2;11612:74;11682:3;11673:6;11662:9;11658:22;11612:74;:::i;:::-;11521:2;11598:5;11594:16;11587:100;11780:2;11769:9;11765:18;11752:32;11738:46;;11265:18;11796:6;11793:30;11790:2;;;11242:1;;11826:12;11790:2;;11871:58;11925:3;11916:6;11905:9;11901:22;11871:58;:::i;:::-;11780:2;11857:5;11853:16;11846:84;;12037:46;12079:3;12004:2;12059:9;12055:22;12037:46;:::i;:::-;12004:2;12023:5;12019:16;12012:72;11072:1033;;;;:::o;12147:800::-;;12269:4;12257:9;12252:3;12248:19;12244:30;12241:2;;;-1:-1;;12277:12;12241:2;12305:20;12269:4;12305:20;:::i;:::-;12296:29;;85:6;72:20;97:33;124:5;97:33;:::i;:::-;12384:75;;12535:2;12586:22;;7395:20;7420:30;7395:20;7420:30;:::i;:::-;12535:2;12550:16;;12543:72;12681:2;12743:22;;217:20;242:41;217:20;242:41;:::i;:::-;12681:2;12696:16;;12689:83;12846:2;12897:22;;7395:20;7420:30;7395:20;7420:30;:::i;17492:241::-;;17596:2;17584:9;17575:7;17571:23;17567:32;17564:2;;;-1:-1;;17602:12;17564:2;85:6;72:20;97:33;124:5;97:33;:::i;17740:366::-;;;17861:2;17849:9;17840:7;17836:23;17832:32;17829:2;;;-1:-1;;17867:12;17829:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;17919:63;-1:-1;18019:2;18058:22;;72:20;97:33;72:20;97:33;:::i;:::-;18027:63;;;;17823:283;;;;;:::o;18113:485::-;;;;18248:2;18236:9;18227:7;18223:23;18219:32;18216:2;;;-1:-1;;18254:12;18216:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;18306:63;-1:-1;18406:2;18445:22;;72:20;97:33;72:20;97:33;:::i;:::-;18414:63;-1:-1;18514:2;18550:22;;7395:20;7420:30;7395:20;7420:30;:::i;:::-;18522:60;;;;18210:388;;;;;:::o;18605:532::-;;;18766:2;18754:9;18745:7;18741:23;18737:32;18734:2;;;-1:-1;;18772:12;18734:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;18824:63;-1:-1;18952:2;18937:18;;18924:32;-1:-1;;;;;18965:30;;18962:2;;;-1:-1;;18998:12;18962:2;19028:93;19113:7;19104:6;19093:9;19089:22;19028:93;:::i;:::-;19018:103;;;18728:409;;;;;:::o;19144:441::-;;19305:2;;19293:9;19284:7;19280:23;19276:32;19273:2;;;-1:-1;;19311:12;19273:2;19369:17;19356:31;-1:-1;;;;;19399:6;19396:30;19393:2;;;-1:-1;;19429:12;19393:2;19537:22;;4332:4;4320:17;;4316:27;-1:-1;4306:2;;-1:-1;;4347:12;4306:2;4394:6;4381:20;4416:112;4431:96;4520:6;4431:96;:::i;4416:112::-;4556:21;;;4613:14;;;;4588:17;;;4714:4;4702:17;;;4693:27;;;;4690:36;-1:-1;4687:2;;;-1:-1;;4729:12;4687:2;-1:-1;4755:10;;4749:238;4774:6;4771:1;4768:13;4749:238;;;4714:4;14263:9;14258:3;14254:19;14250:30;14247:2;;;-1:-1;;14283:12;14247:2;14311:20;4714:4;14311:20;:::i;:::-;14413:72;14481:3;14457:22;14413:72;:::i;:::-;14395:16;14388:98;19305:2;14607:9;14603:22;7664:20;19305:2;14568:5;14564:16;14557:75;14694:2;14727:64;14787:3;14694:2;14767:9;14763:22;14727:64;:::i;:::-;14709:16;;;14702:90;14855:2;14909:22;;;17281:20;14870:16;;;14863:75;4842:82;;4796:1;4789:9;;;;;4938:14;;;;4966;;;;4749:238;;;-1:-1;19449:120;;19267:318;-1:-1;;;;;;;;19267:318::o;19592:441::-;;19753:2;;19741:9;19732:7;19728:23;19724:32;19721:2;;;-1:-1;;19759:12;19721:2;19817:17;19804:31;-1:-1;;;;;19847:6;19844:30;19841:2;;;-1:-1;;19877:12;19841:2;19985:22;;5181:4;5169:17;;5165:27;-1:-1;5155:2;;-1:-1;;5196:12;5155:2;5243:6;5230:20;5265:112;5280:96;5369:6;5280:96;:::i;5265:112::-;5405:21;;;5462:14;;;;5437:17;;;5563:4;5551:17;;;5542:27;;;;5539:36;-1:-1;5536:2;;;-1:-1;;5578:12;5536:2;-1:-1;5604:10;;5598:238;5623:6;5620:1;5617:13;5598:238;;;5563:4;16352:9;16347:3;16343:19;16339:30;16336:2;;;-1:-1;;16372:12;16336:2;16400:20;5563:4;16400:20;:::i;:::-;16502:72;16570:3;16546:22;16502:72;:::i;:::-;16484:16;16477:98;16670:65;16731:3;19753:2;16711:9;16707:22;16670:65;:::i;:::-;16652:16;;;16645:91;16799:2;16853:22;;;17281:20;16814:16;;;16807:75;16945:2;16978:49;17023:3;16999:22;;;16978:49;:::i;:::-;16960:16;;;16953:75;17094:3;17128:57;17181:3;17157:22;;;17128:57;:::i;:::-;17110:16;;;17103:83;5691:82;;5645:1;5638:9;;;;;5787:14;;;;5815;;;;5598:238;;20040:657;;;20222:2;20210:9;20201:7;20197:23;20193:32;20190:2;;;-1:-1;;20228:12;20190:2;20279:17;20273:24;-1:-1;;;;;20317:18;20309:6;20306:30;20303:2;;;-1:-1;;20339:12;20303:2;20369:89;20450:7;20441:6;20430:9;20426:22;20369:89;:::i;:::-;20359:99;;20516:2;20505:9;20501:18;20495:25;20481:39;;20317:18;20532:6;20529:30;20526:2;;;-1:-1;;20562:12;20526:2;;20592:89;20673:7;20664:6;20653:9;20649:22;20592:89;:::i;20704:235::-;;20805:2;20793:9;20784:7;20780:23;20776:32;20773:2;;;-1:-1;;20811:12;20773:2;7408:6;7395:20;7420:30;7444:5;7420:30;:::i;20946:257::-;;21058:2;21046:9;21037:7;21033:23;21029:32;21026:2;;;-1:-1;;21064:12;21026:2;7543:6;7537:13;7555:30;7579:5;7555:30;:::i;21210:241::-;;21314:2;21302:9;21293:7;21289:23;21285:32;21282:2;;;-1:-1;;21320:12;21282:2;-1:-1;7664:20;;21276:175;-1:-1;21276:175::o;21458:787::-;;;;;21655:3;21643:9;21634:7;21630:23;21626:33;21623:2;;;-1:-1;;21662:12;21623:2;7677:6;7664:20;21714:63;;21814:2;21857:9;21853:22;72:20;97:33;124:5;97:33;:::i;:::-;21822:63;-1:-1;21922:2;21969:22;;217:20;242:41;217:20;242:41;:::i;:::-;21930:71;-1:-1;22066:2;22051:18;;22038:32;-1:-1;;;;;22079:30;;22076:2;;;-1:-1;;22112:12;22076:2;22142:87;22221:7;22212:6;22201:9;22197:22;22142:87;:::i;:::-;22132:97;;;21617:628;;;;;;;:::o;23030:532::-;;;23191:2;23179:9;23170:7;23166:23;23162:32;23159:2;;;-1:-1;;23197:12;23159:2;7677:6;7664:20;23249:63;;23377:2;23366:9;23362:18;23349:32;-1:-1;;;;;23393:6;23390:30;23387:2;;;-1:-1;;23423:12;23569:793;;;;23772:2;23760:9;23751:7;23747:23;23743:32;23740:2;;;-1:-1;;23778:12;23740:2;7677:6;7664:20;23830:63;;23958:2;;23947:9;23943:18;23930:32;-1:-1;;;;;23982:18;23974:6;23971:30;23968:2;;;-1:-1;;24004:12;23968:2;24034:93;24119:7;24110:6;24099:9;24095:22;24034:93;:::i;:::-;24024:103;;24192:2;24181:9;24177:18;24164:32;24150:46;;23982:18;24208:6;24205:30;24202:2;;;-1:-1;;24238:12;24202:2;-1:-1;24314:22;;423:4;411:17;;407:27;-1:-1;397:2;;-1:-1;;438:12;397:2;485:6;472:20;507:80;522:64;579:6;522:64;:::i;507:80::-;615:21;;;672:14;;;;647:17;;;761;;;752:27;;;;749:36;-1:-1;746:2;;;-1:-1;;788:12;746:2;-1:-1;814:10;;808:206;833:6;830:1;827:13;808:206;;;85:6;72:20;97:33;124:5;97:33;:::i;:::-;901:50;;855:1;848:9;;;;;965:14;;;;993;;808:206;;;812:14;24258:88;;;;;;;;23734:628;;;;;:::o;24369:396::-;;;24505:2;24493:9;24484:7;24480:23;24476:32;24473:2;;;-1:-1;;24511:12;24473:2;7677:6;7664:20;24563:63;;24663:2;24721:9;24717:22;8748:20;8773:48;8815:5;8773:48;:::i;24772:239::-;;24875:2;24863:9;24854:7;24850:23;24846:32;24843:2;;;-1:-1;;24881:12;24843:2;7800:20;;-1:-1;;;;;;64825:78;;69757:34;;69747:2;;-1:-1;;69795:12;25308:1081;;;;;25566:3;25554:9;25545:7;25541:23;25537:33;25534:2;;;-1:-1;;25573:12;25534:2;8942:6;8929:20;8954:62;9010:5;8954:62;:::i;:::-;25625:92;-1:-1;25782:2;25767:18;;25754:32;-1:-1;;;;;25795:30;;;25792:2;;;-1:-1;;25828:12;25792:2;25858:93;25943:7;25934:6;25923:9;25919:22;25858:93;:::i;:::-;25848:103;;26016:2;26005:9;26001:18;25988:32;25974:46;;25806:18;26032:6;26029:30;26026:2;;;-1:-1;;26062:12;26026:2;26092:78;26162:7;26153:6;26142:9;26138:22;26092:78;:::i;:::-;26082:88;;26235:2;26224:9;26220:18;26207:32;26193:46;;25806:18;26251:6;26248:30;26245:2;;;-1:-1;;26281:12;26245:2;;26311:62;26365:7;26356:6;26345:9;26341:22;26311:62;:::i;26396:289::-;;26524:2;26512:9;26503:7;26499:23;26495:32;26492:2;;;-1:-1;;26530:12;26492:2;9131:6;9118:20;9143:56;9193:5;9143:56;:::i;26692:1079::-;;;;;26992:3;26980:9;26971:7;26967:23;26963:33;26960:2;;;-1:-1;;26999:12;26960:2;27061:67;27120:7;27096:22;27061:67;:::i;:::-;27051:77;;27193:2;27182:9;27178:18;27165:32;-1:-1;;;;;27217:18;27209:6;27206:30;27203:2;;;-1:-1;;27239:12;27203:2;27269:110;27371:7;27362:6;27351:9;27347:22;27269:110;:::i;:::-;27259:120;;27444:2;27433:9;27429:18;27416:32;27402:46;;27217:18;27460:6;27457:30;27454:2;;;-1:-1;;27490:12;27454:2;;27520:94;27606:7;27597:6;27586:9;27582:22;27520:94;:::i;:::-;27510:104;;;27669:86;27747:7;27651:2;27727:9;27723:22;27669:86;:::i;:::-;27659:96;;26954:817;;;;;;;:::o;27778:1465::-;;;;;;;28136:3;28124:9;28115:7;28111:23;28107:33;28104:2;;;-1:-1;;28143:12;28104:2;28205:67;28264:7;28240:22;28205:67;:::i;:::-;28195:77;;28337:2;;28326:9;28322:18;28309:32;-1:-1;;;;;28361:18;28353:6;28350:30;28347:2;;;-1:-1;;28383:12;28347:2;28413:110;28515:7;28506:6;28495:9;28491:22;28413:110;:::i;:::-;28403:120;;28588:2;28577:9;28573:18;28560:32;28546:46;;28361:18;28604:6;28601:30;28598:2;;;-1:-1;;28634:12;28598:2;28664:94;28750:7;28741:6;28730:9;28726:22;28664:94;:::i;:::-;28654:104;;28813:86;28891:7;28795:2;28871:9;28867:22;28813:86;:::i;:::-;28803:96;;28964:3;28953:9;28949:19;28936:33;28922:47;;28361:18;28981:6;28978:30;28975:2;;;-1:-1;;29011:12;28975:2;-1:-1;29086:22;;2729:4;2717:17;;2713:27;-1:-1;2703:2;;-1:-1;;2744:12;2703:2;2791:6;2778:20;2813:79;2828:63;2884:6;2828:63;:::i;2813:79::-;2920:21;;;2977:14;;;;2952:17;;;3066;;;3057:27;;;;3054:36;-1:-1;3051:2;;;-1:-1;;3093:12;3051:2;-1:-1;3119:10;;3113:205;3138:6;3135:1;3132:13;3113:205;;;9810:20;;3206:49;;3160:1;3153:9;;;;;3269:14;;;;3297;;3113:205;;;3117:14;29031:87;;;;;;;;29155:3;29199:9;29195:22;17281:20;29164:63;;28098:1145;;;;;;;;:::o;29250:829::-;;;;;29467:3;29455:9;29446:7;29442:23;29438:33;29435:2;;;-1:-1;;29474:12;29435:2;29532:17;29519:31;-1:-1;;;;;29570:18;29562:6;29559:30;29556:2;;;-1:-1;;29592:12;29556:2;29672:22;;;;15115:4;15094:19;;;15090:30;15087:2;;;-1:-1;;15123:12;15087:2;15151:20;15115:4;15151:20;:::i;:::-;7677:6;7664:20;15237:16;15230:75;15399:63;15458:3;15366:2;15438:9;15434:22;15399:63;:::i;:::-;15366:2;15385:5;15381:16;15374:89;15527:2;15601:9;15597:22;8401:20;8426:49;8469:5;8426:49;:::i;:::-;15527:2;15542:16;;15535:91;15724:65;15785:3;15691:2;15761:22;;15724:65;:::i;:::-;15691:2;15710:5;15706:16;15699:91;15853:3;15912:9;15908:22;17281:20;15853:3;15873:5;15869:16;15862:75;16030:3;16019:9;16015:19;16002:33;29570:18;16047:6;16044:30;16041:2;;;-1:-1;;16077:12;16041:2;16122:58;16176:3;16167:6;16156:9;16152:22;16122:58;:::i;:::-;16030:3;16108:5;16104:16;16097:84;;29612:92;;;;;;29759:86;29837:7;15366:2;29817:9;29813:22;29759:86;:::i;:::-;29429:650;;29749:96;;-1:-1;;;;16030:3;29922:22;;17281:20;;15115:4;30031:22;17281:20;;29429:650::o;30086:263::-;;30201:2;30189:9;30180:7;30176:23;30172:32;30169:2;;;-1:-1;;30207:12;30169:2;-1:-1;17429:13;;30163:186;-1:-1;30163:186::o;31259:137::-;-1:-1;;;;;65830:54;31346:45;;31340:56::o;32401:765::-;;32624:5;62101:12;63321:6;63316:3;63309:19;63358:4;;63353:3;63349:14;32636:93;;63358:4;32815:5;61467:14;-1:-1;32854:290;32879:6;32876:1;32873:13;32854:290;;;32940:13;;-1:-1;;;;;65830:54;36753:71;;30722:14;;;;62805;;;;10793:18;32894:9;32854:290;;;-1:-1;33150:10;;32540:626;-1:-1;;;;;32540:626::o;33203:682::-;;33393:5;62101:12;63321:6;63316:3;63309:19;63358:4;;63353:3;63349:14;33405:92;;63358:4;33567:5;61467:14;-1:-1;33606:257;33631:6;33628:1;33625:13;33606:257;;;33692:13;;34794:37;;30900:14;;;;62805;;;;33653:1;33646:9;33606:257;;35618:323;;35750:5;62101:12;63321:6;63316:3;63309:19;35833:52;35878:6;63358:4;63353:3;63349:14;63358:4;35859:5;35855:16;35833:52;:::i;:::-;10013:19;68820:14;-1:-1;;68816:28;35897:39;;;;63358:4;35897:39;;35698:243;-1:-1;;35698:243::o;38890:1729::-;;39051:6;39125:16;39119:23;69164:1;69157:5;69154:12;69144:2;;69170:9;69144:2;67669:38;37806:3;37799:62;;39305:4;39298:5;39294:16;39288:23;39317:78;39305:4;39384:3;39380:14;39366:12;39317:78;:::i;:::-;;39478:4;39471:5;39467:16;39461:23;39490:78;39478:4;39557:3;39553:14;39539:12;39490:78;:::i;:::-;;39649:4;39642:5;39638:16;39632:23;39649:4;39713:3;39709:14;34794:37;39805:4;39798:5;39794:16;39788:23;39805:4;39869:3;39865:14;34794:37;39970:4;39963:5;39959:16;39953:23;39970:4;40034:3;40030:14;34794:37;40124:4;40117:5;40113:16;40107:23;40136:63;40124:4;40188:3;40184:14;40170:12;40136:63;:::i;:::-;;40276:4;40269:5;40265:16;40259:23;40288:63;40276:4;40340:3;40336:14;40322:12;40288:63;:::i;:::-;;40434:6;;40427:5;40423:18;40417:25;39051:6;40434;40466:3;40462:16;40455:40;40510:71;39051:6;39046:3;39042:16;40562:12;40510:71;:::i;40970:387::-;34794:37;;;-1:-1;;;;;;64825:78;41221:2;41212:12;;35209:56;41321:11;;;41112:245::o;41364:291::-;;68044:6;68039:3;68034;68021:30;68082:16;;68075:27;;;68082:16;41508:147;-1:-1;41508:147::o;41662:271::-;;36458:5;62101:12;36569:52;36614:6;36609:3;36602:4;36595:5;36591:16;36569:52;:::i;:::-;36633:16;;;;;41796:137;-1:-1;;41796:137::o;41940:452::-;-1:-1;;68931:2;68927:14;;;;;37093:86;;68927:14;;;;;42238:2;42229:12;;37093:86;42355:12;;;42114:278::o;42399:659::-;-1:-1;;;38373:87;;38358:1;38479:11;;34794:37;;;;42910:12;;;34794:37;43021:12;;;42644:414::o;43451:222::-;-1:-1;;;;;65830:54;;;;31346:45;;43578:2;43563:18;;43549:124::o;43680:444::-;-1:-1;;;;;65830:54;;;31346:45;;65830:54;;;;44027:2;44012:18;;31346:45;44110:2;44095:18;;34794:37;;;;43863:2;43848:18;;43834:290::o;44131:377::-;-1:-1;;;;;65830:54;;31346:45;;44308:2;44293:18;;69052:1;69042:12;;69032:2;;69058:9;69032:2;67518:48;44494:2;44483:9;44479:18;37642:72;44279:229;;;;;:::o;44515:333::-;-1:-1;;;;;65830:54;;;;31346:45;;44834:2;44819:18;;34794:37;44670:2;44655:18;;44641:207::o;44855:914::-;;45201:2;45222:17;45215:47;45276:123;45201:2;45190:9;45186:18;45385:6;45276:123;:::i;:::-;45447:9;45441:4;45437:20;45432:2;45421:9;45417:18;45410:48;45472:106;45573:4;45564:6;45472:106;:::i;:::-;45464:114;;45626:9;45620:4;45616:20;45611:2;45600:9;45596:18;45589:48;45651:108;45754:4;45745:6;45651:108;:::i;45776:1114::-;;46170:3;46192:17;46185:47;46246:123;46170:3;46159:9;46155:19;46355:6;46246:123;:::i;:::-;46417:9;46411:4;46407:20;46402:2;46391:9;46387:18;46380:48;46442:108;46545:4;46536:6;46442:108;:::i;:::-;46434:116;;46598:9;46592:4;46588:20;46583:2;46572:9;46568:18;46561:48;46623:108;46726:4;46717:6;46623:108;:::i;:::-;46615:116;;46779:9;46773:4;46769:20;46764:2;46753:9;46749:18;46742:48;46804:76;46875:4;46866:6;46804:76;:::i;46897:770::-;;47195:2;47216:17;47209:47;47270:123;47195:2;47184:9;47180:18;47379:6;47270:123;:::i;:::-;47441:9;47435:4;47431:20;47426:2;47415:9;47411:18;47404:48;47466:108;47569:4;47560:6;47466:108;:::i;:::-;47458:116;;;34824:5;47653:2;47642:9;47638:18;34794:37;47166:501;;;;;;:::o;47674:366::-;;47849:2;47870:17;47863:47;47924:106;47849:2;47838:9;47834:18;48016:6;47924:106;:::i;48424:210::-;64659:13;;64652:21;34687:34;;48545:2;48530:18;;48516:118::o;48641:432::-;64659:13;;64652:21;34687:34;;48976:2;48961:18;;34794:37;;;;49059:2;49044:18;;34794:37;48818:2;48803:18;;48789:284::o;49080:222::-;34794:37;;;49207:2;49192:18;;49178:124::o;49309:444::-;34794:37;;;-1:-1;;;;;65830:54;;;49656:2;49641:18;;31346:45;65830:54;49739:2;49724:18;;31346:45;49492:2;49477:18;;49463:290::o;49760:1140::-;34794:37;;;-1:-1;;;;;65830:54;;;50296:2;50281:18;;31346:45;65830:54;;50387:2;50372:18;;31189:58;50131:3;50424:2;50409:18;;50402:48;;;49760:1140;;50464:108;;50116:19;;50558:6;50464:108;:::i;:::-;34824:5;50651:3;50640:9;50636:19;34794:37;34824:5;50735:3;50724:9;50720:19;34794:37;50789:9;50783:4;50779:20;50773:3;50762:9;50758:19;50751:49;50814:76;50885:4;50876:6;50814:76;:::i;:::-;50806:84;50102:798;-1:-1;;;;;;;;;;50102:798::o;50907:511::-;;34824:5;34801:3;34794:37;51127:2;51245;51234:9;51230:18;51223:48;51285:123;51127:2;51116:9;51112:18;51394:6;51285:123;:::i;51425:770::-;;34824:5;34801:3;34794:37;51841:2;51723;51841;51830:9;51826:18;51819:48;51881:123;51723:2;51712:9;51708:18;51990:6;51881:123;:::i;:::-;52042:20;;;52037:2;52022:18;;52015:48;62101:12;;63309:19;;;61467:14;;;;63349;;;-1:-1;32072:260;32097:6;32094:1;32091:13;32072:260;;;32158:13;;-1:-1;;;;;65830:54;31346:45;;62805:14;;;;30510;;;;10793:18;32112:9;32072:260;;52202:700;34794:37;;;52622:2;52607:18;;34794:37;;;;-1:-1;;;;;65830:54;;;;52721:2;52706:18;;31346:45;52804:2;52789:18;;34794:37;52887:3;52872:19;;34794:37;52457:3;52442:19;;52428:474::o;52909:668::-;34794:37;;;53313:2;53298:18;;34794:37;;;;53396:2;53381:18;;34794:37;;;;53479:2;53464:18;;34794:37;-1:-1;;;;;65830:54;53562:3;53547:19;;31346:45;53148:3;53133:19;;53119:458::o;53584:548::-;34794:37;;;66046:4;66035:16;;;;53952:2;53937:18;;40923:35;54035:2;54020:18;;34794:37;54118:2;54103:18;;34794:37;53791:3;53776:19;;53762:370::o;55185:325::-;34794:37;;;55496:2;55481:18;;34794:37;55336:2;55321:18;;55307:203::o;55517:872::-;;55838:3;55860:17;55853:47;55914:118;55838:3;55827:9;55823:19;56018:6;55914:118;:::i;:::-;56080:9;56074:4;56070:20;56065:2;56054:9;56050:18;56043:48;56105:108;56208:4;56199:6;56105:108;:::i;:::-;56292:2;56277:18;;34794:37;;;;-1:-1;;56375:2;56360:18;34794:37;56097:116;55809:580;-1:-1;;55809:580::o;56396:612::-;;56639:2;56660:17;56653:47;56714:118;56639:2;56628:9;56624:18;56818:6;56714:118;:::i;:::-;56911:2;56896:18;;34794:37;;;;-1:-1;56994:2;56979:18;34794:37;56706:126;56610:398;-1:-1;56610:398::o;57584:556::-;34794:37;;;57960:2;57945:18;;34794:37;;;;58043:2;58028:18;;34794:37;-1:-1;;;;;65830:54;58126:2;58111:18;;31346:45;57795:3;57780:19;;57766:374::o;58147:256::-;58209:2;58203:9;58235:17;;;-1:-1;;;;;58295:34;;58331:22;;;58292:62;58289:2;;;58367:1;;58357:12;58289:2;58209;58376:22;58187:216;;-1:-1;58187:216::o;58410:304::-;;-1:-1;;;;;58561:6;58558:30;58555:2;;;-1:-1;;58591:12;58555:2;-1:-1;58636:4;58624:17;;;58689:15;;58492:222::o;68117:268::-;68182:1;68189:101;68203:6;68200:1;68197:13;68189:101;;;68270:11;;;68264:18;68251:11;;;68244:39;68225:2;68218:10;68189:101;;;68305:6;68302:1;68299:13;68296:2;;;-1:-1;;68182:1;68352:16;;68345:27;68166:219::o;69193:117::-;-1:-1;;;;;65830:54;;69252:35;;69242:2;;69301:1;;69291:12;69457:111;69538:5;64659:13;64652:21;69516:5;69513:32;69503:2;;69559:1;;69549:12;70479:117;70571:1;70564:5;70561:12;70551:2;;70587:1;;70577:12"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "4805000",
                "executionCost": "infinite",
                "totalCost": "infinite"
              },
              "external": {
                "WETH()": "infinite",
                "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "infinite",
                "changeAuthorizer(address)": "infinite",
                "deregisterTokens(bytes32,address[])": "infinite",
                "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "infinite",
                "flashLoan(address,address[],uint256[],bytes)": "infinite",
                "getActionId(bytes4)": "infinite",
                "getAuthorizer()": "1126",
                "getDomainSeparator()": "infinite",
                "getInternalBalance(address,address[])": "infinite",
                "getNextNonce(address)": "1379",
                "getPausedState()": "infinite",
                "getPool(bytes32)": "infinite",
                "getPoolTokenInfo(bytes32,address)": "infinite",
                "getPoolTokens(bytes32)": "infinite",
                "getProtocolFeesCollector()": "infinite",
                "hasApprovedRelayer(address,address)": "infinite",
                "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "infinite",
                "managePoolBalance((uint8,bytes32,address,uint256)[])": "infinite",
                "manageUserBalance((uint8,address,uint256,address,address)[])": "infinite",
                "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "infinite",
                "registerPool(uint8)": "infinite",
                "registerTokens(bytes32,address[],address[])": "infinite",
                "setPaused(bool)": "infinite",
                "setRelayerApproval(address,address,bool)": "infinite",
                "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "infinite"
              }
            },
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"authorizer\",\"type\":\"address\"},{\"internalType\":\"contract IWETH\",\"name\":\"weth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountCalculated\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"The `Vault` is Balancer V2's core contract. A single instance of it exists for the entire network, and it is the entity used to interact with Pools by Liquidity Providers who join and exit them, Traders who swap, and Asset Managers who withdraw and deposit tokens. The `Vault`'s source code is split among a number of sub-contracts, with the goal of improving readability and making understanding the system easier. Most sub-contracts have been marked as `abstract` to explicitly indicate that only the full `Vault` is meant to be deployed. Roughly speaking, these are the contents of each sub-contract:  - `AssetManagers`: Pool token Asset Manager registry, and Asset Manager interactions.  - `Fees`: set and compute protocol fees.  - `FlashLoans`: flash loan transfers and fees.  - `PoolBalances`: Pool joins and exits.  - `PoolRegistry`: Pool registration, ID management, and basic queries.  - `PoolTokens`: Pool token registration and registration, and balance queries.  - `Swaps`: Pool swaps.  - `UserBalance`: manage user balances (Internal Balance operations and external balance transfers)  - `VaultAuthorization`: access control, relayers and signature validation. Additionally, the different Pool specializations are handled by the `GeneralPoolsBalance`, `MinimalSwapInfoPoolsBalance` and `TwoTokenPoolsBalance` sub-contracts, which in turn make use of the `BalanceAllocation` library. The most important goal of the `Vault` is to make token swaps use as little gas as possible. This is reflected in a multitude of design decisions, from minor things like the format used to store Pool IDs, to major features such as the different Pool specialization settings. Finally, the large number of tasks carried out by the Vault means its bytecode is very large, close to exceeding the contract size limit imposed by EIP 170 (https://eips.ethereum.org/EIPS/eip-170). Manual tuning of the source code was required to improve code generation and bring the bytecode size below this limit. This includes extensive utilization of `internal` functions (particularly inside modifiers), usage of named return arguments, dedicated storage access methods, dynamic revert reason generation, and usage of inline assembly, to name a few.\",\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/Vault.sol\":\"Vault\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/AssetHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\nimport \\\"../../vault/interfaces/IWETH.sol\\\";\\n\\nabstract contract AssetHelpers {\\n    // solhint-disable-next-line var-name-mixedcase\\n    IWETH private immutable _weth;\\n\\n    // Sentinel value used to indicate WETH with wrapping/unwrapping semantics. The zero address is a good choice for\\n    // multiple reasons: it is cheap to pass as a calldata argument, it is a known invalid token and non-contract, and\\n    // it is an address Pools cannot register as a token.\\n    address private constant _ETH = address(0);\\n\\n    constructor(IWETH weth) {\\n        _weth = weth;\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function _WETH() internal view returns (IWETH) {\\n        return _weth;\\n    }\\n\\n    /**\\n     * @dev Returns true if `asset` is the sentinel value that represents ETH.\\n     */\\n    function _isETH(IAsset asset) internal pure returns (bool) {\\n        return address(asset) == _ETH;\\n    }\\n\\n    /**\\n     * @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\\n     * to the WETH contract.\\n     */\\n    function _translateToIERC20(IAsset asset) internal view returns (IERC20) {\\n        return _isETH(asset) ? _WETH() : _asIERC20(asset);\\n    }\\n\\n    /**\\n     * @dev Same as `_translateToIERC20(IAsset)`, but for an entire array.\\n     */\\n    function _translateToIERC20(IAsset[] memory assets) internal view returns (IERC20[] memory) {\\n        IERC20[] memory tokens = new IERC20[](assets.length);\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            tokens[i] = _translateToIERC20(assets[i]);\\n        }\\n        return tokens;\\n    }\\n\\n    /**\\n     * @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\\n     * returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value.\\n     */\\n    function _asIERC20(IAsset asset) internal pure returns (IERC20) {\\n        return IERC20(address(asset));\\n    }\\n}\\n\",\"keccak256\":\"0xf70e781d7e1469aa57f4622a3d5e1ee9fcb8079c0d256405faf35b9cb93933da\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./LogExpMath.sol\\\";\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\nlibrary FixedPoint {\\n    uint256 internal constant ONE = 1e18; // 18 decimal places\\n    uint256 internal constant MAX_POW_RELATIVE_ERROR = 10000; // 10^(-14)\\n\\n    // Minimum base for the power function when the exponent is 'free' (larger than ONE).\\n    uint256 internal constant MIN_POW_BASE_FREE_EXPONENT = 0.7e18;\\n\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Fixed Point addition is the same as regular checked addition\\n\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        return product / ONE;\\n    }\\n\\n    function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 product = a * b;\\n        _require(a == 0 || product / a == b, Errors.MUL_OVERFLOW);\\n\\n        if (product == 0) {\\n            return 0;\\n        } else {\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((product - 1) / ONE) + 1;\\n        }\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            return aInflated / b;\\n        }\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            uint256 aInflated = a * ONE;\\n            _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\\n\\n            // The traditional divUp formula is:\\n            // divUp(x, y) := (x + y - 1) / y\\n            // To avoid intermediate overflow in the addition, we distribute the division and get:\\n            // divUp(x, y) := (x - 1) / y + 1\\n            // Note that this requires x != 0, which we already tested for.\\n\\n            return ((aInflated - 1) / b) + 1;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\\n     * the true value (that is, the error function expected - actual is always positive).\\n     */\\n    function powDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        if (raw < maxError) {\\n            return 0;\\n        } else {\\n            return sub(raw, maxError);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\\n     * the true value (that is, the error function expected - actual is always negative).\\n     */\\n    function powUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n        uint256 raw = LogExpMath.pow(x, y);\\n        uint256 maxError = add(mulUp(raw, MAX_POW_RELATIVE_ERROR), 1);\\n\\n        return add(raw, maxError);\\n    }\\n\\n    /**\\n     * @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\\n     *\\n     * Useful when computing the complement for values with some level of relative error, as it strips this error and\\n     * prevents intermediate negative values.\\n     */\\n    function complement(uint256 x) internal pure returns (uint256) {\\n        return (x < ONE) ? (ONE - x) : 0;\\n    }\\n}\\n\",\"keccak256\":\"0x38720507bb6c838df83953d1ffa88b97d0e06baefa0e3e387303cb8a090a49f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/LogExpMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General internal License for more details.\\n\\n// You should have received a copy of the GNU General internal License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/* solhint-disable */\\n\\n/**\\n * @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\\n *\\n * Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\\n * exponentiation and logarithm (where the base is Euler's number).\\n *\\n * @author Fernando Martinelli - @fernandomartinelli\\n * @author Sergio Yuhjtman - @sergioyuhjtman\\n * @author Daniel Fernandez - @dmf7z\\n */\\nlibrary LogExpMath {\\n    // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\\n    // two numbers, and multiply by ONE when dividing them.\\n\\n    // All arguments and return values are 18 decimal fixed point numbers.\\n    int256 constant ONE_18 = 1e18;\\n\\n    // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\\n    // case of ln36, 36 decimals.\\n    int256 constant ONE_20 = 1e20;\\n    int256 constant ONE_36 = 1e36;\\n\\n    // The domain of natural exponentiation is bound by the word size and number of decimals used.\\n    //\\n    // Because internally the result will be stored using 20 decimals, the largest possible result is\\n    // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\\n    // The smallest possible result is 10^(-18), which makes largest negative argument\\n    // ln(10^(-18)) = -41.446531673892822312.\\n    // We use 130.0 and -41.0 to have some safety margin.\\n    int256 constant MAX_NATURAL_EXPONENT = 130e18;\\n    int256 constant MIN_NATURAL_EXPONENT = -41e18;\\n\\n    // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\\n    // 256 bit integer.\\n    int256 constant LN_36_LOWER_BOUND = ONE_18 - 1e17;\\n    int256 constant LN_36_UPPER_BOUND = ONE_18 + 1e17;\\n\\n    uint256 constant MILD_EXPONENT_BOUND = 2**254 / uint256(ONE_20);\\n\\n    // 18 decimal constants\\n    int256 constant x0 = 128000000000000000000; // 2\\u02c67\\n    int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // e\\u02c6(x0) (no decimals)\\n    int256 constant x1 = 64000000000000000000; // 2\\u02c66\\n    int256 constant a1 = 6235149080811616882910000000; // e\\u02c6(x1) (no decimals)\\n\\n    // 20 decimal constants\\n    int256 constant x2 = 3200000000000000000000; // 2\\u02c65\\n    int256 constant a2 = 7896296018268069516100000000000000; // e\\u02c6(x2)\\n    int256 constant x3 = 1600000000000000000000; // 2\\u02c64\\n    int256 constant a3 = 888611052050787263676000000; // e\\u02c6(x3)\\n    int256 constant x4 = 800000000000000000000; // 2\\u02c63\\n    int256 constant a4 = 298095798704172827474000; // e\\u02c6(x4)\\n    int256 constant x5 = 400000000000000000000; // 2\\u02c62\\n    int256 constant a5 = 5459815003314423907810; // e\\u02c6(x5)\\n    int256 constant x6 = 200000000000000000000; // 2\\u02c61\\n    int256 constant a6 = 738905609893065022723; // e\\u02c6(x6)\\n    int256 constant x7 = 100000000000000000000; // 2\\u02c60\\n    int256 constant a7 = 271828182845904523536; // e\\u02c6(x7)\\n    int256 constant x8 = 50000000000000000000; // 2\\u02c6-1\\n    int256 constant a8 = 164872127070012814685; // e\\u02c6(x8)\\n    int256 constant x9 = 25000000000000000000; // 2\\u02c6-2\\n    int256 constant a9 = 128402541668774148407; // e\\u02c6(x9)\\n    int256 constant x10 = 12500000000000000000; // 2\\u02c6-3\\n    int256 constant a10 = 113314845306682631683; // e\\u02c6(x10)\\n    int256 constant x11 = 6250000000000000000; // 2\\u02c6-4\\n    int256 constant a11 = 106449445891785942956; // e\\u02c6(x11)\\n\\n    /**\\n     * @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\\n     *\\n     * Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function pow(uint256 x, uint256 y) internal pure returns (uint256) {\\n        if (y == 0) {\\n            // We solve the 0^0 indetermination by making it equal one.\\n            return uint256(ONE_18);\\n        }\\n\\n        if (x == 0) {\\n            return 0;\\n        }\\n\\n        // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\\n        // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\\n        // x^y = exp(y * ln(x)).\\n\\n        // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\\n        _require(x < 2**255, Errors.X_OUT_OF_BOUNDS);\\n        int256 x_int256 = int256(x);\\n\\n        // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\\n        // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\\n\\n        // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\\n        _require(y < MILD_EXPONENT_BOUND, Errors.Y_OUT_OF_BOUNDS);\\n        int256 y_int256 = int256(y);\\n\\n        int256 logx_times_y;\\n        if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {\\n            int256 ln_36_x = ln_36(x_int256);\\n\\n            // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\\n            // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\\n            // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\\n            // (downscaled) last 18 decimals.\\n            logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);\\n        } else {\\n            logx_times_y = ln(x_int256) * y_int256;\\n        }\\n        logx_times_y /= ONE_18;\\n\\n        // Finally, we compute exp(y * ln(x)) to arrive at x^y\\n        _require(\\n            MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,\\n            Errors.PRODUCT_OUT_OF_BOUNDS\\n        );\\n\\n        return uint256(exp(logx_times_y));\\n    }\\n\\n    /**\\n     * @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\\n     *\\n     * Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`.\\n     */\\n    function exp(int256 x) internal pure returns (int256) {\\n        _require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, Errors.INVALID_EXPONENT);\\n\\n        if (x < 0) {\\n            // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\\n            // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\\n            // Fixed point division requires multiplying by ONE_18.\\n            return ((ONE_18 * ONE_18) / exp(-x));\\n        }\\n\\n        // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\\n        // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\\n        // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\\n        // decomposition.\\n        // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest x_n.\\n        // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\\n        // We mutate x by subtracting x_n, making it the remainder of the decomposition.\\n\\n        // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\\n        // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\\n        // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\\n        // decomposition.\\n\\n        // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\\n        // it and compute the accumulated product.\\n\\n        int256 firstAN;\\n        if (x >= x0) {\\n            x -= x0;\\n            firstAN = a0;\\n        } else if (x >= x1) {\\n            x -= x1;\\n            firstAN = a1;\\n        } else {\\n            firstAN = 1; // One with no decimal places\\n        }\\n\\n        // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\\n        // smaller terms.\\n        x *= 100;\\n\\n        // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\\n        // one. Recall that fixed point multiplication requires dviding by ONE_20.\\n        int256 product = ONE_20;\\n\\n        if (x >= x2) {\\n            x -= x2;\\n            product = (product * a2) / ONE_20;\\n        }\\n        if (x >= x3) {\\n            x -= x3;\\n            product = (product * a3) / ONE_20;\\n        }\\n        if (x >= x4) {\\n            x -= x4;\\n            product = (product * a4) / ONE_20;\\n        }\\n        if (x >= x5) {\\n            x -= x5;\\n            product = (product * a5) / ONE_20;\\n        }\\n        if (x >= x6) {\\n            x -= x6;\\n            product = (product * a6) / ONE_20;\\n        }\\n        if (x >= x7) {\\n            x -= x7;\\n            product = (product * a7) / ONE_20;\\n        }\\n        if (x >= x8) {\\n            x -= x8;\\n            product = (product * a8) / ONE_20;\\n        }\\n        if (x >= x9) {\\n            x -= x9;\\n            product = (product * a9) / ONE_20;\\n        }\\n\\n        // x10 and x11 are unnecessary here since we have high enough precision already.\\n\\n        // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\\n        // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\\n\\n        int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.\\n        int256 term; // Each term in the sum, where the nth term is (x^n / n!).\\n\\n        // The first term is simply x.\\n        term = x;\\n        seriesSum += term;\\n\\n        // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\\n        // multiplying by it requires dividing by ONE_20, but dividing by the non-fixed point n values does not.\\n\\n        term = ((term * x) / ONE_20) / 2;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 3;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 4;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 5;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 6;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 7;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 8;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 9;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 10;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 11;\\n        seriesSum += term;\\n\\n        term = ((term * x) / ONE_20) / 12;\\n        seriesSum += term;\\n\\n        // 12 Taylor terms are sufficient for 18 decimal precision.\\n\\n        // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\\n        // approximation of the exponention of the remainder (both with 20 decimals). All that remains is to multiply\\n        // all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),\\n        // and then drop two digits to return an 18 decimal value.\\n\\n        return (((product * seriesSum) / ONE_20) * firstAN) / 100;\\n    }\\n\\n    /**\\n     * @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\\n     */\\n    function ln(int256 a) internal pure returns (int256) {\\n        // The real natural logarithm is not defined for negative numbers or zero.\\n        _require(a > 0, Errors.OUT_OF_BOUNDS);\\n\\n        if (a < ONE_18) {\\n            // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\\n            // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\\n            // Fixed point division requires multiplying by ONE_18.\\n            return (-ln((ONE_18 * ONE_18) / a));\\n        }\\n\\n        // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\\n        // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\\n        // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\\n        // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\\n        // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\\n        // decomposition, which will be lower than the smallest a_n.\\n        // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\\n        // We mutate a by subtracting a_n, making it the remainder of the decomposition.\\n\\n        // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\\n        // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\\n        // ONE_18 to convert them to fixed point.\\n        // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\\n        // by it and compute the accumulated sum.\\n\\n        int256 sum = 0;\\n        if (a >= a0 * ONE_18) {\\n            a /= a0; // Integer, not fixed point division\\n            sum += x0;\\n        }\\n\\n        if (a >= a1 * ONE_18) {\\n            a /= a1; // Integer, not fixed point division\\n            sum += x1;\\n        }\\n\\n        // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\\n        sum *= 100;\\n        a *= 100;\\n\\n        // Because further a_n are  20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\\n\\n        if (a >= a2) {\\n            a = (a * ONE_20) / a2;\\n            sum += x2;\\n        }\\n\\n        if (a >= a3) {\\n            a = (a * ONE_20) / a3;\\n            sum += x3;\\n        }\\n\\n        if (a >= a4) {\\n            a = (a * ONE_20) / a4;\\n            sum += x4;\\n        }\\n\\n        if (a >= a5) {\\n            a = (a * ONE_20) / a5;\\n            sum += x5;\\n        }\\n\\n        if (a >= a6) {\\n            a = (a * ONE_20) / a6;\\n            sum += x6;\\n        }\\n\\n        if (a >= a7) {\\n            a = (a * ONE_20) / a7;\\n            sum += x7;\\n        }\\n\\n        if (a >= a8) {\\n            a = (a * ONE_20) / a8;\\n            sum += x8;\\n        }\\n\\n        if (a >= a9) {\\n            a = (a * ONE_20) / a9;\\n            sum += x9;\\n        }\\n\\n        if (a >= a10) {\\n            a = (a * ONE_20) / a10;\\n            sum += x10;\\n        }\\n\\n        if (a >= a11) {\\n            a = (a * ONE_20) / a11;\\n            sum += x11;\\n        }\\n\\n        // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\\n        // that converges rapidly for values of `a` close to one - the same one used in ln_36.\\n        // Let z = (a - 1) / (a + 1).\\n        // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\\n        // division by ONE_20.\\n        int256 z = ((a - ONE_20) * ONE_20) / (a + ONE_20);\\n        int256 z_squared = (z * z) / ONE_20;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_20;\\n        seriesSum += num / 11;\\n\\n        // 6 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\\n        seriesSum *= 2;\\n\\n        // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\\n        // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\\n        // value.\\n\\n        return (sum + seriesSum) / 100;\\n    }\\n\\n    /**\\n     * @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument.\\n     */\\n    function log(int256 arg, int256 base) internal pure returns (int256) {\\n        // This performs a simple base change: log(arg, base) = ln(arg) / ln(base).\\n\\n        // Both logBase and logArg are computed as 36 decimal fixed point numbers, either by using ln_36, or by\\n        // upscaling.\\n\\n        int256 logBase;\\n        if (LN_36_LOWER_BOUND < base && base < LN_36_UPPER_BOUND) {\\n            logBase = ln_36(base);\\n        } else {\\n            logBase = ln(base) * ONE_18;\\n        }\\n\\n        int256 logArg;\\n        if (LN_36_LOWER_BOUND < arg && arg < LN_36_UPPER_BOUND) {\\n            logArg = ln_36(arg);\\n        } else {\\n            logArg = ln(arg) * ONE_18;\\n        }\\n\\n        // When dividing, we multiply by ONE_18 to arrive at a result with 18 decimal places\\n        return (logArg * ONE_18) / logBase;\\n    }\\n\\n    /**\\n     * @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\\n     * for x close to one.\\n     *\\n     * Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.\\n     */\\n    function ln_36(int256 x) private pure returns (int256) {\\n        // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\\n        // worthwhile.\\n\\n        // First, we transform x to a 36 digit fixed point value.\\n        x *= ONE_18;\\n\\n        // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\\n        // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\\n\\n        // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\\n        // division by ONE_36.\\n        int256 z = ((x - ONE_36) * ONE_36) / (x + ONE_36);\\n        int256 z_squared = (z * z) / ONE_36;\\n\\n        // num is the numerator of the series: the z^(2 * n + 1) term\\n        int256 num = z;\\n\\n        // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\\n        int256 seriesSum = num;\\n\\n        // In each step, the numerator is multiplied by z^2\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 3;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 5;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 7;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 9;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 11;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 13;\\n\\n        num = (num * z_squared) / ONE_36;\\n        seriesSum += num / 15;\\n\\n        // 8 Taylor terms are sufficient for 36 decimal precision.\\n\\n        // All that remains is multiplying by 2 (non fixed point).\\n        return seriesSum * 2;\\n    }\\n}\\n\",\"keccak256\":\"0x828921038b94a51e9408f466af8a31eb4faa533838daaf0ce677211493837a76\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize, which returns 0 for contracts in\\n        // construction, since the code is only stored at the end of the\\n        // constructor execution.\\n\\n        uint256 size;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            size := extcodesize(account)\\n        }\\n        return size > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        _require(address(this).balance >= amount, Errors.ADDRESS_INSUFFICIENT_BALANCE);\\n\\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n        (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n        _require(success, Errors.ADDRESS_CANNOT_SEND_VALUE);\\n    }\\n}\\n\",\"keccak256\":\"0x5f83465783b239828f83c626bae1ac944cfff074c8919c245d14b208bcf317d5\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n// Based on the EnumerableMap library from OpenZeppelin contracts, altered to include the following:\\n//  * a map from IERC20 to bytes32\\n//  * entries are stored in mappings instead of arrays, reducing implicit storage reads for out-of-bounds checks\\n//  * unchecked_at and unchecked_valueAt, which allow for more gas efficient data reads in some scenarios\\n//  * unchecked_indexOf and unchecked_setAt, which allow for more gas efficient data writes in some scenarios\\n//\\n// Additionally, the base private functions that work on bytes32 were removed and replaced with a native implementation\\n// for IERC20 keys, to reduce bytecode size and runtime costs.\\n\\n// We're using non-standard casing for the unchecked functions to differentiate them, so we need to turn off that rule\\n// solhint-disable func-name-mixedcase\\n\\nimport \\\"./IERC20.sol\\\";\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n *     // Declare a set state variable\\n *     EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n */\\nlibrary EnumerableMap {\\n    // The original OpenZeppelin implementation uses a generic Map type with bytes32 keys: this was replaced with\\n    // IERC20ToBytes32Map, which uses IERC20 keys natively, resulting in more dense bytecode.\\n\\n    struct IERC20ToBytes32MapEntry {\\n        IERC20 _key;\\n        bytes32 _value;\\n    }\\n\\n    struct IERC20ToBytes32Map {\\n        // Number of entries in the map\\n        uint256 _length;\\n        // Storage of map keys and values\\n        mapping(uint256 => IERC20ToBytes32MapEntry) _entries;\\n        // Position of the entry defined by a key in the `entries` array, plus 1\\n        // because index 0 means a key is not in the map.\\n        mapping(IERC20 => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\\n     * key. O(1).\\n     *\\n     * Returns true if the key was added to the map, that is if it was not\\n     * already present.\\n     */\\n    function set(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        bytes32 value\\n    ) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to !contains(map, key)\\n        if (keyIndex == 0) {\\n            uint256 previousLength = map._length;\\n            map._entries[previousLength] = IERC20ToBytes32MapEntry({ _key: key, _value: value });\\n            map._length = previousLength + 1;\\n\\n            // The entry is stored at previousLength, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            map._indexes[key] = previousLength + 1;\\n            return true;\\n        } else {\\n            map._entries[keyIndex - 1]._value = value;\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\\n     * {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\\n     *\\n     * This function performs one less storage read than {set}, but it should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_setAt(\\n        IERC20ToBytes32Map storage map,\\n        uint256 index,\\n        bytes32 value\\n    ) internal {\\n        map._entries[index]._value = value;\\n    }\\n\\n    /**\\n     * @dev Removes a key-value pair from a map. O(1).\\n     *\\n     * Returns true if the key was removed from the map, that is if it was present.\\n     */\\n    function remove(IERC20ToBytes32Map storage map, IERC20 key) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to contains(map, key)\\n        if (keyIndex != 0) {\\n            // To delete a key-value pair from the _entries pseudo-array in O(1), we swap the entry to delete with the\\n            // one at the highest index, and then remove this last entry (sometimes called as 'swap and pop').\\n            // This modifies the order of the pseudo-array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = keyIndex - 1;\\n            uint256 lastIndex = map._length - 1;\\n\\n            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            IERC20ToBytes32MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n            // Move the last entry to the index where the entry to delete is\\n            map._entries[toDeleteIndex] = lastEntry;\\n            // Update the index for the moved entry\\n            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved entry was stored\\n            delete map._entries[lastIndex];\\n            map._length = lastIndex;\\n\\n            // Delete the index for the deleted slot\\n            delete map._indexes[key];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the key is in the map. O(1).\\n     */\\n    function contains(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (bool) {\\n        return map._indexes[key] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of key-value pairs in the map. O(1).\\n     */\\n    function length(IERC20ToBytes32Map storage map) internal view returns (uint256) {\\n        return map._length;\\n    }\\n\\n    /**\\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of entries inside the\\n     * array, and it may change when more entries are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        _require(map._length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(map, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        IERC20ToBytes32MapEntry storage entry = map._entries[index];\\n        return (entry._key, entry._value);\\n    }\\n\\n    /**\\n     * @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\\n     * read). O(1).\\n     */\\n    function unchecked_valueAt(IERC20ToBytes32Map storage map, uint256 index) internal view returns (bytes32) {\\n        return map._entries[index]._value;\\n    }\\n\\n    /**\\n     * @dev Returns the value associated with `key`. O(1).\\n     *\\n     * Requirements:\\n     *\\n     * - `key` must be in the map. Reverts with `errorCode` otherwise.\\n     */\\n    function get(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        uint256 errorCode\\n    ) internal view returns (bytes32) {\\n        uint256 index = map._indexes[key];\\n        _require(index > 0, errorCode);\\n        return unchecked_valueAt(map, index - 1);\\n    }\\n\\n    /**\\n     * @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\\n     * instead.\\n     */\\n    function unchecked_indexOf(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (uint256) {\\n        return map._indexes[key];\\n    }\\n}\\n\",\"keccak256\":\"0x0e7bb50a1095a2a000328ef2243fca7b556ebccfe594f4466d0853f56ed07755\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n    /**\\n     * @dev Converts an unsigned uint256 into a signed int256.\\n     *\\n     * Requirements:\\n     *\\n     * - input must be less than or equal to maxInt256.\\n     */\\n    function toInt256(uint256 value) internal pure returns (int256) {\\n        _require(value < 2**255, Errors.SAFE_CAST_VALUE_CANT_FIT_INT256);\\n        return int256(value);\\n    }\\n}\\n\",\"keccak256\":\"0xfefa8c6b6aed0ac9df03ac0c4cce2a94da8d8815bb7f1459fef9f93ada8d316d\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/AssetManagers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./UserBalance.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\nimport \\\"./balances/GeneralPoolsBalance.sol\\\";\\nimport \\\"./balances/MinimalSwapInfoPoolsBalance.sol\\\";\\nimport \\\"./balances/TwoTokenPoolsBalance.sol\\\";\\n\\nabstract contract AssetManagers is\\n    ReentrancyGuard,\\n    GeneralPoolsBalance,\\n    MinimalSwapInfoPoolsBalance,\\n    TwoTokenPoolsBalance\\n{\\n    using Math for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Stores the Asset Manager for each token of each Pool.\\n    mapping(bytes32 => mapping(IERC20 => address)) internal _poolAssetManagers;\\n\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external override nonReentrant whenNotPaused {\\n        // This variable could be declared inside the loop, but that causes the compiler to allocate memory on each\\n        // loop iteration, increasing gas costs.\\n        PoolBalanceOp memory op;\\n\\n        for (uint256 i = 0; i < ops.length; ++i) {\\n            // By indexing the array only once, we don't spend extra gas in the same bounds check.\\n            op = ops[i];\\n\\n            bytes32 poolId = op.poolId;\\n            _ensureRegisteredPool(poolId);\\n\\n            IERC20 token = op.token;\\n            _require(_isTokenRegistered(poolId, token), Errors.TOKEN_NOT_REGISTERED);\\n            _require(_poolAssetManagers[poolId][token] == msg.sender, Errors.SENDER_NOT_ASSET_MANAGER);\\n\\n            PoolBalanceOpKind kind = op.kind;\\n            uint256 amount = op.amount;\\n            (int256 cashDelta, int256 managedDelta) = _performPoolManagementOperation(kind, poolId, token, amount);\\n\\n            emit PoolBalanceManaged(poolId, msg.sender, token, cashDelta, managedDelta);\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs the `kind` Asset Manager operation on a Pool.\\n     *\\n     * Withdrawals will transfer `amount` tokens to the caller, deposits will transfer `amount` tokens from the caller,\\n     * and updates will set the managed balance to `amount`.\\n     *\\n     * Returns a tuple with the 'cash' and 'managed' balance deltas as a result of this call.\\n     */\\n    function _performPoolManagementOperation(\\n        PoolBalanceOpKind kind,\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256, int256) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (kind == PoolBalanceOpKind.WITHDRAW) {\\n            return _withdrawPoolBalance(poolId, specialization, token, amount);\\n        } else if (kind == PoolBalanceOpKind.DEPOSIT) {\\n            return _depositPoolBalance(poolId, specialization, token, amount);\\n        } else {\\n            // PoolBalanceOpKind.UPDATE\\n            return _updateManagedBalance(poolId, specialization, token, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'cash' to 'managed' balance, and transfers them to the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _withdrawPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolCashToManaged(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolCashToManaged(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolCashToManaged(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransfer(msg.sender, amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(-amount);\\n        managedDelta = int256(amount);\\n    }\\n\\n    /**\\n     * @dev Moves `amount` tokens from a Pool's 'managed' to 'cash' balance, and transfers them from the caller.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary.\\n     */\\n    function _depositPoolBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _twoTokenPoolManagedToCash(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _minimalSwapInfoPoolManagedToCash(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _generalPoolManagedToCash(poolId, token, amount);\\n        }\\n\\n        if (amount > 0) {\\n            token.safeTransferFrom(msg.sender, address(this), amount);\\n        }\\n\\n        // Since 'cash' and 'managed' are stored as uint112, `amount` is guaranteed to also fit in 112 bits. It will\\n        // therefore always fit in a 256 bit integer.\\n        cashDelta = int256(amount);\\n        managedDelta = int256(-amount);\\n    }\\n\\n    /**\\n     * @dev Sets a Pool's 'managed' balance to `amount`.\\n     *\\n     * Returns the 'cash' and 'managed' balance deltas as a result of this call (the 'cash' delta will always be zero).\\n     */\\n    function _updateManagedBalance(\\n        bytes32 poolId,\\n        PoolSpecialization specialization,\\n        IERC20 token,\\n        uint256 amount\\n    ) private returns (int256 cashDelta, int256 managedDelta) {\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            managedDelta = _setTwoTokenPoolManagedBalance(poolId, token, amount);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            managedDelta = _setMinimalSwapInfoPoolManagedBalance(poolId, token, amount);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            managedDelta = _setGeneralPoolManagedBalance(poolId, token, amount);\\n        }\\n\\n        cashDelta = 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered for `poolId`.\\n     */\\n    function _isTokenRegistered(bytes32 poolId, IERC20 token) private view returns (bool) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _isTwoTokenPoolTokenRegistered(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _isMinimalSwapInfoPoolTokenRegistered(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _isGeneralPoolTokenRegistered(poolId, token);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xef8f7cdf851eaf8e97e55d4510739b32722de4de07cf069ddfa76ced2c9cd193\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/AssetTransfersHandler.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/AssetHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/Address.sol\\\";\\n\\nimport \\\"./interfaces/IWETH.sol\\\";\\nimport \\\"./interfaces/IAsset.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\nabstract contract AssetTransfersHandler is AssetHelpers {\\n    using SafeERC20 for IERC20;\\n    using Address for address payable;\\n\\n    /**\\n     * @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\\n     * as possible from Internal Balance, then transfers any remaining amount.\\n     *\\n     * If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * will be wrapped into WETH.\\n     *\\n     * WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\\n     * caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\\n     * typically doesn't hold any).\\n     */\\n    function _receiveAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address sender,\\n        bool fromInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            _require(!fromInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // The ETH amount to receive is deposited into the WETH contract, which will in turn mint WETH for\\n            // the Vault at a 1:1 ratio.\\n\\n            // A check for this condition is also introduced by the compiler, but this one provides a revert reason.\\n            // Note we're checking for the Vault's total balance, *not* ETH sent in this transaction.\\n            _require(address(this).balance >= amount, Errors.INSUFFICIENT_ETH);\\n            _WETH().deposit{ value: amount }();\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n\\n            if (fromInternalBalance) {\\n                // We take as many tokens from Internal Balance as possible: any remaining amounts will be transferred.\\n                uint256 deductedBalance = _decreaseInternalBalance(sender, token, amount, true);\\n                // Because `deductedBalance` will be always the lesser of the current internal balance\\n                // and the amount to decrease, it is safe to perform unchecked arithmetic.\\n                amount -= deductedBalance;\\n            }\\n\\n            if (amount > 0) {\\n                token.safeTransferFrom(sender, address(this), amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\\n     * Balance instead of being transferred.\\n     *\\n     * If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\\n     * are instead sent directly after unwrapping WETH.\\n     */\\n    function _sendAsset(\\n        IAsset asset,\\n        uint256 amount,\\n        address payable recipient,\\n        bool toInternalBalance\\n    ) internal {\\n        if (amount == 0) {\\n            return;\\n        }\\n\\n        if (_isETH(asset)) {\\n            // Sending ETH is not as involved as receiving it: the only special behavior is it cannot be\\n            // deposited to Internal Balance.\\n            _require(!toInternalBalance, Errors.INVALID_ETH_INTERNAL_BALANCE);\\n\\n            // First, the Vault withdraws deposited ETH from the WETH contract, by burning the same amount of WETH\\n            // from the Vault. This receipt will be handled by the Vault's `receive`.\\n            _WETH().withdraw(amount);\\n\\n            // Then, the withdrawn ETH is sent to the recipient.\\n            recipient.sendValue(amount);\\n        } else {\\n            IERC20 token = _asIERC20(asset);\\n            if (toInternalBalance) {\\n                _increaseInternalBalance(recipient, token, amount);\\n            } else {\\n                token.safeTransfer(recipient, amount);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\\n     * if the caller sent less ETH than `amountUsed`.\\n     *\\n     * Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\\n     * Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\\n     * not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\\n     * returned ETH.\\n     */\\n    function _handleRemainingEth(uint256 amountUsed) internal {\\n        _require(msg.value >= amountUsed, Errors.INSUFFICIENT_ETH);\\n\\n        uint256 excess = msg.value - amountUsed;\\n        if (excess > 0) {\\n            msg.sender.sendValue(excess);\\n        }\\n    }\\n\\n    /**\\n     * @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\\n     * caller.\\n     *\\n     * Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\\n     * we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\\n     * ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\\n     * locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\\n     * prevent user error.\\n     */\\n    receive() external payable {\\n        _require(msg.sender == address(_WETH()), Errors.ETH_TRANSFER);\\n    }\\n\\n    // This contract uses virtual internal functions instead of inheriting from the modules that implement them (in\\n    // this case UserBalance) in order to decouple it from the rest of the system and enable standalone testing by\\n    // implementing these with mocks.\\n\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal virtual;\\n\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool capped\\n    ) internal virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x5534195c226355beb7c084ac01ac615920c6f7fbec550dab472827318536c9cb\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/Fees.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/FixedPoint.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./ProtocolFeesCollector.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\nimport \\\"./interfaces/IVault.sol\\\";\\n\\n/**\\n * @dev To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the\\n * ProtocolFeesCollector contract.\\n */\\nabstract contract Fees is IVault {\\n    using SafeERC20 for IERC20;\\n\\n    ProtocolFeesCollector private immutable _protocolFeesCollector;\\n\\n    constructor() {\\n        _protocolFeesCollector = new ProtocolFeesCollector(IVault(this));\\n    }\\n\\n    function getProtocolFeesCollector() public view override returns (ProtocolFeesCollector) {\\n        return _protocolFeesCollector;\\n    }\\n\\n    /**\\n     * @dev Returns the protocol swap fee percentage.\\n     */\\n    function _getProtocolSwapFeePercentage() internal view returns (uint256) {\\n        return getProtocolFeesCollector().getSwapFeePercentage();\\n    }\\n\\n    /**\\n     * @dev Returns the protocol fee amount to charge for a flash loan of `amount`.\\n     */\\n    function _calculateFlashLoanFeeAmount(uint256 amount) internal view returns (uint256) {\\n        // Fixed point multiplication introduces error: we round up, which means in certain scenarios the charged\\n        // percentage can be slightly higher than intended.\\n        uint256 percentage = getProtocolFeesCollector().getFlashLoanFeePercentage();\\n        return FixedPoint.mulUp(amount, percentage);\\n    }\\n\\n    function _payFee(IERC20 token, uint256 amount) internal {\\n        if (amount > 0) {\\n            token.safeTransfer(address(getProtocolFeesCollector()), amount);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaed6f3ebf261e68a5093bb6b775d4c6c85eb9c7133aa20e701013f02edc4a6e3\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/FlashLoans.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\n// This flash loan provider was based on the Aave protocol's open source\\n// implementation and terminology and interfaces are intentionally kept\\n// similar\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./Fees.sol\\\";\\nimport \\\"./interfaces/IFlashLoanRecipient.sol\\\";\\n\\n/**\\n * @dev Handles Flash Loans through the Vault. Calls the `receiveFlashLoan` hook on the flash loan recipient\\n * contract, which implements the `IFlashLoanRecipient` interface.\\n */\\nabstract contract FlashLoans is Fees, ReentrancyGuard, TemporarilyPausable {\\n    using SafeERC20 for IERC20;\\n\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external override nonReentrant whenNotPaused {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        uint256[] memory feeAmounts = new uint256[](tokens.length);\\n        uint256[] memory preLoanBalances = new uint256[](tokens.length);\\n\\n        // Used to ensure `tokens` is sorted in ascending order, which ensures token uniqueness.\\n        IERC20 previousToken = IERC20(0);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n\\n            _require(token > previousToken, token == IERC20(0) ? Errors.ZERO_TOKEN : Errors.UNSORTED_TOKENS);\\n            previousToken = token;\\n\\n            preLoanBalances[i] = token.balanceOf(address(this));\\n            feeAmounts[i] = _calculateFlashLoanFeeAmount(amount);\\n\\n            _require(preLoanBalances[i] >= amount, Errors.INSUFFICIENT_FLASH_LOAN_BALANCE);\\n            token.safeTransfer(address(recipient), amount);\\n        }\\n\\n        recipient.receiveFlashLoan(tokens, amounts, feeAmounts, userData);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 preLoanBalance = preLoanBalances[i];\\n\\n            // Checking for loan repayment first (without accounting for fees) makes for simpler debugging, and results\\n            // in more accurate revert reasons if the flash loan protocol fee percentage is zero.\\n            uint256 postLoanBalance = token.balanceOf(address(this));\\n            _require(postLoanBalance >= preLoanBalance, Errors.INVALID_POST_LOAN_BALANCE);\\n\\n            // No need for checked arithmetic since we know the loan was fully repaid.\\n            uint256 receivedFees = postLoanBalance - preLoanBalance;\\n            _require(receivedFees >= feeAmounts[i], Errors.INSUFFICIENT_FLASH_LOAN_FEES);\\n\\n            _payFee(token, receivedFees);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x8c120a27ca27e199a713e509154c0743347b8087321d5235409b2e9b15e32b3b\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolBalances.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./Fees.sol\\\";\\nimport \\\"./PoolTokens.sol\\\";\\nimport \\\"./UserBalance.sol\\\";\\nimport \\\"./interfaces/IBasePool.sol\\\";\\n\\n/**\\n * @dev Stores the Asset Managers (by Pool and token), and implements the top level Asset Manager and Pool interfaces,\\n * such as registering and deregistering tokens, joining and exiting Pools, and informational functions like `getPool`\\n * and `getPoolTokens`, delegating to specialization-specific functions as needed.\\n *\\n * `managePoolBalance` handles all Asset Manager interactions.\\n */\\nabstract contract PoolBalances is Fees, ReentrancyGuard, PoolTokens, UserBalance {\\n    using Math for uint256;\\n    using SafeERC20 for IERC20;\\n    using BalanceAllocation for bytes32;\\n    using BalanceAllocation for bytes32[];\\n\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable override whenNotPaused {\\n        // This function doesn't have the nonReentrant modifier: it is applied to `_joinOrExit` instead.\\n\\n        // Note that `recipient` is not actually payable in the context of a join - we cast it because we handle both\\n        // joins and exits at once.\\n        _joinOrExit(PoolBalanceChangeKind.JOIN, poolId, sender, payable(recipient), _toPoolBalanceChange(request));\\n    }\\n\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external override {\\n        // This function doesn't have the nonReentrant modifier: it is applied to `_joinOrExit` instead.\\n        _joinOrExit(PoolBalanceChangeKind.EXIT, poolId, sender, recipient, _toPoolBalanceChange(request));\\n    }\\n\\n    // This has the exact same layout as JoinPoolRequest and ExitPoolRequest, except the `maxAmountsIn` and\\n    // `minAmountsOut` are called `limits`. Internally we use this struct for both since these two functions are quite\\n    // similar, but expose the others to callers for clarity.\\n    struct PoolBalanceChange {\\n        IAsset[] assets;\\n        uint256[] limits;\\n        bytes userData;\\n        bool useInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Converts a JoinPoolRequest into a PoolBalanceChange, with no runtime cost.\\n     */\\n    function _toPoolBalanceChange(JoinPoolRequest memory request)\\n        private\\n        pure\\n        returns (PoolBalanceChange memory change)\\n    {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            change := request\\n        }\\n    }\\n\\n    /**\\n     * @dev Converts an ExitPoolRequest into a PoolBalanceChange, with no runtime cost.\\n     */\\n    function _toPoolBalanceChange(ExitPoolRequest memory request)\\n        private\\n        pure\\n        returns (PoolBalanceChange memory change)\\n    {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            change := request\\n        }\\n    }\\n\\n    /**\\n     * @dev Implements both `joinPool` and `exitPool`, based on `kind`.\\n     */\\n    function _joinOrExit(\\n        PoolBalanceChangeKind kind,\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        PoolBalanceChange memory change\\n    ) private nonReentrant withRegisteredPool(poolId) authenticateFor(sender) {\\n        // This function uses a large number of stack variables (poolId, sender and recipient, balances, amounts, fees,\\n        // etc.), which leads to 'stack too deep' issues. It relies on private functions with seemingly arbitrary\\n        // interfaces to work around this limitation.\\n\\n        InputHelpers.ensureInputLengthMatch(change.assets.length, change.limits.length);\\n\\n        // We first check that the caller passed the Pool's registered tokens in the correct order, and retrieve the\\n        // current balance for each.\\n        IERC20[] memory tokens = _translateToIERC20(change.assets);\\n        bytes32[] memory balances = _validateTokensAndGetBalances(poolId, tokens);\\n\\n        // The bulk of the work is done here: the corresponding Pool hook is called, its final balances are computed,\\n        // assets are transferred, and fees are paid.\\n        (\\n            bytes32[] memory finalBalances,\\n            uint256[] memory amountsInOrOut,\\n            uint256[] memory paidProtocolSwapFeeAmounts\\n        ) = _callPoolBalanceChange(kind, poolId, sender, recipient, change, balances);\\n\\n        // All that remains is storing the new Pool balances.\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _setTwoTokenPoolCashBalances(poolId, tokens[0], finalBalances[0], tokens[1], finalBalances[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _setMinimalSwapInfoPoolBalances(poolId, tokens, finalBalances);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _setGeneralPoolBalances(poolId, finalBalances);\\n        }\\n\\n        bool positive = kind == PoolBalanceChangeKind.JOIN; // Amounts in are positive, out are negative\\n        emit PoolBalanceChanged(\\n            poolId,\\n            sender,\\n            tokens,\\n            // We can unsafely cast to int256 because balances are actually stored as uint112\\n            _unsafeCastToInt256(amountsInOrOut, positive),\\n            paidProtocolSwapFeeAmounts\\n        );\\n    }\\n\\n    /**\\n     * @dev Calls the corresponding Pool hook to get the amounts in/out plus protocol fee amounts, and performs the\\n     * associated token transfers and fee payments, returning the Pool's final balances.\\n     */\\n    function _callPoolBalanceChange(\\n        PoolBalanceChangeKind kind,\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances\\n    )\\n        private\\n        returns (\\n            bytes32[] memory finalBalances,\\n            uint256[] memory amountsInOrOut,\\n            uint256[] memory dueProtocolFeeAmounts\\n        )\\n    {\\n        (uint256[] memory totalBalances, uint256 lastChangeBlock) = balances.totalsAndLastChangeBlock();\\n\\n        IBasePool pool = IBasePool(_getPoolAddress(poolId));\\n        (amountsInOrOut, dueProtocolFeeAmounts) = kind == PoolBalanceChangeKind.JOIN\\n            ? pool.onJoinPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                totalBalances,\\n                lastChangeBlock,\\n                _getProtocolSwapFeePercentage(),\\n                change.userData\\n            )\\n            : pool.onExitPool(\\n                poolId,\\n                sender,\\n                recipient,\\n                totalBalances,\\n                lastChangeBlock,\\n                _getProtocolSwapFeePercentage(),\\n                change.userData\\n            );\\n\\n        InputHelpers.ensureInputLengthMatch(balances.length, amountsInOrOut.length, dueProtocolFeeAmounts.length);\\n\\n        // The Vault ignores the `recipient` in joins and the `sender` in exits: it is up to the Pool to keep track of\\n        // their participation.\\n        finalBalances = kind == PoolBalanceChangeKind.JOIN\\n            ? _processJoinPoolTransfers(sender, change, balances, amountsInOrOut, dueProtocolFeeAmounts)\\n            : _processExitPoolTransfers(recipient, change, balances, amountsInOrOut, dueProtocolFeeAmounts);\\n    }\\n\\n    /**\\n     * @dev Transfers `amountsIn` from `sender`, checking that they are within their accepted limits, and pays\\n     * accumulated protocol swap fees.\\n     *\\n     * Returns the Pool's final balances, which are the current balances plus `amountsIn` minus accumulated protocol\\n     * swap fees.\\n     */\\n    function _processJoinPoolTransfers(\\n        address sender,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances,\\n        uint256[] memory amountsIn,\\n        uint256[] memory dueProtocolFeeAmounts\\n    ) private returns (bytes32[] memory finalBalances) {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 wrappedEth = 0;\\n\\n        finalBalances = new bytes32[](balances.length);\\n        for (uint256 i = 0; i < change.assets.length; ++i) {\\n            uint256 amountIn = amountsIn[i];\\n            _require(amountIn <= change.limits[i], Errors.JOIN_ABOVE_MAX);\\n\\n            // Receive assets from the sender - possibly from Internal Balance.\\n            IAsset asset = change.assets[i];\\n            _receiveAsset(asset, amountIn, sender, change.useInternalBalance);\\n\\n            if (_isETH(asset)) {\\n                wrappedEth = wrappedEth.add(amountIn);\\n            }\\n\\n            uint256 feeAmount = dueProtocolFeeAmounts[i];\\n            _payFee(_translateToIERC20(asset), feeAmount);\\n\\n            // Compute the new Pool balances. Note that the fee amount might be larger than `amountIn`,\\n            // resulting in an overall decrease of the Pool's balance for a token.\\n            finalBalances[i] = (amountIn >= feeAmount) // This lets us skip checked arithmetic\\n                ? balances[i].increaseCash(amountIn - feeAmount)\\n                : balances[i].decreaseCash(feeAmount - amountIn);\\n        }\\n\\n        // Handle any used and remaining ETH.\\n        _handleRemainingEth(wrappedEth);\\n    }\\n\\n    /**\\n     * @dev Transfers `amountsOut` to `recipient`, checking that they are within their accepted limits, and pays\\n     * accumulated protocol swap fees from the Pool.\\n     *\\n     * Returns the Pool's final balances, which are the current `balances` minus `amountsOut` and fees paid\\n     * (`dueProtocolFeeAmounts`).\\n     */\\n    function _processExitPoolTransfers(\\n        address payable recipient,\\n        PoolBalanceChange memory change,\\n        bytes32[] memory balances,\\n        uint256[] memory amountsOut,\\n        uint256[] memory dueProtocolFeeAmounts\\n    ) private returns (bytes32[] memory finalBalances) {\\n        finalBalances = new bytes32[](balances.length);\\n        for (uint256 i = 0; i < change.assets.length; ++i) {\\n            uint256 amountOut = amountsOut[i];\\n            _require(amountOut >= change.limits[i], Errors.EXIT_BELOW_MIN);\\n\\n            // Send tokens to the recipient - possibly to Internal Balance\\n            IAsset asset = change.assets[i];\\n            _sendAsset(asset, amountOut, recipient, change.useInternalBalance);\\n\\n            uint256 feeAmount = dueProtocolFeeAmounts[i];\\n            _payFee(_translateToIERC20(asset), feeAmount);\\n\\n            // Compute the new Pool balances. A Pool's token balance always decreases after an exit (potentially by 0).\\n            finalBalances[i] = balances[i].decreaseCash(amountOut.add(feeAmount));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for `poolId`'s `expectedTokens`.\\n     *\\n     * `expectedTokens` must exactly equal the token array returned by `getPoolTokens`: both arrays must have the same\\n     * length, elements and order. Additionally, the Pool must have at least one registered token.\\n     */\\n    function _validateTokensAndGetBalances(bytes32 poolId, IERC20[] memory expectedTokens)\\n        private\\n        view\\n        returns (bytes32[] memory)\\n    {\\n        (IERC20[] memory actualTokens, bytes32[] memory balances) = _getPoolTokens(poolId);\\n        InputHelpers.ensureInputLengthMatch(actualTokens.length, expectedTokens.length);\\n        _require(actualTokens.length > 0, Errors.POOL_NO_TOKENS);\\n\\n        for (uint256 i = 0; i < actualTokens.length; ++i) {\\n            _require(actualTokens[i] == expectedTokens[i], Errors.TOKENS_MISMATCH);\\n        }\\n\\n        return balances;\\n    }\\n\\n    /**\\n     * @dev Casts an array of uint256 to int256, setting the sign of the result according to the `positive` flag,\\n     * without checking whether the values fit in the signed 256 bit range.\\n     */\\n    function _unsafeCastToInt256(uint256[] memory values, bool positive)\\n        private\\n        pure\\n        returns (int256[] memory signedValues)\\n    {\\n        signedValues = new int256[](values.length);\\n        for (uint256 i = 0; i < values.length; i++) {\\n            signedValues[i] = positive ? int256(values[i]) : -int256(values[i]);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xe9a33a9311984449a3271bbd0cbf5970cd4c1910179afdaee2a62413ebaf5ba8\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\\n * and helper functions for ensuring correct behavior when working with Pools.\\n */\\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\\n    // types.\\n    mapping(bytes32 => bool) private _isPoolRegistered;\\n\\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\\n    uint256 private _nextPoolNonce;\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    modifier withRegisteredPool(bytes32 poolId) {\\n        _ensureRegisteredPool(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    modifier onlyPool(bytes32 poolId) {\\n        _ensurePoolIsSender(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    function _ensurePoolIsSender(bytes32 poolId) private view {\\n        _ensureRegisteredPool(poolId);\\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\\n    }\\n\\n    function registerPool(PoolSpecialization specialization)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        returns (bytes32)\\n    {\\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\\n        // 2**80 Pools, and the nonce will not overflow.\\n\\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\\n\\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\\n        _isPoolRegistered[poolId] = true;\\n\\n        _nextPoolNonce += 1;\\n\\n        emit PoolRegistered(poolId);\\n        return poolId;\\n    }\\n\\n    function getPool(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (address, PoolSpecialization)\\n    {\\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\\n    }\\n\\n    /**\\n     * @dev Creates a Pool ID.\\n     *\\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\\n     *\\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\\n     * unique.\\n     *\\n     * Pool IDs have the following layout:\\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\\n     * MSB                                                                              LSB\\n     *\\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\\n     * suffice. However, there's nothing else of interest to store in this extra space.\\n     */\\n    function _toPoolId(\\n        address pool,\\n        PoolSpecialization specialization,\\n        uint80 nonce\\n    ) internal pure returns (bytes32) {\\n        bytes32 serialized;\\n\\n        serialized |= bytes32(uint256(nonce));\\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\\n\\n        return serialized;\\n    }\\n\\n    /**\\n     * @dev Returns the address of a Pool's contract.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\\n        // since the logical shift already sets the upper bits to zero.\\n        return address(uint256(poolId) >> (12 * 8));\\n    }\\n\\n    /**\\n     * @dev Returns the specialization setting of a Pool.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\\n\\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\\n        // string: we instead perform the check ourselves to help in error diagnosis.\\n\\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\\n        // values 0, 1 and 2.\\n        _require(value < 3, Errors.INVALID_POOL_ID);\\n\\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            specialization := value\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaf06c559c8a964e9b43308003b43cf698bda38d88cc26118b55394017a369327\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/PoolTokens.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./AssetManagers.sol\\\";\\nimport \\\"./PoolRegistry.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\n\\nabstract contract PoolTokens is ReentrancyGuard, PoolRegistry, AssetManagers {\\n    using BalanceAllocation for bytes32;\\n    using BalanceAllocation for bytes32[];\\n\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external override nonReentrant whenNotPaused onlyPool(poolId) {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, assetManagers.length);\\n\\n        // Validates token addresses and assigns Asset Managers\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(token != IERC20(0), Errors.INVALID_TOKEN);\\n\\n            _poolAssetManagers[poolId][token] = assetManagers[i];\\n        }\\n\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\\n            _registerTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _registerMinimalSwapInfoPoolTokens(poolId, tokens);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _registerGeneralPoolTokens(poolId, tokens);\\n        }\\n\\n        emit TokensRegistered(poolId, tokens, assetManagers);\\n    }\\n\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        onlyPool(poolId)\\n    {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            _require(tokens.length == 2, Errors.TOKENS_LENGTH_MUST_BE_2);\\n            _deregisterTwoTokenPoolTokens(poolId, tokens[0], tokens[1]);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            _deregisterMinimalSwapInfoPoolTokens(poolId, tokens);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            _deregisterGeneralPoolTokens(poolId, tokens);\\n        }\\n\\n        // The deregister calls above ensure the total token balance is zero. Therefore it is now safe to remove any\\n        // associated Asset Managers, since they hold no Pool balance.\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            delete _poolAssetManagers[poolId][tokens[i]];\\n        }\\n\\n        emit TokensDeregistered(poolId, tokens);\\n    }\\n\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        )\\n    {\\n        bytes32[] memory rawBalances;\\n        (tokens, rawBalances) = _getPoolTokens(poolId);\\n        (balances, lastChangeBlock) = rawBalances.totalsAndLastChangeBlock();\\n    }\\n\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        )\\n    {\\n        bytes32 balance;\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            balance = _getTwoTokenPoolBalance(poolId, token);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            balance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            balance = _getGeneralPoolBalance(poolId, token);\\n        }\\n\\n        cash = balance.cash();\\n        managed = balance.managed();\\n        lastChangeBlock = balance.lastChangeBlock();\\n        assetManager = _poolAssetManagers[poolId][token];\\n    }\\n\\n    /**\\n     * @dev Returns all of `poolId`'s registered tokens, along with their raw balances.\\n     */\\n    function _getPoolTokens(bytes32 poolId) internal view returns (IERC20[] memory tokens, bytes32[] memory balances) {\\n        PoolSpecialization specialization = _getPoolSpecialization(poolId);\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            return _getTwoTokenPoolTokens(poolId);\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            return _getMinimalSwapInfoPoolTokens(poolId);\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            return _getGeneralPoolTokens(poolId);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd68fdb5d0d889ebbb8084921492d441792b4eed7164d3ded3cd5f531fe237629\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/Swaps.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/openzeppelin/EnumerableMap.sol\\\";\\nimport \\\"../lib/openzeppelin/EnumerableSet.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeCast.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./PoolBalances.sol\\\";\\nimport \\\"./interfaces/IPoolSwapStructs.sol\\\";\\nimport \\\"./interfaces/IGeneralPool.sol\\\";\\nimport \\\"./interfaces/IMinimalSwapInfoPool.sol\\\";\\nimport \\\"./balances/BalanceAllocation.sol\\\";\\n\\n/**\\n * Implements the Vault's high-level swap functionality.\\n *\\n * Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. They need not trust the Pool\\n * contracts to do this: all security checks are made by the Vault.\\n *\\n * The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n * In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n * and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n * More complex swaps, such as one 'token in' to multiple tokens out can be achieved by batching together\\n * individual swaps.\\n */\\nabstract contract Swaps is ReentrancyGuard, PoolBalances {\\n    using SafeERC20 for IERC20;\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\\n\\n    using Math for int256;\\n    using Math for uint256;\\n    using SafeCast for uint256;\\n    using BalanceAllocation for bytes32;\\n\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    )\\n        external\\n        payable\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        authenticateFor(funds.sender)\\n        returns (uint256 amountCalculated)\\n    {\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.SWAP_DEADLINE);\\n\\n        // This revert reason is for consistency with `batchSwap`: an equivalent `swap` performed using that function\\n        // would result in this error.\\n        _require(singleSwap.amount > 0, Errors.UNKNOWN_AMOUNT_IN_FIRST_SWAP);\\n\\n        IERC20 tokenIn = _translateToIERC20(singleSwap.assetIn);\\n        IERC20 tokenOut = _translateToIERC20(singleSwap.assetOut);\\n        _require(tokenIn != tokenOut, Errors.CANNOT_SWAP_SAME_TOKEN);\\n\\n        // Initializing each struct field one-by-one uses less gas than setting all at once.\\n        IPoolSwapStructs.SwapRequest memory poolRequest;\\n        poolRequest.poolId = singleSwap.poolId;\\n        poolRequest.kind = singleSwap.kind;\\n        poolRequest.tokenIn = tokenIn;\\n        poolRequest.tokenOut = tokenOut;\\n        poolRequest.amount = singleSwap.amount;\\n        poolRequest.userData = singleSwap.userData;\\n        poolRequest.from = funds.sender;\\n        poolRequest.to = funds.recipient;\\n        // The lastChangeBlock field is left uninitialized.\\n\\n        uint256 amountIn;\\n        uint256 amountOut;\\n\\n        (amountCalculated, amountIn, amountOut) = _swapWithPool(poolRequest);\\n        _require(singleSwap.kind == SwapKind.GIVEN_IN ? amountOut >= limit : amountIn <= limit, Errors.SWAP_LIMIT);\\n\\n        _receiveAsset(singleSwap.assetIn, amountIn, funds.sender, funds.fromInternalBalance);\\n        _sendAsset(singleSwap.assetOut, amountOut, funds.recipient, funds.toInternalBalance);\\n\\n        // If the asset in is ETH, then `amountIn` ETH was wrapped into WETH.\\n        _handleRemainingEth(_isETH(singleSwap.assetIn) ? amountIn : 0);\\n    }\\n\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    )\\n        external\\n        payable\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        authenticateFor(funds.sender)\\n        returns (int256[] memory assetDeltas)\\n    {\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        _require(block.timestamp <= deadline, Errors.SWAP_DEADLINE);\\n\\n        InputHelpers.ensureInputLengthMatch(assets.length, limits.length);\\n\\n        // Perform the swaps, updating the Pool token balances and computing the net Vault asset deltas.\\n        assetDeltas = _swapWithPools(swaps, assets, funds, kind);\\n\\n        // Process asset deltas, by either transferring assets from the sender (for positive deltas) or to the recipient\\n        // (for negative deltas).\\n        uint256 wrappedEth = 0;\\n        for (uint256 i = 0; i < assets.length; ++i) {\\n            IAsset asset = assets[i];\\n            int256 delta = assetDeltas[i];\\n            _require(delta <= limits[i], Errors.SWAP_LIMIT);\\n\\n            if (delta > 0) {\\n                uint256 toReceive = uint256(delta);\\n                _receiveAsset(asset, toReceive, funds.sender, funds.fromInternalBalance);\\n\\n                if (_isETH(asset)) {\\n                    wrappedEth = wrappedEth.add(toReceive);\\n                }\\n            } else if (delta < 0) {\\n                uint256 toSend = uint256(-delta);\\n                _sendAsset(asset, toSend, funds.recipient, funds.toInternalBalance);\\n            }\\n        }\\n\\n        // Handle any used and remaining ETH.\\n        _handleRemainingEth(wrappedEth);\\n    }\\n\\n    // For `_swapWithPools` to handle both 'given in' and 'given out' swaps, it internally tracks the 'given' amount\\n    // (supplied by the caller), and the 'calculated' amount (returned by the Pool in response to the swap request).\\n\\n    /**\\n     * @dev Given the two swap tokens and the swap kind, returns which one is the 'given' token (the token whose\\n     * amount is supplied by the caller).\\n     */\\n    function _tokenGiven(\\n        SwapKind kind,\\n        IERC20 tokenIn,\\n        IERC20 tokenOut\\n    ) private pure returns (IERC20) {\\n        return kind == SwapKind.GIVEN_IN ? tokenIn : tokenOut;\\n    }\\n\\n    /**\\n     * @dev Given the two swap tokens and the swap kind, returns which one is the 'calculated' token (the token whose\\n     * amount is calculated by the Pool).\\n     */\\n    function _tokenCalculated(\\n        SwapKind kind,\\n        IERC20 tokenIn,\\n        IERC20 tokenOut\\n    ) private pure returns (IERC20) {\\n        return kind == SwapKind.GIVEN_IN ? tokenOut : tokenIn;\\n    }\\n\\n    /**\\n     * @dev Returns an ordered pair (amountIn, amountOut) given the 'given' and 'calculated' amounts, and the swap kind.\\n     */\\n    function _getAmounts(\\n        SwapKind kind,\\n        uint256 amountGiven,\\n        uint256 amountCalculated\\n    ) private pure returns (uint256 amountIn, uint256 amountOut) {\\n        if (kind == SwapKind.GIVEN_IN) {\\n            (amountIn, amountOut) = (amountGiven, amountCalculated);\\n        } else {\\n            // SwapKind.GIVEN_OUT\\n            (amountIn, amountOut) = (amountCalculated, amountGiven);\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs all `swaps`, calling swap hooks on the Pool contracts and updating their balances. Does not cause\\n     * any transfer of tokens - instead it returns the net Vault token deltas: positive if the Vault should receive\\n     * tokens, and negative if it should send them.\\n     */\\n    function _swapWithPools(\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        SwapKind kind\\n    ) private returns (int256[] memory assetDeltas) {\\n        assetDeltas = new int256[](assets.length);\\n\\n        // These variables could be declared inside the loop, but that causes the compiler to allocate memory on each\\n        // loop iteration, increasing gas costs.\\n        BatchSwapStep memory batchSwapStep;\\n        IPoolSwapStructs.SwapRequest memory poolRequest;\\n\\n        // These store data about the previous swap here to implement multihop logic across swaps.\\n        IERC20 previousTokenCalculated;\\n        uint256 previousAmountCalculated;\\n\\n        for (uint256 i = 0; i < swaps.length; ++i) {\\n            batchSwapStep = swaps[i];\\n\\n            bool withinBounds = batchSwapStep.assetInIndex < assets.length &&\\n                batchSwapStep.assetOutIndex < assets.length;\\n            _require(withinBounds, Errors.OUT_OF_BOUNDS);\\n\\n            IERC20 tokenIn = _translateToIERC20(assets[batchSwapStep.assetInIndex]);\\n            IERC20 tokenOut = _translateToIERC20(assets[batchSwapStep.assetOutIndex]);\\n            _require(tokenIn != tokenOut, Errors.CANNOT_SWAP_SAME_TOKEN);\\n\\n            // Sentinel value for multihop logic\\n            if (batchSwapStep.amount == 0) {\\n                // When the amount given is zero, we use the calculated amount for the previous swap, as long as the\\n                // current swap's given token is the previous calculated token. This makes it possible to swap a\\n                // given amount of token A for token B, and then use the resulting token B amount to swap for token C.\\n                _require(i > 0, Errors.UNKNOWN_AMOUNT_IN_FIRST_SWAP);\\n                bool usingPreviousToken = previousTokenCalculated == _tokenGiven(kind, tokenIn, tokenOut);\\n                _require(usingPreviousToken, Errors.MALCONSTRUCTED_MULTIHOP_SWAP);\\n                batchSwapStep.amount = previousAmountCalculated;\\n            }\\n\\n            // Initializing each struct field one-by-one uses less gas than setting all at once\\n            poolRequest.poolId = batchSwapStep.poolId;\\n            poolRequest.kind = kind;\\n            poolRequest.tokenIn = tokenIn;\\n            poolRequest.tokenOut = tokenOut;\\n            poolRequest.amount = batchSwapStep.amount;\\n            poolRequest.userData = batchSwapStep.userData;\\n            poolRequest.from = funds.sender;\\n            poolRequest.to = funds.recipient;\\n            // The lastChangeBlock field is left uninitialized\\n\\n            uint256 amountIn;\\n            uint256 amountOut;\\n            (previousAmountCalculated, amountIn, amountOut) = _swapWithPool(poolRequest);\\n\\n            previousTokenCalculated = _tokenCalculated(kind, tokenIn, tokenOut);\\n\\n            // Accumulate Vault deltas across swaps\\n            assetDeltas[batchSwapStep.assetInIndex] = assetDeltas[batchSwapStep.assetInIndex].add(amountIn.toInt256());\\n            assetDeltas[batchSwapStep.assetOutIndex] = assetDeltas[batchSwapStep.assetOutIndex].sub(\\n                amountOut.toInt256()\\n            );\\n        }\\n    }\\n\\n    /**\\n     * @dev Performs a swap according to the parameters specified in `request`, calling the Pool's contract hook and\\n     * updating the Pool's balance.\\n     *\\n     * Returns the amount of tokens going into or out of the Vault as a result of this swap, depending on the swap kind.\\n     */\\n    function _swapWithPool(IPoolSwapStructs.SwapRequest memory request)\\n        private\\n        returns (\\n            uint256 amountCalculated,\\n            uint256 amountIn,\\n            uint256 amountOut\\n        )\\n    {\\n        // Get the calculated amount from the Pool and update its balances\\n        address pool = _getPoolAddress(request.poolId);\\n        PoolSpecialization specialization = _getPoolSpecialization(request.poolId);\\n\\n        if (specialization == PoolSpecialization.TWO_TOKEN) {\\n            amountCalculated = _processTwoTokenPoolSwapRequest(request, IMinimalSwapInfoPool(pool));\\n        } else if (specialization == PoolSpecialization.MINIMAL_SWAP_INFO) {\\n            amountCalculated = _processMinimalSwapInfoPoolSwapRequest(request, IMinimalSwapInfoPool(pool));\\n        } else {\\n            // PoolSpecialization.GENERAL\\n            amountCalculated = _processGeneralPoolSwapRequest(request, IGeneralPool(pool));\\n        }\\n\\n        (amountIn, amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\\n        emit Swap(request.poolId, request.tokenIn, request.tokenOut, amountIn, amountOut);\\n    }\\n\\n    function _processTwoTokenPoolSwapRequest(IPoolSwapStructs.SwapRequest memory request, IMinimalSwapInfoPool pool)\\n        private\\n        returns (uint256 amountCalculated)\\n    {\\n        // For gas efficiency reasons, this function uses low-level knowledge of how Two Token Pool balances are\\n        // stored internally, instead of using getters and setters for all operations.\\n\\n        (\\n            bytes32 tokenABalance,\\n            bytes32 tokenBBalance,\\n            TwoTokenPoolBalances storage poolBalances\\n        ) = _getTwoTokenPoolSharedBalances(request.poolId, request.tokenIn, request.tokenOut);\\n\\n        // We have the two Pool balances, but we don't know which one is 'token in' or 'token out'.\\n        bytes32 tokenInBalance;\\n        bytes32 tokenOutBalance;\\n\\n        // In Two Token Pools, token A has a smaller address than token B\\n        if (request.tokenIn < request.tokenOut) {\\n            // in is A, out is B\\n            tokenInBalance = tokenABalance;\\n            tokenOutBalance = tokenBBalance;\\n        } else {\\n            // in is B, out is A\\n            tokenOutBalance = tokenABalance;\\n            tokenInBalance = tokenBBalance;\\n        }\\n\\n        // Perform the swap request and compute the new balances for 'token in' and 'token out' after the swap\\n        (tokenInBalance, tokenOutBalance, amountCalculated) = _callMinimalSwapInfoPoolOnSwapHook(\\n            request,\\n            pool,\\n            tokenInBalance,\\n            tokenOutBalance\\n        );\\n\\n        // We check the token ordering again to create the new shared cash packed struct\\n        poolBalances.sharedCash = request.tokenIn < request.tokenOut\\n            ? BalanceAllocation.toSharedCash(tokenInBalance, tokenOutBalance) // in is A, out is B\\n            : BalanceAllocation.toSharedCash(tokenOutBalance, tokenInBalance); // in is B, out is A\\n    }\\n\\n    function _processMinimalSwapInfoPoolSwapRequest(\\n        IPoolSwapStructs.SwapRequest memory request,\\n        IMinimalSwapInfoPool pool\\n    ) private returns (uint256 amountCalculated) {\\n        bytes32 tokenInBalance = _getMinimalSwapInfoPoolBalance(request.poolId, request.tokenIn);\\n        bytes32 tokenOutBalance = _getMinimalSwapInfoPoolBalance(request.poolId, request.tokenOut);\\n\\n        // Perform the swap request and compute the new balances for 'token in' and 'token out' after the swap\\n        (tokenInBalance, tokenOutBalance, amountCalculated) = _callMinimalSwapInfoPoolOnSwapHook(\\n            request,\\n            pool,\\n            tokenInBalance,\\n            tokenOutBalance\\n        );\\n\\n        _minimalSwapInfoPoolsBalances[request.poolId][request.tokenIn] = tokenInBalance;\\n        _minimalSwapInfoPoolsBalances[request.poolId][request.tokenOut] = tokenOutBalance;\\n    }\\n\\n    /**\\n     * @dev Calls the onSwap hook for a Pool that implements IMinimalSwapInfoPool: both Minimal Swap Info and Two Token\\n     * Pools do this.\\n     */\\n    function _callMinimalSwapInfoPoolOnSwapHook(\\n        IPoolSwapStructs.SwapRequest memory request,\\n        IMinimalSwapInfoPool pool,\\n        bytes32 tokenInBalance,\\n        bytes32 tokenOutBalance\\n    )\\n        internal\\n        returns (\\n            bytes32 newTokenInBalance,\\n            bytes32 newTokenOutBalance,\\n            uint256 amountCalculated\\n        )\\n    {\\n        uint256 tokenInTotal = tokenInBalance.total();\\n        uint256 tokenOutTotal = tokenOutBalance.total();\\n        request.lastChangeBlock = Math.max(tokenInBalance.lastChangeBlock(), tokenOutBalance.lastChangeBlock());\\n\\n        // Perform the swap request callback, and compute the new balances for 'token in' and 'token out' after the swap\\n        amountCalculated = pool.onSwap(request, tokenInTotal, tokenOutTotal);\\n        (uint256 amountIn, uint256 amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\\n\\n        newTokenInBalance = tokenInBalance.increaseCash(amountIn);\\n        newTokenOutBalance = tokenOutBalance.decreaseCash(amountOut);\\n    }\\n\\n    function _processGeneralPoolSwapRequest(IPoolSwapStructs.SwapRequest memory request, IGeneralPool pool)\\n        private\\n        returns (uint256 amountCalculated)\\n    {\\n        bytes32 tokenInBalance;\\n        bytes32 tokenOutBalance;\\n\\n        // We access both token indexes without checking existence, because we will do it manually immediately after.\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[request.poolId];\\n        uint256 indexIn = poolBalances.unchecked_indexOf(request.tokenIn);\\n        uint256 indexOut = poolBalances.unchecked_indexOf(request.tokenOut);\\n\\n        if (indexIn == 0 || indexOut == 0) {\\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(request.poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        // EnumerableMap stores indices *plus one* to use the zero index as a sentinel value - because these are valid,\\n        // we can undo this.\\n        indexIn -= 1;\\n        indexOut -= 1;\\n\\n        uint256 tokenAmount = poolBalances.length();\\n        uint256[] memory currentBalances = new uint256[](tokenAmount);\\n\\n        request.lastChangeBlock = 0;\\n        for (uint256 i = 0; i < tokenAmount; i++) {\\n            // Because the iteration is bounded by `tokenAmount`, and no tokens are registered or deregistered here, we\\n            // know `i` is a valid token index and can use `unchecked_valueAt` to save storage reads.\\n            bytes32 balance = poolBalances.unchecked_valueAt(i);\\n\\n            currentBalances[i] = balance.total();\\n            request.lastChangeBlock = Math.max(request.lastChangeBlock, balance.lastChangeBlock());\\n\\n            if (i == indexIn) {\\n                tokenInBalance = balance;\\n            } else if (i == indexOut) {\\n                tokenOutBalance = balance;\\n            }\\n        }\\n\\n        // Perform the swap request callback and compute the new balances for 'token in' and 'token out' after the swap\\n        amountCalculated = pool.onSwap(request, currentBalances, indexIn, indexOut);\\n        (uint256 amountIn, uint256 amountOut) = _getAmounts(request.kind, request.amount, amountCalculated);\\n        tokenInBalance = tokenInBalance.increaseCash(amountIn);\\n        tokenOutBalance = tokenOutBalance.decreaseCash(amountOut);\\n\\n        // Because no tokens were registered or deregistered between now or when we retrieved the indexes for\\n        // 'token in' and 'token out', we can use `unchecked_setAt` to save storage reads.\\n        poolBalances.unchecked_setAt(indexIn, tokenInBalance);\\n        poolBalances.unchecked_setAt(indexOut, tokenOutBalance);\\n    }\\n\\n    // This function is not marked as `nonReentrant` because the underlying mechanism relies on reentrancy\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external override returns (int256[] memory) {\\n        // In order to accurately 'simulate' swaps, this function actually does perform the swaps, including calling the\\n        // Pool hooks and updating balances in storage. However, once it computes the final Vault Deltas, it\\n        // reverts unconditionally, returning this array as the revert data.\\n        //\\n        // By wrapping this reverting call, we can decode the deltas 'returned' and return them as a normal Solidity\\n        // function would. The only caveat is the function becomes non-view, but off-chain clients can still call it\\n        // via eth_call to get the expected result.\\n        //\\n        // This technique was inspired by the work from the Gnosis team in the Gnosis Safe contract:\\n        // https://github.com/gnosis/safe-contracts/blob/v1.2.0/contracts/GnosisSafe.sol#L265\\n        //\\n        // Most of this function is implemented using inline assembly, as the actual work it needs to do is not\\n        // significant, and Solidity is not particularly well-suited to generate this behavior, resulting in a large\\n        // amount of generated bytecode.\\n\\n        if (msg.sender != address(this)) {\\n            // We perform an external call to ourselves, forwarding the same calldata. In this call, the else clause of\\n            // the preceding if statement will be executed instead.\\n\\n            // solhint-disable-next-line avoid-low-level-calls\\n            (bool success, ) = address(this).call(msg.data);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // This call should always revert to decode the actual asset deltas from the revert reason\\n                switch success\\n                    case 0 {\\n                        // Note we are manually writing the memory slot 0. We can safely overwrite whatever is\\n                        // stored there as we take full control of the execution and then immediately return.\\n\\n                        // We copy the first 4 bytes to check if it matches with the expected signature, otherwise\\n                        // there was another revert reason and we should forward it.\\n                        returndatacopy(0, 0, 0x04)\\n                        let error := and(mload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)\\n\\n                        // If the first 4 bytes don't match with the expected signature, we forward the revert reason.\\n                        if eq(eq(error, 0xfa61cc1200000000000000000000000000000000000000000000000000000000), 0) {\\n                            returndatacopy(0, 0, returndatasize())\\n                            revert(0, returndatasize())\\n                        }\\n\\n                        // The returndata contains the signature, followed by the raw memory representation of an array:\\n                        // length + data. We need to return an ABI-encoded representation of this array.\\n                        // An ABI-encoded array contains an additional field when compared to its raw memory\\n                        // representation: an offset to the location of the length. The offset itself is 32 bytes long,\\n                        // so the smallest value we  can use is 32 for the data to be located immediately after it.\\n                        mstore(0, 32)\\n\\n                        // We now copy the raw memory array from returndata into memory. Since the offset takes up 32\\n                        // bytes, we start copying at address 0x20. We also get rid of the error signature, which takes\\n                        // the first four bytes of returndata.\\n                        let size := sub(returndatasize(), 0x04)\\n                        returndatacopy(0x20, 0x04, size)\\n\\n                        // We finally return the ABI-encoded array, which has a total length equal to that of the array\\n                        // (returndata), plus the 32 bytes for the offset.\\n                        return(0, add(size, 32))\\n                    }\\n                    default {\\n                        // This call should always revert, but we fail nonetheless if that didn't happen\\n                        invalid()\\n                    }\\n            }\\n        } else {\\n            int256[] memory deltas = _swapWithPools(swaps, assets, funds, kind);\\n\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We will return a raw representation of the array in memory, which is composed of a 32 byte length,\\n                // followed by the 32 byte int256 values. Because revert expects a size in bytes, we multiply the array\\n                // length (stored at `deltas`) by 32.\\n                let size := mul(mload(deltas), 32)\\n\\n                // We send one extra value for the error signature \\\"QueryError(int256[])\\\" which is 0xfa61cc12.\\n                // We store it in the previous slot to the `deltas` array. We know there will be at least one available\\n                // slot due to how the memory scratch space works.\\n                // We can safely overwrite whatever is stored in this slot as we will revert immediately after that.\\n                mstore(sub(deltas, 0x20), 0x00000000000000000000000000000000000000000000000000000000fa61cc12)\\n                let start := sub(deltas, 0x04)\\n\\n                // When copying from `deltas` into returndata, we copy an additional 36 bytes to also return the array's\\n                // length and the error signature.\\n                revert(start, add(size, 36))\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x486518f80d8aca8f3e55d35db8e18323504fc5fbbcfd8fb3483ff25229eb8d27\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/UserBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/math/Math.sol\\\";\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeCast.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./AssetTransfersHandler.sol\\\";\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance.\\n *\\n * Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n * transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n * when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n * gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n *\\n * Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n * operations of different kinds, with different senders and recipients, at once.\\n */\\nabstract contract UserBalance is ReentrancyGuard, AssetTransfersHandler, VaultAuthorization {\\n    using Math for uint256;\\n    using SafeCast for uint256;\\n    using SafeERC20 for IERC20;\\n\\n    // Internal Balance for each token, for each account.\\n    mapping(address => mapping(IERC20 => uint256)) private _internalTokenBalance;\\n\\n    function getInternalBalance(address user, IERC20[] memory tokens)\\n        external\\n        view\\n        override\\n        returns (uint256[] memory balances)\\n    {\\n        balances = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; i++) {\\n            balances[i] = _getInternalBalance(user, tokens[i]);\\n        }\\n    }\\n\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable override nonReentrant {\\n        // We need to track how much of the received ETH was used and wrapped into WETH to return any excess.\\n        uint256 ethWrapped = 0;\\n\\n        // Cache for these checks so we only perform them once (if at all).\\n        bool checkedCallerIsRelayer = false;\\n        bool checkedNotPaused = false;\\n\\n        for (uint256 i = 0; i < ops.length; i++) {\\n            UserBalanceOpKind kind;\\n            IAsset asset;\\n            uint256 amount;\\n            address sender;\\n            address payable recipient;\\n\\n            // This destructuring by calling `_validateUserBalanceOp` seems odd, but results in reduced bytecode size.\\n            (kind, asset, amount, sender, recipient, checkedCallerIsRelayer) = _validateUserBalanceOp(\\n                ops[i],\\n                checkedCallerIsRelayer\\n            );\\n\\n            if (kind == UserBalanceOpKind.WITHDRAW_INTERNAL) {\\n                // Internal Balance withdrawals can always be performed by an authorized account.\\n                _withdrawFromInternalBalance(asset, sender, recipient, amount);\\n            } else {\\n                // All other operations are blocked if the contract is paused.\\n\\n                // We cache the result of the pause check and skip it for other operations in this same transaction\\n                // (if any).\\n                if (!checkedNotPaused) {\\n                    _ensureNotPaused();\\n                    checkedNotPaused = true;\\n                }\\n\\n                if (kind == UserBalanceOpKind.DEPOSIT_INTERNAL) {\\n                    _depositToInternalBalance(asset, sender, recipient, amount);\\n\\n                    // Keep track of all ETH wrapped into WETH as part of a deposit.\\n                    if (_isETH(asset)) {\\n                        ethWrapped = ethWrapped.add(amount);\\n                    }\\n                } else {\\n                    // Transfers don't support ETH.\\n                    _require(!_isETH(asset), Errors.CANNOT_USE_ETH_SENTINEL);\\n                    IERC20 token = _asIERC20(asset);\\n\\n                    if (kind == UserBalanceOpKind.TRANSFER_INTERNAL) {\\n                        _transferInternalBalance(token, sender, recipient, amount);\\n                    } else {\\n                        // TRANSFER_EXTERNAL\\n                        _transferToExternalBalance(token, sender, recipient, amount);\\n                    }\\n                }\\n            }\\n        }\\n\\n        // Handle any remaining ETH.\\n        _handleRemainingEth(ethWrapped);\\n    }\\n\\n    function _depositToInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        _increaseInternalBalance(recipient, _translateToIERC20(asset), amount);\\n        _receiveAsset(asset, amount, sender, false);\\n    }\\n\\n    function _withdrawFromInternalBalance(\\n        IAsset asset,\\n        address sender,\\n        address payable recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, _translateToIERC20(asset), amount, false);\\n        _sendAsset(asset, amount, recipient, false);\\n    }\\n\\n    function _transferInternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        // A partial decrease of Internal Balance is disallowed: `sender` must have the full `amount`.\\n        _decreaseInternalBalance(sender, token, amount, false);\\n        _increaseInternalBalance(recipient, token, amount);\\n    }\\n\\n    function _transferToExternalBalance(\\n        IERC20 token,\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) private {\\n        if (amount > 0) {\\n            token.safeTransferFrom(sender, recipient, amount);\\n            emit ExternalBalanceTransfer(token, sender, recipient, amount);\\n        }\\n    }\\n\\n    /**\\n     * @dev Increases `account`'s Internal Balance for `token` by `amount`.\\n     */\\n    function _increaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal override {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        uint256 newBalance = currentBalance.add(amount);\\n        _setInternalBalance(account, token, newBalance, amount.toInt256());\\n    }\\n\\n    /**\\n     * @dev Decreases `account`'s Internal Balance for `token` by `amount`. If `allowPartial` is true, this function\\n     * doesn't revert if `account` doesn't have enough balance, and sets it to zero and returns the deducted amount\\n     * instead.\\n     */\\n    function _decreaseInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 amount,\\n        bool allowPartial\\n    ) internal override returns (uint256 deducted) {\\n        uint256 currentBalance = _getInternalBalance(account, token);\\n        _require(allowPartial || (currentBalance >= amount), Errors.INSUFFICIENT_INTERNAL_BALANCE);\\n\\n        deducted = Math.min(currentBalance, amount);\\n        // By construction, `deducted` is lower or equal to `currentBalance`, so we don't need to use checked\\n        // arithmetic.\\n        uint256 newBalance = currentBalance - deducted;\\n        _setInternalBalance(account, token, newBalance, -(deducted.toInt256()));\\n    }\\n\\n    /**\\n     * @dev Sets `account`'s Internal Balance for `token` to `newBalance`.\\n     *\\n     * Emits an `InternalBalanceChanged` event. This event includes `delta`, which is the amount the balance increased\\n     * (if positive) or decreased (if negative). To avoid reading the current balance in order to compute the delta,\\n     * this function relies on the caller providing it directly.\\n     */\\n    function _setInternalBalance(\\n        address account,\\n        IERC20 token,\\n        uint256 newBalance,\\n        int256 delta\\n    ) private {\\n        _internalTokenBalance[account][token] = newBalance;\\n        emit InternalBalanceChanged(account, token, delta);\\n    }\\n\\n    /**\\n     * @dev Returns `account`'s Internal Balance for `token`.\\n     */\\n    function _getInternalBalance(address account, IERC20 token) internal view returns (uint256) {\\n        return _internalTokenBalance[account][token];\\n    }\\n\\n    /**\\n     * @dev Destructures a User Balance operation, validating that the contract caller is allowed to perform it.\\n     */\\n    function _validateUserBalanceOp(UserBalanceOp memory op, bool checkedCallerIsRelayer)\\n        private\\n        view\\n        returns (\\n            UserBalanceOpKind,\\n            IAsset,\\n            uint256,\\n            address,\\n            address payable,\\n            bool\\n        )\\n    {\\n        // The only argument we need to validate is `sender`, which can only be either the contract caller, or a\\n        // relayer approved by `sender`.\\n        address sender = op.sender;\\n\\n        if (sender != msg.sender) {\\n            // We need to check both that the contract caller is a relayer, and that `sender` approved them.\\n\\n            // Because the relayer check is global (i.e. independent of `sender`), we cache that result and skip it for\\n            // other operations in this same transaction (if any).\\n            if (!checkedCallerIsRelayer) {\\n                _authenticateCaller();\\n                checkedCallerIsRelayer = true;\\n            }\\n\\n            _require(_hasApprovedRelayer(sender, msg.sender), Errors.USER_DOESNT_ALLOW_RELAYER);\\n        }\\n\\n        return (op.kind, op.asset, op.amount, sender, op.recipient, checkedCallerIsRelayer);\\n    }\\n}\\n\",\"keccak256\":\"0x4412e4e084ff3be5b80f421a9fdbc72de7e2fc17a054609f40c32c32fdcaefbd\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/Vault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\nimport \\\"./interfaces/IWETH.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\nimport \\\"./FlashLoans.sol\\\";\\nimport \\\"./Swaps.sol\\\";\\n\\n/**\\n * @dev The `Vault` is Balancer V2's core contract. A single instance of it exists for the entire network, and it is the\\n * entity used to interact with Pools by Liquidity Providers who join and exit them, Traders who swap, and Asset\\n * Managers who withdraw and deposit tokens.\\n *\\n * The `Vault`'s source code is split among a number of sub-contracts, with the goal of improving readability and making\\n * understanding the system easier. Most sub-contracts have been marked as `abstract` to explicitly indicate that only\\n * the full `Vault` is meant to be deployed.\\n *\\n * Roughly speaking, these are the contents of each sub-contract:\\n *\\n *  - `AssetManagers`: Pool token Asset Manager registry, and Asset Manager interactions.\\n *  - `Fees`: set and compute protocol fees.\\n *  - `FlashLoans`: flash loan transfers and fees.\\n *  - `PoolBalances`: Pool joins and exits.\\n *  - `PoolRegistry`: Pool registration, ID management, and basic queries.\\n *  - `PoolTokens`: Pool token registration and registration, and balance queries.\\n *  - `Swaps`: Pool swaps.\\n *  - `UserBalance`: manage user balances (Internal Balance operations and external balance transfers)\\n *  - `VaultAuthorization`: access control, relayers and signature validation.\\n *\\n * Additionally, the different Pool specializations are handled by the `GeneralPoolsBalance`,\\n * `MinimalSwapInfoPoolsBalance` and `TwoTokenPoolsBalance` sub-contracts, which in turn make use of the\\n * `BalanceAllocation` library.\\n *\\n * The most important goal of the `Vault` is to make token swaps use as little gas as possible. This is reflected in a\\n * multitude of design decisions, from minor things like the format used to store Pool IDs, to major features such as\\n * the different Pool specialization settings.\\n *\\n * Finally, the large number of tasks carried out by the Vault means its bytecode is very large, close to exceeding\\n * the contract size limit imposed by EIP 170 (https://eips.ethereum.org/EIPS/eip-170). Manual tuning of the source code\\n * was required to improve code generation and bring the bytecode size below this limit. This includes extensive\\n * utilization of `internal` functions (particularly inside modifiers), usage of named return arguments, dedicated\\n * storage access methods, dynamic revert reason generation, and usage of inline assembly, to name a few.\\n */\\ncontract Vault is VaultAuthorization, FlashLoans, Swaps {\\n    constructor(\\n        IAuthorizer authorizer,\\n        IWETH weth,\\n        uint256 pauseWindowDuration,\\n        uint256 bufferPeriodDuration\\n    ) VaultAuthorization(authorizer) AssetHelpers(weth) TemporarilyPausable(pauseWindowDuration, bufferPeriodDuration) {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function setPaused(bool paused) external override nonReentrant authenticate {\\n        _setPaused(paused);\\n    }\\n\\n    // solhint-disable-next-line func-name-mixedcase\\n    function WETH() external view override returns (IWETH) {\\n        return _WETH();\\n    }\\n}\\n\",\"keccak256\":\"0xca8fefb90b4dbc611a7b6685504076b7484974ad0b986cf9b98cae0df4a9035b\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/GeneralPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableMap.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\n\\nabstract contract GeneralPoolsBalance {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\\n\\n    // Data for Pools with the General specialization setting\\n    //\\n    // These Pools use the IGeneralPool interface, which means the Vault must query the balance for *all* of their\\n    // tokens in every swap. If we kept a mapping of token to balance plus a set (array) of tokens, it'd be very gas\\n    // intensive to read all token addresses just to then do a lookup on the balance mapping.\\n    //\\n    // Instead, we use our customized EnumerableMap, which lets us read the N balances in N+1 storage accesses (one for\\n    // each token in the Pool), access the index of any 'token in' a single read (required for the IGeneralPool call),\\n    // and update an entry's value given its index.\\n\\n    // Map of token -> balance pairs for each Pool with this specialization. Many functions rely on storage pointers to\\n    // a Pool's EnumerableMap to save gas when computing storage slots.\\n    mapping(bytes32 => EnumerableMap.IERC20ToBytes32Map) internal _generalPoolsBalances;\\n\\n    /**\\n     * @dev Registers a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // EnumerableMaps require an explicit initial value when creating a key-value pair: we use zero, the same\\n            // value that is found in uninitialized storage, which corresponds to an empty balance.\\n            bool added = poolBalances.set(tokens[i], 0);\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n            _require(currentBalance.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // We don't need to check remove's return value, since _getGeneralPoolBalance already checks that the token\\n            // was registered.\\n            poolBalances.remove(token);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a General Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setGeneralPoolBalances(bytes32 poolId, bytes32[] memory balances) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < balances.length; ++i) {\\n            // Since we assume all balances are properly ordered, we can simply use `unchecked_setAt` to avoid one less\\n            // storage read per token.\\n            poolBalances.unchecked_setAt(i, balances[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a General Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setGeneralPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateGeneralPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a General Pool to the result of the `mutation` function when called with the\\n     * current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateGeneralPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        poolBalances.set(token, newBalance);\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a General Pool. The order may change when tokens are\\n     * registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _getGeneralPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        tokens = new IERC20[](poolBalances.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableMap's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            (tokens[i], balances[i]) = poolBalances.unchecked_at(i);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getGeneralPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return _getGeneralPoolBalance(poolBalances, token);\\n    }\\n\\n    /**\\n     * @dev Same as `_getGeneralPoolBalance` but using a Pool's storage pointer, which saves gas in repeated reads and\\n     * writes.\\n     */\\n    function _getGeneralPoolBalance(EnumerableMap.IERC20ToBytes32Map storage poolBalances, IERC20 token)\\n        private\\n        view\\n        returns (bytes32)\\n    {\\n        return poolBalances.get(token, Errors.TOKEN_NOT_REGISTERED);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _isGeneralPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return poolBalances.contains(token);\\n    }\\n}\\n\",\"keccak256\":\"0x534135bd6edee54ffaa785ff26916a2471211c55e718aba84e41961823edfc0c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableSet.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract MinimalSwapInfoPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n\\n    // Data for Pools with the Minimal Swap Info specialization setting\\n    //\\n    // These Pools use the IMinimalSwapInfoPool interface, and so the Vault must read the balance of the two tokens\\n    // in the swap. The best solution is to use a mapping from token to balance, which lets us read or write any token's\\n    // balance in a single storage access.\\n    //\\n    // We also keep a set of registered tokens. Because tokens with non-zero balance are by definition registered, in\\n    // some balance getters we skip checking for token registration if a non-zero balance is found, saving gas by\\n    // performing a single read instead of two.\\n\\n    mapping(bytes32 => mapping(IERC20 => bytes32)) internal _minimalSwapInfoPoolsBalances;\\n    mapping(bytes32 => EnumerableSet.AddressSet) internal _minimalSwapInfoPoolsTokens;\\n\\n    /**\\n     * @dev Registers a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            bool added = poolTokens.add(address(tokens[i]));\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n            // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n            // balance.\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(_minimalSwapInfoPoolsBalances[poolId][token].isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // For consistency with other Pool specialization settings, we explicitly reset the balance (which may have\\n            // a non-zero last change block).\\n            delete _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n            bool removed = poolTokens.remove(address(token));\\n            _require(removed, Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a Minimal Swap Info Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setMinimalSwapInfoPoolBalances(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        bytes32[] memory balances\\n    ) internal {\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            _minimalSwapInfoPoolsBalances[poolId][tokens[i]] = balances[i];\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Minimal Swap Info Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setMinimalSwapInfoPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Minimal Swap Info Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateMinimalSwapInfoPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        bytes32 currentBalance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        _minimalSwapInfoPoolsBalances[poolId][token] = newBalance;\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a Minimal Swap Info Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _getMinimalSwapInfoPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        tokens = new IERC20[](poolTokens.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableSet's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            IERC20 token = IERC20(poolTokens.unchecked_at(i));\\n            tokens[i] = token;\\n            balances[i] = _minimalSwapInfoPoolsBalances[poolId][token];\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Minimal Swap Info Pool.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getMinimalSwapInfoPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        bytes32 balance = _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n        // A non-zero balance guarantees that the token is registered. If zero, we manually check if the token is\\n        // registered in the Pool. Token registration implies that the Pool is registered as well, which lets us save\\n        // gas by not performing the check.\\n        bool tokenRegistered = balance.isNotZero() || _minimalSwapInfoPoolsTokens[poolId].contains(address(token));\\n\\n        if (!tokenRegistered) {\\n            // The token might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        return balance;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _isMinimalSwapInfoPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        return poolTokens.contains(address(token));\\n    }\\n}\\n\",\"keccak256\":\"0x4b002c25bd067d9e1272df67271a0993be4f7f92cae0a0871abc2d52272b10df\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract TwoTokenPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n\\n    // Data for Pools with the Two Token specialization setting\\n    //\\n    // These are similar to the Minimal Swap Info Pool case (because the Pool only has two tokens, and therefore there\\n    // are only two balances to read), but there's a key difference in how data is stored. Keeping a set makes little\\n    // sense, as it will only ever hold two tokens, so we can just store those two directly.\\n    //\\n    // The gas savings associated with using these Pools come from how token balances are stored: cash amounts for token\\n    // A and token B are packed together, as are managed amounts. Because only cash changes in a swap, there's no need\\n    // to write to this second storage slot. A single last change block number for both tokens is stored with the packed\\n    // cash fields.\\n\\n    struct TwoTokenPoolBalances {\\n        bytes32 sharedCash;\\n        bytes32 sharedManaged;\\n    }\\n\\n    // We could just keep a mapping from Pool ID to TwoTokenSharedBalances, but there's an issue: we wouldn't know to\\n    // which tokens those balances correspond. This would mean having to also check which are registered with the Pool.\\n    //\\n    // What we do instead to save those storage reads is keep a nested mapping from the token pair hash to the balances\\n    // struct. The Pool only has two tokens, so only a single entry of this mapping is set (the one that corresponds to\\n    // that pair's hash).\\n    //\\n    // This has the trade-off of making Vault code that interacts with these Pools cumbersome: both balances must be\\n    // accessed at the same time by using both token addresses, and some logic is needed to determine how the pair hash\\n    // is computed. We do this by sorting the tokens, calling the token with the lowest numerical address value token A,\\n    // and the other one token B. In functions where the token arguments could be either A or B, we use X and Y instead.\\n    //\\n    // If users query a token pair containing an unregistered token, the Pool will generate a hash for a mapping entry\\n    // that was not set, and return zero balances. Non-zero balances are only possible if both tokens in the pair\\n    // are registered with the Pool, which means we don't have to check the TwoTokenPoolTokens struct, and can save\\n    // storage reads.\\n\\n    struct TwoTokenPoolTokens {\\n        IERC20 tokenA;\\n        IERC20 tokenB;\\n        mapping(bytes32 => TwoTokenPoolBalances) balances;\\n    }\\n\\n    mapping(bytes32 => TwoTokenPoolTokens) private _twoTokenPoolTokens;\\n\\n    /**\\n     * @dev Registers tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must not be the same\\n     * - The tokens must be ordered: tokenX < tokenY\\n     */\\n    function _registerTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        // Not technically true since we didn't register yet, but this is consistent with the error messages of other\\n        // specialization settings.\\n        _require(tokenX != tokenY, Errors.TOKEN_ALREADY_REGISTERED);\\n\\n        _require(tokenX < tokenY, Errors.UNSORTED_TOKENS);\\n\\n        // A Two Token Pool with no registered tokens is identified by having zero addresses for tokens A and B.\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        _require(poolTokens.tokenA == IERC20(0) && poolTokens.tokenB == IERC20(0), Errors.TOKENS_ALREADY_SET);\\n\\n        // Since tokenX < tokenY, tokenX is A and tokenY is B\\n        poolTokens.tokenA = tokenX;\\n        poolTokens.tokenB = tokenY;\\n\\n        // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n        // balance.\\n    }\\n\\n    /**\\n     * @dev Deregisters tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     * - both tokens must have zero balance in the Vault\\n     */\\n    function _deregisterTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        ) = _getTwoTokenPoolSharedBalances(poolId, tokenX, tokenY);\\n\\n        _require(balanceA.isZero() && balanceB.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n        delete _twoTokenPoolTokens[poolId];\\n\\n        // For consistency with other Pool specialization settings, we explicitly reset the packed cash field (which may\\n        // have a non-zero last change block).\\n        delete poolBalances.sharedCash;\\n    }\\n\\n    /**\\n     * @dev Sets the cash balances of a Two Token Pool's tokens.\\n     *\\n     * WARNING: this assumes `tokenA` and `tokenB` are the Pool's two registered tokens, and are in the correct order.\\n     */\\n    function _setTwoTokenPoolCashBalances(\\n        bytes32 poolId,\\n        IERC20 tokenA,\\n        bytes32 balanceA,\\n        IERC20 tokenB,\\n        bytes32 balanceB\\n    ) internal {\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        TwoTokenPoolBalances storage poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n        poolBalances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Two Token Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setTwoTokenPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Two Token Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateTwoTokenPoolSharedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        (\\n            TwoTokenPoolBalances storage balances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            ,\\n            bytes32 balanceB\\n        ) = _getTwoTokenPoolBalances(poolId);\\n\\n        int256 delta;\\n        if (token == tokenA) {\\n            bytes32 newBalance = mutation(balanceA, amount);\\n            delta = newBalance.managedDelta(balanceA);\\n            balanceA = newBalance;\\n        } else {\\n            // token == tokenB\\n            bytes32 newBalance = mutation(balanceB, amount);\\n            delta = newBalance.managedDelta(balanceB);\\n            balanceB = newBalance;\\n        }\\n\\n        balances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n        balances.sharedManaged = BalanceAllocation.toSharedManaged(balanceA, balanceB);\\n\\n        return delta;\\n    }\\n\\n    /*\\n     * @dev Returns an array with all the tokens and balances in a Two Token Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _getTwoTokenPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        // Both tokens will either be zero (if unregistered) or non-zero (if registered), but we keep the full check for\\n        // clarity.\\n        if (tokenA == IERC20(0) || tokenB == IERC20(0)) {\\n            return (new IERC20[](0), new bytes32[](0));\\n        }\\n\\n        // Note that functions relying on this getter expect tokens to be properly ordered, so we use the (A, B)\\n        // ordering.\\n\\n        tokens = new IERC20[](2);\\n        tokens[0] = tokenA;\\n        tokens[1] = tokenB;\\n\\n        balances = new bytes32[](2);\\n        balances[0] = balanceA;\\n        balances[1] = balanceB;\\n    }\\n\\n    /**\\n     * @dev Same as `_getTwoTokenPoolTokens`, except it returns the two tokens and balances directly instead of using\\n     * an array, as well as a storage pointer to the `TwoTokenPoolBalances` struct, which can be used to update it\\n     * without having to recompute the pair hash and storage slot.\\n     */\\n    function _getTwoTokenPoolBalances(bytes32 poolId)\\n        private\\n        view\\n        returns (\\n            TwoTokenPoolBalances storage poolBalances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            IERC20 tokenB,\\n            bytes32 balanceB\\n        )\\n    {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        tokenA = poolTokens.tokenA;\\n        tokenB = poolTokens.tokenB;\\n\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        poolBalances = poolTokens.balances[pairHash];\\n\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * This function is convenient but not particularly gas efficient, and should be avoided during gas-sensitive\\n     * operations, such as swaps. For those, _getTwoTokenPoolSharedBalances provides a more flexible interface.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        // We can't just read the balance of token, because we need to know the full pair in order to compute the pair\\n        // hash and access the balance mapping. We therefore rely on `_getTwoTokenPoolBalances`.\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        if (token == tokenA) {\\n            return balanceA;\\n        } else if (token == tokenB) {\\n            return balanceB;\\n        } else {\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of the two tokens in a Two Token Pool.\\n     *\\n     * The returned balances are those of token A and token B, where token A is the lowest of token X and token Y, and\\n     * token B the other.\\n     *\\n     * This function also returns a storage pointer to the TwoTokenPoolBalances struct associated with the token pair,\\n     * which can be used to update it without having to recompute the pair hash and storage slot.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolSharedBalances(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    )\\n        internal\\n        view\\n        returns (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        )\\n    {\\n        (IERC20 tokenA, IERC20 tokenB) = _sortTwoTokens(tokenX, tokenY);\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n\\n        poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n\\n        // Because we're reading balances using the pair hash, if either token X or token Y is not registered then\\n        // *both* balance entries will be zero.\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        // A non-zero balance guarantees that both tokens are registered. If zero, we manually check whether each\\n        // token is registered in the Pool. Token registration implies that the Pool is registered as well, which\\n        // lets us save gas by not performing the check.\\n        bool tokensRegistered = sharedCash.isNotZero() ||\\n            sharedManaged.isNotZero() ||\\n            (_isTwoTokenPoolTokenRegistered(poolId, tokenA) && _isTwoTokenPoolTokenRegistered(poolId, tokenB));\\n\\n        if (!tokensRegistered) {\\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _isTwoTokenPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n\\n        // The zero address can never be a registered token.\\n        return (token == poolTokens.tokenA || token == poolTokens.tokenB) && token != IERC20(0);\\n    }\\n\\n    /**\\n     * @dev Returns the hash associated with a given token pair.\\n     */\\n    function _getTwoTokenPairHash(IERC20 tokenA, IERC20 tokenB) private pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(tokenA, tokenB));\\n    }\\n\\n    /**\\n     * @dev Sorts two tokens in ascending order, returning them as a (tokenA, tokenB) tuple.\\n     */\\n    function _sortTwoTokens(IERC20 tokenX, IERC20 tokenY) private pure returns (IERC20, IERC20) {\\n        return tokenX < tokenY ? (tokenX, tokenY) : (tokenY, tokenX);\\n    }\\n}\\n\",\"keccak256\":\"0x2cd5a8f9bee0addefa4e63cb7380f9b133d2e482807603fed931d42e3e1f40f4\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev IPools with the General specialization setting should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\\n * grant to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IGeneralPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7f11733a5cd8f81c123c02f79d94ead7b65217021ebddafda10e796a25e1ef41\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\\n * to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IMinimalSwapInfoPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7469919e147c0db8b4f290d310ca3816dec5d3c6cc6b258cf6e0df820a20a179\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 19073,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_generalPoolsBalances",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "2",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_paused",
                "offset": 0,
                "slot": "3",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_authorizer",
                "offset": 1,
                "slot": "3",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 15355,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_isPoolRegistered",
                "offset": 0,
                "slot": "5",
                "type": "t_mapping(t_bytes32,t_bool)"
              },
              {
                "astId": 15357,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_nextPoolNonce",
                "offset": 0,
                "slot": "6",
                "type": "t_uint256"
              },
              {
                "astId": 19489,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_minimalSwapInfoPoolsBalances",
                "offset": 0,
                "slot": "7",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))"
              },
              {
                "astId": 19493,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_minimalSwapInfoPoolsTokens",
                "offset": 0,
                "slot": "8",
                "type": "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)"
              },
              {
                "astId": 19947,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_twoTokenPoolTokens",
                "offset": 0,
                "slot": "9",
                "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)"
              },
              {
                "astId": 13417,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_poolAssetManagers",
                "offset": 0,
                "slot": "10",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))"
              },
              {
                "astId": 17602,
                "contract": "src.sol/amm/vault/Vault.sol:Vault",
                "label": "_internalTokenBalance",
                "offset": 0,
                "slot": "11",
                "type": "t_mapping(t_address,t_mapping(t_contract(IERC20)5095,t_uint256))"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_array(t_address)dyn_storage": {
                "base": "t_address",
                "encoding": "dynamic_array",
                "label": "address[]",
                "numberOfBytes": "32"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_mapping(t_contract(IERC20)5095,t_uint256))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(contract IERC20 => uint256))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_uint256)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_bool)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_address))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => address))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_address)"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => bytes32))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_bytes32)"
              },
              "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)",
                "numberOfBytes": "32",
                "value": "t_struct(AddressSet)4822_storage"
              },
              "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32Map)4479_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolBalances)19934_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolTokens)19943_storage"
              },
              "t_mapping(t_contract(IERC20)5095,t_address)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => address)",
                "numberOfBytes": "32",
                "value": "t_address"
              },
              "t_mapping(t_contract(IERC20)5095,t_bytes32)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => bytes32)",
                "numberOfBytes": "32",
                "value": "t_bytes32"
              },
              "t_mapping(t_contract(IERC20)5095,t_uint256)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)": {
                "encoding": "mapping",
                "key": "t_uint256",
                "label": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32MapEntry)4468_storage"
              },
              "t_struct(AddressSet)4822_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableSet.AddressSet",
                "members": [
                  {
                    "astId": 4817,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "_values",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_array(t_address)dyn_storage"
                  },
                  {
                    "astId": 4821,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_address,t_uint256)"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(IERC20ToBytes32Map)4479_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32Map",
                "members": [
                  {
                    "astId": 4470,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "_length",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_uint256"
                  },
                  {
                    "astId": 4474,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "_entries",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)"
                  },
                  {
                    "astId": 4478,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_contract(IERC20)5095,t_uint256)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_struct(IERC20ToBytes32MapEntry)4468_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32MapEntry",
                "members": [
                  {
                    "astId": 4465,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "_key",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 4467,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "_value",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolBalances)19934_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances",
                "members": [
                  {
                    "astId": 19931,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "sharedCash",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_bytes32"
                  },
                  {
                    "astId": 19933,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "sharedManaged",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolTokens)19943_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens",
                "members": [
                  {
                    "astId": 19936,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "tokenA",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19938,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "tokenB",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19942,
                    "contract": "src.sol/amm/vault/Vault.sol:Vault",
                    "label": "balances",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/VaultAuthorization.sol": {
        "VaultAuthorization": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation. Additionally handles relayer access and approval.",
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation. Additionally handles relayer access and approval.\",\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/VaultAuthorization.sol\":\"VaultAuthorization\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/VaultAuthorization.sol:VaultAuthorization",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/VaultAuthorization.sol:VaultAuthorization",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/VaultAuthorization.sol:VaultAuthorization",
                "label": "_paused",
                "offset": 0,
                "slot": "2",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/VaultAuthorization.sol:VaultAuthorization",
                "label": "_authorizer",
                "offset": 1,
                "slot": "2",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/VaultAuthorization.sol:VaultAuthorization",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "3",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/balances/BalanceAllocation.sol": {
        "BalanceAllocation": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d4ddcdf2389f86c19318a6802d619029a5e0de6f7824d9a473a242367d93236964736f6c63430007010033",
              "opcodes": "PUSH1 0x56 PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD4 0xDD 0xCD CALLCODE CODESIZE SWAP16 DUP7 0xC1 SWAP4 XOR 0xA6 DUP1 0x2D PUSH2 0x9029 0xA5 0xE0 0xDE PUSH16 0x7824D9A473A242367D93236964736F6C PUSH4 0x43000701 STOP CALLER ",
              "sourceMap": "2895:11371:54:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d4ddcdf2389f86c19318a6802d619029a5e0de6f7824d9a473a242367d93236964736f6c63430007010033",
              "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD4 0xDD 0xCD CALLCODE CODESIZE SWAP16 DUP7 0xC1 SWAP4 XOR 0xA6 DUP1 0x2D PUSH2 0x9029 0xA5 0xE0 0xDE PUSH16 0x7824D9A473A242367D93236964736F6C PUSH4 0x43000701 STOP CALLER ",
              "sourceMap": "2895:11371:54:-:0;;;;;;;;"
            },
            "gasEstimates": {
              "creation": {
                "codeDepositCost": "17200",
                "executionCost": "97",
                "totalCost": "17297"
              },
              "internal": {
                "_decodeBalanceA(bytes32)": "infinite",
                "_decodeBalanceB(bytes32)": "infinite",
                "_pack(uint256,uint256,uint256)": "infinite",
                "cash(bytes32)": "infinite",
                "cashToManaged(bytes32,uint256)": "infinite",
                "decreaseCash(bytes32,uint256)": "infinite",
                "fromSharedToBalanceA(bytes32,bytes32)": "infinite",
                "fromSharedToBalanceB(bytes32,bytes32)": "infinite",
                "increaseCash(bytes32,uint256)": "infinite",
                "isNotZero(bytes32)": "infinite",
                "isZero(bytes32)": "infinite",
                "lastChangeBlock(bytes32)": "infinite",
                "managed(bytes32)": "infinite",
                "managedDelta(bytes32,bytes32)": "infinite",
                "managedToCash(bytes32,uint256)": "infinite",
                "setManaged(bytes32,uint256)": "infinite",
                "toBalance(uint256,uint256,uint256)": "infinite",
                "toSharedCash(bytes32,bytes32)": "infinite",
                "toSharedManaged(bytes32,bytes32)": "infinite",
                "total(bytes32)": "infinite",
                "totalsAndLastChangeBlock(bytes32[] memory)": "infinite"
              }
            },
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/balances/BalanceAllocation.sol\":\"BalanceAllocation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/balances/GeneralPoolsBalance.sol": {
        "GeneralPoolsBalance": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/balances/GeneralPoolsBalance.sol\":\"GeneralPoolsBalance\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n// Based on the EnumerableMap library from OpenZeppelin contracts, altered to include the following:\\n//  * a map from IERC20 to bytes32\\n//  * entries are stored in mappings instead of arrays, reducing implicit storage reads for out-of-bounds checks\\n//  * unchecked_at and unchecked_valueAt, which allow for more gas efficient data reads in some scenarios\\n//  * unchecked_indexOf and unchecked_setAt, which allow for more gas efficient data writes in some scenarios\\n//\\n// Additionally, the base private functions that work on bytes32 were removed and replaced with a native implementation\\n// for IERC20 keys, to reduce bytecode size and runtime costs.\\n\\n// We're using non-standard casing for the unchecked functions to differentiate them, so we need to turn off that rule\\n// solhint-disable func-name-mixedcase\\n\\nimport \\\"./IERC20.sol\\\";\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Library for managing an enumerable variant of Solidity's\\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\\n * type.\\n *\\n * Maps have the following properties:\\n *\\n * - Entries are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Entries are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableMap for EnumerableMap.UintToAddressMap;\\n *\\n *     // Declare a set state variable\\n *     EnumerableMap.UintToAddressMap private myMap;\\n * }\\n * ```\\n */\\nlibrary EnumerableMap {\\n    // The original OpenZeppelin implementation uses a generic Map type with bytes32 keys: this was replaced with\\n    // IERC20ToBytes32Map, which uses IERC20 keys natively, resulting in more dense bytecode.\\n\\n    struct IERC20ToBytes32MapEntry {\\n        IERC20 _key;\\n        bytes32 _value;\\n    }\\n\\n    struct IERC20ToBytes32Map {\\n        // Number of entries in the map\\n        uint256 _length;\\n        // Storage of map keys and values\\n        mapping(uint256 => IERC20ToBytes32MapEntry) _entries;\\n        // Position of the entry defined by a key in the `entries` array, plus 1\\n        // because index 0 means a key is not in the map.\\n        mapping(IERC20 => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Adds a key-value pair to a map, or updates the value for an existing\\n     * key. O(1).\\n     *\\n     * Returns true if the key was added to the map, that is if it was not\\n     * already present.\\n     */\\n    function set(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        bytes32 value\\n    ) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to !contains(map, key)\\n        if (keyIndex == 0) {\\n            uint256 previousLength = map._length;\\n            map._entries[previousLength] = IERC20ToBytes32MapEntry({ _key: key, _value: value });\\n            map._length = previousLength + 1;\\n\\n            // The entry is stored at previousLength, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            map._indexes[key] = previousLength + 1;\\n            return true;\\n        } else {\\n            map._entries[keyIndex - 1]._value = value;\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\\n     * {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\\n     *\\n     * This function performs one less storage read than {set}, but it should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_setAt(\\n        IERC20ToBytes32Map storage map,\\n        uint256 index,\\n        bytes32 value\\n    ) internal {\\n        map._entries[index]._value = value;\\n    }\\n\\n    /**\\n     * @dev Removes a key-value pair from a map. O(1).\\n     *\\n     * Returns true if the key was removed from the map, that is if it was present.\\n     */\\n    function remove(IERC20ToBytes32Map storage map, IERC20 key) internal returns (bool) {\\n        // We read and store the key's index to prevent multiple reads from the same storage slot\\n        uint256 keyIndex = map._indexes[key];\\n\\n        // Equivalent to contains(map, key)\\n        if (keyIndex != 0) {\\n            // To delete a key-value pair from the _entries pseudo-array in O(1), we swap the entry to delete with the\\n            // one at the highest index, and then remove this last entry (sometimes called as 'swap and pop').\\n            // This modifies the order of the pseudo-array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = keyIndex - 1;\\n            uint256 lastIndex = map._length - 1;\\n\\n            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            IERC20ToBytes32MapEntry storage lastEntry = map._entries[lastIndex];\\n\\n            // Move the last entry to the index where the entry to delete is\\n            map._entries[toDeleteIndex] = lastEntry;\\n            // Update the index for the moved entry\\n            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved entry was stored\\n            delete map._entries[lastIndex];\\n            map._length = lastIndex;\\n\\n            // Delete the index for the deleted slot\\n            delete map._indexes[key];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the key is in the map. O(1).\\n     */\\n    function contains(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (bool) {\\n        return map._indexes[key] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of key-value pairs in the map. O(1).\\n     */\\n    function length(IERC20ToBytes32Map storage map) internal view returns (uint256) {\\n        return map._length;\\n    }\\n\\n    /**\\n     * @dev Returns the key-value pair stored at position `index` in the map. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of entries inside the\\n     * array, and it may change when more entries are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        _require(map._length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(map, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(IERC20ToBytes32Map storage map, uint256 index) internal view returns (IERC20, bytes32) {\\n        IERC20ToBytes32MapEntry storage entry = map._entries[index];\\n        return (entry._key, entry._value);\\n    }\\n\\n    /**\\n     * @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\\n     * read). O(1).\\n     */\\n    function unchecked_valueAt(IERC20ToBytes32Map storage map, uint256 index) internal view returns (bytes32) {\\n        return map._entries[index]._value;\\n    }\\n\\n    /**\\n     * @dev Returns the value associated with `key`. O(1).\\n     *\\n     * Requirements:\\n     *\\n     * - `key` must be in the map. Reverts with `errorCode` otherwise.\\n     */\\n    function get(\\n        IERC20ToBytes32Map storage map,\\n        IERC20 key,\\n        uint256 errorCode\\n    ) internal view returns (bytes32) {\\n        uint256 index = map._indexes[key];\\n        _require(index > 0, errorCode);\\n        return unchecked_valueAt(map, index - 1);\\n    }\\n\\n    /**\\n     * @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\\n     * instead.\\n     */\\n    function unchecked_indexOf(IERC20ToBytes32Map storage map, IERC20 key) internal view returns (uint256) {\\n        return map._indexes[key];\\n    }\\n}\\n\",\"keccak256\":\"0x0e7bb50a1095a2a000328ef2243fca7b556ebccfe594f4466d0853f56ed07755\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/GeneralPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableMap.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\n\\nabstract contract GeneralPoolsBalance {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableMap for EnumerableMap.IERC20ToBytes32Map;\\n\\n    // Data for Pools with the General specialization setting\\n    //\\n    // These Pools use the IGeneralPool interface, which means the Vault must query the balance for *all* of their\\n    // tokens in every swap. If we kept a mapping of token to balance plus a set (array) of tokens, it'd be very gas\\n    // intensive to read all token addresses just to then do a lookup on the balance mapping.\\n    //\\n    // Instead, we use our customized EnumerableMap, which lets us read the N balances in N+1 storage accesses (one for\\n    // each token in the Pool), access the index of any 'token in' a single read (required for the IGeneralPool call),\\n    // and update an entry's value given its index.\\n\\n    // Map of token -> balance pairs for each Pool with this specialization. Many functions rely on storage pointers to\\n    // a Pool's EnumerableMap to save gas when computing storage slots.\\n    mapping(bytes32 => EnumerableMap.IERC20ToBytes32Map) internal _generalPoolsBalances;\\n\\n    /**\\n     * @dev Registers a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // EnumerableMaps require an explicit initial value when creating a key-value pair: we use zero, the same\\n            // value that is found in uninitialized storage, which corresponds to an empty balance.\\n            bool added = poolBalances.set(tokens[i], 0);\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterGeneralPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n            _require(currentBalance.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // We don't need to check remove's return value, since _getGeneralPoolBalance already checks that the token\\n            // was registered.\\n            poolBalances.remove(token);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a General Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setGeneralPoolBalances(bytes32 poolId, bytes32[] memory balances) internal {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n\\n        for (uint256 i = 0; i < balances.length; ++i) {\\n            // Since we assume all balances are properly ordered, we can simply use `unchecked_setAt` to avoid one less\\n            // storage read per token.\\n            poolBalances.unchecked_setAt(i, balances[i]);\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a General Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _generalPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateGeneralPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a General Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setGeneralPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateGeneralPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a General Pool to the result of the `mutation` function when called with the\\n     * current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateGeneralPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        bytes32 currentBalance = _getGeneralPoolBalance(poolBalances, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        poolBalances.set(token, newBalance);\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a General Pool. The order may change when tokens are\\n     * registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _getGeneralPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        tokens = new IERC20[](poolBalances.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableMap's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            (tokens[i], balances[i]) = poolBalances.unchecked_at(i);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getGeneralPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return _getGeneralPoolBalance(poolBalances, token);\\n    }\\n\\n    /**\\n     * @dev Same as `_getGeneralPoolBalance` but using a Pool's storage pointer, which saves gas in repeated reads and\\n     * writes.\\n     */\\n    function _getGeneralPoolBalance(EnumerableMap.IERC20ToBytes32Map storage poolBalances, IERC20 token)\\n        private\\n        view\\n        returns (bytes32)\\n    {\\n        return poolBalances.get(token, Errors.TOKEN_NOT_REGISTERED);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a General Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     */\\n    function _isGeneralPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableMap.IERC20ToBytes32Map storage poolBalances = _generalPoolsBalances[poolId];\\n        return poolBalances.contains(token);\\n    }\\n}\\n\",\"keccak256\":\"0x534135bd6edee54ffaa785ff26916a2471211c55e718aba84e41961823edfc0c\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 19073,
                "contract": "src.sol/amm/vault/balances/GeneralPoolsBalance.sol:GeneralPoolsBalance",
                "label": "_generalPoolsBalances",
                "offset": 0,
                "slot": "0",
                "type": "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)"
              }
            ],
            "types": {
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_bytes32,t_struct(IERC20ToBytes32Map)4479_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32Map)4479_storage"
              },
              "t_mapping(t_contract(IERC20)5095,t_uint256)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)": {
                "encoding": "mapping",
                "key": "t_uint256",
                "label": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry)",
                "numberOfBytes": "32",
                "value": "t_struct(IERC20ToBytes32MapEntry)4468_storage"
              },
              "t_struct(IERC20ToBytes32Map)4479_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32Map",
                "members": [
                  {
                    "astId": 4470,
                    "contract": "src.sol/amm/vault/balances/GeneralPoolsBalance.sol:GeneralPoolsBalance",
                    "label": "_length",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_uint256"
                  },
                  {
                    "astId": 4474,
                    "contract": "src.sol/amm/vault/balances/GeneralPoolsBalance.sol:GeneralPoolsBalance",
                    "label": "_entries",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_uint256,t_struct(IERC20ToBytes32MapEntry)4468_storage)"
                  },
                  {
                    "astId": 4478,
                    "contract": "src.sol/amm/vault/balances/GeneralPoolsBalance.sol:GeneralPoolsBalance",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_contract(IERC20)5095,t_uint256)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_struct(IERC20ToBytes32MapEntry)4468_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableMap.IERC20ToBytes32MapEntry",
                "members": [
                  {
                    "astId": 4465,
                    "contract": "src.sol/amm/vault/balances/GeneralPoolsBalance.sol:GeneralPoolsBalance",
                    "label": "_key",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 4467,
                    "contract": "src.sol/amm/vault/balances/GeneralPoolsBalance.sol:GeneralPoolsBalance",
                    "label": "_value",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol": {
        "MinimalSwapInfoPoolsBalance": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol\":\"MinimalSwapInfoPoolsBalance\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the EnumerableSet library from OpenZeppelin contracts, altered to remove the base private functions that\\n// work on bytes32, replacing them with a native implementation for address values, to reduce bytecode size and runtime\\n// costs.\\n// The `unchecked_at` function was also added, which allows for more gas efficient data reads in some scenarios.\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n *     // Add the library methods\\n *     using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n *     // Declare a set state variable\\n *     EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n    // The original OpenZeppelin implementation uses a generic Set type with bytes32 values: this was replaced with\\n    // AddressSet, which uses address keys natively, resulting in more dense bytecode.\\n\\n    struct AddressSet {\\n        // Storage of set values\\n        address[] _values;\\n        // Position of the value in the `values` array, plus 1 because index 0\\n        // means a value is not in the set.\\n        mapping(address => uint256) _indexes;\\n    }\\n\\n    /**\\n     * @dev Add a value to a set. O(1).\\n     *\\n     * Returns true if the value was added to the set, that is if it was not\\n     * already present.\\n     */\\n    function add(AddressSet storage set, address value) internal returns (bool) {\\n        if (!contains(set, value)) {\\n            set._values.push(value);\\n            // The value is stored at length-1, but we add 1 to all indexes\\n            // and use 0 as a sentinel value\\n            set._indexes[value] = set._values.length;\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Removes a value from a set. O(1).\\n     *\\n     * Returns true if the value was removed from the set, that is if it was\\n     * present.\\n     */\\n    function remove(AddressSet storage set, address value) internal returns (bool) {\\n        // We read and store the value's index to prevent multiple reads from the same storage slot\\n        uint256 valueIndex = set._indexes[value];\\n\\n        if (valueIndex != 0) {\\n            // Equivalent to contains(set, value)\\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\\n            // This modifies the order of the array, as noted in {at}.\\n\\n            uint256 toDeleteIndex = valueIndex - 1;\\n            uint256 lastIndex = set._values.length - 1;\\n\\n            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n            address lastValue = set._values[lastIndex];\\n\\n            // Move the last value to the index where the value to delete is\\n            set._values[toDeleteIndex] = lastValue;\\n            // Update the index for the moved value\\n            set._indexes[lastValue] = toDeleteIndex + 1; // All indexes are 1-based\\n\\n            // Delete the slot where the moved value was stored\\n            set._values.pop();\\n\\n            // Delete the index for the deleted slot\\n            delete set._indexes[value];\\n\\n            return true;\\n        } else {\\n            return false;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if the value is in the set. O(1).\\n     */\\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\\n        return set._indexes[value] != 0;\\n    }\\n\\n    /**\\n     * @dev Returns the number of values on the set. O(1).\\n     */\\n    function length(AddressSet storage set) internal view returns (uint256) {\\n        return set._values.length;\\n    }\\n\\n    /**\\n     * @dev Returns the value stored at position `index` in the set. O(1).\\n     *\\n     * Note that there are no guarantees on the ordering of values inside the\\n     * array, and it may change when more values are added or removed.\\n     *\\n     * Requirements:\\n     *\\n     * - `index` must be strictly less than {length}.\\n     */\\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        _require(set._values.length > index, Errors.OUT_OF_BOUNDS);\\n        return unchecked_at(set, index);\\n    }\\n\\n    /**\\n     * @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\\n     * than {length}). O(1).\\n     *\\n     * This function performs one less storage read than {at}, but should only be used when `index` is known to be\\n     * within bounds.\\n     */\\n    function unchecked_at(AddressSet storage set, uint256 index) internal view returns (address) {\\n        return set._values[index];\\n    }\\n}\\n\",\"keccak256\":\"0x92673c683363abc0c7e5f39d4bc26779f0c1292bf7a61b03155e0c3d60f25718\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/PoolRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\\n * and helper functions for ensuring correct behavior when working with Pools.\\n */\\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\\n    // types.\\n    mapping(bytes32 => bool) private _isPoolRegistered;\\n\\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\\n    uint256 private _nextPoolNonce;\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    modifier withRegisteredPool(bytes32 poolId) {\\n        _ensureRegisteredPool(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    modifier onlyPool(bytes32 poolId) {\\n        _ensurePoolIsSender(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    function _ensurePoolIsSender(bytes32 poolId) private view {\\n        _ensureRegisteredPool(poolId);\\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\\n    }\\n\\n    function registerPool(PoolSpecialization specialization)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        returns (bytes32)\\n    {\\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\\n        // 2**80 Pools, and the nonce will not overflow.\\n\\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\\n\\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\\n        _isPoolRegistered[poolId] = true;\\n\\n        _nextPoolNonce += 1;\\n\\n        emit PoolRegistered(poolId);\\n        return poolId;\\n    }\\n\\n    function getPool(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (address, PoolSpecialization)\\n    {\\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\\n    }\\n\\n    /**\\n     * @dev Creates a Pool ID.\\n     *\\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\\n     *\\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\\n     * unique.\\n     *\\n     * Pool IDs have the following layout:\\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\\n     * MSB                                                                              LSB\\n     *\\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\\n     * suffice. However, there's nothing else of interest to store in this extra space.\\n     */\\n    function _toPoolId(\\n        address pool,\\n        PoolSpecialization specialization,\\n        uint80 nonce\\n    ) internal pure returns (bytes32) {\\n        bytes32 serialized;\\n\\n        serialized |= bytes32(uint256(nonce));\\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\\n\\n        return serialized;\\n    }\\n\\n    /**\\n     * @dev Returns the address of a Pool's contract.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\\n        // since the logical shift already sets the upper bits to zero.\\n        return address(uint256(poolId) >> (12 * 8));\\n    }\\n\\n    /**\\n     * @dev Returns the specialization setting of a Pool.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\\n\\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\\n        // string: we instead perform the check ourselves to help in error diagnosis.\\n\\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\\n        // values 0, 1 and 2.\\n        _require(value < 3, Errors.INVALID_POOL_ID);\\n\\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            specialization := value\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaf06c559c8a964e9b43308003b43cf698bda38d88cc26118b55394017a369327\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/EnumerableSet.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract MinimalSwapInfoPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n    using EnumerableSet for EnumerableSet.AddressSet;\\n\\n    // Data for Pools with the Minimal Swap Info specialization setting\\n    //\\n    // These Pools use the IMinimalSwapInfoPool interface, and so the Vault must read the balance of the two tokens\\n    // in the swap. The best solution is to use a mapping from token to balance, which lets us read or write any token's\\n    // balance in a single storage access.\\n    //\\n    // We also keep a set of registered tokens. Because tokens with non-zero balance are by definition registered, in\\n    // some balance getters we skip checking for token registration if a non-zero balance is found, saving gas by\\n    // performing a single read instead of two.\\n\\n    mapping(bytes32 => mapping(IERC20 => bytes32)) internal _minimalSwapInfoPoolsBalances;\\n    mapping(bytes32 => EnumerableSet.AddressSet) internal _minimalSwapInfoPoolsTokens;\\n\\n    /**\\n     * @dev Registers a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must not be registered in the Pool\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _registerMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            bool added = poolTokens.add(address(tokens[i]));\\n            _require(added, Errors.TOKEN_ALREADY_REGISTERED);\\n            // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n            // balance.\\n        }\\n    }\\n\\n    /**\\n     * @dev Deregisters a list of tokens in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokens` must be registered in the Pool\\n     * - `tokens` must have zero balance in the Vault\\n     * - `tokens` must not contain duplicates\\n     */\\n    function _deregisterMinimalSwapInfoPoolTokens(bytes32 poolId, IERC20[] memory tokens) internal {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            _require(_minimalSwapInfoPoolsBalances[poolId][token].isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n            // For consistency with other Pool specialization settings, we explicitly reset the balance (which may have\\n            // a non-zero last change block).\\n            delete _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n            bool removed = poolTokens.remove(address(token));\\n            _require(removed, Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Sets the balances of a Minimal Swap Info Pool's tokens to `balances`.\\n     *\\n     * WARNING: this assumes `balances` has the same length and order as the Pool's tokens.\\n     */\\n    function _setMinimalSwapInfoPoolBalances(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        bytes32[] memory balances\\n    ) internal {\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            _minimalSwapInfoPoolsBalances[poolId][tokens[i]] = balances[i];\\n        }\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     */\\n    function _minimalSwapInfoPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Minimal Swap Info Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setMinimalSwapInfoPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateMinimalSwapInfoPoolBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Minimal Swap Info Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\\n     * `token` is registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateMinimalSwapInfoPoolBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        bytes32 currentBalance = _getMinimalSwapInfoPoolBalance(poolId, token);\\n\\n        bytes32 newBalance = mutation(currentBalance, amount);\\n        _minimalSwapInfoPoolsBalances[poolId][token] = newBalance;\\n\\n        return newBalance.managedDelta(currentBalance);\\n    }\\n\\n    /**\\n     * @dev Returns an array with all the tokens and balances in a Minimal Swap Info Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _getMinimalSwapInfoPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        tokens = new IERC20[](poolTokens.length());\\n        balances = new bytes32[](tokens.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            // Because the iteration is bounded by `tokens.length`, which matches the EnumerableSet's length, we can use\\n            // `unchecked_at` as we know `i` is a valid token index, saving storage reads.\\n            IERC20 token = IERC20(poolTokens.unchecked_at(i));\\n            tokens[i] = token;\\n            balances[i] = _minimalSwapInfoPoolsBalances[poolId][token];\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Minimal Swap Info Pool.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getMinimalSwapInfoPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        bytes32 balance = _minimalSwapInfoPoolsBalances[poolId][token];\\n\\n        // A non-zero balance guarantees that the token is registered. If zero, we manually check if the token is\\n        // registered in the Pool. Token registration implies that the Pool is registered as well, which lets us save\\n        // gas by not performing the check.\\n        bool tokenRegistered = balance.isNotZero() || _minimalSwapInfoPoolsTokens[poolId].contains(address(token));\\n\\n        if (!tokenRegistered) {\\n            // The token might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        return balance;\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Minimal Swap Info Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\\n     */\\n    function _isMinimalSwapInfoPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        EnumerableSet.AddressSet storage poolTokens = _minimalSwapInfoPoolsTokens[poolId];\\n        return poolTokens.contains(address(token));\\n    }\\n}\\n\",\"keccak256\":\"0x4b002c25bd067d9e1272df67271a0993be4f7f92cae0a0871abc2d52272b10df\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_paused",
                "offset": 0,
                "slot": "2",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_authorizer",
                "offset": 1,
                "slot": "2",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "3",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 15355,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_isPoolRegistered",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_bytes32,t_bool)"
              },
              {
                "astId": 15357,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_nextPoolNonce",
                "offset": 0,
                "slot": "5",
                "type": "t_uint256"
              },
              {
                "astId": 19489,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_minimalSwapInfoPoolsBalances",
                "offset": 0,
                "slot": "6",
                "type": "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))"
              },
              {
                "astId": 19493,
                "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                "label": "_minimalSwapInfoPoolsTokens",
                "offset": 0,
                "slot": "7",
                "type": "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_array(t_address)dyn_storage": {
                "base": "t_address",
                "encoding": "dynamic_array",
                "label": "address[]",
                "numberOfBytes": "32"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_bool)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_bytes32,t_mapping(t_contract(IERC20)5095,t_bytes32))": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => mapping(contract IERC20 => bytes32))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_contract(IERC20)5095,t_bytes32)"
              },
              "t_mapping(t_bytes32,t_struct(AddressSet)4822_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct EnumerableSet.AddressSet)",
                "numberOfBytes": "32",
                "value": "t_struct(AddressSet)4822_storage"
              },
              "t_mapping(t_contract(IERC20)5095,t_bytes32)": {
                "encoding": "mapping",
                "key": "t_contract(IERC20)5095",
                "label": "mapping(contract IERC20 => bytes32)",
                "numberOfBytes": "32",
                "value": "t_bytes32"
              },
              "t_struct(AddressSet)4822_storage": {
                "encoding": "inplace",
                "label": "struct EnumerableSet.AddressSet",
                "members": [
                  {
                    "astId": 4817,
                    "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                    "label": "_values",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_array(t_address)dyn_storage"
                  },
                  {
                    "astId": 4821,
                    "contract": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol:MinimalSwapInfoPoolsBalance",
                    "label": "_indexes",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_mapping(t_address,t_uint256)"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol": {
        "TwoTokenPoolsBalance": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "PausedStateChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes4",
                  "name": "selector",
                  "type": "bytes4"
                }
              ],
              "name": "getActionId",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getPausedState",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                },
                {
                  "internalType": "uint256",
                  "name": "pauseWindowEndTime",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "bufferPeriodEndTime",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getActionId(bytes4)": {
                "details": "Returns the action identifier associated with the external function described by `selector`."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPausedState()": {
                "details": "Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getActionId(bytes4)": "851c1bb3",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPausedState()": "1c0de051",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PausedStateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"getActionId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPausedState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"pauseWindowEndTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bufferPeriodEndTime\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getActionId(bytes4)\":{\"details\":\"Returns the action identifier associated with the external function described by `selector`.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPausedState()\":{\"details\":\"Returns the current contract pause status, as well as the end times of the Pause Window and Buffer Period.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol\":\"TwoTokenPoolsBalance\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/SignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../openzeppelin/EIP712.sol\\\";\\nimport \\\"../../vault/interfaces/ISignaturesValidator.sol\\\";\\n\\n/**\\n * @dev Utility for signing Solidity function calls.\\n *\\n * This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\\n * metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\\n *\\n * Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs.\\n */\\nabstract contract SignaturesValidator is ISignaturesValidator, EIP712 {\\n    // The appended data consists of a deadline, plus the [v,r,s] signature. For simplicity, we use a full 256 bit slot\\n    // for each of these values, even if 'v' is typically an 8 bit value.\\n    uint256 internal constant _EXTRA_CALLDATA_LENGTH = 4 * 32;\\n\\n    // Replay attack prevention for each user.\\n    mapping(address => uint256) internal _nextNonce;\\n\\n    constructor(string memory name) EIP712(name, \\\"1\\\") {\\n        // solhint-disable-previous-line no-empty-blocks\\n    }\\n\\n    function getDomainSeparator() external view override returns (bytes32) {\\n        return _domainSeparatorV4();\\n    }\\n\\n    function getNextNonce(address user) external view override returns (uint256) {\\n        return _nextNonce[user];\\n    }\\n\\n    /**\\n     * @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata.\\n     */\\n    function _validateSignature(address user, uint256 errorCode) internal {\\n        uint256 nextNonce = _nextNonce[user]++;\\n        _require(_isSignatureValid(user, nextNonce), errorCode);\\n    }\\n\\n    function _isSignatureValid(address user, uint256 nonce) private view returns (bool) {\\n        uint256 deadline = _deadline();\\n\\n        // The deadline is timestamp-based: it should not be relied upon for sub-minute accuracy.\\n        // solhint-disable-next-line not-rely-on-time\\n        if (deadline < block.timestamp) {\\n            return false;\\n        }\\n\\n        bytes32 typeHash = _typeHash();\\n        if (typeHash == bytes32(0)) {\\n            // Prevent accidental signature validation for functions that don't have an associated type hash.\\n            return false;\\n        }\\n\\n        // All type hashes have this format: (bytes calldata, address sender, uint256 nonce, uint256 deadline).\\n        bytes32 structHash = keccak256(abi.encode(typeHash, keccak256(_calldata()), msg.sender, nonce, deadline));\\n        bytes32 digest = _hashTypedDataV4(structHash);\\n        (uint8 v, bytes32 r, bytes32 s) = _signature();\\n\\n        address recoveredAddress = ecrecover(digest, v, r, s);\\n\\n        // ecrecover returns the zero address on recover failure, so we need to handle that explicitly.\\n        return recoveredAddress != address(0) && recoveredAddress == user;\\n    }\\n\\n    /**\\n     * @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\\n     * selector (available as `msg.sig`).\\n     *\\n     * The typehash must conform to the following format:\\n     *  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\\n     *\\n     * If 0x00, all signatures will be considered invalid.\\n     */\\n    function _typeHash() internal view virtual returns (bytes32);\\n\\n    /**\\n     * @dev Extracts the signature deadline from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _deadline() internal pure returns (uint256) {\\n        // The deadline is the first extra argument at the end of the original calldata.\\n        return uint256(_decodeExtraCalldataWord(0));\\n    }\\n\\n    /**\\n     * @dev Extracts the signature parameters from extra calldata.\\n     *\\n     * This function returns bogus data if no signature is included. This is not a security risk, as that data would not\\n     * be considered a valid signature in the first place.\\n     */\\n    function _signature()\\n        internal\\n        pure\\n        returns (\\n            uint8 v,\\n            bytes32 r,\\n            bytes32 s\\n        )\\n    {\\n        // v, r and s are appended after the signature deadline, in that order.\\n        v = uint8(uint256(_decodeExtraCalldataWord(0x20)));\\n        r = _decodeExtraCalldataWord(0x40);\\n        s = _decodeExtraCalldataWord(0x60);\\n    }\\n\\n    /**\\n     * @dev Returns the original calldata, without the extra bytes containing the signature.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _calldata() internal pure returns (bytes memory result) {\\n        result = msg.data; // A calldata to memory assignment results in memory allocation and copy of contents.\\n        if (result.length > _EXTRA_CALLDATA_LENGTH) {\\n            // solhint-disable-next-line no-inline-assembly\\n            assembly {\\n                // We simply overwrite the array length with the reduced one.\\n                mstore(result, sub(calldatasize(), _EXTRA_CALLDATA_LENGTH))\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\\n     *\\n     * This function returns bogus data if no signature is included.\\n     */\\n    function _decodeExtraCalldataWord(uint256 offset) private pure returns (bytes32 result) {\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            result := calldataload(add(sub(calldatasize(), _EXTRA_CALLDATA_LENGTH), offset))\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x6213987a5afd34c9c55e93526487b32d2c8e8847a9fe11503e8b79dacd2ccc35\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/TemporarilyPausable.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\\n * used as an emergency switch in case a security vulnerability or threat is identified.\\n *\\n * The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\\n * unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\\n * system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\\n * analysis later determines there was a false alarm.\\n *\\n * If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\\n * Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\\n * to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\\n *\\n * Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\\n * irreversible.\\n */\\nabstract contract TemporarilyPausable {\\n    // The Pause Window and Buffer Period are timestamp-based: they should not be relied upon for sub-minute accuracy.\\n    // solhint-disable not-rely-on-time\\n\\n    uint256 private constant _MAX_PAUSE_WINDOW_DURATION = 90 days;\\n    uint256 private constant _MAX_BUFFER_PERIOD_DURATION = 30 days;\\n\\n    uint256 private immutable _pauseWindowEndTime;\\n    uint256 private immutable _bufferPeriodEndTime;\\n\\n    bool private _paused;\\n\\n    event PausedStateChanged(bool paused);\\n\\n    constructor(uint256 pauseWindowDuration, uint256 bufferPeriodDuration) {\\n        _require(pauseWindowDuration <= _MAX_PAUSE_WINDOW_DURATION, Errors.MAX_PAUSE_WINDOW_DURATION);\\n        _require(bufferPeriodDuration <= _MAX_BUFFER_PERIOD_DURATION, Errors.MAX_BUFFER_PERIOD_DURATION);\\n\\n        uint256 pauseWindowEndTime = block.timestamp + pauseWindowDuration;\\n\\n        _pauseWindowEndTime = pauseWindowEndTime;\\n        _bufferPeriodEndTime = pauseWindowEndTime + bufferPeriodDuration;\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    modifier whenNotPaused() {\\n        _ensureNotPaused();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\\n     * Period.\\n     */\\n    function getPausedState()\\n        external\\n        view\\n        returns (\\n            bool paused,\\n            uint256 pauseWindowEndTime,\\n            uint256 bufferPeriodEndTime\\n        )\\n    {\\n        paused = !_isNotPaused();\\n        pauseWindowEndTime = _getPauseWindowEndTime();\\n        bufferPeriodEndTime = _getBufferPeriodEndTime();\\n    }\\n\\n    /**\\n     * @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\\n     * unpaused until the end of the Buffer Period.\\n     *\\n     * Once the Buffer Period expires, this function reverts unconditionally.\\n     */\\n    function _setPaused(bool paused) internal {\\n        if (paused) {\\n            _require(block.timestamp < _getPauseWindowEndTime(), Errors.PAUSE_WINDOW_EXPIRED);\\n        } else {\\n            _require(block.timestamp < _getBufferPeriodEndTime(), Errors.BUFFER_PERIOD_EXPIRED);\\n        }\\n\\n        _paused = paused;\\n        emit PausedStateChanged(paused);\\n    }\\n\\n    /**\\n     * @dev Reverts if the contract is paused.\\n     */\\n    function _ensureNotPaused() internal view {\\n        _require(_isNotPaused(), Errors.PAUSED);\\n    }\\n\\n    /**\\n     * @dev Returns true if the contract is unpaused.\\n     *\\n     * Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\\n     * longer accessed.\\n     */\\n    function _isNotPaused() internal view returns (bool) {\\n        // After the Buffer Period, the (inexpensive) timestamp check short-circuits the storage access.\\n        return block.timestamp > _getBufferPeriodEndTime() || !_paused;\\n    }\\n\\n    // These getters lead to reduced bytecode size by inlining the immutable variables in a single place.\\n\\n    function _getPauseWindowEndTime() private view returns (uint256) {\\n        return _pauseWindowEndTime;\\n    }\\n\\n    function _getBufferPeriodEndTime() private view returns (uint256) {\\n        return _bufferPeriodEndTime;\\n    }\\n}\\n\",\"keccak256\":\"0x62ce7916f3c54325cc982b261747de5a1ab411de571af003d746f770969a1e5e\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\\n * Adapted from OpenZeppelin's SafeMath library\\n */\\nlibrary Math {\\n    /**\\n     * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        _require(c >= a, Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        _require((b >= 0 && c >= a) || (b < 0 && c < a), Errors.ADD_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b <= a, Errors.SUB_OVERFLOW);\\n        uint256 c = a - b;\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers of 256 bits.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a >= b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers of 256 bits.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a * b;\\n        _require(a == 0 || c / a == b, Errors.MUL_OVERFLOW);\\n        return c;\\n    }\\n\\n    function divDown(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n        return a / b;\\n    }\\n\\n    function divUp(uint256 a, uint256 b) internal pure returns (uint256) {\\n        _require(b != 0, Errors.ZERO_DIVISION);\\n\\n        if (a == 0) {\\n            return 0;\\n        } else {\\n            return 1 + (a - 1) / b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x98cf5d1e9b91be5a4315c1aa7bf6480e097113c5f9a9200c92d123bc4ece9ec4\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n    /* solhint-disable var-name-mixedcase */\\n    bytes32 private immutable _HASHED_NAME;\\n    bytes32 private immutable _HASHED_VERSION;\\n    bytes32 private immutable _TYPE_HASH;\\n\\n    /* solhint-enable var-name-mixedcase */\\n\\n    /**\\n     * @dev Initializes the domain separator and parameter caches.\\n     *\\n     * The meaning of `name` and `version` is specified in\\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n     *\\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n     * - `version`: the current major version of the signing domain.\\n     *\\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n     * contract upgrade].\\n     */\\n    constructor(string memory name, string memory version) {\\n        _HASHED_NAME = keccak256(bytes(name));\\n        _HASHED_VERSION = keccak256(bytes(version));\\n        _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the domain separator for the current chain.\\n     */\\n    function _domainSeparatorV4() internal view virtual returns (bytes32) {\\n        return keccak256(abi.encode(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION, _getChainId(), address(this)));\\n    }\\n\\n    /**\\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n     * function returns the hash of the fully encoded EIP712 message for this domain.\\n     *\\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n     *\\n     * ```solidity\\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n     *     keccak256(\\\"Mail(address to,string contents)\\\"),\\n     *     mailTo,\\n     *     keccak256(bytes(mailContents))\\n     * )));\\n     * address signer = ECDSA.recover(digest, signature);\\n     * ```\\n     */\\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n        return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", _domainSeparatorV4(), structHash));\\n    }\\n\\n    function _getChainId() private view returns (uint256 chainId) {\\n        // Silence state mutability warning without generating bytecode.\\n        // See https://github.com/ethereum/solidity/issues/10090#issuecomment-741789128 and\\n        // https://github.com/ethereum/solidity/issues/2691\\n        this;\\n\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            chainId := chainid()\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0cf3ec5d6130aac057e69df14b1ff87baf9c6c2cb13bc545952def004e629ac0\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/PoolRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./VaultAuthorization.sol\\\";\\n\\n/**\\n * @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\\n * and helper functions for ensuring correct behavior when working with Pools.\\n */\\nabstract contract PoolRegistry is ReentrancyGuard, VaultAuthorization {\\n    // Each pool is represented by their unique Pool ID. We use `bytes32` for them, for lack of a way to define new\\n    // types.\\n    mapping(bytes32 => bool) private _isPoolRegistered;\\n\\n    // We keep an increasing nonce to make Pool IDs unique. It is interpreted as a `uint80`, but storing it as a\\n    // `uint256` results in reduced bytecode on reads and writes due to the lack of masking.\\n    uint256 private _nextPoolNonce;\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    modifier withRegisteredPool(bytes32 poolId) {\\n        _ensureRegisteredPool(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    modifier onlyPool(bytes32 poolId) {\\n        _ensurePoolIsSender(poolId);\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool.\\n     */\\n    function _ensureRegisteredPool(bytes32 poolId) internal view {\\n        _require(_isPoolRegistered[poolId], Errors.INVALID_POOL_ID);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract.\\n     */\\n    function _ensurePoolIsSender(bytes32 poolId) private view {\\n        _ensureRegisteredPool(poolId);\\n        _require(msg.sender == _getPoolAddress(poolId), Errors.CALLER_NOT_POOL);\\n    }\\n\\n    function registerPool(PoolSpecialization specialization)\\n        external\\n        override\\n        nonReentrant\\n        whenNotPaused\\n        returns (bytes32)\\n    {\\n        // Each Pool is assigned a unique ID based on an incrementing nonce. This assumes there will never be more than\\n        // 2**80 Pools, and the nonce will not overflow.\\n\\n        bytes32 poolId = _toPoolId(msg.sender, specialization, uint80(_nextPoolNonce));\\n\\n        _require(!_isPoolRegistered[poolId], Errors.INVALID_POOL_ID); // Should never happen as Pool IDs are unique.\\n        _isPoolRegistered[poolId] = true;\\n\\n        _nextPoolNonce += 1;\\n\\n        emit PoolRegistered(poolId);\\n        return poolId;\\n    }\\n\\n    function getPool(bytes32 poolId)\\n        external\\n        view\\n        override\\n        withRegisteredPool(poolId)\\n        returns (address, PoolSpecialization)\\n    {\\n        return (_getPoolAddress(poolId), _getPoolSpecialization(poolId));\\n    }\\n\\n    /**\\n     * @dev Creates a Pool ID.\\n     *\\n     * These are deterministically created by packing the Pool's contract address and its specialization setting into\\n     * the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\\n     *\\n     * Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\\n     * unique.\\n     *\\n     * Pool IDs have the following layout:\\n     * | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\\n     * MSB                                                                              LSB\\n     *\\n     * 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\\n     * suffice. However, there's nothing else of interest to store in this extra space.\\n     */\\n    function _toPoolId(\\n        address pool,\\n        PoolSpecialization specialization,\\n        uint80 nonce\\n    ) internal pure returns (bytes32) {\\n        bytes32 serialized;\\n\\n        serialized |= bytes32(uint256(nonce));\\n        serialized |= bytes32(uint256(specialization)) << (10 * 8);\\n        serialized |= bytes32(uint256(pool)) << (12 * 8);\\n\\n        return serialized;\\n    }\\n\\n    /**\\n     * @dev Returns the address of a Pool's contract.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolAddress(bytes32 poolId) internal pure returns (address) {\\n        // 12 byte logical shift left to remove the nonce and specialization setting. We don't need to mask,\\n        // since the logical shift already sets the upper bits to zero.\\n        return address(uint256(poolId) >> (12 * 8));\\n    }\\n\\n    /**\\n     * @dev Returns the specialization setting of a Pool.\\n     *\\n     * Due to how Pool IDs are created, this is done with no storage accesses and costs little gas.\\n     */\\n    function _getPoolSpecialization(bytes32 poolId) internal pure returns (PoolSpecialization specialization) {\\n        // 10 byte logical shift left to remove the nonce, followed by a 2 byte mask to remove the address.\\n        uint256 value = uint256(poolId >> (10 * 8)) & (2**(2 * 8) - 1);\\n\\n        // Casting a value into an enum results in a runtime check that reverts unless the value is within the enum's\\n        // range. Passing an invalid Pool ID to this function would then result in an obscure revert with no reason\\n        // string: we instead perform the check ourselves to help in error diagnosis.\\n\\n        // There are three Pool specialization settings: general, minimal swap info and two tokens, which correspond to\\n        // values 0, 1 and 2.\\n        _require(value < 3, Errors.INVALID_POOL_ID);\\n\\n        // Because we have checked that `value` is within the enum range, we can use assembly to skip the runtime check.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            specialization := value\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xaf06c559c8a964e9b43308003b43cf698bda38d88cc26118b55394017a369327\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/VaultAuthorization.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/helpers/TemporarilyPausable.sol\\\";\\nimport \\\"../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../lib/helpers/SignaturesValidator.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\\n *\\n * Additionally handles relayer access and approval.\\n */\\nabstract contract VaultAuthorization is\\n    IVault,\\n    ReentrancyGuard,\\n    Authentication,\\n    SignaturesValidator,\\n    TemporarilyPausable\\n{\\n    // Ideally, we'd store the type hashes as immutable state variables to avoid computing the hash at runtime, but\\n    // unfortunately immutable variables cannot be used in assembly, so we just keep the precomputed hashes instead.\\n\\n    // _JOIN_TYPE_HASH = keccak256(\\\"JoinPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _JOIN_TYPE_HASH = 0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58;\\n\\n    // _EXIT_TYPE_HASH = keccak256(\\\"ExitPool(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _EXIT_TYPE_HASH = 0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353;\\n\\n    // _SWAP_TYPE_HASH = keccak256(\\\"Swap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _SWAP_TYPE_HASH = 0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe;\\n\\n    // _BATCH_SWAP_TYPE_HASH = keccak256(\\\"BatchSwap(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32 private constant _BATCH_SWAP_TYPE_HASH = 0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a;\\n\\n    // _SET_RELAYER_TYPE_HASH =\\n    //     keccak256(\\\"SetRelayerApproval(bytes calldata,address sender,uint256 nonce,uint256 deadline)\\\");\\n    bytes32\\n        private constant _SET_RELAYER_TYPE_HASH = 0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a;\\n\\n    IAuthorizer private _authorizer;\\n    mapping(address => mapping(address => bool)) private _approvedRelayers;\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\\n     * is, it is a relayer for that function), and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     *\\n     * Should only be applied to external functions.\\n     */\\n    modifier authenticateFor(address user) {\\n        _authenticateFor(user);\\n        _;\\n    }\\n\\n    constructor(IAuthorizer authorizer)\\n        // The Vault is a singleton, so it simply uses its own address to disambiguate action identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n        SignaturesValidator(\\\"Balancer V2 Vault\\\")\\n    {\\n        _authorizer = authorizer;\\n    }\\n\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external override nonReentrant authenticate {\\n        emit AuthorizerChanged(_authorizer, newAuthorizer);\\n        _authorizer = newAuthorizer;\\n    }\\n\\n    function getAuthorizer() external view override returns (IAuthorizer) {\\n        return _authorizer;\\n    }\\n\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external override nonReentrant whenNotPaused authenticateFor(sender) {\\n        _approvedRelayers[sender][relayer] = approved;\\n        emit RelayerApprovalChanged(relayer, sender, approved);\\n    }\\n\\n    function hasApprovedRelayer(address user, address relayer) external view override returns (bool) {\\n        return _hasApprovedRelayer(user, relayer);\\n    }\\n\\n    /**\\n     * @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\\n     * function (that is, it is a relayer for that function) and either:\\n     *  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\\n     *  b) a valid signature from them was appended to the calldata.\\n     */\\n    function _authenticateFor(address user) internal {\\n        if (msg.sender != user) {\\n            // In this context, 'permission to call a function' means 'being a relayer for a function'.\\n            _authenticateCaller();\\n\\n            // Being a relayer is not sufficient: `user` must have also approved the caller either via\\n            // `setRelayerApproval`, or by providing a signature appended to the calldata.\\n            if (!_hasApprovedRelayer(user, msg.sender)) {\\n                _validateSignature(user, Errors.USER_DOESNT_ALLOW_RELAYER);\\n            }\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `user` approved `relayer` to act as a relayer for them.\\n     */\\n    function _hasApprovedRelayer(address user, address relayer) internal view returns (bool) {\\n        return _approvedRelayers[user][relayer];\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view override returns (bool) {\\n        // Access control is delegated to the Authorizer.\\n        return _authorizer.canPerform(actionId, user, address(this));\\n    }\\n\\n    function _typeHash() internal pure override returns (bytes32 hash) {\\n        // This is a simple switch-case statement, trivially written in Solidity by chaining else-if statements, but the\\n        // assembly implementation results in much denser bytecode.\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            // The function selector is located at the first 4 bytes of calldata. We copy the first full calldata\\n            // 256 word, and then perform a logical shift to the right, moving the selector to the least significant\\n            // 4 bytes.\\n            let selector := shr(224, calldataload(0))\\n\\n            // With the selector in the least significant 4 bytes, we can use 4 byte literals with leading zeros,\\n            // resulting in dense bytecode (PUSH4 opcodes).\\n            switch selector\\n                case 0xb95cac28 {\\n                    hash := _JOIN_TYPE_HASH\\n                }\\n                case 0x8bdb3913 {\\n                    hash := _EXIT_TYPE_HASH\\n                }\\n                case 0x52bbbe29 {\\n                    hash := _SWAP_TYPE_HASH\\n                }\\n                case 0x945bcec9 {\\n                    hash := _BATCH_SWAP_TYPE_HASH\\n                }\\n                case 0xfa6e671d {\\n                    hash := _SET_RELAYER_TYPE_HASH\\n                }\\n                default {\\n                    hash := 0x0000000000000000000000000000000000000000000000000000000000000000\\n                }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x9507d046133247f81fb624f7bb5c3797fcd89904a1393b3c6874abf7772e3204\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/BalanceAllocation.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/math/Math.sol\\\";\\n\\n// This library is used to create a data structure that represents a token's balance for a Pool. 'cash' is how many\\n// tokens the Pool has sitting inside of the Vault. 'managed' is how many tokens were withdrawn from the Vault by the\\n// Pool's Asset Manager. 'total' is the sum of these two, and represents the Pool's total token balance, including\\n// tokens that are *not* inside of the Vault.\\n//\\n// 'cash' is updated whenever tokens enter and exit the Vault, while 'managed' is only updated if the reason tokens are\\n// moving is due to an Asset Manager action. This is reflected in the different methods available: 'increaseCash'\\n// and 'decreaseCash' for swaps and add/remove liquidity events, and 'cashToManaged' and 'managedToCash' for events\\n// transferring funds to and from the Asset Manager.\\n//\\n// The Vault disallows the Pool's 'cash' from becoming negative. In other words, it can never use any tokens that are\\n// not inside the Vault.\\n//\\n// One of the goals of this library is to store the entire token balance in a single storage slot, which is why we use\\n// 112 bit unsigned integers for 'cash' and 'managed'. For consistency, we also disallow any combination of 'cash' and\\n// 'managed' that yields a 'total' that doesn't fit in 112 bits.\\n//\\n// The remaining 32 bits of the slot are used to store the most recent block when the total balance changed. This\\n// can be used to implement price oracles that are resilient to 'sandwich' attacks.\\n//\\n// We could use a Solidity struct to pack these three values together in a single storage slot, but unfortunately\\n// Solidity only allows for structs to live in either storage, calldata or memory. Because a memory struct still takes\\n// up a slot in the stack (to store its memory location), and because the entire balance fits in a single stack slot\\n// (two 112 bit values plus the 32 bit block), using memory is strictly less gas performant. Therefore, we do manual\\n// packing and unpacking.\\n//\\n// Since we cannot define new types, we rely on bytes32 to represent these values instead, as it doesn't have any\\n// associated arithmetic operations and therefore reduces the chance of misuse.\\nlibrary BalanceAllocation {\\n    using Math for uint256;\\n\\n    // The 'cash' portion of the balance is stored in the least significant 112 bits of a 256 bit word, while the\\n    // 'managed' part uses the following 112 bits. The most significant 32 bits are used to store the block\\n\\n    /**\\n     * @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed').\\n     */\\n    function total(bytes32 balance) internal pure returns (uint256) {\\n        // Since 'cash' and 'managed' are 112 bit values, we don't need checked arithmetic. Additionally, `toBalance`\\n        // ensures that 'total' always fits in 112 bits.\\n        return cash(balance) + managed(balance);\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens currently in the Vault.\\n     */\\n    function cash(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the amount of Pool tokens that are being managed by an Asset Manager.\\n     */\\n    function managed(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(balance >> 112) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the last block when the total balance changed.\\n     */\\n    function lastChangeBlock(bytes32 balance) internal pure returns (uint256) {\\n        uint256 mask = 2**(32) - 1;\\n        return uint256(balance >> 224) & mask;\\n    }\\n\\n    /**\\n     * @dev Returns the difference in 'managed' between two balances.\\n     */\\n    function managedDelta(bytes32 newBalance, bytes32 oldBalance) internal pure returns (int256) {\\n        // Because `managed` is a 112 bit value, we can safely perform unchecked arithmetic in 256 bits.\\n        return int256(managed(newBalance)) - int256(managed(oldBalance));\\n    }\\n\\n    /**\\n     * @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\\n     * balance of *any* of them last changed.\\n     */\\n    function totalsAndLastChangeBlock(bytes32[] memory balances)\\n        internal\\n        pure\\n        returns (\\n            uint256[] memory results,\\n            uint256 lastChangeBlock_ // Avoid shadowing\\n        )\\n    {\\n        results = new uint256[](balances.length);\\n        lastChangeBlock_ = 0;\\n\\n        for (uint256 i = 0; i < results.length; i++) {\\n            bytes32 balance = balances[i];\\n            results[i] = total(balance);\\n            lastChangeBlock_ = Math.max(lastChangeBlock_, lastChangeBlock(balance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isZero(bytes32 balance) internal pure returns (bool) {\\n        // We simply need to check the least significant 224 bytes of the word: the block does not affect this.\\n        uint256 mask = 2**(224) - 1;\\n        return (uint256(balance) & mask) == 0;\\n    }\\n\\n    /**\\n     * @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\\n     * with zero.\\n     */\\n    function isNotZero(bytes32 balance) internal pure returns (bool) {\\n        return !isZero(balance);\\n    }\\n\\n    /**\\n     * @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\\n     *\\n     * For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits.\\n     */\\n    function toBalance(\\n        uint256 _cash,\\n        uint256 _managed,\\n        uint256 _blockNumber\\n    ) internal pure returns (bytes32) {\\n        uint256 _total = _cash + _managed;\\n\\n        // Since both 'cash' and 'managed' are positive integers, by checking that their sum ('total') fits in 112 bits\\n        // we are also indirectly checking that both 'cash' and 'managed' themselves fit in 112 bits.\\n        _require(_total >= _cash && _total < 2**112, Errors.BALANCE_TOTAL_OVERFLOW);\\n\\n        // We assume the block fits in 32 bits - this is expected to hold for at least a few decades.\\n        return _pack(_cash, _managed, _blockNumber);\\n    }\\n\\n    /**\\n     * @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\\n     * for Asset Manager deposits).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function increaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\\n     * (except for Asset Manager withdrawals).\\n     *\\n     * Updates the last total balance change block, even if `amount` is zero.\\n     */\\n    function decreaseCash(bytes32 balance, uint256 amount) internal view returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 currentManaged = managed(balance);\\n        uint256 newLastChangeBlock = block.number;\\n\\n        return toBalance(newCash, currentManaged, newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\\n     * from the Vault.\\n     */\\n    function cashToManaged(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).sub(amount);\\n        uint256 newManaged = managed(balance).add(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\\n     * into the Vault.\\n     */\\n    function managedToCash(bytes32 balance, uint256 amount) internal pure returns (bytes32) {\\n        uint256 newCash = cash(balance).add(amount);\\n        uint256 newManaged = managed(balance).sub(amount);\\n        uint256 currentLastChangeBlock = lastChangeBlock(balance);\\n\\n        return toBalance(newCash, newManaged, currentLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\\n     * profits or losses. It's the Manager's responsibility to provide a meaningful value.\\n     *\\n     * Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value.\\n     */\\n    function setManaged(bytes32 balance, uint256 newManaged) internal view returns (bytes32) {\\n        uint256 currentCash = cash(balance);\\n        uint256 newLastChangeBlock = block.number;\\n        return toBalance(currentCash, newManaged, newLastChangeBlock);\\n    }\\n\\n    // Alternative mode for Pools with the Two Token specialization setting\\n\\n    // Instead of storing cash and external for each 'token in' a single storage slot, Two Token Pools store the cash\\n    // for both tokens in the same slot, and the managed for both in another one. This reduces the gas cost for swaps,\\n    // because the only slot that needs to be updated is the one with the cash. However, it also means that managing\\n    // balances is more cumbersome, as both tokens need to be read/written at the same time.\\n    //\\n    // The field with both cash balances packed is called sharedCash, and the one with external amounts is called\\n    // sharedManaged. These two are collectively called the 'shared' balance fields. In both of these, the portion\\n    // that corresponds to token A is stored in the least significant 112 bits of a 256 bit word, while token B's part\\n    // uses the next least significant 112 bits.\\n    //\\n    // Because only cash is written to during a swap, we store the last total balance change block with the\\n    // packed cash fields. Typically Pools have a distinct block per token: in the case of Two Token Pools they\\n    // are the same.\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceA(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance) & mask;\\n    }\\n\\n    /**\\n     * @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\\n     * shared cash and managed balances.\\n     */\\n    function _decodeBalanceB(bytes32 sharedBalance) private pure returns (uint256) {\\n        uint256 mask = 2**(112) - 1;\\n        return uint256(sharedBalance >> 112) & mask;\\n    }\\n\\n    // To decode the last balance change block, we can simply use the `blockNumber` function.\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A.\\n     */\\n    function fromSharedToBalanceA(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceA(sharedCash), _decodeBalanceA(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B.\\n     */\\n    function fromSharedToBalanceB(bytes32 sharedCash, bytes32 sharedManaged) internal pure returns (bytes32) {\\n        // Note that we extract the block from the sharedCash field, which is the one that is updated by swaps.\\n        // Both token A and token B use the same block\\n        return toBalance(_decodeBalanceB(sharedCash), _decodeBalanceB(sharedManaged), lastChangeBlock(sharedCash));\\n    }\\n\\n    /**\\n     * @dev Returns the sharedCash shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedCash(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // Both balances are assigned the same block  Since it is possible a single one of them has changed (for\\n        // example, in an Asset Manager update), we keep the latest (largest) one.\\n        uint32 newLastChangeBlock = uint32(Math.max(lastChangeBlock(tokenABalance), lastChangeBlock(tokenBBalance)));\\n\\n        return _pack(cash(tokenABalance), cash(tokenBBalance), newLastChangeBlock);\\n    }\\n\\n    /**\\n     * @dev Returns the sharedManaged shared field, given the current balances for token A and token B.\\n     */\\n    function toSharedManaged(bytes32 tokenABalance, bytes32 tokenBBalance) internal pure returns (bytes32) {\\n        // We don't bother storing a last change block, as it is read from the shared cash field.\\n        return _pack(managed(tokenABalance), managed(tokenBBalance), 0);\\n    }\\n\\n    // Shared functions\\n\\n    /**\\n     * @dev Packs together two uint112 and one uint32 into a bytes32\\n     */\\n    function _pack(\\n        uint256 _leastSignificant,\\n        uint256 _midSignificant,\\n        uint256 _mostSignificant\\n    ) private pure returns (bytes32) {\\n        return bytes32((_mostSignificant << 224) + (_midSignificant << 112) + _leastSignificant);\\n    }\\n}\\n\",\"keccak256\":\"0x20961781812c61dcd2d7f2063598cbe1bdfd806ad9cadb857e3350d2cc132f17\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/helpers/BalancerErrors.sol\\\";\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalanceAllocation.sol\\\";\\nimport \\\"../PoolRegistry.sol\\\";\\n\\nabstract contract TwoTokenPoolsBalance is PoolRegistry {\\n    using BalanceAllocation for bytes32;\\n\\n    // Data for Pools with the Two Token specialization setting\\n    //\\n    // These are similar to the Minimal Swap Info Pool case (because the Pool only has two tokens, and therefore there\\n    // are only two balances to read), but there's a key difference in how data is stored. Keeping a set makes little\\n    // sense, as it will only ever hold two tokens, so we can just store those two directly.\\n    //\\n    // The gas savings associated with using these Pools come from how token balances are stored: cash amounts for token\\n    // A and token B are packed together, as are managed amounts. Because only cash changes in a swap, there's no need\\n    // to write to this second storage slot. A single last change block number for both tokens is stored with the packed\\n    // cash fields.\\n\\n    struct TwoTokenPoolBalances {\\n        bytes32 sharedCash;\\n        bytes32 sharedManaged;\\n    }\\n\\n    // We could just keep a mapping from Pool ID to TwoTokenSharedBalances, but there's an issue: we wouldn't know to\\n    // which tokens those balances correspond. This would mean having to also check which are registered with the Pool.\\n    //\\n    // What we do instead to save those storage reads is keep a nested mapping from the token pair hash to the balances\\n    // struct. The Pool only has two tokens, so only a single entry of this mapping is set (the one that corresponds to\\n    // that pair's hash).\\n    //\\n    // This has the trade-off of making Vault code that interacts with these Pools cumbersome: both balances must be\\n    // accessed at the same time by using both token addresses, and some logic is needed to determine how the pair hash\\n    // is computed. We do this by sorting the tokens, calling the token with the lowest numerical address value token A,\\n    // and the other one token B. In functions where the token arguments could be either A or B, we use X and Y instead.\\n    //\\n    // If users query a token pair containing an unregistered token, the Pool will generate a hash for a mapping entry\\n    // that was not set, and return zero balances. Non-zero balances are only possible if both tokens in the pair\\n    // are registered with the Pool, which means we don't have to check the TwoTokenPoolTokens struct, and can save\\n    // storage reads.\\n\\n    struct TwoTokenPoolTokens {\\n        IERC20 tokenA;\\n        IERC20 tokenB;\\n        mapping(bytes32 => TwoTokenPoolBalances) balances;\\n    }\\n\\n    mapping(bytes32 => TwoTokenPoolTokens) private _twoTokenPoolTokens;\\n\\n    /**\\n     * @dev Registers tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must not be the same\\n     * - The tokens must be ordered: tokenX < tokenY\\n     */\\n    function _registerTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        // Not technically true since we didn't register yet, but this is consistent with the error messages of other\\n        // specialization settings.\\n        _require(tokenX != tokenY, Errors.TOKEN_ALREADY_REGISTERED);\\n\\n        _require(tokenX < tokenY, Errors.UNSORTED_TOKENS);\\n\\n        // A Two Token Pool with no registered tokens is identified by having zero addresses for tokens A and B.\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        _require(poolTokens.tokenA == IERC20(0) && poolTokens.tokenB == IERC20(0), Errors.TOKENS_ALREADY_SET);\\n\\n        // Since tokenX < tokenY, tokenX is A and tokenY is B\\n        poolTokens.tokenA = tokenX;\\n        poolTokens.tokenB = tokenY;\\n\\n        // Note that we don't initialize the balance mapping: the default value of zero corresponds to an empty\\n        // balance.\\n    }\\n\\n    /**\\n     * @dev Deregisters tokens in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     *\\n     * Requirements:\\n     *\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     * - both tokens must have zero balance in the Vault\\n     */\\n    function _deregisterTwoTokenPoolTokens(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    ) internal {\\n        (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        ) = _getTwoTokenPoolSharedBalances(poolId, tokenX, tokenY);\\n\\n        _require(balanceA.isZero() && balanceB.isZero(), Errors.NONZERO_TOKEN_BALANCE);\\n\\n        delete _twoTokenPoolTokens[poolId];\\n\\n        // For consistency with other Pool specialization settings, we explicitly reset the packed cash field (which may\\n        // have a non-zero last change block).\\n        delete poolBalances.sharedCash;\\n    }\\n\\n    /**\\n     * @dev Sets the cash balances of a Two Token Pool's tokens.\\n     *\\n     * WARNING: this assumes `tokenA` and `tokenB` are the Pool's two registered tokens, and are in the correct order.\\n     */\\n    function _setTwoTokenPoolCashBalances(\\n        bytes32 poolId,\\n        IERC20 tokenA,\\n        bytes32 balanceA,\\n        IERC20 tokenB,\\n        bytes32 balanceB\\n    ) internal {\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        TwoTokenPoolBalances storage poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n        poolBalances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from cash into managed.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolCashToManaged(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.cashToManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Transforms `amount` of `token`'s balance in a Two Token Pool from managed into cash.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     */\\n    function _twoTokenPoolManagedToCash(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal {\\n        _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.managedToCash, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s managed balance in a Two Token Pool to `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _setTwoTokenPoolManagedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        uint256 amount\\n    ) internal returns (int256) {\\n        return _updateTwoTokenPoolSharedBalance(poolId, token, BalanceAllocation.setManaged, amount);\\n    }\\n\\n    /**\\n     * @dev Sets `token`'s balance in a Two Token Pool to the result of the `mutation` function when called with\\n     * the current balance and `amount`.\\n     *\\n     * This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\\n     * registered for that Pool.\\n     *\\n     * Returns the managed balance delta as a result of this call.\\n     */\\n    function _updateTwoTokenPoolSharedBalance(\\n        bytes32 poolId,\\n        IERC20 token,\\n        function(bytes32, uint256) returns (bytes32) mutation,\\n        uint256 amount\\n    ) private returns (int256) {\\n        (\\n            TwoTokenPoolBalances storage balances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            ,\\n            bytes32 balanceB\\n        ) = _getTwoTokenPoolBalances(poolId);\\n\\n        int256 delta;\\n        if (token == tokenA) {\\n            bytes32 newBalance = mutation(balanceA, amount);\\n            delta = newBalance.managedDelta(balanceA);\\n            balanceA = newBalance;\\n        } else {\\n            // token == tokenB\\n            bytes32 newBalance = mutation(balanceB, amount);\\n            delta = newBalance.managedDelta(balanceB);\\n            balanceB = newBalance;\\n        }\\n\\n        balances.sharedCash = BalanceAllocation.toSharedCash(balanceA, balanceB);\\n        balances.sharedManaged = BalanceAllocation.toSharedManaged(balanceA, balanceB);\\n\\n        return delta;\\n    }\\n\\n    /*\\n     * @dev Returns an array with all the tokens and balances in a Two Token Pool. The order may change when\\n     * tokens are registered or deregistered.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _getTwoTokenPoolTokens(bytes32 poolId)\\n        internal\\n        view\\n        returns (IERC20[] memory tokens, bytes32[] memory balances)\\n    {\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        // Both tokens will either be zero (if unregistered) or non-zero (if registered), but we keep the full check for\\n        // clarity.\\n        if (tokenA == IERC20(0) || tokenB == IERC20(0)) {\\n            return (new IERC20[](0), new bytes32[](0));\\n        }\\n\\n        // Note that functions relying on this getter expect tokens to be properly ordered, so we use the (A, B)\\n        // ordering.\\n\\n        tokens = new IERC20[](2);\\n        tokens[0] = tokenA;\\n        tokens[1] = tokenB;\\n\\n        balances = new bytes32[](2);\\n        balances[0] = balanceA;\\n        balances[1] = balanceB;\\n    }\\n\\n    /**\\n     * @dev Same as `_getTwoTokenPoolTokens`, except it returns the two tokens and balances directly instead of using\\n     * an array, as well as a storage pointer to the `TwoTokenPoolBalances` struct, which can be used to update it\\n     * without having to recompute the pair hash and storage slot.\\n     */\\n    function _getTwoTokenPoolBalances(bytes32 poolId)\\n        private\\n        view\\n        returns (\\n            TwoTokenPoolBalances storage poolBalances,\\n            IERC20 tokenA,\\n            bytes32 balanceA,\\n            IERC20 tokenB,\\n            bytes32 balanceB\\n        )\\n    {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n        tokenA = poolTokens.tokenA;\\n        tokenB = poolTokens.tokenB;\\n\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n        poolBalances = poolTokens.balances[pairHash];\\n\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns the balance of a token in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the General specialization setting.\\n     *\\n     * This function is convenient but not particularly gas efficient, and should be avoided during gas-sensitive\\n     * operations, such as swaps. For those, _getTwoTokenPoolSharedBalances provides a more flexible interface.\\n     *\\n     * Requirements:\\n     *\\n     * - `token` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolBalance(bytes32 poolId, IERC20 token) internal view returns (bytes32) {\\n        // We can't just read the balance of token, because we need to know the full pair in order to compute the pair\\n        // hash and access the balance mapping. We therefore rely on `_getTwoTokenPoolBalances`.\\n        (, IERC20 tokenA, bytes32 balanceA, IERC20 tokenB, bytes32 balanceB) = _getTwoTokenPoolBalances(poolId);\\n\\n        if (token == tokenA) {\\n            return balanceA;\\n        } else if (token == tokenB) {\\n            return balanceB;\\n        } else {\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the balance of the two tokens in a Two Token Pool.\\n     *\\n     * The returned balances are those of token A and token B, where token A is the lowest of token X and token Y, and\\n     * token B the other.\\n     *\\n     * This function also returns a storage pointer to the TwoTokenPoolBalances struct associated with the token pair,\\n     * which can be used to update it without having to recompute the pair hash and storage slot.\\n     *\\n     * Requirements:\\n     *\\n     * - `poolId` must be a Minimal Swap Info Pool\\n     * - `tokenX` and `tokenY` must be registered in the Pool\\n     */\\n    function _getTwoTokenPoolSharedBalances(\\n        bytes32 poolId,\\n        IERC20 tokenX,\\n        IERC20 tokenY\\n    )\\n        internal\\n        view\\n        returns (\\n            bytes32 balanceA,\\n            bytes32 balanceB,\\n            TwoTokenPoolBalances storage poolBalances\\n        )\\n    {\\n        (IERC20 tokenA, IERC20 tokenB) = _sortTwoTokens(tokenX, tokenY);\\n        bytes32 pairHash = _getTwoTokenPairHash(tokenA, tokenB);\\n\\n        poolBalances = _twoTokenPoolTokens[poolId].balances[pairHash];\\n\\n        // Because we're reading balances using the pair hash, if either token X or token Y is not registered then\\n        // *both* balance entries will be zero.\\n        bytes32 sharedCash = poolBalances.sharedCash;\\n        bytes32 sharedManaged = poolBalances.sharedManaged;\\n\\n        // A non-zero balance guarantees that both tokens are registered. If zero, we manually check whether each\\n        // token is registered in the Pool. Token registration implies that the Pool is registered as well, which\\n        // lets us save gas by not performing the check.\\n        bool tokensRegistered = sharedCash.isNotZero() ||\\n            sharedManaged.isNotZero() ||\\n            (_isTwoTokenPoolTokenRegistered(poolId, tokenA) && _isTwoTokenPoolTokenRegistered(poolId, tokenB));\\n\\n        if (!tokensRegistered) {\\n            // The tokens might not be registered because the Pool itself is not registered. We check this to provide a\\n            // more accurate revert reason.\\n            _ensureRegisteredPool(poolId);\\n            _revert(Errors.TOKEN_NOT_REGISTERED);\\n        }\\n\\n        balanceA = BalanceAllocation.fromSharedToBalanceA(sharedCash, sharedManaged);\\n        balanceB = BalanceAllocation.fromSharedToBalanceB(sharedCash, sharedManaged);\\n    }\\n\\n    /**\\n     * @dev Returns true if `token` is registered in a Two Token Pool.\\n     *\\n     * This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\\n     */\\n    function _isTwoTokenPoolTokenRegistered(bytes32 poolId, IERC20 token) internal view returns (bool) {\\n        TwoTokenPoolTokens storage poolTokens = _twoTokenPoolTokens[poolId];\\n\\n        // The zero address can never be a registered token.\\n        return (token == poolTokens.tokenA || token == poolTokens.tokenB) && token != IERC20(0);\\n    }\\n\\n    /**\\n     * @dev Returns the hash associated with a given token pair.\\n     */\\n    function _getTwoTokenPairHash(IERC20 tokenA, IERC20 tokenB) private pure returns (bytes32) {\\n        return keccak256(abi.encodePacked(tokenA, tokenB));\\n    }\\n\\n    /**\\n     * @dev Sorts two tokens in ascending order, returning them as a (tokenA, tokenB) tuple.\\n     */\\n    function _sortTwoTokens(IERC20 tokenX, IERC20 tokenY) private pure returns (IERC20, IERC20) {\\n        return tokenX < tokenY ? (tokenX, tokenY) : (tokenY, tokenX);\\n    }\\n}\\n\",\"keccak256\":\"0x2cd5a8f9bee0addefa4e63cb7380f9b133d2e482807603fed931d42e3e1f40f4\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [
              {
                "astId": 5143,
                "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                "label": "_status",
                "offset": 0,
                "slot": "0",
                "type": "t_uint256"
              },
              {
                "astId": 1061,
                "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                "label": "_nextNonce",
                "offset": 0,
                "slot": "1",
                "type": "t_mapping(t_address,t_uint256)"
              },
              {
                "astId": 1309,
                "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                "label": "_paused",
                "offset": 0,
                "slot": "2",
                "type": "t_bool"
              },
              {
                "astId": 18222,
                "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                "label": "_authorizer",
                "offset": 1,
                "slot": "2",
                "type": "t_contract(IAuthorizer)20660"
              },
              {
                "astId": 18228,
                "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                "label": "_approvedRelayers",
                "offset": 0,
                "slot": "3",
                "type": "t_mapping(t_address,t_mapping(t_address,t_bool))"
              },
              {
                "astId": 15355,
                "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                "label": "_isPoolRegistered",
                "offset": 0,
                "slot": "4",
                "type": "t_mapping(t_bytes32,t_bool)"
              },
              {
                "astId": 15357,
                "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                "label": "_nextPoolNonce",
                "offset": 0,
                "slot": "5",
                "type": "t_uint256"
              },
              {
                "astId": 19947,
                "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                "label": "_twoTokenPoolTokens",
                "offset": 0,
                "slot": "6",
                "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)"
              }
            ],
            "types": {
              "t_address": {
                "encoding": "inplace",
                "label": "address",
                "numberOfBytes": "20"
              },
              "t_bool": {
                "encoding": "inplace",
                "label": "bool",
                "numberOfBytes": "1"
              },
              "t_bytes32": {
                "encoding": "inplace",
                "label": "bytes32",
                "numberOfBytes": "32"
              },
              "t_contract(IAuthorizer)20660": {
                "encoding": "inplace",
                "label": "contract IAuthorizer",
                "numberOfBytes": "20"
              },
              "t_contract(IERC20)5095": {
                "encoding": "inplace",
                "label": "contract IERC20",
                "numberOfBytes": "20"
              },
              "t_mapping(t_address,t_bool)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_address,t_mapping(t_address,t_bool))": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => mapping(address => bool))",
                "numberOfBytes": "32",
                "value": "t_mapping(t_address,t_bool)"
              },
              "t_mapping(t_address,t_uint256)": {
                "encoding": "mapping",
                "key": "t_address",
                "label": "mapping(address => uint256)",
                "numberOfBytes": "32",
                "value": "t_uint256"
              },
              "t_mapping(t_bytes32,t_bool)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => bool)",
                "numberOfBytes": "32",
                "value": "t_bool"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolBalances)19934_storage"
              },
              "t_mapping(t_bytes32,t_struct(TwoTokenPoolTokens)19943_storage)": {
                "encoding": "mapping",
                "key": "t_bytes32",
                "label": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens)",
                "numberOfBytes": "32",
                "value": "t_struct(TwoTokenPoolTokens)19943_storage"
              },
              "t_struct(TwoTokenPoolBalances)19934_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances",
                "members": [
                  {
                    "astId": 19931,
                    "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                    "label": "sharedCash",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_bytes32"
                  },
                  {
                    "astId": 19933,
                    "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                    "label": "sharedManaged",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_bytes32"
                  }
                ],
                "numberOfBytes": "64"
              },
              "t_struct(TwoTokenPoolTokens)19943_storage": {
                "encoding": "inplace",
                "label": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens",
                "members": [
                  {
                    "astId": 19936,
                    "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                    "label": "tokenA",
                    "offset": 0,
                    "slot": "0",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19938,
                    "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                    "label": "tokenB",
                    "offset": 0,
                    "slot": "1",
                    "type": "t_contract(IERC20)5095"
                  },
                  {
                    "astId": 19942,
                    "contract": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol:TwoTokenPoolsBalance",
                    "label": "balances",
                    "offset": 0,
                    "slot": "2",
                    "type": "t_mapping(t_bytes32,t_struct(TwoTokenPoolBalances)19934_storage)"
                  }
                ],
                "numberOfBytes": "96"
              },
              "t_uint256": {
                "encoding": "inplace",
                "label": "uint256",
                "numberOfBytes": "32"
              }
            }
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IAsset.sol": {
        "IAsset": {
          "abi": [],
          "devdoc": {
            "details": "This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like types. This concept is unrelated to a Pool's Asset Managers.",
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like types. This concept is unrelated to a Pool's Asset Managers.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IAsset.sol\":\"IAsset\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IAuthorizer.sol": {
        "IAuthorizer": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "actionId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "where",
                  "type": "address"
                }
              ],
              "name": "canPerform",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "canPerform(bytes32,address,address)": {
                "details": "Returns true if `account` can perform the action described by `actionId` in the contract `where`."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "canPerform(bytes32,address,address)": "9be2a884"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"actionId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"}],\"name\":\"canPerform\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"canPerform(bytes32,address,address)\":{\"details\":\"Returns true if `account` can perform the action described by `actionId` in the contract `where`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":\"IAuthorizer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IBasePool.sol": {
        "IBasePool": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onExitPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "dueProtocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onJoinPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "dueProtocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from either IGeneralPool or IMinimalSwapInfoPool",
            "kind": "dev",
            "methods": {
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares."
              },
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "74f3b009",
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "d5c096c4"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onExitPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"dueProtocolFeeAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onJoinPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"dueProtocolFeeAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from either IGeneralPool or IMinimalSwapInfoPool\",\"kind\":\"dev\",\"methods\":{\"onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares.\"},\"onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IBasePool.sol\":\"IBasePool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol": {
        "IFlashLoanRecipient": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "feeAmounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "receiveFlashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "kind": "dev",
            "methods": {
              "receiveFlashLoan(address[],uint256[],uint256[],bytes)": {
                "details": "When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient. At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the Vault, or else the entire flash loan will revert. `userData` is the same value passed in the `IVault.flashLoan` call."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "receiveFlashLoan(address[],uint256[],uint256[],bytes)": "f04f2707"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"feeAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"receiveFlashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"receiveFlashLoan(address[],uint256[],uint256[],bytes)\":{\"details\":\"When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient. At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the Vault, or else the entire flash loan will revert. `userData` is the same value passed in the `IVault.flashLoan` call.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":\"IFlashLoanRecipient\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IGeneralPool.sol": {
        "IGeneralPool": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onExitPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "dueProtocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onJoinPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "dueProtocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "lastChangeBlock",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "from",
                      "type": "address"
                    },
                    {
                      "internalType": "address",
                      "name": "to",
                      "type": "address"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IPoolSwapStructs.SwapRequest",
                  "name": "swapRequest",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "indexIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "indexOut",
                  "type": "uint256"
                }
              ],
              "name": "onSwap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "IPools with the General specialization setting should implement this interface. This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool. Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant to the pool in a 'given out' swap. This can often be implemented by a `view` function, since many pricing algorithms don't need to track state changes in swaps. However, contracts implementing this in non-view functions should check that the caller is indeed the Vault.",
            "kind": "dev",
            "methods": {
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares."
              },
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "74f3b009",
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "d5c096c4",
              "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": "01ec954a"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onExitPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"dueProtocolFeeAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onJoinPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"dueProtocolFeeAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IPoolSwapStructs.SwapRequest\",\"name\":\"swapRequest\",\"type\":\"tuple\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"indexIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexOut\",\"type\":\"uint256\"}],\"name\":\"onSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"IPools with the General specialization setting should implement this interface. This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool. Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant to the pool in a 'given out' swap. This can often be implemented by a `view` function, since many pricing algorithms don't need to track state changes in swaps. However, contracts implementing this in non-view functions should check that the caller is indeed the Vault.\",\"kind\":\"dev\",\"methods\":{\"onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares.\"},\"onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":\"IGeneralPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IGeneralPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev IPools with the General specialization setting should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\\n * grant to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IGeneralPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256[] memory balances,\\n        uint256 indexIn,\\n        uint256 indexOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7f11733a5cd8f81c123c02f79d94ead7b65217021ebddafda10e796a25e1ef41\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol": {
        "IMinimalSwapInfoPool": {
          "abi": [
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onExitPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "amountsOut",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "dueProtocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "protocolSwapFeePercentage",
                  "type": "uint256"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "onJoinPool",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "amountsIn",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "dueProtocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "tokenOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "lastChangeBlock",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "from",
                      "type": "address"
                    },
                    {
                      "internalType": "address",
                      "name": "to",
                      "type": "address"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IPoolSwapStructs.SwapRequest",
                  "name": "swapRequest",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "currentBalanceTokenIn",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "currentBalanceTokenOut",
                  "type": "uint256"
                }
              ],
              "name": "onSwap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface. This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool. Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant to the pool in a 'given out' swap. This can often be implemented by a `view` function, since many pricing algorithms don't need to track state changes in swaps. However, contracts implementing this in non-view functions should check that the caller is indeed the Vault.",
            "kind": "dev",
            "methods": {
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares."
              },
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": {
                "details": "Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "74f3b009",
              "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": "d5c096c4",
              "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": "9d2c110c"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onExitPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"dueProtocolFeeAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolSwapFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"onJoinPool\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"dueProtocolFeeAmounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IPoolSwapStructs.SwapRequest\",\"name\":\"swapRequest\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"currentBalanceTokenIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentBalanceTokenOut\",\"type\":\"uint256\"}],\"name\":\"onSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface. This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool. Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant to the pool in a 'given out' swap. This can often be implemented by a `view` function, since many pricing algorithms don't need to track state changes in swaps. However, contracts implementing this in non-view functions should check that the caller is indeed the Vault.\",\"kind\":\"dev\",\"methods\":{\"onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`, as well as collect the reported amount in protocol fees, which the Pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share. `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as burning pool shares.\"},\"onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)\":{\"details\":\"Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault. The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`. Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join. `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return. `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total balance. `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.) Contracts implementing this function should check that the caller is indeed the Vault before performing any state-changing operations, such as minting pool shares.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol\":\"IMinimalSwapInfoPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IBasePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IVault.sol\\\";\\nimport \\\"./IPoolSwapStructs.sol\\\";\\n\\n/**\\n * @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\\n * the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\\n * either IGeneralPool or IMinimalSwapInfoPool\\n */\\ninterface IBasePool is IPoolSwapStructs {\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\\n     * each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\\n     * The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\\n     * the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\\n     *\\n     * `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\\n     * designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\\n     * for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as minting pool shares.\\n     */\\n    function onJoinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsIn, uint256[] memory dueProtocolFeeAmounts);\\n\\n    /**\\n     * @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\\n     * tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\\n     * to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\\n     * as well as collect the reported amount in protocol fees, which the Pool should calculate based on\\n     * `protocolSwapFeePercentage`.\\n     *\\n     * Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\\n     *\\n     * `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\\n     * to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\\n     * the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\\n     *\\n     * `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\\n     * balance.\\n     *\\n     * `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\\n     * exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\\n     *\\n     * Contracts implementing this function should check that the caller is indeed the Vault before performing any\\n     * state-changing operations, such as burning pool shares.\\n     */\\n    function onExitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        uint256[] memory balances,\\n        uint256 lastChangeBlock,\\n        uint256 protocolSwapFeePercentage,\\n        bytes memory userData\\n    ) external returns (uint256[] memory amountsOut, uint256[] memory dueProtocolFeeAmounts);\\n}\\n\",\"keccak256\":\"0x1fdce4de26cad355f4ad93e4a5b66d5a5692c4cd2f0b6c2bb2c3aef3ee49422f\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IBasePool.sol\\\";\\n\\n/**\\n * @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\\n *\\n * This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\\n * Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\\n * to the pool in a 'given out' swap.\\n *\\n * This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\\n * changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\\n * indeed the Vault.\\n */\\ninterface IMinimalSwapInfoPool is IBasePool {\\n    function onSwap(\\n        SwapRequest memory swapRequest,\\n        uint256 currentBalanceTokenIn,\\n        uint256 currentBalanceTokenOut\\n    ) external returns (uint256 amount);\\n}\\n\",\"keccak256\":\"0x7469919e147c0db8b4f290d310ca3816dec5d3c6cc6b258cf6e0df820a20a179\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IPoolSwapStructs.sol": {
        "IPoolSwapStructs": {
          "abi": [],
          "devdoc": {
            "kind": "dev",
            "methods": {},
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {}
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":\"IPoolSwapStructs\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IPoolSwapStructs.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IVault.sol\\\";\\n\\ninterface IPoolSwapStructs {\\n    // This is not really an interface - it just defines common structs used by other interfaces: IGeneralPool and\\n    // IMinimalSwapInfoPool.\\n    //\\n    // This data structure represents a request for a token swap, where `kind` indicates the swap type ('given in' or\\n    // 'given out') which indicates whether or not the amount sent by the pool is known.\\n    //\\n    // The pool receives `tokenIn` and sends `tokenOut`. `amount` is the number of `tokenIn` tokens the pool will take\\n    // in, or the number of `tokenOut` tokens the Pool will send out, depending on the given swap `kind`.\\n    //\\n    // All other fields are not strictly necessary for most swaps, but are provided to support advanced scenarios in\\n    // some Pools.\\n    //\\n    // `poolId` is the ID of the Pool involved in the swap - this is useful for Pool contracts that implement more than\\n    // one Pool.\\n    //\\n    // The meaning of `lastChangeBlock` depends on the Pool specialization:\\n    //  - Two Token or Minimal Swap Info: the last block in which either `tokenIn` or `tokenOut` changed its total\\n    //    balance.\\n    //  - General: the last block in which *any* of the Pool's registered tokens changed its total balance.\\n    //\\n    // `from` is the origin address for the funds the Pool receives, and `to` is the destination address\\n    // where the Pool sends the outgoing tokens.\\n    //\\n    // `userData` is extra data provided by the caller - typically a signature from a trusted party.\\n    struct SwapRequest {\\n        IVault.SwapKind kind;\\n        IERC20 tokenIn;\\n        IERC20 tokenOut;\\n        uint256 amount;\\n        // Misc data\\n        bytes32 poolId;\\n        uint256 lastChangeBlock;\\n        address from;\\n        address to;\\n        bytes userData;\\n    }\\n}\\n\",\"keccak256\":\"0xe32bcd1cce37949796369b0026cf5cf34eb7273fa50ac239186e8cd4b822e196\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/ISignaturesValidator.sol": {
        "ISignaturesValidator": {
          "abi": [
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Interface for the SignatureValidator helper, used to support meta-transactions.",
            "kind": "dev",
            "methods": {
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "getDomainSeparator()": "ed24911d",
              "getNextNonce(address)": "90193b7c"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface for the SignatureValidator helper, used to support meta-transactions.\",\"kind\":\"dev\",\"methods\":{\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":\"ISignaturesValidator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IVault.sol": {
        "IVault": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "oldAuthorizer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "AuthorizerChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "ExternalBalanceTransfer",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "delta",
                  "type": "int256"
                }
              ],
              "name": "InternalBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "liquidityProvider",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "int256[]",
                  "name": "deltas",
                  "type": "int256[]"
                },
                {
                  "indexed": false,
                  "internalType": "uint256[]",
                  "name": "protocolFeeAmounts",
                  "type": "uint256[]"
                }
              ],
              "name": "PoolBalanceChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "cashDelta",
                  "type": "int256"
                },
                {
                  "indexed": false,
                  "internalType": "int256",
                  "name": "managedDelta",
                  "type": "int256"
                }
              ],
              "name": "PoolBalanceManaged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "PoolRegistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "RelayerApprovalChanged",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenIn",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "contract IERC20",
                  "name": "tokenOut",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountIn",
                  "type": "uint256"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "amountOut",
                  "type": "uint256"
                }
              ],
              "name": "Swap",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "TokensDeregistered",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": false,
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "indexed": false,
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "indexed": false,
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "TokensRegistered",
              "type": "event"
            },
            {
              "inputs": [],
              "name": "WETH",
              "outputs": [
                {
                  "internalType": "contract IWETH",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "int256[]",
                  "name": "limits",
                  "type": "int256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "batchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "newAuthorizer",
                  "type": "address"
                }
              ],
              "name": "changeAuthorizer",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "deregisterTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address payable",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "minAmountsOut",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.ExitPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "exitPool",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "contract IFlashLoanRecipient",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "amounts",
                  "type": "uint256[]"
                },
                {
                  "internalType": "bytes",
                  "name": "userData",
                  "type": "bytes"
                }
              ],
              "name": "flashLoan",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getAuthorizer",
              "outputs": [
                {
                  "internalType": "contract IAuthorizer",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getDomainSeparator",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                }
              ],
              "name": "getInternalBalance",
              "outputs": [
                {
                  "internalType": "uint256[]",
                  "name": "",
                  "type": "uint256[]"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                }
              ],
              "name": "getNextNonce",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPool",
              "outputs": [
                {
                  "internalType": "address",
                  "name": "",
                  "type": "address"
                },
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "",
                  "type": "uint8"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20",
                  "name": "token",
                  "type": "address"
                }
              ],
              "name": "getPoolTokenInfo",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "cash",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "managed",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                },
                {
                  "internalType": "address",
                  "name": "assetManager",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                }
              ],
              "name": "getPoolTokens",
              "outputs": [
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "uint256[]",
                  "name": "balances",
                  "type": "uint256[]"
                },
                {
                  "internalType": "uint256",
                  "name": "lastChangeBlock",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "getProtocolFeesCollector",
              "outputs": [
                {
                  "internalType": "contract ProtocolFeesCollector",
                  "name": "",
                  "type": "address"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "user",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                }
              ],
              "name": "hasApprovedRelayer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "components": [
                    {
                      "internalType": "contract IAsset[]",
                      "name": "assets",
                      "type": "address[]"
                    },
                    {
                      "internalType": "uint256[]",
                      "name": "maxAmountsIn",
                      "type": "uint256[]"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.JoinPoolRequest",
                  "name": "request",
                  "type": "tuple"
                }
              ],
              "name": "joinPool",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.PoolBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "contract IERC20",
                      "name": "token",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    }
                  ],
                  "internalType": "struct IVault.PoolBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "managePoolBalance",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "enum IVault.UserBalanceOpKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "asset",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    }
                  ],
                  "internalType": "struct IVault.UserBalanceOp[]",
                  "name": "ops",
                  "type": "tuple[]"
                }
              ],
              "name": "manageUserBalance",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.SwapKind",
                  "name": "kind",
                  "type": "uint8"
                },
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetInIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "assetOutIndex",
                      "type": "uint256"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.BatchSwapStep[]",
                  "name": "swaps",
                  "type": "tuple[]"
                },
                {
                  "internalType": "contract IAsset[]",
                  "name": "assets",
                  "type": "address[]"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                }
              ],
              "name": "queryBatchSwap",
              "outputs": [
                {
                  "internalType": "int256[]",
                  "name": "assetDeltas",
                  "type": "int256[]"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "enum IVault.PoolSpecialization",
                  "name": "specialization",
                  "type": "uint8"
                }
              ],
              "name": "registerPool",
              "outputs": [
                {
                  "internalType": "bytes32",
                  "name": "",
                  "type": "bytes32"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bytes32",
                  "name": "poolId",
                  "type": "bytes32"
                },
                {
                  "internalType": "contract IERC20[]",
                  "name": "tokens",
                  "type": "address[]"
                },
                {
                  "internalType": "address[]",
                  "name": "assetManagers",
                  "type": "address[]"
                }
              ],
              "name": "registerTokens",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "bool",
                  "name": "paused",
                  "type": "bool"
                }
              ],
              "name": "setPaused",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "relayer",
                  "type": "address"
                },
                {
                  "internalType": "bool",
                  "name": "approved",
                  "type": "bool"
                }
              ],
              "name": "setRelayerApproval",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "components": [
                    {
                      "internalType": "bytes32",
                      "name": "poolId",
                      "type": "bytes32"
                    },
                    {
                      "internalType": "enum IVault.SwapKind",
                      "name": "kind",
                      "type": "uint8"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetIn",
                      "type": "address"
                    },
                    {
                      "internalType": "contract IAsset",
                      "name": "assetOut",
                      "type": "address"
                    },
                    {
                      "internalType": "uint256",
                      "name": "amount",
                      "type": "uint256"
                    },
                    {
                      "internalType": "bytes",
                      "name": "userData",
                      "type": "bytes"
                    }
                  ],
                  "internalType": "struct IVault.SingleSwap",
                  "name": "singleSwap",
                  "type": "tuple"
                },
                {
                  "components": [
                    {
                      "internalType": "address",
                      "name": "sender",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "fromInternalBalance",
                      "type": "bool"
                    },
                    {
                      "internalType": "address payable",
                      "name": "recipient",
                      "type": "address"
                    },
                    {
                      "internalType": "bool",
                      "name": "toInternalBalance",
                      "type": "bool"
                    }
                  ],
                  "internalType": "struct IVault.FundManagement",
                  "name": "funds",
                  "type": "tuple"
                },
                {
                  "internalType": "uint256",
                  "name": "limit",
                  "type": "uint256"
                },
                {
                  "internalType": "uint256",
                  "name": "deadline",
                  "type": "uint256"
                }
              ],
              "name": "swap",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "payable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Full external interface for the Vault core contract - no external or public methods exist in the contract that don't override one of these declarations.",
            "events": {
              "ExternalBalanceTransfer(address,address,address,uint256)": {
                "details": "Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account."
              },
              "InternalBalanceChanged(address,address,int256)": {
                "details": "Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through interacting with Pools using Internal Balance. Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH address."
              },
              "PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])": {
                "details": "Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively."
              },
              "PoolBalanceManaged(bytes32,address,address,int256,int256)": {
                "details": "Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`."
              },
              "PoolRegistered(bytes32)": {
                "details": "Emitted when a Pool is registered by calling `registerPool`."
              },
              "Swap(bytes32,address,address,uint256,uint256)": {
                "details": "Emitted for each individual swap performed by `swap` or `batchSwap`."
              },
              "TokensDeregistered(bytes32,address[])": {
                "details": "Emitted when a Pool deregisters tokens by calling `deregisterTokens`."
              },
              "TokensRegistered(bytes32,address[],address[])": {
                "details": "Emitted when a Pool registers tokens by calling `registerTokens`."
              }
            },
            "kind": "dev",
            "methods": {
              "WETH()": {
                "details": "Returns the Vault's WETH instance."
              },
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": {
                "details": "Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events."
              },
              "changeAuthorizer(address)": {
                "details": "Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event."
              },
              "deregisterTokens(bytes32,address[])": {
                "details": "Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event."
              },
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event."
              },
              "flashLoan(address,address[],uint256[],bytes)": {
                "details": "Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call."
              },
              "getAuthorizer()": {
                "details": "Returns the Vault's Authorizer."
              },
              "getDomainSeparator()": {
                "details": "Returns the EIP712 domain separator."
              },
              "getInternalBalance(address,address[])": {
                "details": "Returns `user`'s Internal Balance for a set of tokens."
              },
              "getNextNonce(address)": {
                "details": "Returns the next nonce used by an address to sign messages."
              },
              "getPool(bytes32)": {
                "details": "Returns a Pool's contract address and specialization setting."
              },
              "getPoolTokenInfo(bytes32,address)": {
                "details": "Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager."
              },
              "getPoolTokens(bytes32)": {
                "details": "Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead."
              },
              "getProtocolFeesCollector()": {
                "details": "Returns the current protocol fee module."
              },
              "hasApprovedRelayer(address,address)": {
                "details": "Returns true if `user` has approved `relayer` to act as a relayer for them."
              },
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": {
                "details": "Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event."
              },
              "managePoolBalance((uint8,bytes32,address,uint256)[])": {
                "details": "Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
              },
              "manageUserBalance((uint8,address,uint256,address,address)[])": {
                "details": "Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
              },
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": {
                "details": "Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction."
              },
              "registerPool(uint8)": {
                "details": "Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event."
              },
              "registerTokens(bytes32,address[],address[])": {
                "details": "Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event."
              },
              "setPaused(bool)": {
                "details": "Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited."
              },
              "setRelayerApproval(address,address,bool)": {
                "details": "Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event."
              },
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": {
                "details": "Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "WETH()": "ad5c4648",
              "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": "945bcec9",
              "changeAuthorizer(address)": "0e9e98cf",
              "deregisterTokens(bytes32,address[])": "7d3aeb96",
              "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "8bdb3913",
              "flashLoan(address,address[],uint256[],bytes)": "5c38449e",
              "getAuthorizer()": "aaabadc5",
              "getDomainSeparator()": "ed24911d",
              "getInternalBalance(address,address[])": "0f5a6efa",
              "getNextNonce(address)": "90193b7c",
              "getPool(bytes32)": "f6c00927",
              "getPoolTokenInfo(bytes32,address)": "b05f8e48",
              "getPoolTokens(bytes32)": "f94d4668",
              "getProtocolFeesCollector()": "d2946c2b",
              "hasApprovedRelayer(address,address)": "fec90d72",
              "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "b95cac28",
              "managePoolBalance((uint8,bytes32,address,uint256)[])": "e6c46092",
              "manageUserBalance((uint8,address,uint256,address,address)[])": "0e8e3e84",
              "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": "f84d066e",
              "registerPool(uint8)": "09b2760f",
              "registerTokens(bytes32,address[],address[])": "66a9c7d2",
              "setPaused(bool)": "16c38b3c",
              "setRelayerApproval(address,address,bool)": "fa6e671d",
              "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "52bbbe29"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"oldAuthorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"AuthorizerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExternalBalanceTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"delta\",\"type\":\"int256\"}],\"name\":\"InternalBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidityProvider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int256[]\",\"name\":\"deltas\",\"type\":\"int256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"protocolFeeAmounts\",\"type\":\"uint256[]\"}],\"name\":\"PoolBalanceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cashDelta\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"managedDelta\",\"type\":\"int256\"}],\"name\":\"PoolBalanceManaged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"PoolRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"RelayerApprovalChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"TokensDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"TokensRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"int256[]\",\"name\":\"limits\",\"type\":\"int256[]\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"batchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"newAuthorizer\",\"type\":\"address\"}],\"name\":\"changeAuthorizer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"deregisterTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.ExitPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IFlashLoanRecipient\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizer\",\"outputs\":[{\"internalType\":\"contract IAuthorizer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDomainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getInternalBalance\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getPoolTokenInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"managed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"assetManager\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"lastChangeBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProtocolFeesCollector\",\"outputs\":[{\"internalType\":\"contract ProtocolFeesCollector\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"hasApprovedRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.JoinPoolRequest\",\"name\":\"request\",\"type\":\"tuple\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.PoolBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct IVault.PoolBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"managePoolBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum IVault.UserBalanceOpKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct IVault.UserBalanceOp[]\",\"name\":\"ops\",\"type\":\"tuple[]\"}],\"name\":\"manageUserBalance\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"assetInIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"assetOutIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.BatchSwapStep[]\",\"name\":\"swaps\",\"type\":\"tuple[]\"},{\"internalType\":\"contract IAsset[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"}],\"name\":\"queryBatchSwap\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"assetDeltas\",\"type\":\"int256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum IVault.PoolSpecialization\",\"name\":\"specialization\",\"type\":\"uint8\"}],\"name\":\"registerPool\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"assetManagers\",\"type\":\"address[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setRelayerApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"enum IVault.SwapKind\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetIn\",\"type\":\"address\"},{\"internalType\":\"contract IAsset\",\"name\":\"assetOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"internalType\":\"struct IVault.SingleSwap\",\"name\":\"singleSwap\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"fromInternalBalance\",\"type\":\"bool\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"toInternalBalance\",\"type\":\"bool\"}],\"internalType\":\"struct IVault.FundManagement\",\"name\":\"funds\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Full external interface for the Vault core contract - no external or public methods exist in the contract that don't override one of these declarations.\",\"events\":{\"ExternalBalanceTransfer(address,address,address,uint256)\":{\"details\":\"Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\"},\"InternalBalanceChanged(address,address,int256)\":{\"details\":\"Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through interacting with Pools using Internal Balance. Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH address.\"},\"PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])\":{\"details\":\"Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\"},\"PoolBalanceManaged(bytes32,address,address,int256,int256)\":{\"details\":\"Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\"},\"PoolRegistered(bytes32)\":{\"details\":\"Emitted when a Pool is registered by calling `registerPool`.\"},\"Swap(bytes32,address,address,uint256,uint256)\":{\"details\":\"Emitted for each individual swap performed by `swap` or `batchSwap`.\"},\"TokensDeregistered(bytes32,address[])\":{\"details\":\"Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\"},\"TokensRegistered(bytes32,address[],address[])\":{\"details\":\"Emitted when a Pool registers tokens by calling `registerTokens`.\"}},\"kind\":\"dev\",\"methods\":{\"WETH()\":{\"details\":\"Returns the Vault's WETH instance.\"},\"batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)\":{\"details\":\"Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either the amount of tokens sent to or received from the Pool, depending on the `kind` value. Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or `amountOut` depending on the swap kind. Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`. The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses, or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault. Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies the minimum or maximum amount of each token the vault is allowed to transfer. `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the equivalent `swap` call. Emits `Swap` events.\"},\"changeAuthorizer(address)\":{\"details\":\"Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this. Emits an `AuthorizerChanged` event.\"},\"deregisterTokens(bytes32,address[])\":{\"details\":\"Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be deregistered in the same `deregisterTokens` call. A deregistered token can be re-registered later on, possibly with a different Asset Manager. Emits a `TokensDeregistered` event.\"},\"exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see `getPoolTokenInfo`). If the caller is not `sender`, it must be an authorized relayer for them. The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault: it just enforces these minimums. If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit. `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be exited. If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise, an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to do so will trigger a revert. `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the `tokens` array. This array must match the Pool's registered tokens. This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract. Emits a `PoolBalanceChanged` event.\"},\"flashLoan(address,address[],uint256[],bytes)\":{\"details\":\"Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it, and then reverting unless the tokens plus a proportional protocol fee have been returned. The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount for each token contract. `tokens` must be sorted in ascending order. The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the `receiveFlashLoan` call.\"},\"getAuthorizer()\":{\"details\":\"Returns the Vault's Authorizer.\"},\"getDomainSeparator()\":{\"details\":\"Returns the EIP712 domain separator.\"},\"getInternalBalance(address,address[])\":{\"details\":\"Returns `user`'s Internal Balance for a set of tokens.\"},\"getNextNonce(address)\":{\"details\":\"Returns the next nonce used by an address to sign messages.\"},\"getPool(bytes32)\":{\"details\":\"Returns a Pool's contract address and specialization setting.\"},\"getPoolTokenInfo(bytes32,address)\":{\"details\":\"Returns detailed information for a Pool's registered token. `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token` equals the sum of `cash` and `managed`. Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`, `managed` or `total` balance to be greater than 2^112 - 1. `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a change for this purpose, and will update `lastChangeBlock`. `assetManager` is the Pool's token Asset Manager.\"},\"getPoolTokens(bytes32)\":{\"details\":\"Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of the tokens' `balances` changed. The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order. If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same order as passed to `registerTokens`. Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo` instead.\"},\"getProtocolFeesCollector()\":{\"details\":\"Returns the current protocol fee module.\"},\"hasApprovedRelayer(address,address)\":{\"details\":\"Returns true if `user` has approved `relayer` to act as a relayer for them.\"},\"joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))\":{\"details\":\"Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized Pool shares. If the caller is not `sender`, it must be an authorized relayer for them. The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces these maximums. If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent back to the caller (not the sender, which is important for relayers). `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final `assets` array might not be sorted. Pools with no registered tokens cannot be joined. If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be withdrawn from Internal Balance: attempting to do so will trigger a revert. This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement their own custom logic. This typically requires additional information from the user (such as the expected number of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed directly to the Pool's contract, as is `recipient`. Emits a `PoolBalanceChanged` event.\"},\"managePoolBalance((uint8,bytes32,address,uint256)[])\":{\"details\":\"Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates. Pool Balance management features batching, which means a single contract call can be used to perform multiple operations of different kinds, with different Pools and tokens, at once. For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\"},\"manageUserBalance((uint8,address,uint256,address,address)[])\":{\"details\":\"Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer) and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as it lets integrators reuse a user's Vault allowance. For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\"},\"queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))\":{\"details\":\"Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result. Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH) the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it receives are the same that an equivalent `batchSwap` call would receive. Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct. This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens, approve them for the Vault, or even know a user's address. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction.\"},\"registerPool(uint8)\":{\"details\":\"Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be changed. The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`, depending on the chosen specialization setting. This contract is known as the Pool's contract. Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words, multiple Pools may share the same contract. Emits a `PoolRegistered` event.\"},\"registerTokens(bytes32,address[],address[])\":{\"details\":\"Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract. Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens, exit by receiving registered tokens, and can only swap registered tokens. Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in ascending order. The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`, depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore expected to be highly secured smart contracts with sound design principles, and the decision to register an Asset Manager should not be made lightly. Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset Manager is set, it cannot be changed except by deregistering the associated token and registering again with a different Asset Manager. Emits a `TokensRegistered` event.\"},\"setPaused(bool)\":{\"details\":\"Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an error in some part of the system. The Vault can only be paused during an initial time period, after which pausing is forever disabled. While the contract is paused, the following features are disabled: - depositing and transferring internal balance - transferring external balance (using the Vault's allowance) - swaps - joining Pools - Asset Manager interactions Internal Balance can still be withdrawn, and Pools exited.\"},\"setRelayerApproval(address,address,bool)\":{\"details\":\"Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise. Emits a `RelayerApprovalChanged` event.\"},\"swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)\":{\"details\":\"Performs a swap with a single Pool. If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens taken from the Pool, which must be greater than or equal to `limit`. If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens sent to the Pool, which must be less than or equal to `limit`. Internal Balance usage and the recipient are determined by the `funds` struct. Emits a `Swap` event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IVault.sol\":\"IVault\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/helpers/Authentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"./BalancerErrors.sol\\\";\\nimport \\\"./IAuthentication.sol\\\";\\n\\n/**\\n * @dev Building block for performing access control on external functions.\\n *\\n * This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\\n * to external functions to only make them callable by authorized accounts.\\n *\\n * Derived contracts must implement the `_canPerform` function, which holds the actual access control logic.\\n */\\nabstract contract Authentication is IAuthentication {\\n    bytes32 private immutable _actionIdDisambiguator;\\n\\n    /**\\n     * @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\\n     * multi contract systems.\\n     *\\n     * There are two main uses for it:\\n     *  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\\n     *    unique. The contract's own address is a good option.\\n     *  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\\n     *    shared by the entire family (and no other contract) should be used instead.\\n     */\\n    constructor(bytes32 actionIdDisambiguator) {\\n        _actionIdDisambiguator = actionIdDisambiguator;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions.\\n     */\\n    modifier authenticate() {\\n        _authenticateCaller();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Reverts unless the caller is allowed to call the entry point function.\\n     */\\n    function _authenticateCaller() internal view {\\n        bytes32 actionId = getActionId(msg.sig);\\n        _require(_canPerform(actionId, msg.sender), Errors.SENDER_NOT_ALLOWED);\\n    }\\n\\n    function getActionId(bytes4 selector) public view override returns (bytes32) {\\n        // Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the\\n        // function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of\\n        // multiple contracts.\\n        return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));\\n    }\\n\\n    function _canPerform(bytes32 actionId, address user) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xea892213ec2967f53e26a0dd833bde01e4d9b6e49dd91e6c59ff00044f83c28d\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/BalancerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// solhint-disable\\n\\n/**\\n * @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\\n * supported.\\n */\\nfunction _require(bool condition, uint256 errorCode) pure {\\n    if (!condition) _revert(errorCode);\\n}\\n\\n/**\\n * @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported.\\n */\\nfunction _revert(uint256 errorCode) pure {\\n    // We're going to dynamically create a revert string based on the error code, with the following format:\\n    // 'BAL#{errorCode}'\\n    // where the code is left-padded with zeroes to three digits (so they range from 000 to 999).\\n    //\\n    // We don't have revert strings embedded in the contract to save bytecode size: it takes much less space to store a\\n    // number (8 to 16 bits) than the individual string characters.\\n    //\\n    // The dynamic string creation algorithm that follows could be implemented in Solidity, but assembly allows for a\\n    // much denser implementation, again saving bytecode size. Given this function unconditionally reverts, this is a\\n    // safe place to rely on it without worrying about how its usage might affect e.g. memory contents.\\n    assembly {\\n        // First, we need to compute the ASCII representation of the error code. We assume that it is in the 0-999\\n        // range, so we only need to convert three digits. To convert the digits to ASCII, we add 0x30, the value for\\n        // the '0' character.\\n\\n        let units := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let tenths := add(mod(errorCode, 10), 0x30)\\n\\n        errorCode := div(errorCode, 10)\\n        let hundreds := add(mod(errorCode, 10), 0x30)\\n\\n        // With the individual characters, we can now construct the full string. The \\\"BAL#\\\" part is a known constant\\n        // (0x42414c23): we simply shift this by 24 (to provide space for the 3 bytes of the error code), and add the\\n        // characters to it, each shifted by a multiple of 8.\\n        // The revert reason is then shifted left by 200 bits (256 minus the length of the string, 7 characters * 8 bits\\n        // per character = 56) to locate it in the most significant part of the 256 slot (the beginning of a byte\\n        // array).\\n\\n        let revertReason := shl(200, add(0x42414c23000000, add(add(units, shl(8, tenths)), shl(16, hundreds))))\\n\\n        // We can now encode the reason in memory, which can be safely overwritten as we're about to revert. The encoded\\n        // message will have the following layout:\\n        // [ revert reason identifier ] [ string location offset ] [ string length ] [ string contents ]\\n\\n        // The Solidity revert reason identifier is 0x08c739a0, the function selector of the Error(string) function. We\\n        // also write zeroes to the next 28 bytes of memory, but those are about to be overwritten.\\n        mstore(0x0, 0x08c379a000000000000000000000000000000000000000000000000000000000)\\n        // Next is the offset to the location of the string, which will be placed immediately after (20 bytes away).\\n        mstore(0x04, 0x0000000000000000000000000000000000000000000000000000000000000020)\\n        // The string length is fixed: 7 characters.\\n        mstore(0x24, 7)\\n        // Finally, the string itself is stored.\\n        mstore(0x44, revertReason)\\n\\n        // Even if the string is only 7 bytes long, we need to return a full 32 byte slot containing it. The length of\\n        // the encoded message is therefore 4 + 32 + 32 + 32 = 100.\\n        revert(0, 100)\\n    }\\n}\\n\\nlibrary Errors {\\n    // Math\\n    uint256 internal constant ADD_OVERFLOW = 0;\\n    uint256 internal constant SUB_OVERFLOW = 1;\\n    uint256 internal constant SUB_UNDERFLOW = 2;\\n    uint256 internal constant MUL_OVERFLOW = 3;\\n    uint256 internal constant ZERO_DIVISION = 4;\\n    uint256 internal constant DIV_INTERNAL = 5;\\n    uint256 internal constant X_OUT_OF_BOUNDS = 6;\\n    uint256 internal constant Y_OUT_OF_BOUNDS = 7;\\n    uint256 internal constant PRODUCT_OUT_OF_BOUNDS = 8;\\n    uint256 internal constant INVALID_EXPONENT = 9;\\n\\n    // Input\\n    uint256 internal constant OUT_OF_BOUNDS = 100;\\n    uint256 internal constant UNSORTED_ARRAY = 101;\\n    uint256 internal constant UNSORTED_TOKENS = 102;\\n    uint256 internal constant INPUT_LENGTH_MISMATCH = 103;\\n    uint256 internal constant ZERO_TOKEN = 104;\\n\\n    // Shared pools\\n    uint256 internal constant MIN_TOKENS = 200;\\n    uint256 internal constant MAX_TOKENS = 201;\\n    uint256 internal constant MAX_SWAP_FEE_PERCENTAGE = 202;\\n    uint256 internal constant MIN_SWAP_FEE_PERCENTAGE = 203;\\n    uint256 internal constant MINIMUM_BPT = 204;\\n    uint256 internal constant CALLER_NOT_VAULT = 205;\\n    uint256 internal constant UNINITIALIZED = 206;\\n    uint256 internal constant BPT_IN_MAX_AMOUNT = 207;\\n    uint256 internal constant BPT_OUT_MIN_AMOUNT = 208;\\n    uint256 internal constant EXPIRED_PERMIT = 209;\\n\\n    // Pools\\n    uint256 internal constant MIN_AMP = 300;\\n    uint256 internal constant MAX_AMP = 301;\\n    uint256 internal constant MIN_WEIGHT = 302;\\n    uint256 internal constant MAX_STABLE_TOKENS = 303;\\n    uint256 internal constant MAX_IN_RATIO = 304;\\n    uint256 internal constant MAX_OUT_RATIO = 305;\\n    uint256 internal constant MIN_BPT_IN_FOR_TOKEN_OUT = 306;\\n    uint256 internal constant MAX_OUT_BPT_FOR_TOKEN_IN = 307;\\n    uint256 internal constant NORMALIZED_WEIGHT_INVARIANT = 308;\\n    uint256 internal constant INVALID_TOKEN = 309;\\n    uint256 internal constant UNHANDLED_JOIN_KIND = 310;\\n    uint256 internal constant ZERO_INVARIANT = 311;\\n\\n    // Lib\\n    uint256 internal constant REENTRANCY = 400;\\n    uint256 internal constant SENDER_NOT_ALLOWED = 401;\\n    uint256 internal constant PAUSED = 402;\\n    uint256 internal constant PAUSE_WINDOW_EXPIRED = 403;\\n    uint256 internal constant MAX_PAUSE_WINDOW_DURATION = 404;\\n    uint256 internal constant MAX_BUFFER_PERIOD_DURATION = 405;\\n    uint256 internal constant INSUFFICIENT_BALANCE = 406;\\n    uint256 internal constant INSUFFICIENT_ALLOWANCE = 407;\\n    uint256 internal constant ERC20_TRANSFER_FROM_ZERO_ADDRESS = 408;\\n    uint256 internal constant ERC20_TRANSFER_TO_ZERO_ADDRESS = 409;\\n    uint256 internal constant ERC20_MINT_TO_ZERO_ADDRESS = 410;\\n    uint256 internal constant ERC20_BURN_FROM_ZERO_ADDRESS = 411;\\n    uint256 internal constant ERC20_APPROVE_FROM_ZERO_ADDRESS = 412;\\n    uint256 internal constant ERC20_APPROVE_TO_ZERO_ADDRESS = 413;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_ALLOWANCE = 414;\\n    uint256 internal constant ERC20_DECREASED_ALLOWANCE_BELOW_ZERO = 415;\\n    uint256 internal constant ERC20_TRANSFER_EXCEEDS_BALANCE = 416;\\n    uint256 internal constant ERC20_BURN_EXCEEDS_ALLOWANCE = 417;\\n    uint256 internal constant SAFE_ERC20_CALL_FAILED = 418;\\n    uint256 internal constant ADDRESS_INSUFFICIENT_BALANCE = 419;\\n    uint256 internal constant ADDRESS_CANNOT_SEND_VALUE = 420;\\n    uint256 internal constant SAFE_CAST_VALUE_CANT_FIT_INT256 = 421;\\n    uint256 internal constant GRANT_SENDER_NOT_ADMIN = 422;\\n    uint256 internal constant REVOKE_SENDER_NOT_ADMIN = 423;\\n    uint256 internal constant RENOUNCE_SENDER_NOT_ALLOWED = 424;\\n    uint256 internal constant BUFFER_PERIOD_EXPIRED = 425;\\n\\n    // Vault\\n    uint256 internal constant INVALID_POOL_ID = 500;\\n    uint256 internal constant CALLER_NOT_POOL = 501;\\n    uint256 internal constant SENDER_NOT_ASSET_MANAGER = 502;\\n    uint256 internal constant USER_DOESNT_ALLOW_RELAYER = 503;\\n    uint256 internal constant INVALID_SIGNATURE = 504;\\n    uint256 internal constant EXIT_BELOW_MIN = 505;\\n    uint256 internal constant JOIN_ABOVE_MAX = 506;\\n    uint256 internal constant SWAP_LIMIT = 507;\\n    uint256 internal constant SWAP_DEADLINE = 508;\\n    uint256 internal constant CANNOT_SWAP_SAME_TOKEN = 509;\\n    uint256 internal constant UNKNOWN_AMOUNT_IN_FIRST_SWAP = 510;\\n    uint256 internal constant MALCONSTRUCTED_MULTIHOP_SWAP = 511;\\n    uint256 internal constant INTERNAL_BALANCE_OVERFLOW = 512;\\n    uint256 internal constant INSUFFICIENT_INTERNAL_BALANCE = 513;\\n    uint256 internal constant INVALID_ETH_INTERNAL_BALANCE = 514;\\n    uint256 internal constant INVALID_POST_LOAN_BALANCE = 515;\\n    uint256 internal constant INSUFFICIENT_ETH = 516;\\n    uint256 internal constant UNALLOCATED_ETH = 517;\\n    uint256 internal constant ETH_TRANSFER = 518;\\n    uint256 internal constant CANNOT_USE_ETH_SENTINEL = 519;\\n    uint256 internal constant TOKENS_MISMATCH = 520;\\n    uint256 internal constant TOKEN_NOT_REGISTERED = 521;\\n    uint256 internal constant TOKEN_ALREADY_REGISTERED = 522;\\n    uint256 internal constant TOKENS_ALREADY_SET = 523;\\n    uint256 internal constant TOKENS_LENGTH_MUST_BE_2 = 524;\\n    uint256 internal constant NONZERO_TOKEN_BALANCE = 525;\\n    uint256 internal constant BALANCE_TOTAL_OVERFLOW = 526;\\n    uint256 internal constant POOL_NO_TOKENS = 527;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_BALANCE = 528;\\n\\n    // Fees\\n    uint256 internal constant SWAP_FEE_PERCENTAGE_TOO_HIGH = 600;\\n    uint256 internal constant FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH = 601;\\n    uint256 internal constant INSUFFICIENT_FLASH_LOAN_FEES = 602;\\n}\\n\",\"keccak256\":\"0xd55b221ce0812144b0f9e05efd305916a2d4d2f8fbce964175e3f7a9060d145c\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/IAuthentication.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthentication {\\n    /**\\n     * @dev Returns the action identifier associated with the external function described by `selector`.\\n     */\\n    function getActionId(bytes4 selector) external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xfd687ced203d2c6da8189792e1719a5182faf45956129388b231ee76740b99a6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/helpers/InputHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./BalancerErrors.sol\\\";\\n\\nimport \\\"../../vault/interfaces/IAsset.sol\\\";\\n\\nlibrary InputHelpers {\\n    function ensureInputLengthMatch(uint256 a, uint256 b) internal pure {\\n        _require(a == b, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureInputLengthMatch(\\n        uint256 a,\\n        uint256 b,\\n        uint256 c\\n    ) internal pure {\\n        _require(a == b && b == c, Errors.INPUT_LENGTH_MISMATCH);\\n    }\\n\\n    function ensureArrayIsSorted(IAsset[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(IERC20[] memory array) internal pure {\\n        address[] memory addressArray;\\n        // solhint-disable-next-line no-inline-assembly\\n        assembly {\\n            addressArray := array\\n        }\\n        ensureArrayIsSorted(addressArray);\\n    }\\n\\n    function ensureArrayIsSorted(address[] memory array) internal pure {\\n        if (array.length < 2) {\\n            return;\\n        }\\n\\n        address previous = array[0];\\n        for (uint256 i = 1; i < array.length; ++i) {\\n            address current = array[i];\\n            _require(previous < current, Errors.UNSORTED_ARRAY);\\n            previous = current;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd58eb6851269729d3ea0d739f812c67c3e750b046ef1653ae12134e668925d28\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\n// Based on the ReentrancyGuard library from OpenZeppelin contracts, altered to reduce bytecode size.\\n// Modifier code is inlined by the compiler, which causes its code to appear multiple times in the codebase. By using\\n// private functions, we achieve the same end result with slightly higher runtime gas costs but reduced bytecode size.\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    constructor() {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and make it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        _enterNonReentrant();\\n        _;\\n        _exitNonReentrant();\\n    }\\n\\n    function _enterNonReentrant() private {\\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n        _require(_status != _ENTERED, Errors.REENTRANCY);\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n    }\\n\\n    function _exitNonReentrant() private {\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n}\\n\",\"keccak256\":\"0xe055f8c5d34af6e615892acf192c74d2d83784713bd98b2f8e44751f5ffe2bed\",\"license\":\"MIT\"},\"src.sol/amm/lib/openzeppelin/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../helpers/BalancerErrors.sol\\\";\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(address(token), abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     *\\n     * WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert.\\n     */\\n    function _callOptionalReturn(address token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves.\\n        (bool success, bytes memory returndata) = token.call(data);\\n\\n        // If the low-level call didn't succeed we return whatever was returned from it.\\n        assembly {\\n            if eq(success, 0) {\\n                returndatacopy(0, 0, returndatasize())\\n                revert(0, returndatasize())\\n            }\\n        }\\n\\n        // Finally we check the returndata size is either zero or true - note that this check will always pass for EOAs\\n        _require(returndata.length == 0 || abi.decode(returndata, (bool)), Errors.SAFE_ERC20_CALL_FAILED);\\n    }\\n}\\n\",\"keccak256\":\"0x8db59e0924c72228865dddcadc07e25507809582c50679c8efec6fa737704aed\",\"license\":\"MIT\"},\"src.sol/amm/vault/ProtocolFeesCollector.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../lib/openzeppelin/IERC20.sol\\\";\\nimport \\\"../lib/helpers/InputHelpers.sol\\\";\\nimport \\\"../lib/helpers/Authentication.sol\\\";\\nimport \\\"../lib/openzeppelin/ReentrancyGuard.sol\\\";\\nimport \\\"../lib/openzeppelin/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IVault.sol\\\";\\nimport \\\"./interfaces/IAuthorizer.sol\\\";\\n\\n/**\\n * @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\\n * Vault performs to reduce its overall bytecode size.\\n *\\n * The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\\n * sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\\n * to the Vault's own authorizer.\\n */\\ncontract ProtocolFeesCollector is Authentication, ReentrancyGuard {\\n    using SafeERC20 for IERC20;\\n\\n    // Absolute maximum fee percentages (1e18 = 100%, 1e16 = 1%).\\n    uint256 private constant _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE = 50e16; // 50%\\n    uint256 private constant _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE = 1e16; // 1%\\n\\n    IVault public immutable vault;\\n\\n    // All fee percentages are 18-decimal fixed point numbers.\\n\\n    // The swap fee is charged whenever a swap occurs, as a percentage of the fee charged by the Pool. These are not\\n    // actually charged on each individual swap: the `Vault` relies on the Pools being honest and reporting fees due\\n    // when users join and exit them.\\n    uint256 private _swapFeePercentage;\\n\\n    // The flash loan fee is charged whenever a flash loan occurs, as a percentage of the tokens lent.\\n    uint256 private _flashLoanFeePercentage;\\n\\n    event SwapFeePercentageChanged(uint256 newSwapFeePercentage);\\n    event FlashLoanFeePercentageChanged(uint256 newFlashLoanFeePercentage);\\n\\n    constructor(IVault _vault)\\n        // The ProtocolFeesCollector is a singleton, so it simply uses its own address to disambiguate action\\n        // identifiers.\\n        Authentication(bytes32(uint256(address(this))))\\n    {\\n        vault = _vault;\\n    }\\n\\n    function withdrawCollectedFees(\\n        IERC20[] calldata tokens,\\n        uint256[] calldata amounts,\\n        address recipient\\n    ) external nonReentrant authenticate {\\n        InputHelpers.ensureInputLengthMatch(tokens.length, amounts.length);\\n\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            IERC20 token = tokens[i];\\n            uint256 amount = amounts[i];\\n            token.safeTransfer(recipient, amount);\\n        }\\n    }\\n\\n    function setSwapFeePercentage(uint256 newSwapFeePercentage) external authenticate {\\n        _require(newSwapFeePercentage <= _MAX_PROTOCOL_SWAP_FEE_PERCENTAGE, Errors.SWAP_FEE_PERCENTAGE_TOO_HIGH);\\n        _swapFeePercentage = newSwapFeePercentage;\\n        emit SwapFeePercentageChanged(newSwapFeePercentage);\\n    }\\n\\n    function setFlashLoanFeePercentage(uint256 newFlashLoanFeePercentage) external authenticate {\\n        _require(\\n            newFlashLoanFeePercentage <= _MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE,\\n            Errors.FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH\\n        );\\n        _flashLoanFeePercentage = newFlashLoanFeePercentage;\\n        emit FlashLoanFeePercentageChanged(newFlashLoanFeePercentage);\\n    }\\n\\n    function getSwapFeePercentage() external view returns (uint256) {\\n        return _swapFeePercentage;\\n    }\\n\\n    function getFlashLoanFeePercentage() external view returns (uint256) {\\n        return _flashLoanFeePercentage;\\n    }\\n\\n    function getCollectedFeeAmounts(IERC20[] memory tokens) external view returns (uint256[] memory feeAmounts) {\\n        feeAmounts = new uint256[](tokens.length);\\n        for (uint256 i = 0; i < tokens.length; ++i) {\\n            feeAmounts[i] = tokens[i].balanceOf(address(this));\\n        }\\n    }\\n\\n    function getAuthorizer() external view returns (IAuthorizer) {\\n        return _getAuthorizer();\\n    }\\n\\n    function _canPerform(bytes32 actionId, address account) internal view override returns (bool) {\\n        return _getAuthorizer().canPerform(actionId, account, address(this));\\n    }\\n\\n    function _getAuthorizer() internal view returns (IAuthorizer) {\\n        return vault.getAuthorizer();\\n    }\\n}\\n\",\"keccak256\":\"0x67a0898b29a356085f4d7a83c52d1c794ebf07b6522133c9b9c7f5faf10d2184\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n    // solhint-disable-previous-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0x70ecf1d48c285d78718bd2e159345677038ed8a81c74444bedd6a5c61af9aff6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\ninterface IAuthorizer {\\n    /**\\n     * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n     */\\n    function canPerform(\\n        bytes32 actionId,\\n        address account,\\n        address where\\n    ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x792871e208bba1dad291f8d1cffad86f4afa5e2360816bd9c43481f7297155f5\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n    /**\\n     * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n     *\\n     * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n     * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n     * Vault, or else the entire flash loan will revert.\\n     *\\n     * `userData` is the same value passed in the `IVault.flashLoan` call.\\n     */\\n    function receiveFlashLoan(\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        uint256[] memory feeAmounts,\\n        bytes memory userData\\n    ) external;\\n}\\n\",\"keccak256\":\"0x6886740dcaebfb24a25f914ce5b4299aeab3fe0cc135a1707c0fe4e3d6d02cb6\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/ISignaturesValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface for the SignatureValidator helper, used to support meta-transactions.\\n */\\ninterface ISignaturesValidator {\\n    /**\\n     * @dev Returns the EIP712 domain separator.\\n     */\\n    function getDomainSeparator() external view returns (bytes32);\\n\\n    /**\\n     * @dev Returns the next nonce used by an address to sign messages.\\n     */\\n    function getNextNonce(address user) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x2fe46b13b7c8bfc6f5c539c0b73d6325813f383f551b71fb6bca8dafd06964e1\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\nimport \\\"./ISignaturesValidator.sol\\\";\\nimport \\\"../ProtocolFeesCollector.sol\\\";\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault is ISignaturesValidator {\\n    // Generalities about the Vault:\\n    //\\n    // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n    // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n    // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n    // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n    // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n    //\\n    // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n    // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n    // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n    // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n    //\\n    // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n    // Authorizer\\n    //\\n    // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n    // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n    // can perform a given action.\\n\\n    /**\\n     * @dev Returns the Vault's Authorizer.\\n     */\\n    function getAuthorizer() external view returns (IAuthorizer);\\n\\n    /**\\n     * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n     *\\n     * Emits an `AuthorizerChanged` event.\\n     */\\n    function changeAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n    event AuthorizerChanged(IAuthorizer indexed oldAuthorizer, IAuthorizer indexed newAuthorizer);\\n\\n    // Relayers\\n    //\\n    // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n    // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n    // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n    // this power, two things must occur:\\n    //  - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n    //    means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n    //    functions.\\n    //  - Each user must approve the relayer to act on their behalf.\\n    // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n    // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n    // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n    /**\\n     * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n     */\\n    function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n    /**\\n     * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n     *\\n     * Emits a `RelayerApprovalChanged` event.\\n     */\\n    function setRelayerApproval(\\n        address sender,\\n        address relayer,\\n        bool approved\\n    ) external;\\n\\n    event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n    // Internal Balance\\n    //\\n    // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n    // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n    // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n    // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n    //\\n    // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n    // operations of different kinds, with different senders and recipients, at once.\\n\\n    /**\\n     * @dev Returns `user`'s Internal Balance for a set of tokens.\\n     */\\n    function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n     * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n     * it lets integrators reuse a user's Vault allowance.\\n     *\\n     * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n     */\\n    function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n    /**\\n     * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n     without manual WETH wrapping or unwrapping.\\n     */\\n    struct UserBalanceOp {\\n        UserBalanceOpKind kind;\\n        IAsset asset;\\n        uint256 amount;\\n        address sender;\\n        address payable recipient;\\n    }\\n\\n    // There are four possible operations in `manageUserBalance`:\\n    //\\n    // - DEPOSIT_INTERNAL\\n    // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n    // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n    // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n    // relevant for relayers).\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - WITHDRAW_INTERNAL\\n    // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n    //\\n    // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n    // it to the recipient as ETH.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_INTERNAL\\n    // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `InternalBalanceChanged` event.\\n    //\\n    //\\n    // - TRANSFER_EXTERNAL\\n    // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n    // relayers, as it lets them reuse a user's Vault allowance.\\n    //\\n    // Reverts if the ETH sentinel value is passed.\\n    //\\n    // Emits an `ExternalBalanceTransfer` event.\\n\\n    enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n    /**\\n     * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n     * interacting with Pools using Internal Balance.\\n     *\\n     * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n     * address.\\n     */\\n    event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n    /**\\n     * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n     */\\n    event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n    // Pools\\n    //\\n    // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n    // functionality:\\n    //\\n    //  - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n    // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n    // which increase with the number of registered tokens.\\n    //\\n    //  - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n    // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n    // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n    // independent of the number of registered tokens.\\n    //\\n    //  - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n    // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n    enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n    /**\\n     * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n     * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n     * changed.\\n     *\\n     * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n     * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n     *\\n     * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n     * multiple Pools may share the same contract.\\n     *\\n     * Emits a `PoolRegistered` event.\\n     */\\n    function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n    /**\\n     * @dev Emitted when a Pool is registered by calling `registerPool`.\\n     */\\n    event PoolRegistered(bytes32 poolId);\\n\\n    /**\\n     * @dev Returns a Pool's contract address and specialization setting.\\n     */\\n    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n    /**\\n     * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n     * exit by receiving registered tokens, and can only swap registered tokens.\\n     *\\n     * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n     * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n     * ascending order.\\n     *\\n     * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n     * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n     * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n     * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n     * Asset Manager should not be made lightly.\\n     *\\n     * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n     * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n     * different Asset Manager.\\n     *\\n     * Emits a `TokensRegistered` event.\\n     */\\n    function registerTokens(\\n        bytes32 poolId,\\n        IERC20[] memory tokens,\\n        address[] memory assetManagers\\n    ) external;\\n\\n    /**\\n     * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n     */\\n    event TokensRegistered(bytes32 poolId, IERC20[] tokens, address[] assetManagers);\\n\\n    /**\\n     * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n     *\\n     * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n     * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n     * must be deregistered in the same `deregisterTokens` call.\\n     *\\n     * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n     *\\n     * Emits a `TokensDeregistered` event.\\n     */\\n    function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n    /**\\n     * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n     */\\n    event TokensDeregistered(bytes32 poolId, IERC20[] tokens);\\n\\n    /**\\n     * @dev Returns detailed information for a Pool's registered token.\\n     *\\n     * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n     * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n     * equals the sum of `cash` and `managed`.\\n     *\\n     * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n     * `managed` or `total` balance to be greater than 2^112 - 1.\\n     *\\n     * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n     * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n     * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n     * change for this purpose, and will update `lastChangeBlock`.\\n     *\\n     * `assetManager` is the Pool's token Asset Manager.\\n     */\\n    function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n        external\\n        view\\n        returns (\\n            uint256 cash,\\n            uint256 managed,\\n            uint256 lastChangeBlock,\\n            address assetManager\\n        );\\n\\n    /**\\n     * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n     * the tokens' `balances` changed.\\n     *\\n     * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n     * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n     *\\n     * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n     * order as passed to `registerTokens`.\\n     *\\n     * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n     * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n     * instead.\\n     */\\n    function getPoolTokens(bytes32 poolId)\\n        external\\n        view\\n        returns (\\n            IERC20[] memory tokens,\\n            uint256[] memory balances,\\n            uint256 lastChangeBlock\\n        );\\n\\n    /**\\n     * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n     * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n     * Pool shares.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n     * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n     * these maximums.\\n     *\\n     * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n     * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n     * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n     * back to the caller (not the sender, which is important for relayers).\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n     * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n     * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n     *\\n     * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n     * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n     * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n     *\\n     * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n     * directly to the Pool's contract, as is `recipient`.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function joinPool(\\n        bytes32 poolId,\\n        address sender,\\n        address recipient,\\n        JoinPoolRequest memory request\\n    ) external payable;\\n\\n    struct JoinPoolRequest {\\n        IAsset[] assets;\\n        uint256[] maxAmountsIn;\\n        bytes userData;\\n        bool fromInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n     * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n     * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n     * `getPoolTokenInfo`).\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n     * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n     * it just enforces these minimums.\\n     *\\n     * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n     * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n     * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n     *\\n     * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n     * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n     * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n     * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n     *\\n     * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n     * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n     * do so will trigger a revert.\\n     *\\n     * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n     * `tokens` array. This array must match the Pool's registered tokens.\\n     *\\n     * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n     * their own custom logic. This typically requires additional information from the user (such as the expected number\\n     * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n     * passed directly to the Pool's contract.\\n     *\\n     * Emits a `PoolBalanceChanged` event.\\n     */\\n    function exitPool(\\n        bytes32 poolId,\\n        address sender,\\n        address payable recipient,\\n        ExitPoolRequest memory request\\n    ) external;\\n\\n    struct ExitPoolRequest {\\n        IAsset[] assets;\\n        uint256[] minAmountsOut;\\n        bytes userData;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n     */\\n    event PoolBalanceChanged(\\n        bytes32 indexed poolId,\\n        address indexed liquidityProvider,\\n        IERC20[] tokens,\\n        int256[] deltas,\\n        uint256[] protocolFeeAmounts\\n    );\\n\\n    enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n    // Swaps\\n    //\\n    // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n    // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n    // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n    //\\n    // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n    // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n    // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n    // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n    // individual swaps.\\n    //\\n    // There are two swap kinds:\\n    //  - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n    // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n    //  - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n    // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n    //\\n    // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n    // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n    // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n    // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n    // the final intended token.\\n    //\\n    // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n    // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n    // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n    // much less gas than they would otherwise.\\n    //\\n    // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n    // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n    // updating the Pool's internal accounting).\\n    //\\n    // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n    // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n    // minimum amount of tokens to receive (by passing a negative value) is specified.\\n    //\\n    // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n    // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n    //\\n    // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n    // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n    // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n    // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n    //\\n    // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n    enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n    /**\\n     * @dev Performs a swap with a single Pool.\\n     *\\n     * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n     * taken from the Pool, which must be greater than or equal to `limit`.\\n     *\\n     * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n     * sent to the Pool, which must be less than or equal to `limit`.\\n     *\\n     * Internal Balance usage and the recipient are determined by the `funds` struct.\\n     *\\n     * Emits a `Swap` event.\\n     */\\n    function swap(\\n        SingleSwap memory singleSwap,\\n        FundManagement memory funds,\\n        uint256 limit,\\n        uint256 deadline\\n    ) external payable returns (uint256);\\n\\n    /**\\n     * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n     * the `kind` value.\\n     *\\n     * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n     * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct SingleSwap {\\n        bytes32 poolId;\\n        SwapKind kind;\\n        IAsset assetIn;\\n        IAsset assetOut;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n     * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n     *\\n     * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n     * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n     * the same index in the `assets` array.\\n     *\\n     * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n     * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n     * `amountOut` depending on the swap kind.\\n     *\\n     * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n     * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n     * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n     *\\n     * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n     * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n     * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n     * or unwrapped from WETH by the Vault.\\n     *\\n     * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n     * the minimum or maximum amount of each token the vault is allowed to transfer.\\n     *\\n     * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n     * equivalent `swap` call.\\n     *\\n     * Emits `Swap` events.\\n     */\\n    function batchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds,\\n        int256[] memory limits,\\n        uint256 deadline\\n    ) external payable returns (int256[] memory);\\n\\n    /**\\n     * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n     * `assets` array passed to that function, and ETH assets are converted to WETH.\\n     *\\n     * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n     * from the previous swap, depending on the swap kind.\\n     *\\n     * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n     * used to extend swap behavior.\\n     */\\n    struct BatchSwapStep {\\n        bytes32 poolId;\\n        uint256 assetInIndex;\\n        uint256 assetOutIndex;\\n        uint256 amount;\\n        bytes userData;\\n    }\\n\\n    /**\\n     * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n     */\\n    event Swap(\\n        bytes32 indexed poolId,\\n        IERC20 indexed tokenIn,\\n        IERC20 indexed tokenOut,\\n        uint256 amountIn,\\n        uint256 amountOut\\n    );\\n\\n    /**\\n     * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n     * `recipient` account.\\n     *\\n     * If the caller is not `sender`, it must be an authorized relayer for them.\\n     *\\n     * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n     * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n     * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n     * `joinPool`.\\n     *\\n     * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n     * transferred. This matches the behavior of `exitPool`.\\n     *\\n     * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n     * revert.\\n     */\\n    struct FundManagement {\\n        address sender;\\n        bool fromInternalBalance;\\n        address payable recipient;\\n        bool toInternalBalance;\\n    }\\n\\n    /**\\n     * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n     * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n     *\\n     * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n     * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n     * receives are the same that an equivalent `batchSwap` call would receive.\\n     *\\n     * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n     * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n     * approve them for the Vault, or even know a user's address.\\n     *\\n     * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n     * eth_call instead of eth_sendTransaction.\\n     */\\n    function queryBatchSwap(\\n        SwapKind kind,\\n        BatchSwapStep[] memory swaps,\\n        IAsset[] memory assets,\\n        FundManagement memory funds\\n    ) external returns (int256[] memory assetDeltas);\\n\\n    // Flash Loans\\n\\n    /**\\n     * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n     * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n     *\\n     * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n     * for each token contract. `tokens` must be sorted in ascending order.\\n     *\\n     * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n     * `receiveFlashLoan` call.\\n     */\\n    function flashLoan(\\n        IFlashLoanRecipient recipient,\\n        IERC20[] memory tokens,\\n        uint256[] memory amounts,\\n        bytes memory userData\\n    ) external;\\n\\n    // Asset Management\\n    //\\n    // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n    // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n    // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n    // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n    // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n    // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n    //\\n    // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n    // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n    //\\n    // This concept is unrelated to the IAsset interface.\\n\\n    /**\\n     * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n     *\\n     * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n     * operations of different kinds, with different Pools and tokens, at once.\\n     *\\n     * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n     */\\n    function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n    struct PoolBalanceOp {\\n        PoolBalanceOpKind kind;\\n        bytes32 poolId;\\n        IERC20 token;\\n        uint256 amount;\\n    }\\n\\n    /**\\n     * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n     *\\n     * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n     *\\n     * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n     * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n     */\\n    enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n    /**\\n     * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n     */\\n    event PoolBalanceManaged(\\n        bytes32 indexed poolId,\\n        address indexed assetManager,\\n        IERC20 indexed token,\\n        int256 cashDelta,\\n        int256 managedDelta\\n    );\\n\\n    // Protocol Fees\\n    //\\n    // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n    // permissioned accounts.\\n    //\\n    // There are two kinds of protocol fees:\\n    //\\n    //  - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n    //\\n    //  - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n    // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n    // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n    // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n    // exiting a Pool in debt without first paying their share.\\n\\n    /**\\n     * @dev Returns the current protocol fee module.\\n     */\\n    function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n    /**\\n     * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n     * error in some part of the system.\\n     *\\n     * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n     *\\n     * While the contract is paused, the following features are disabled:\\n     * - depositing and transferring internal balance\\n     * - transferring external balance (using the Vault's allowance)\\n     * - swaps\\n     * - joining Pools\\n     * - Asset Manager interactions\\n     *\\n     * Internal Balance can still be withdrawn, and Pools exited.\\n     */\\n    function setPaused(bool paused) external;\\n\\n    /**\\n     * @dev Returns the Vault's WETH instance.\\n     */\\n    function WETH() external view returns (IWETH);\\n    // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0x9e7499e263ba0da0d97e3937f3446b74a17d14d3d2f16c47a4a5c14686c61ac0\",\"license\":\"GPL-3.0-or-later\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      },
      "src.sol/amm/vault/interfaces/IWETH.sol": {
        "IWETH": {
          "abi": [
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Approval",
              "type": "event"
            },
            {
              "anonymous": false,
              "inputs": [
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "from",
                  "type": "address"
                },
                {
                  "indexed": true,
                  "internalType": "address",
                  "name": "to",
                  "type": "address"
                },
                {
                  "indexed": false,
                  "internalType": "uint256",
                  "name": "value",
                  "type": "uint256"
                }
              ],
              "name": "Transfer",
              "type": "event"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "owner",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                }
              ],
              "name": "allowance",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "spender",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "approve",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "account",
                  "type": "address"
                }
              ],
              "name": "balanceOf",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "deposit",
              "outputs": [],
              "stateMutability": "payable",
              "type": "function"
            },
            {
              "inputs": [],
              "name": "totalSupply",
              "outputs": [
                {
                  "internalType": "uint256",
                  "name": "",
                  "type": "uint256"
                }
              ],
              "stateMutability": "view",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transfer",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "address",
                  "name": "sender",
                  "type": "address"
                },
                {
                  "internalType": "address",
                  "name": "recipient",
                  "type": "address"
                },
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "transferFrom",
              "outputs": [
                {
                  "internalType": "bool",
                  "name": "",
                  "type": "bool"
                }
              ],
              "stateMutability": "nonpayable",
              "type": "function"
            },
            {
              "inputs": [
                {
                  "internalType": "uint256",
                  "name": "amount",
                  "type": "uint256"
                }
              ],
              "name": "withdraw",
              "outputs": [],
              "stateMutability": "nonpayable",
              "type": "function"
            }
          ],
          "devdoc": {
            "details": "Interface for the WETH token contract used internally for wrapping and unwrapping, to support sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.",
            "kind": "dev",
            "methods": {
              "allowance(address,address)": {
                "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
              },
              "approve(address,uint256)": {
                "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
              },
              "balanceOf(address)": {
                "details": "Returns the amount of tokens owned by `account`."
              },
              "totalSupply()": {
                "details": "Returns the amount of tokens in existence."
              },
              "transfer(address,uint256)": {
                "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              },
              "transferFrom(address,address,uint256)": {
                "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
              }
            },
            "version": 1
          },
          "evm": {
            "bytecode": {
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "deployedBytecode": {
              "immutableReferences": {},
              "linkReferences": {},
              "object": "",
              "opcodes": "",
              "sourceMap": ""
            },
            "gasEstimates": null,
            "methodIdentifiers": {
              "allowance(address,address)": "dd62ed3e",
              "approve(address,uint256)": "095ea7b3",
              "balanceOf(address)": "70a08231",
              "deposit()": "d0e30db0",
              "totalSupply()": "18160ddd",
              "transfer(address,uint256)": "a9059cbb",
              "transferFrom(address,address,uint256)": "23b872dd",
              "withdraw(uint256)": "2e1a7d4d"
            }
          },
          "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface for the WETH token contract used internally for wrapping and unwrapping, to support sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src.sol/amm/vault/interfaces/IWETH.sol\":\"IWETH\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src.sol/amm/lib/openzeppelin/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address sender,\\n        address recipient,\\n        uint256 amount\\n    ) external returns (bool);\\n\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xd828a935a72a6d182912abba290e4debb8c684c36fd756088f7acb30e0b2bb76\",\"license\":\"MIT\"},\"src.sol/amm/vault/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../../lib/openzeppelin/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n    function deposit() external payable;\\n\\n    function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0x621a25d9e3f3a4cd9e4493ab330a50a4456b6ea8fc568911fdd5486f78a4d3ab\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
          "storageLayout": {
            "storage": [],
            "types": null
          },
          "userdoc": {
            "kind": "user",
            "methods": {},
            "version": 1
          }
        }
      }
    },
    "errors": [
      {
        "component": "general",
        "errorCode": "1878",
        "formattedMessage": "src.sol/amm/StableSwap.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n",
        "message": "SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.",
        "severity": "warning",
        "sourceLocation": {
          "end": -1,
          "file": "src.sol/amm/StableSwap.sol",
          "start": -1
        },
        "type": "Warning"
      }
    ],
    "sources": {
      "src.sol/amm/StableSwap.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/StableSwap.sol",
          "exportedSymbols": {
            "StableSwap": [
              136
            ]
          },
          "id": 137,
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 1,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "22:23:0"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
              "file": "./lib/math/FixedPoint.sol",
              "id": 2,
              "nodeType": "ImportDirective",
              "scope": 137,
              "sourceUnit": 1816,
              "src": "47:35:0",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol",
              "file": "./pools/stable/StablePoolUserDataHelpers.sol",
              "id": 3,
              "nodeType": "ImportDirective",
              "scope": 137,
              "sourceUnit": 10776,
              "src": "84:54:0",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/stable/StableMath.sol",
              "file": "./pools/stable/StableMath.sol",
              "id": 4,
              "nodeType": "ImportDirective",
              "scope": 137,
              "sourceUnit": 9487,
              "src": "139:39:0",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 5,
                    "name": "StableMath",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 9486,
                    "src": "203:10:0",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_StableMath_$9486",
                      "typeString": "contract StableMath"
                    }
                  },
                  "id": 6,
                  "nodeType": "InheritanceSpecifier",
                  "src": "203:10:0"
                }
              ],
              "contractDependencies": [
                9486
              ],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 136,
              "linearizedBaseContracts": [
                136,
                9486
              ],
              "name": "StableSwap",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 9,
                  "libraryName": {
                    "id": 7,
                    "name": "FixedPoint",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1815,
                    "src": "226:10:0",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FixedPoint_$1815",
                      "typeString": "library FixedPoint"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "220:29:0",
                  "typeName": {
                    "id": 8,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "241:7:0",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 12,
                  "libraryName": {
                    "id": 10,
                    "name": "StablePoolUserDataHelpers",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 10775,
                    "src": "260:25:0",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_StablePoolUserDataHelpers_$10775",
                      "typeString": "library StablePoolUserDataHelpers"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "254:42:0",
                  "typeName": {
                    "id": 11,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "290:5:0",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 14,
                  "mutability": "immutable",
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 136,
                  "src": "301:23:0",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 13,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "301:7:0",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "functionSelector": "1cb2333d",
                  "id": 16,
                  "mutability": "mutable",
                  "name": "amplificationParameter",
                  "nodeType": "VariableDeclaration",
                  "scope": 136,
                  "src": "330:37:0",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "330:7:0",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 46,
                    "nodeType": "Block",
                    "src": "419:236:0",
                    "statements": [
                      {
                        "expression": {
                          "id": 24,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 21,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14,
                            "src": "429:5:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 22,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "437:3:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 23,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "src": "437:10:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "src": "429:18:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 25,
                        "nodeType": "ExpressionStatement",
                        "src": "429:18:0"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 29,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 27,
                                "name": "_amplificationParameter",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18,
                                "src": "466:23:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 28,
                                "name": "_MIN_AMP",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8168,
                                "src": "493:8:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "466:35:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 30,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "503:6:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 31,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MIN_AMP",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 447,
                              "src": "503:14:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 26,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "457:8:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 32,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "457:61:0",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 33,
                        "nodeType": "ExpressionStatement",
                        "src": "457:61:0"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 37,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 35,
                                "name": "_amplificationParameter",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18,
                                "src": "537:23:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 36,
                                "name": "_MAX_AMP",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8174,
                                "src": "564:8:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "537:35:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 38,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "574:6:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 39,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_AMP",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 450,
                              "src": "574:14:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 34,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "528:8:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 40,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "528:61:0",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 41,
                        "nodeType": "ExpressionStatement",
                        "src": "528:61:0"
                      },
                      {
                        "expression": {
                          "id": 44,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 42,
                            "name": "amplificationParameter",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16,
                            "src": "600:22:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 43,
                            "name": "_amplificationParameter",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18,
                            "src": "625:23:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "600:48:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 45,
                        "nodeType": "ExpressionStatement",
                        "src": "600:48:0"
                      }
                    ]
                  },
                  "id": 47,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18,
                        "mutability": "mutable",
                        "name": "_amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 47,
                        "src": "386:31:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "386:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "385:33:0"
                  },
                  "returnParameters": {
                    "id": 20,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "419:0:0"
                  },
                  "scope": 136,
                  "src": "374:281:0",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 58,
                    "nodeType": "Block",
                    "src": "680:94:0",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 53,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 50,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -15,
                                  "src": "698:3:0",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 51,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "698:10:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "id": 52,
                                "name": "owner",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14,
                                "src": "712:5:0",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "698:19:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6e2e",
                              "id": 54,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "719:36:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_0fcea41e877c4f84237ea6b9061acc9b3fc97555de5ba31615eb7b8cf7110239",
                                "typeString": "literal_string \"Only owner can call this function.\""
                              },
                              "value": "Only owner can call this function."
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_0fcea41e877c4f84237ea6b9061acc9b3fc97555de5ba31615eb7b8cf7110239",
                                "typeString": "literal_string \"Only owner can call this function.\""
                              }
                            ],
                            "id": 49,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "690:7:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 55,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "690:66:0",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 56,
                        "nodeType": "ExpressionStatement",
                        "src": "690:66:0"
                      },
                      {
                        "id": 57,
                        "nodeType": "PlaceholderStatement",
                        "src": "766:1:0"
                      }
                    ]
                  },
                  "id": 59,
                  "name": "onlyOwner",
                  "nodeType": "ModifierDefinition",
                  "parameters": {
                    "id": 48,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "680:0:0"
                  },
                  "src": "661:113:0",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 70,
                    "nodeType": "Block",
                    "src": "888:65:0",
                    "statements": [
                      {
                        "expression": {
                          "id": 68,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 66,
                            "name": "amplificationParameter",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16,
                            "src": "898:22:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 67,
                            "name": "_amplificationParameter",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 61,
                            "src": "923:23:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "898:48:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 69,
                        "nodeType": "ExpressionStatement",
                        "src": "898:48:0"
                      }
                    ]
                  },
                  "functionSelector": "97010c6f",
                  "id": 71,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 64,
                      "modifierName": {
                        "id": 63,
                        "name": "onlyOwner",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 59,
                        "src": "874:9:0",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "874:9:0"
                    }
                  ],
                  "name": "updateAmplificationParameter",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 62,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 61,
                        "mutability": "mutable",
                        "name": "_amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 71,
                        "src": "818:31:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 60,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "818:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "817:33:0"
                  },
                  "returnParameters": {
                    "id": 65,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "888:0:0"
                  },
                  "scope": 136,
                  "src": "780:173:0",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 78,
                    "nodeType": "Block",
                    "src": "1028:46:0",
                    "statements": [
                      {
                        "expression": {
                          "id": 76,
                          "name": "amplificationParameter",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16,
                          "src": "1045:22:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 75,
                        "id": 77,
                        "nodeType": "Return",
                        "src": "1038:29:0"
                      }
                    ]
                  },
                  "functionSelector": "6daccffa",
                  "id": 79,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getAmplificationParameter",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 72,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "993:2:0"
                  },
                  "returnParameters": {
                    "id": 75,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 74,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 79,
                        "src": "1019:7:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 73,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1019:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1018:9:0"
                  },
                  "scope": 136,
                  "src": "959:115:0",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 106,
                    "nodeType": "Block",
                    "src": "1272:257:0",
                    "statements": [
                      {
                        "assignments": [
                          94
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 94,
                            "mutability": "mutable",
                            "name": "amountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 106,
                            "src": "1282:17:0",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 93,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1282:7:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 103,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 97,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16,
                              "src": "1358:22:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 98,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 84,
                              "src": "1398:8:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 99,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 86,
                              "src": "1424:7:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 100,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 88,
                              "src": "1449:8:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 101,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 81,
                              "src": "1475:6:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 95,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "1314:10:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 96,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcOutGivenIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8431,
                            "src": "1314:26:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 102,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1314:181:0",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1282:213:0"
                      },
                      {
                        "expression": {
                          "id": 104,
                          "name": "amountOut",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 94,
                          "src": "1513:9:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 92,
                        "id": 105,
                        "nodeType": "Return",
                        "src": "1506:16:0"
                      }
                    ]
                  },
                  "functionSelector": "77a74302",
                  "id": 107,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "onSwapGivenIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 89,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 81,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 107,
                        "src": "1125:14:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 80,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1125:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 84,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 107,
                        "src": "1149:25:0",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 82,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1149:7:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 83,
                          "nodeType": "ArrayTypeName",
                          "src": "1149:9:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 86,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 107,
                        "src": "1184:15:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 85,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1184:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 88,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 107,
                        "src": "1209:16:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 87,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1209:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1115:116:0"
                  },
                  "returnParameters": {
                    "id": 92,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 91,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 107,
                        "src": "1263:7:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 90,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1263:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1262:9:0"
                  },
                  "scope": 136,
                  "src": "1093:436:0",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 134,
                    "nodeType": "Block",
                    "src": "1715:255:0",
                    "statements": [
                      {
                        "assignments": [
                          122
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 122,
                            "mutability": "mutable",
                            "name": "amountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 134,
                            "src": "1725:16:0",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 121,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1725:7:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 131,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 125,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16,
                              "src": "1800:22:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 126,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 112,
                              "src": "1840:8:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 127,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 114,
                              "src": "1866:7:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 128,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 116,
                              "src": "1891:8:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 129,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 109,
                              "src": "1917:6:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 123,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "1756:10:0",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 124,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcInGivenOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8496,
                            "src": "1756:26:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 130,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1756:181:0",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1725:212:0"
                      },
                      {
                        "expression": {
                          "id": 132,
                          "name": "amountIn",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 122,
                          "src": "1955:8:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 120,
                        "id": 133,
                        "nodeType": "Return",
                        "src": "1948:15:0"
                      }
                    ]
                  },
                  "functionSelector": "1ff3bc6b",
                  "id": 135,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "onSwapGivenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 117,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 109,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 135,
                        "src": "1568:14:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 108,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1568:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 112,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 135,
                        "src": "1592:25:0",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 110,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1592:7:0",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 111,
                          "nodeType": "ArrayTypeName",
                          "src": "1592:9:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 114,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 135,
                        "src": "1627:15:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 113,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1627:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 116,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 135,
                        "src": "1652:16:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 115,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1652:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1558:116:0"
                  },
                  "returnParameters": {
                    "id": 120,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 119,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 135,
                        "src": "1706:7:0",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 118,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1706:7:0",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1705:9:0"
                  },
                  "scope": 136,
                  "src": "1535:435:0",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "external"
                }
              ],
              "scope": 137,
              "src": "180:1792:0"
            }
          ],
          "src": "22:1951:0"
        },
        "id": 0
      },
      "src.sol/amm/lib/helpers/AssetHelpers.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/helpers/AssetHelpers.sol",
          "exportedSymbols": {
            "AssetHelpers": [
              266
            ]
          },
          "id": 267,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 138,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:1"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../openzeppelin/IERC20.sol",
              "id": 139,
              "nodeType": "ImportDirective",
              "scope": 267,
              "sourceUnit": 5096,
              "src": "713:36:1",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAsset.sol",
              "file": "../../vault/interfaces/IAsset.sol",
              "id": 140,
              "nodeType": "ImportDirective",
              "scope": 267,
              "sourceUnit": 20646,
              "src": "751:43:1",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IWETH.sol",
              "file": "../../vault/interfaces/IWETH.sol",
              "id": 141,
              "nodeType": "ImportDirective",
              "scope": 267,
              "sourceUnit": 21282,
              "src": "795:42:1",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 266,
              "linearizedBaseContracts": [
                266
              ],
              "name": "AssetHelpers",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": false,
                  "id": 143,
                  "mutability": "immutable",
                  "name": "_weth",
                  "nodeType": "VariableDeclaration",
                  "scope": 266,
                  "src": "928:29:1",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IWETH_$21281",
                    "typeString": "contract IWETH"
                  },
                  "typeName": {
                    "id": 142,
                    "name": "IWETH",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21281,
                    "src": "928:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IWETH_$21281",
                      "typeString": "contract IWETH"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 149,
                  "mutability": "constant",
                  "name": "_ETH",
                  "nodeType": "VariableDeclaration",
                  "scope": 266,
                  "src": "1259:42:1",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 144,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1259:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": {
                    "arguments": [
                      {
                        "hexValue": "30",
                        "id": 147,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1299:1:1",
                        "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": 146,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "1291:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_address_$",
                        "typeString": "type(address)"
                      },
                      "typeName": {
                        "id": 145,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "1291:7:1",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 148,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1291:10:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_address_payable",
                      "typeString": "address payable"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 158,
                    "nodeType": "Block",
                    "src": "1332:29:1",
                    "statements": [
                      {
                        "expression": {
                          "id": 156,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 154,
                            "name": "_weth",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 143,
                            "src": "1342:5:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IWETH_$21281",
                              "typeString": "contract IWETH"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 155,
                            "name": "weth",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 151,
                            "src": "1350:4:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IWETH_$21281",
                              "typeString": "contract IWETH"
                            }
                          },
                          "src": "1342:12:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        },
                        "id": 157,
                        "nodeType": "ExpressionStatement",
                        "src": "1342:12:1"
                      }
                    ]
                  },
                  "id": 159,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 152,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 151,
                        "mutability": "mutable",
                        "name": "weth",
                        "nodeType": "VariableDeclaration",
                        "scope": 159,
                        "src": "1320:10:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IWETH_$21281",
                          "typeString": "contract IWETH"
                        },
                        "typeName": {
                          "id": 150,
                          "name": "IWETH",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21281,
                          "src": "1320:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1319:12:1"
                  },
                  "returnParameters": {
                    "id": 153,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1332:0:1"
                  },
                  "scope": 266,
                  "src": "1308:53:1",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 166,
                    "nodeType": "Block",
                    "src": "1467:29:1",
                    "statements": [
                      {
                        "expression": {
                          "id": 164,
                          "name": "_weth",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 143,
                          "src": "1484:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        },
                        "functionReturnParameters": 163,
                        "id": 165,
                        "nodeType": "Return",
                        "src": "1477:12:1"
                      }
                    ]
                  },
                  "id": 167,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_WETH",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 160,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1434:2:1"
                  },
                  "returnParameters": {
                    "id": 163,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 162,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 167,
                        "src": "1460:5:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IWETH_$21281",
                          "typeString": "contract IWETH"
                        },
                        "typeName": {
                          "id": 161,
                          "name": "IWETH",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21281,
                          "src": "1460:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1459:7:1"
                  },
                  "scope": 266,
                  "src": "1420:76:1",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 182,
                    "nodeType": "Block",
                    "src": "1656:46:1",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "id": 180,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "id": 177,
                                "name": "asset",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 170,
                                "src": "1681:5:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              ],
                              "id": 176,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "1673:7:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 175,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "1673:7:1",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 178,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1673:14:1",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "id": 179,
                            "name": "_ETH",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 149,
                            "src": "1691:4:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "1673:22:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 174,
                        "id": 181,
                        "nodeType": "Return",
                        "src": "1666:29:1"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 168,
                    "nodeType": "StructuredDocumentation",
                    "src": "1502:90:1",
                    "text": " @dev Returns true if `asset` is the sentinel value that represents ETH."
                  },
                  "id": 183,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_isETH",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 171,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 170,
                        "mutability": "mutable",
                        "name": "asset",
                        "nodeType": "VariableDeclaration",
                        "scope": 183,
                        "src": "1613:12:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        },
                        "typeName": {
                          "id": 169,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "1613:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1612:14:1"
                  },
                  "returnParameters": {
                    "id": 174,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 173,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 183,
                        "src": "1650:4:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 172,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "1650:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1649:6:1"
                  },
                  "scope": 266,
                  "src": "1597:105:1",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 201,
                    "nodeType": "Block",
                    "src": "1947:66:1",
                    "statements": [
                      {
                        "expression": {
                          "condition": {
                            "arguments": [
                              {
                                "id": 192,
                                "name": "asset",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 186,
                                "src": "1971:5:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              ],
                              "id": 191,
                              "name": "_isETH",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 183,
                              "src": "1964:6:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_bool_$",
                                "typeString": "function (contract IAsset) pure returns (bool)"
                              }
                            },
                            "id": 193,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1964:13:1",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "arguments": [
                              {
                                "id": 197,
                                "name": "asset",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 186,
                                "src": "2000:5:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              ],
                              "id": 196,
                              "name": "_asIERC20",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 265,
                              "src": "1990:9:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                "typeString": "function (contract IAsset) pure returns (contract IERC20)"
                              }
                            },
                            "id": 198,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1990:16:1",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 199,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "1964:42:1",
                          "trueExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 194,
                              "name": "_WETH",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 167,
                              "src": "1980:5:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IWETH_$21281_$",
                                "typeString": "function () view returns (contract IWETH)"
                              }
                            },
                            "id": 195,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1980:7:1",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IWETH_$21281",
                              "typeString": "contract IWETH"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "functionReturnParameters": 190,
                        "id": 200,
                        "nodeType": "Return",
                        "src": "1957:49:1"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 184,
                    "nodeType": "StructuredDocumentation",
                    "src": "1708:161:1",
                    "text": " @dev Translates `asset` into an equivalent IERC20 token address. If `asset` represents ETH, it will be translated\n to the WETH contract."
                  },
                  "id": 202,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_translateToIERC20",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 187,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 186,
                        "mutability": "mutable",
                        "name": "asset",
                        "nodeType": "VariableDeclaration",
                        "scope": 202,
                        "src": "1902:12:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        },
                        "typeName": {
                          "id": 185,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "1902:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1901:14:1"
                  },
                  "returnParameters": {
                    "id": 190,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 189,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 202,
                        "src": "1939:6:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 188,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "1939:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1938:8:1"
                  },
                  "scope": 266,
                  "src": "1874:139:1",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 248,
                    "nodeType": "Block",
                    "src": "2202:211:1",
                    "statements": [
                      {
                        "assignments": [
                          215
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 215,
                            "mutability": "mutable",
                            "name": "tokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 248,
                            "src": "2212:22:1",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 213,
                                "name": "IERC20",
                                "nodeType": "UserDefinedTypeName",
                                "referencedDeclaration": 5095,
                                "src": "2212:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 214,
                              "nodeType": "ArrayTypeName",
                              "src": "2212:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                "typeString": "contract IERC20[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 222,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 219,
                                "name": "assets",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 206,
                                "src": "2250:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                  "typeString": "contract IAsset[] memory"
                                }
                              },
                              "id": 220,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "2250:13:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 218,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "2237:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (contract IERC20[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 216,
                                "name": "IERC20",
                                "nodeType": "UserDefinedTypeName",
                                "referencedDeclaration": 5095,
                                "src": "2241:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 217,
                              "nodeType": "ArrayTypeName",
                              "src": "2241:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                "typeString": "contract IERC20[]"
                              }
                            }
                          },
                          "id": 221,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2237:27:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2212:52:1"
                      },
                      {
                        "body": {
                          "id": 244,
                          "nodeType": "Block",
                          "src": "2318:66:1",
                          "statements": [
                            {
                              "expression": {
                                "id": 242,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 234,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 215,
                                    "src": "2332:6:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 236,
                                  "indexExpression": {
                                    "id": 235,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 224,
                                    "src": "2339:1:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "2332:9:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 238,
                                        "name": "assets",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 206,
                                        "src": "2363:6:1",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                          "typeString": "contract IAsset[] memory"
                                        }
                                      },
                                      "id": 240,
                                      "indexExpression": {
                                        "id": 239,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 224,
                                        "src": "2370:1:1",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "2363:9:1",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IAsset_$20645",
                                        "typeString": "contract IAsset"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_IAsset_$20645",
                                        "typeString": "contract IAsset"
                                      }
                                    ],
                                    "id": 237,
                                    "name": "_translateToIERC20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [
                                      202,
                                      249
                                    ],
                                    "referencedDeclaration": 202,
                                    "src": "2344:18:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                      "typeString": "function (contract IAsset) view returns (contract IERC20)"
                                    }
                                  },
                                  "id": 241,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2344:29:1",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "2332:41:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 243,
                              "nodeType": "ExpressionStatement",
                              "src": "2332:41:1"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 230,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 227,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 224,
                            "src": "2294:1:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 228,
                              "name": "assets",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 206,
                              "src": "2298:6:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            },
                            "id": 229,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2298:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2294:17:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 245,
                        "initializationExpression": {
                          "assignments": [
                            224
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 224,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 245,
                              "src": "2279:9:1",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 223,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2279:7:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 226,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 225,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2291:1:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2279:13:1"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 232,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "2313:3:1",
                            "subExpression": {
                              "id": 231,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 224,
                              "src": "2315:1:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 233,
                          "nodeType": "ExpressionStatement",
                          "src": "2313:3:1"
                        },
                        "nodeType": "ForStatement",
                        "src": "2274:110:1"
                      },
                      {
                        "expression": {
                          "id": 246,
                          "name": "tokens",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 215,
                          "src": "2400:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        "functionReturnParameters": 211,
                        "id": 247,
                        "nodeType": "Return",
                        "src": "2393:13:1"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 203,
                    "nodeType": "StructuredDocumentation",
                    "src": "2019:86:1",
                    "text": " @dev Same as `_translateToIERC20(IAsset)`, but for an entire array."
                  },
                  "id": 249,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_translateToIERC20",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 207,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 206,
                        "mutability": "mutable",
                        "name": "assets",
                        "nodeType": "VariableDeclaration",
                        "scope": 249,
                        "src": "2138:22:1",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                          "typeString": "contract IAsset[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 204,
                            "name": "IAsset",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20645,
                            "src": "2138:6:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAsset_$20645",
                              "typeString": "contract IAsset"
                            }
                          },
                          "id": 205,
                          "nodeType": "ArrayTypeName",
                          "src": "2138:8:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                            "typeString": "contract IAsset[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2137:24:1"
                  },
                  "returnParameters": {
                    "id": 211,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 210,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 249,
                        "src": "2185:15:1",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 208,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "2185:6:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 209,
                          "nodeType": "ArrayTypeName",
                          "src": "2185:8:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2184:17:1"
                  },
                  "scope": 266,
                  "src": "2110:303:1",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 264,
                    "nodeType": "Block",
                    "src": "2718:46:1",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 260,
                                  "name": "asset",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 252,
                                  "src": "2750:5:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  }
                                ],
                                "id": 259,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2742:7:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 258,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2742:7:1",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 261,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2742:14:1",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 257,
                            "name": "IERC20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5095,
                            "src": "2735:6:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                              "typeString": "type(contract IERC20)"
                            }
                          },
                          "id": 262,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2735:22:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "functionReturnParameters": 256,
                        "id": 263,
                        "nodeType": "Return",
                        "src": "2728:29:1"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 250,
                    "nodeType": "StructuredDocumentation",
                    "src": "2419:230:1",
                    "text": " @dev Interprets `asset` as an IERC20 token. This function should only be called on `asset` if `_isETH` previously\n returned false for it, that is, if `asset` is guaranteed not to be the ETH sentinel value."
                  },
                  "id": 265,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_asIERC20",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 253,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 252,
                        "mutability": "mutable",
                        "name": "asset",
                        "nodeType": "VariableDeclaration",
                        "scope": 265,
                        "src": "2673:12:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        },
                        "typeName": {
                          "id": 251,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "2673:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2672:14:1"
                  },
                  "returnParameters": {
                    "id": 256,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 255,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 265,
                        "src": "2710:6:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 254,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "2710:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2709:8:1"
                  },
                  "scope": 266,
                  "src": "2654:110:1",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 267,
              "src": "839:1927:1"
            }
          ],
          "src": "688:2079:1"
        },
        "id": 1
      },
      "src.sol/amm/lib/helpers/Authentication.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/helpers/Authentication.sol",
          "exportedSymbols": {
            "Authentication": [
              343
            ]
          },
          "id": 344,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 268,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:2"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "./BalancerErrors.sol",
              "id": 269,
              "nodeType": "ImportDirective",
              "scope": 344,
              "sourceUnit": 656,
              "src": "713:30:2",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/IAuthentication.sol",
              "file": "./IAuthentication.sol",
              "id": 270,
              "nodeType": "ImportDirective",
              "scope": 344,
              "sourceUnit": 912,
              "src": "744:31:2",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 272,
                    "name": "IAuthentication",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 911,
                    "src": "1207:15:2",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IAuthentication_$911",
                      "typeString": "contract IAuthentication"
                    }
                  },
                  "id": 273,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1207:15:2"
                }
              ],
              "contractDependencies": [
                911
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 271,
                "nodeType": "StructuredDocumentation",
                "src": "777:393:2",
                "text": " @dev Building block for performing access control on external functions.\n This contract is used via the `authenticate` modifier (or the `_authenticateCaller` function), which can be applied\n to external functions to only make them callable by authorized accounts.\n Derived contracts must implement the `_canPerform` function, which holds the actual access control logic."
              },
              "fullyImplemented": false,
              "id": 343,
              "linearizedBaseContracts": [
                343,
                911
              ],
              "name": "Authentication",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": false,
                  "id": 275,
                  "mutability": "immutable",
                  "name": "_actionIdDisambiguator",
                  "nodeType": "VariableDeclaration",
                  "scope": 343,
                  "src": "1229:48:2",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 274,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1229:7:2",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 285,
                    "nodeType": "Block",
                    "src": "1919:63:2",
                    "statements": [
                      {
                        "expression": {
                          "id": 283,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 281,
                            "name": "_actionIdDisambiguator",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 275,
                            "src": "1929:22:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 282,
                            "name": "actionIdDisambiguator",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 278,
                            "src": "1954:21:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "1929:46:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 284,
                        "nodeType": "ExpressionStatement",
                        "src": "1929:46:2"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 276,
                    "nodeType": "StructuredDocumentation",
                    "src": "1284:587:2",
                    "text": " @dev The main purpose of the `actionIdDisambiguator` is to prevent accidental function selector collisions in\n multi contract systems.\n There are two main uses for it:\n  - if the contract is a singleton, any unique identifier can be used to make the associated action identifiers\n    unique. The contract's own address is a good option.\n  - if the contract belongs to a family that shares action identifiers for the same functions, an identifier\n    shared by the entire family (and no other contract) should be used instead."
                  },
                  "id": 286,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 279,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 278,
                        "mutability": "mutable",
                        "name": "actionIdDisambiguator",
                        "nodeType": "VariableDeclaration",
                        "scope": 286,
                        "src": "1888:29:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 277,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1888:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1887:31:2"
                  },
                  "returnParameters": {
                    "id": 280,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1919:0:2"
                  },
                  "scope": 343,
                  "src": "1876:106:2",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 293,
                    "nodeType": "Block",
                    "src": "2146:49:2",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 289,
                            "name": "_authenticateCaller",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 316,
                            "src": "2156:19:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$__$",
                              "typeString": "function () view"
                            }
                          },
                          "id": 290,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2156:21:2",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 291,
                        "nodeType": "ExpressionStatement",
                        "src": "2156:21:2"
                      },
                      {
                        "id": 292,
                        "nodeType": "PlaceholderStatement",
                        "src": "2187:1:2"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 287,
                    "nodeType": "StructuredDocumentation",
                    "src": "1988:129:2",
                    "text": " @dev Reverts unless the caller is allowed to call this function. Should only be applied to external functions."
                  },
                  "id": 294,
                  "name": "authenticate",
                  "nodeType": "ModifierDefinition",
                  "parameters": {
                    "id": 288,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2143:2:2"
                  },
                  "src": "2122:73:2",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 315,
                    "nodeType": "Block",
                    "src": "2345:136:2",
                    "statements": [
                      {
                        "assignments": [
                          299
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 299,
                            "mutability": "mutable",
                            "name": "actionId",
                            "nodeType": "VariableDeclaration",
                            "scope": 315,
                            "src": "2355:16:2",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 298,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "2355:7:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 304,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 301,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "2386:3:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 302,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sig",
                              "nodeType": "MemberAccess",
                              "src": "2386:7:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes4",
                                "typeString": "bytes4"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes4",
                                "typeString": "bytes4"
                              }
                            ],
                            "id": 300,
                            "name": "getActionId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 333,
                            "src": "2374:11:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes4_$returns$_t_bytes32_$",
                              "typeString": "function (bytes4) view returns (bytes32)"
                            }
                          },
                          "id": 303,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2374:20:2",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2355:39:2"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 307,
                                  "name": "actionId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 299,
                                  "src": "2425:8:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 308,
                                    "name": "msg",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -15,
                                    "src": "2435:3:2",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_message",
                                      "typeString": "msg"
                                    }
                                  },
                                  "id": 309,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "src": "2435:10:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                ],
                                "id": 306,
                                "name": "_canPerform",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 342,
                                "src": "2413:11:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$",
                                  "typeString": "function (bytes32,address) view returns (bool)"
                                }
                              },
                              "id": 310,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2413:33:2",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 311,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2448:6:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 312,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SENDER_NOT_ALLOWED",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 486,
                              "src": "2448:25:2",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 305,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2404:8:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 313,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2404:70:2",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 314,
                        "nodeType": "ExpressionStatement",
                        "src": "2404:70:2"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 295,
                    "nodeType": "StructuredDocumentation",
                    "src": "2201:94:2",
                    "text": " @dev Reverts unless the caller is allowed to call the entry point function."
                  },
                  "id": 316,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_authenticateCaller",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 296,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2328:2:2"
                  },
                  "returnParameters": {
                    "id": 297,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2345:0:2"
                  },
                  "scope": 343,
                  "src": "2300:181:2",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    910
                  ],
                  "body": {
                    "id": 332,
                    "nodeType": "Block",
                    "src": "2564:353:2",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 327,
                                  "name": "_actionIdDisambiguator",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 275,
                                  "src": "2876:22:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 328,
                                  "name": "selector",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 318,
                                  "src": "2900:8:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes4",
                                    "typeString": "bytes4"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes4",
                                    "typeString": "bytes4"
                                  }
                                ],
                                "expression": {
                                  "id": 325,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "2859:3:2",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 326,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encodePacked",
                                "nodeType": "MemberAccess",
                                "src": "2859:16:2",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 329,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2859:50:2",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 324,
                            "name": "keccak256",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -8,
                            "src": "2849:9:2",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 330,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2849:61:2",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 323,
                        "id": 331,
                        "nodeType": "Return",
                        "src": "2842:68:2"
                      }
                    ]
                  },
                  "functionSelector": "851c1bb3",
                  "id": 333,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getActionId",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 320,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2537:8:2"
                  },
                  "parameters": {
                    "id": 319,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 318,
                        "mutability": "mutable",
                        "name": "selector",
                        "nodeType": "VariableDeclaration",
                        "scope": 333,
                        "src": "2508:15:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        "typeName": {
                          "id": 317,
                          "name": "bytes4",
                          "nodeType": "ElementaryTypeName",
                          "src": "2508:6:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes4",
                            "typeString": "bytes4"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2507:17:2"
                  },
                  "returnParameters": {
                    "id": 323,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 322,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 333,
                        "src": "2555:7:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 321,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2555:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2554:9:2"
                  },
                  "scope": 343,
                  "src": "2487:430:2",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "id": 342,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_canPerform",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 338,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 335,
                        "mutability": "mutable",
                        "name": "actionId",
                        "nodeType": "VariableDeclaration",
                        "scope": 342,
                        "src": "2944:16:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 334,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2944:7:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 337,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 342,
                        "src": "2962:12:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 336,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2962:7:2",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2943:32:2"
                  },
                  "returnParameters": {
                    "id": 341,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 340,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 342,
                        "src": "3007:4:2",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 339,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3007:4:2",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3006:6:2"
                  },
                  "scope": 343,
                  "src": "2923:90:2",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                }
              ],
              "scope": 344,
              "src": "1171:1844:2"
            }
          ],
          "src": "688:2328:2"
        },
        "id": 2
      },
      "src.sol/amm/lib/helpers/BalancerErrors.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
          "exportedSymbols": {
            "Errors": [
              655
            ],
            "_require": [
              361
            ],
            "_revert": [
              369
            ]
          },
          "id": 656,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 345,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:3"
            },
            {
              "body": {
                "id": 360,
                "nodeType": "Block",
                "src": "924:43:3",
                "statements": [
                  {
                    "condition": {
                      "id": 354,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "934:10:3",
                      "subExpression": {
                        "id": 353,
                        "name": "condition",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 348,
                        "src": "935:9:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "id": 359,
                    "nodeType": "IfStatement",
                    "src": "930:34:3",
                    "trueBody": {
                      "expression": {
                        "arguments": [
                          {
                            "id": 356,
                            "name": "errorCode",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 350,
                            "src": "954:9:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 355,
                          "name": "_revert",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 369,
                          "src": "946:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                            "typeString": "function (uint256) pure"
                          }
                        },
                        "id": 357,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "946:18:3",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_tuple$__$",
                          "typeString": "tuple()"
                        }
                      },
                      "id": 358,
                      "nodeType": "ExpressionStatement",
                      "src": "946:18:3"
                    }
                  }
                ]
              },
              "documentation": {
                "id": 346,
                "nodeType": "StructuredDocumentation",
                "src": "733:132:3",
                "text": " @dev Reverts if `condition` is false, with a revert reason containing `errorCode`. Only codes up to 999 are\n supported."
              },
              "id": 361,
              "implemented": true,
              "kind": "freeFunction",
              "modifiers": [],
              "name": "_require",
              "nodeType": "FunctionDefinition",
              "parameters": {
                "id": 351,
                "nodeType": "ParameterList",
                "parameters": [
                  {
                    "constant": false,
                    "id": 348,
                    "mutability": "mutable",
                    "name": "condition",
                    "nodeType": "VariableDeclaration",
                    "scope": 361,
                    "src": "884:14:3",
                    "stateVariable": false,
                    "storageLocation": "default",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "typeName": {
                      "id": 347,
                      "name": "bool",
                      "nodeType": "ElementaryTypeName",
                      "src": "884:4:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "visibility": "internal"
                  },
                  {
                    "constant": false,
                    "id": 350,
                    "mutability": "mutable",
                    "name": "errorCode",
                    "nodeType": "VariableDeclaration",
                    "scope": 361,
                    "src": "900:17:3",
                    "stateVariable": false,
                    "storageLocation": "default",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "typeName": {
                      "id": 349,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "900:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "visibility": "internal"
                  }
                ],
                "src": "883:35:3"
              },
              "returnParameters": {
                "id": 352,
                "nodeType": "ParameterList",
                "parameters": [],
                "src": "924:0:3"
              },
              "scope": 656,
              "src": "866:101:3",
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            {
              "body": {
                "id": 368,
                "nodeType": "Block",
                "src": "1115:3131:3",
                "statements": [
                  {
                    "AST": {
                      "nodeType": "YulBlock",
                      "src": "1904:2340:3",
                      "statements": [
                        {
                          "nodeType": "YulVariableDeclaration",
                          "src": "2178:42:3",
                          "value": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "name": "errorCode",
                                    "nodeType": "YulIdentifier",
                                    "src": "2199:9:3"
                                  },
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "2210:2:3",
                                    "type": "",
                                    "value": "10"
                                  }
                                ],
                                "functionName": {
                                  "name": "mod",
                                  "nodeType": "YulIdentifier",
                                  "src": "2195:3:3"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "2195:18:3"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "2215:4:3",
                                "type": "",
                                "value": "0x30"
                              }
                            ],
                            "functionName": {
                              "name": "add",
                              "nodeType": "YulIdentifier",
                              "src": "2191:3:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "2191:29:3"
                          },
                          "variables": [
                            {
                              "name": "units",
                              "nodeType": "YulTypedName",
                              "src": "2182:5:3",
                              "type": ""
                            }
                          ]
                        },
                        {
                          "nodeType": "YulAssignment",
                          "src": "2230:31:3",
                          "value": {
                            "arguments": [
                              {
                                "name": "errorCode",
                                "nodeType": "YulIdentifier",
                                "src": "2247:9:3"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "2258:2:3",
                                "type": "",
                                "value": "10"
                              }
                            ],
                            "functionName": {
                              "name": "div",
                              "nodeType": "YulIdentifier",
                              "src": "2243:3:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "2243:18:3"
                          },
                          "variableNames": [
                            {
                              "name": "errorCode",
                              "nodeType": "YulIdentifier",
                              "src": "2230:9:3"
                            }
                          ]
                        },
                        {
                          "nodeType": "YulVariableDeclaration",
                          "src": "2270:43:3",
                          "value": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "name": "errorCode",
                                    "nodeType": "YulIdentifier",
                                    "src": "2292:9:3"
                                  },
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "2303:2:3",
                                    "type": "",
                                    "value": "10"
                                  }
                                ],
                                "functionName": {
                                  "name": "mod",
                                  "nodeType": "YulIdentifier",
                                  "src": "2288:3:3"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "2288:18:3"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "2308:4:3",
                                "type": "",
                                "value": "0x30"
                              }
                            ],
                            "functionName": {
                              "name": "add",
                              "nodeType": "YulIdentifier",
                              "src": "2284:3:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "2284:29:3"
                          },
                          "variables": [
                            {
                              "name": "tenths",
                              "nodeType": "YulTypedName",
                              "src": "2274:6:3",
                              "type": ""
                            }
                          ]
                        },
                        {
                          "nodeType": "YulAssignment",
                          "src": "2323:31:3",
                          "value": {
                            "arguments": [
                              {
                                "name": "errorCode",
                                "nodeType": "YulIdentifier",
                                "src": "2340:9:3"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "2351:2:3",
                                "type": "",
                                "value": "10"
                              }
                            ],
                            "functionName": {
                              "name": "div",
                              "nodeType": "YulIdentifier",
                              "src": "2336:3:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "2336:18:3"
                          },
                          "variableNames": [
                            {
                              "name": "errorCode",
                              "nodeType": "YulIdentifier",
                              "src": "2323:9:3"
                            }
                          ]
                        },
                        {
                          "nodeType": "YulVariableDeclaration",
                          "src": "2363:45:3",
                          "value": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "name": "errorCode",
                                    "nodeType": "YulIdentifier",
                                    "src": "2387:9:3"
                                  },
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "2398:2:3",
                                    "type": "",
                                    "value": "10"
                                  }
                                ],
                                "functionName": {
                                  "name": "mod",
                                  "nodeType": "YulIdentifier",
                                  "src": "2383:3:3"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "2383:18:3"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "2403:4:3",
                                "type": "",
                                "value": "0x30"
                              }
                            ],
                            "functionName": {
                              "name": "add",
                              "nodeType": "YulIdentifier",
                              "src": "2379:3:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "2379:29:3"
                          },
                          "variables": [
                            {
                              "name": "hundreds",
                              "nodeType": "YulTypedName",
                              "src": "2367:8:3",
                              "type": ""
                            }
                          ]
                        },
                        {
                          "nodeType": "YulVariableDeclaration",
                          "src": "2970:103:3",
                          "value": {
                            "arguments": [
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "2994:3:3",
                                "type": "",
                                "value": "200"
                              },
                              {
                                "arguments": [
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "3003:16:3",
                                    "type": "",
                                    "value": "0x42414c23000000"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "arguments": [
                                          {
                                            "name": "units",
                                            "nodeType": "YulIdentifier",
                                            "src": "3029:5:3"
                                          },
                                          {
                                            "arguments": [
                                              {
                                                "kind": "number",
                                                "nodeType": "YulLiteral",
                                                "src": "3040:1:3",
                                                "type": "",
                                                "value": "8"
                                              },
                                              {
                                                "name": "tenths",
                                                "nodeType": "YulIdentifier",
                                                "src": "3043:6:3"
                                              }
                                            ],
                                            "functionName": {
                                              "name": "shl",
                                              "nodeType": "YulIdentifier",
                                              "src": "3036:3:3"
                                            },
                                            "nodeType": "YulFunctionCall",
                                            "src": "3036:14:3"
                                          }
                                        ],
                                        "functionName": {
                                          "name": "add",
                                          "nodeType": "YulIdentifier",
                                          "src": "3025:3:3"
                                        },
                                        "nodeType": "YulFunctionCall",
                                        "src": "3025:26:3"
                                      },
                                      {
                                        "arguments": [
                                          {
                                            "kind": "number",
                                            "nodeType": "YulLiteral",
                                            "src": "3057:2:3",
                                            "type": "",
                                            "value": "16"
                                          },
                                          {
                                            "name": "hundreds",
                                            "nodeType": "YulIdentifier",
                                            "src": "3061:8:3"
                                          }
                                        ],
                                        "functionName": {
                                          "name": "shl",
                                          "nodeType": "YulIdentifier",
                                          "src": "3053:3:3"
                                        },
                                        "nodeType": "YulFunctionCall",
                                        "src": "3053:17:3"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "3021:3:3"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "3021:50:3"
                                  }
                                ],
                                "functionName": {
                                  "name": "add",
                                  "nodeType": "YulIdentifier",
                                  "src": "2999:3:3"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "2999:73:3"
                              }
                            ],
                            "functionName": {
                              "name": "shl",
                              "nodeType": "YulIdentifier",
                              "src": "2990:3:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "2990:83:3"
                          },
                          "variables": [
                            {
                              "name": "revertReason",
                              "nodeType": "YulTypedName",
                              "src": "2974:12:3",
                              "type": ""
                            }
                          ]
                        },
                        {
                          "expression": {
                            "arguments": [
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "3588:3:3",
                                "type": "",
                                "value": "0x0"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "3593:66:3",
                                "type": "",
                                "value": "0x08c379a000000000000000000000000000000000000000000000000000000000"
                              }
                            ],
                            "functionName": {
                              "name": "mstore",
                              "nodeType": "YulIdentifier",
                              "src": "3581:6:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "3581:79:3"
                          },
                          "nodeType": "YulExpressionStatement",
                          "src": "3581:79:3"
                        },
                        {
                          "expression": {
                            "arguments": [
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "3793:4:3",
                                "type": "",
                                "value": "0x04"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "3799:66:3",
                                "type": "",
                                "value": "0x0000000000000000000000000000000000000000000000000000000000000020"
                              }
                            ],
                            "functionName": {
                              "name": "mstore",
                              "nodeType": "YulIdentifier",
                              "src": "3786:6:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "3786:80:3"
                          },
                          "nodeType": "YulExpressionStatement",
                          "src": "3786:80:3"
                        },
                        {
                          "expression": {
                            "arguments": [
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "3935:4:3",
                                "type": "",
                                "value": "0x24"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "3941:1:3",
                                "type": "",
                                "value": "7"
                              }
                            ],
                            "functionName": {
                              "name": "mstore",
                              "nodeType": "YulIdentifier",
                              "src": "3928:6:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "3928:15:3"
                          },
                          "nodeType": "YulExpressionStatement",
                          "src": "3928:15:3"
                        },
                        {
                          "expression": {
                            "arguments": [
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "4008:4:3",
                                "type": "",
                                "value": "0x44"
                              },
                              {
                                "name": "revertReason",
                                "nodeType": "YulIdentifier",
                                "src": "4014:12:3"
                              }
                            ],
                            "functionName": {
                              "name": "mstore",
                              "nodeType": "YulIdentifier",
                              "src": "4001:6:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "4001:26:3"
                          },
                          "nodeType": "YulExpressionStatement",
                          "src": "4001:26:3"
                        },
                        {
                          "expression": {
                            "arguments": [
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "4231:1:3",
                                "type": "",
                                "value": "0"
                              },
                              {
                                "kind": "number",
                                "nodeType": "YulLiteral",
                                "src": "4234:3:3",
                                "type": "",
                                "value": "100"
                              }
                            ],
                            "functionName": {
                              "name": "revert",
                              "nodeType": "YulIdentifier",
                              "src": "4224:6:3"
                            },
                            "nodeType": "YulFunctionCall",
                            "src": "4224:14:3"
                          },
                          "nodeType": "YulExpressionStatement",
                          "src": "4224:14:3"
                        }
                      ]
                    },
                    "evmVersion": "istanbul",
                    "externalReferences": [
                      {
                        "declaration": 364,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2199:9:3",
                        "valueSize": 1
                      },
                      {
                        "declaration": 364,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2230:9:3",
                        "valueSize": 1
                      },
                      {
                        "declaration": 364,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2247:9:3",
                        "valueSize": 1
                      },
                      {
                        "declaration": 364,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2292:9:3",
                        "valueSize": 1
                      },
                      {
                        "declaration": 364,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2323:9:3",
                        "valueSize": 1
                      },
                      {
                        "declaration": 364,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2340:9:3",
                        "valueSize": 1
                      },
                      {
                        "declaration": 364,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2387:9:3",
                        "valueSize": 1
                      }
                    ],
                    "id": 367,
                    "nodeType": "InlineAssembly",
                    "src": "1895:2349:3"
                  }
                ]
              },
              "documentation": {
                "id": 362,
                "nodeType": "StructuredDocumentation",
                "src": "969:104:3",
                "text": " @dev Reverts with a revert reason containing `errorCode`. Only codes up to 999 are supported."
              },
              "id": 369,
              "implemented": true,
              "kind": "freeFunction",
              "modifiers": [],
              "name": "_revert",
              "nodeType": "FunctionDefinition",
              "parameters": {
                "id": 365,
                "nodeType": "ParameterList",
                "parameters": [
                  {
                    "constant": false,
                    "id": 364,
                    "mutability": "mutable",
                    "name": "errorCode",
                    "nodeType": "VariableDeclaration",
                    "scope": 369,
                    "src": "1091:17:3",
                    "stateVariable": false,
                    "storageLocation": "default",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "typeName": {
                      "id": 363,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "1091:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "visibility": "internal"
                  }
                ],
                "src": "1090:19:3"
              },
              "returnParameters": {
                "id": 366,
                "nodeType": "ParameterList",
                "parameters": [],
                "src": "1115:0:3"
              },
              "scope": 656,
              "src": "1074:3172:3",
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "fullyImplemented": true,
              "id": 655,
              "linearizedBaseContracts": [
                655
              ],
              "name": "Errors",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": true,
                  "id": 372,
                  "mutability": "constant",
                  "name": "ADD_OVERFLOW",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4281:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 370,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4281:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "30",
                    "id": 371,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4322:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_0_by_1",
                      "typeString": "int_const 0"
                    },
                    "value": "0"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 375,
                  "mutability": "constant",
                  "name": "SUB_OVERFLOW",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4329:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 373,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4329:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "31",
                    "id": 374,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4370:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1_by_1",
                      "typeString": "int_const 1"
                    },
                    "value": "1"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 378,
                  "mutability": "constant",
                  "name": "SUB_UNDERFLOW",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4377:43:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 376,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4377:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "32",
                    "id": 377,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4419:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_2_by_1",
                      "typeString": "int_const 2"
                    },
                    "value": "2"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 381,
                  "mutability": "constant",
                  "name": "MUL_OVERFLOW",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4426:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 379,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4426:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "33",
                    "id": 380,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4467:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_3_by_1",
                      "typeString": "int_const 3"
                    },
                    "value": "3"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 384,
                  "mutability": "constant",
                  "name": "ZERO_DIVISION",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4474:43:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 382,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4474:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "34",
                    "id": 383,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4516:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_4_by_1",
                      "typeString": "int_const 4"
                    },
                    "value": "4"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 387,
                  "mutability": "constant",
                  "name": "DIV_INTERNAL",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4523:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 385,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4523:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "35",
                    "id": 386,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4564:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_5_by_1",
                      "typeString": "int_const 5"
                    },
                    "value": "5"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 390,
                  "mutability": "constant",
                  "name": "X_OUT_OF_BOUNDS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4571:45:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 388,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4571:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "36",
                    "id": 389,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4615:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_6_by_1",
                      "typeString": "int_const 6"
                    },
                    "value": "6"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 393,
                  "mutability": "constant",
                  "name": "Y_OUT_OF_BOUNDS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4622:45:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 391,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4622:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "37",
                    "id": 392,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4666:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_7_by_1",
                      "typeString": "int_const 7"
                    },
                    "value": "7"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 396,
                  "mutability": "constant",
                  "name": "PRODUCT_OUT_OF_BOUNDS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4673:51:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 394,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4673:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "38",
                    "id": 395,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4723:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_8_by_1",
                      "typeString": "int_const 8"
                    },
                    "value": "8"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 399,
                  "mutability": "constant",
                  "name": "INVALID_EXPONENT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4730:46:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 397,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4730:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "39",
                    "id": 398,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4775:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_9_by_1",
                      "typeString": "int_const 9"
                    },
                    "value": "9"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 402,
                  "mutability": "constant",
                  "name": "OUT_OF_BOUNDS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4796:45:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 400,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4796:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "313030",
                    "id": 401,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4838:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_100_by_1",
                      "typeString": "int_const 100"
                    },
                    "value": "100"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 405,
                  "mutability": "constant",
                  "name": "UNSORTED_ARRAY",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4847:46:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 403,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4847:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "313031",
                    "id": 404,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4890:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_101_by_1",
                      "typeString": "int_const 101"
                    },
                    "value": "101"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 408,
                  "mutability": "constant",
                  "name": "UNSORTED_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4899:47:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 406,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4899:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "313032",
                    "id": 407,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4943:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_102_by_1",
                      "typeString": "int_const 102"
                    },
                    "value": "102"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 411,
                  "mutability": "constant",
                  "name": "INPUT_LENGTH_MISMATCH",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "4952:53:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 409,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4952:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "313033",
                    "id": 410,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5002:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_103_by_1",
                      "typeString": "int_const 103"
                    },
                    "value": "103"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 414,
                  "mutability": "constant",
                  "name": "ZERO_TOKEN",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5011:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 412,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5011:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "313034",
                    "id": 413,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5050:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_104_by_1",
                      "typeString": "int_const 104"
                    },
                    "value": "104"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 417,
                  "mutability": "constant",
                  "name": "MIN_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5080:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 415,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5080:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323030",
                    "id": 416,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5119:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_200_by_1",
                      "typeString": "int_const 200"
                    },
                    "value": "200"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 420,
                  "mutability": "constant",
                  "name": "MAX_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5128:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 418,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5128:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323031",
                    "id": 419,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5167:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_201_by_1",
                      "typeString": "int_const 201"
                    },
                    "value": "201"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 423,
                  "mutability": "constant",
                  "name": "MAX_SWAP_FEE_PERCENTAGE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5176:55:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 421,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5176:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323032",
                    "id": 422,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5228:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_202_by_1",
                      "typeString": "int_const 202"
                    },
                    "value": "202"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 426,
                  "mutability": "constant",
                  "name": "MIN_SWAP_FEE_PERCENTAGE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5237:55:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 424,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5237:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323033",
                    "id": 425,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5289:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_203_by_1",
                      "typeString": "int_const 203"
                    },
                    "value": "203"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 429,
                  "mutability": "constant",
                  "name": "MINIMUM_BPT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5298:43:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 427,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5298:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323034",
                    "id": 428,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5338:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_204_by_1",
                      "typeString": "int_const 204"
                    },
                    "value": "204"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 432,
                  "mutability": "constant",
                  "name": "CALLER_NOT_VAULT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5347:48:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 430,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5347:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323035",
                    "id": 431,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5392:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_205_by_1",
                      "typeString": "int_const 205"
                    },
                    "value": "205"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 435,
                  "mutability": "constant",
                  "name": "UNINITIALIZED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5401:45:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 433,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5401:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323036",
                    "id": 434,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5443:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_206_by_1",
                      "typeString": "int_const 206"
                    },
                    "value": "206"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 438,
                  "mutability": "constant",
                  "name": "BPT_IN_MAX_AMOUNT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5452:49:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 436,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5452:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323037",
                    "id": 437,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5498:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_207_by_1",
                      "typeString": "int_const 207"
                    },
                    "value": "207"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 441,
                  "mutability": "constant",
                  "name": "BPT_OUT_MIN_AMOUNT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5507:50:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 439,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5507:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323038",
                    "id": 440,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5554:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_208_by_1",
                      "typeString": "int_const 208"
                    },
                    "value": "208"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 444,
                  "mutability": "constant",
                  "name": "EXPIRED_PERMIT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5563:46:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 442,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5563:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "323039",
                    "id": 443,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5606:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_209_by_1",
                      "typeString": "int_const 209"
                    },
                    "value": "209"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 447,
                  "mutability": "constant",
                  "name": "MIN_AMP",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5629:39:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 445,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5629:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333030",
                    "id": 446,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5665:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_300_by_1",
                      "typeString": "int_const 300"
                    },
                    "value": "300"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 450,
                  "mutability": "constant",
                  "name": "MAX_AMP",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5674:39:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 448,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5674:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333031",
                    "id": 449,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5710:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_301_by_1",
                      "typeString": "int_const 301"
                    },
                    "value": "301"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 453,
                  "mutability": "constant",
                  "name": "MIN_WEIGHT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5719:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 451,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5719:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333032",
                    "id": 452,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5758:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_302_by_1",
                      "typeString": "int_const 302"
                    },
                    "value": "302"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 456,
                  "mutability": "constant",
                  "name": "MAX_STABLE_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5767:49:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 454,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5767:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333033",
                    "id": 455,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5813:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_303_by_1",
                      "typeString": "int_const 303"
                    },
                    "value": "303"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 459,
                  "mutability": "constant",
                  "name": "MAX_IN_RATIO",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5822:44:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 457,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5822:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333034",
                    "id": 458,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5863:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_304_by_1",
                      "typeString": "int_const 304"
                    },
                    "value": "304"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 462,
                  "mutability": "constant",
                  "name": "MAX_OUT_RATIO",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5872:45:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 460,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5872:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333035",
                    "id": 461,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5914:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_305_by_1",
                      "typeString": "int_const 305"
                    },
                    "value": "305"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 465,
                  "mutability": "constant",
                  "name": "MIN_BPT_IN_FOR_TOKEN_OUT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5923:56:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 463,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5923:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333036",
                    "id": 464,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "5976:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_306_by_1",
                      "typeString": "int_const 306"
                    },
                    "value": "306"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 468,
                  "mutability": "constant",
                  "name": "MAX_OUT_BPT_FOR_TOKEN_IN",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "5985:56:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 466,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5985:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333037",
                    "id": 467,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6038:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_307_by_1",
                      "typeString": "int_const 307"
                    },
                    "value": "307"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 471,
                  "mutability": "constant",
                  "name": "NORMALIZED_WEIGHT_INVARIANT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6047:59:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 469,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6047:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333038",
                    "id": 470,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6103:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_308_by_1",
                      "typeString": "int_const 308"
                    },
                    "value": "308"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 474,
                  "mutability": "constant",
                  "name": "INVALID_TOKEN",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6112:45:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 472,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6112:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333039",
                    "id": 473,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6154:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_309_by_1",
                      "typeString": "int_const 309"
                    },
                    "value": "309"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 477,
                  "mutability": "constant",
                  "name": "UNHANDLED_JOIN_KIND",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6163:51:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 475,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6163:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333130",
                    "id": 476,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6211:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_310_by_1",
                      "typeString": "int_const 310"
                    },
                    "value": "310"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 480,
                  "mutability": "constant",
                  "name": "ZERO_INVARIANT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6220:46:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 478,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6220:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "333131",
                    "id": 479,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6263:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_311_by_1",
                      "typeString": "int_const 311"
                    },
                    "value": "311"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 483,
                  "mutability": "constant",
                  "name": "REENTRANCY",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6284:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 481,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6284:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343030",
                    "id": 482,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6323:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_400_by_1",
                      "typeString": "int_const 400"
                    },
                    "value": "400"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 486,
                  "mutability": "constant",
                  "name": "SENDER_NOT_ALLOWED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6332:50:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 484,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6332:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343031",
                    "id": 485,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6379:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_401_by_1",
                      "typeString": "int_const 401"
                    },
                    "value": "401"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 489,
                  "mutability": "constant",
                  "name": "PAUSED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6388:38:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 487,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6388:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343032",
                    "id": 488,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6423:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_402_by_1",
                      "typeString": "int_const 402"
                    },
                    "value": "402"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 492,
                  "mutability": "constant",
                  "name": "PAUSE_WINDOW_EXPIRED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6432:52:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 490,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6432:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343033",
                    "id": 491,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6481:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_403_by_1",
                      "typeString": "int_const 403"
                    },
                    "value": "403"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 495,
                  "mutability": "constant",
                  "name": "MAX_PAUSE_WINDOW_DURATION",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6490:57:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 493,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6490:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343034",
                    "id": 494,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6544:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_404_by_1",
                      "typeString": "int_const 404"
                    },
                    "value": "404"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 498,
                  "mutability": "constant",
                  "name": "MAX_BUFFER_PERIOD_DURATION",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6553:58:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 496,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6553:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343035",
                    "id": 497,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6608:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_405_by_1",
                      "typeString": "int_const 405"
                    },
                    "value": "405"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 501,
                  "mutability": "constant",
                  "name": "INSUFFICIENT_BALANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6617:52:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 499,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6617:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343036",
                    "id": 500,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6666:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_406_by_1",
                      "typeString": "int_const 406"
                    },
                    "value": "406"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 504,
                  "mutability": "constant",
                  "name": "INSUFFICIENT_ALLOWANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6675:54:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 502,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6675:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343037",
                    "id": 503,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6726:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_407_by_1",
                      "typeString": "int_const 407"
                    },
                    "value": "407"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 507,
                  "mutability": "constant",
                  "name": "ERC20_TRANSFER_FROM_ZERO_ADDRESS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6735:64:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 505,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6735:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343038",
                    "id": 506,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6796:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_408_by_1",
                      "typeString": "int_const 408"
                    },
                    "value": "408"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 510,
                  "mutability": "constant",
                  "name": "ERC20_TRANSFER_TO_ZERO_ADDRESS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6805:62:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 508,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6805:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343039",
                    "id": 509,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6864:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_409_by_1",
                      "typeString": "int_const 409"
                    },
                    "value": "409"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 513,
                  "mutability": "constant",
                  "name": "ERC20_MINT_TO_ZERO_ADDRESS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6873:58:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 511,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6873:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343130",
                    "id": 512,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6928:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_410_by_1",
                      "typeString": "int_const 410"
                    },
                    "value": "410"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 516,
                  "mutability": "constant",
                  "name": "ERC20_BURN_FROM_ZERO_ADDRESS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "6937:60:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 514,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6937:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343131",
                    "id": 515,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6994:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_411_by_1",
                      "typeString": "int_const 411"
                    },
                    "value": "411"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 519,
                  "mutability": "constant",
                  "name": "ERC20_APPROVE_FROM_ZERO_ADDRESS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7003:63:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 517,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7003:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343132",
                    "id": 518,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7063:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_412_by_1",
                      "typeString": "int_const 412"
                    },
                    "value": "412"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 522,
                  "mutability": "constant",
                  "name": "ERC20_APPROVE_TO_ZERO_ADDRESS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7072:61:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 520,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7072:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343133",
                    "id": 521,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7130:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_413_by_1",
                      "typeString": "int_const 413"
                    },
                    "value": "413"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 525,
                  "mutability": "constant",
                  "name": "ERC20_TRANSFER_EXCEEDS_ALLOWANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7139:64:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 523,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7139:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343134",
                    "id": 524,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7200:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_414_by_1",
                      "typeString": "int_const 414"
                    },
                    "value": "414"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 528,
                  "mutability": "constant",
                  "name": "ERC20_DECREASED_ALLOWANCE_BELOW_ZERO",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7209:68:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 526,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7209:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343135",
                    "id": 527,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7274:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_415_by_1",
                      "typeString": "int_const 415"
                    },
                    "value": "415"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 531,
                  "mutability": "constant",
                  "name": "ERC20_TRANSFER_EXCEEDS_BALANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7283:62:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 529,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7283:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343136",
                    "id": 530,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7342:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_416_by_1",
                      "typeString": "int_const 416"
                    },
                    "value": "416"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 534,
                  "mutability": "constant",
                  "name": "ERC20_BURN_EXCEEDS_ALLOWANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7351:60:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 532,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7351:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343137",
                    "id": 533,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7408:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_417_by_1",
                      "typeString": "int_const 417"
                    },
                    "value": "417"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 537,
                  "mutability": "constant",
                  "name": "SAFE_ERC20_CALL_FAILED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7417:54:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 535,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7417:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343138",
                    "id": 536,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7468:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_418_by_1",
                      "typeString": "int_const 418"
                    },
                    "value": "418"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 540,
                  "mutability": "constant",
                  "name": "ADDRESS_INSUFFICIENT_BALANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7477:60:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 538,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7477:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343139",
                    "id": 539,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7534:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_419_by_1",
                      "typeString": "int_const 419"
                    },
                    "value": "419"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 543,
                  "mutability": "constant",
                  "name": "ADDRESS_CANNOT_SEND_VALUE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7543:57:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 541,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7543:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343230",
                    "id": 542,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7597:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_420_by_1",
                      "typeString": "int_const 420"
                    },
                    "value": "420"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 546,
                  "mutability": "constant",
                  "name": "SAFE_CAST_VALUE_CANT_FIT_INT256",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7606:63:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 544,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7606:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343231",
                    "id": 545,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7666:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_421_by_1",
                      "typeString": "int_const 421"
                    },
                    "value": "421"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 549,
                  "mutability": "constant",
                  "name": "GRANT_SENDER_NOT_ADMIN",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7675:54:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 547,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7675:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343232",
                    "id": 548,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7726:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_422_by_1",
                      "typeString": "int_const 422"
                    },
                    "value": "422"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 552,
                  "mutability": "constant",
                  "name": "REVOKE_SENDER_NOT_ADMIN",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7735:55:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 550,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7735:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343233",
                    "id": 551,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7787:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_423_by_1",
                      "typeString": "int_const 423"
                    },
                    "value": "423"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 555,
                  "mutability": "constant",
                  "name": "RENOUNCE_SENDER_NOT_ALLOWED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7796:59:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 553,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7796:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343234",
                    "id": 554,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7852:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_424_by_1",
                      "typeString": "int_const 424"
                    },
                    "value": "424"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 558,
                  "mutability": "constant",
                  "name": "BUFFER_PERIOD_EXPIRED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7861:53:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 556,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7861:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "343235",
                    "id": 557,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7911:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_425_by_1",
                      "typeString": "int_const 425"
                    },
                    "value": "425"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 561,
                  "mutability": "constant",
                  "name": "INVALID_POOL_ID",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7934:47:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 559,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7934:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353030",
                    "id": 560,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "7978:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_500_by_1",
                      "typeString": "int_const 500"
                    },
                    "value": "500"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 564,
                  "mutability": "constant",
                  "name": "CALLER_NOT_POOL",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "7987:47:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 562,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7987:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353031",
                    "id": 563,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8031:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_501_by_1",
                      "typeString": "int_const 501"
                    },
                    "value": "501"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 567,
                  "mutability": "constant",
                  "name": "SENDER_NOT_ASSET_MANAGER",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8040:56:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 565,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8040:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353032",
                    "id": 566,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8093:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_502_by_1",
                      "typeString": "int_const 502"
                    },
                    "value": "502"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 570,
                  "mutability": "constant",
                  "name": "USER_DOESNT_ALLOW_RELAYER",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8102:57:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 568,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8102:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353033",
                    "id": 569,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8156:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_503_by_1",
                      "typeString": "int_const 503"
                    },
                    "value": "503"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 573,
                  "mutability": "constant",
                  "name": "INVALID_SIGNATURE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8165:49:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 571,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8165:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353034",
                    "id": 572,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8211:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_504_by_1",
                      "typeString": "int_const 504"
                    },
                    "value": "504"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 576,
                  "mutability": "constant",
                  "name": "EXIT_BELOW_MIN",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8220:46:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 574,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8220:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353035",
                    "id": 575,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8263:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_505_by_1",
                      "typeString": "int_const 505"
                    },
                    "value": "505"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 579,
                  "mutability": "constant",
                  "name": "JOIN_ABOVE_MAX",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8272:46:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 577,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8272:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353036",
                    "id": 578,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8315:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_506_by_1",
                      "typeString": "int_const 506"
                    },
                    "value": "506"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 582,
                  "mutability": "constant",
                  "name": "SWAP_LIMIT",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8324:42:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 580,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8324:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353037",
                    "id": 581,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8363:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_507_by_1",
                      "typeString": "int_const 507"
                    },
                    "value": "507"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 585,
                  "mutability": "constant",
                  "name": "SWAP_DEADLINE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8372:45:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 583,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8372:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353038",
                    "id": 584,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8414:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_508_by_1",
                      "typeString": "int_const 508"
                    },
                    "value": "508"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 588,
                  "mutability": "constant",
                  "name": "CANNOT_SWAP_SAME_TOKEN",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8423:54:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 586,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8423:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353039",
                    "id": 587,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8474:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_509_by_1",
                      "typeString": "int_const 509"
                    },
                    "value": "509"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 591,
                  "mutability": "constant",
                  "name": "UNKNOWN_AMOUNT_IN_FIRST_SWAP",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8483:60:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 589,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8483:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353130",
                    "id": 590,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8540:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_510_by_1",
                      "typeString": "int_const 510"
                    },
                    "value": "510"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 594,
                  "mutability": "constant",
                  "name": "MALCONSTRUCTED_MULTIHOP_SWAP",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8549:60:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 592,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8549:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353131",
                    "id": 593,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8606:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_511_by_1",
                      "typeString": "int_const 511"
                    },
                    "value": "511"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 597,
                  "mutability": "constant",
                  "name": "INTERNAL_BALANCE_OVERFLOW",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8615:57:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 595,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8615:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353132",
                    "id": 596,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8669:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_512_by_1",
                      "typeString": "int_const 512"
                    },
                    "value": "512"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 600,
                  "mutability": "constant",
                  "name": "INSUFFICIENT_INTERNAL_BALANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8678:61:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 598,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8678:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353133",
                    "id": 599,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8736:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_513_by_1",
                      "typeString": "int_const 513"
                    },
                    "value": "513"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 603,
                  "mutability": "constant",
                  "name": "INVALID_ETH_INTERNAL_BALANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8745:60:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 601,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8745:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353134",
                    "id": 602,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8802:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_514_by_1",
                      "typeString": "int_const 514"
                    },
                    "value": "514"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 606,
                  "mutability": "constant",
                  "name": "INVALID_POST_LOAN_BALANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8811:57:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 604,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8811:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353135",
                    "id": 605,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8865:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_515_by_1",
                      "typeString": "int_const 515"
                    },
                    "value": "515"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 609,
                  "mutability": "constant",
                  "name": "INSUFFICIENT_ETH",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8874:48:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 607,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8874:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353136",
                    "id": 608,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8919:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_516_by_1",
                      "typeString": "int_const 516"
                    },
                    "value": "516"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 612,
                  "mutability": "constant",
                  "name": "UNALLOCATED_ETH",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8928:47:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 610,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8928:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353137",
                    "id": 611,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "8972:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_517_by_1",
                      "typeString": "int_const 517"
                    },
                    "value": "517"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 615,
                  "mutability": "constant",
                  "name": "ETH_TRANSFER",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "8981:44:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 613,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8981:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353138",
                    "id": 614,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9022:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_518_by_1",
                      "typeString": "int_const 518"
                    },
                    "value": "518"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 618,
                  "mutability": "constant",
                  "name": "CANNOT_USE_ETH_SENTINEL",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9031:55:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 616,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9031:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353139",
                    "id": 617,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9083:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_519_by_1",
                      "typeString": "int_const 519"
                    },
                    "value": "519"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 621,
                  "mutability": "constant",
                  "name": "TOKENS_MISMATCH",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9092:47:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 619,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9092:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353230",
                    "id": 620,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9136:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_520_by_1",
                      "typeString": "int_const 520"
                    },
                    "value": "520"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 624,
                  "mutability": "constant",
                  "name": "TOKEN_NOT_REGISTERED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9145:52:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 622,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9145:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353231",
                    "id": 623,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9194:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_521_by_1",
                      "typeString": "int_const 521"
                    },
                    "value": "521"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 627,
                  "mutability": "constant",
                  "name": "TOKEN_ALREADY_REGISTERED",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9203:56:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 625,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9203:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353232",
                    "id": 626,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9256:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_522_by_1",
                      "typeString": "int_const 522"
                    },
                    "value": "522"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 630,
                  "mutability": "constant",
                  "name": "TOKENS_ALREADY_SET",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9265:50:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 628,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9265:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353233",
                    "id": 629,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9312:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_523_by_1",
                      "typeString": "int_const 523"
                    },
                    "value": "523"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 633,
                  "mutability": "constant",
                  "name": "TOKENS_LENGTH_MUST_BE_2",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9321:55:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 631,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9321:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353234",
                    "id": 632,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9373:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_524_by_1",
                      "typeString": "int_const 524"
                    },
                    "value": "524"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 636,
                  "mutability": "constant",
                  "name": "NONZERO_TOKEN_BALANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9382:53:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 634,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9382:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353235",
                    "id": 635,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9432:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_525_by_1",
                      "typeString": "int_const 525"
                    },
                    "value": "525"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 639,
                  "mutability": "constant",
                  "name": "BALANCE_TOTAL_OVERFLOW",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9441:54:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 637,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9441:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353236",
                    "id": 638,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9492:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_526_by_1",
                      "typeString": "int_const 526"
                    },
                    "value": "526"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 642,
                  "mutability": "constant",
                  "name": "POOL_NO_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9501:46:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 640,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9501:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353237",
                    "id": 641,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9544:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_527_by_1",
                      "typeString": "int_const 527"
                    },
                    "value": "527"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 645,
                  "mutability": "constant",
                  "name": "INSUFFICIENT_FLASH_LOAN_BALANCE",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9553:63:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 643,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9553:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "353238",
                    "id": 644,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9613:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_528_by_1",
                      "typeString": "int_const 528"
                    },
                    "value": "528"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 648,
                  "mutability": "constant",
                  "name": "SWAP_FEE_PERCENTAGE_TOO_HIGH",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9635:60:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 646,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9635:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "363030",
                    "id": 647,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9692:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_600_by_1",
                      "typeString": "int_const 600"
                    },
                    "value": "600"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 651,
                  "mutability": "constant",
                  "name": "FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9701:66:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 649,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9701:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "363031",
                    "id": 650,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9764:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_601_by_1",
                      "typeString": "int_const 601"
                    },
                    "value": "601"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 654,
                  "mutability": "constant",
                  "name": "INSUFFICIENT_FLASH_LOAN_FEES",
                  "nodeType": "VariableDeclaration",
                  "scope": 655,
                  "src": "9773:60:3",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 652,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9773:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "363032",
                    "id": 653,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "9830:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_602_by_1",
                      "typeString": "int_const 602"
                    },
                    "value": "602"
                  },
                  "visibility": "internal"
                }
              ],
              "scope": 656,
              "src": "4248:5588:3"
            }
          ],
          "src": "688:9149:3"
        },
        "id": 3
      },
      "src.sol/amm/lib/helpers/BalancerHelpers.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/helpers/BalancerHelpers.sol",
          "exportedSymbols": {
            "BalancerHelpers": [
              900
            ]
          },
          "id": 901,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 657,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:4"
            },
            {
              "id": 658,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:4"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../math/Math.sol",
              "id": 659,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 3351,
              "src": "747:26:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
              "file": "../math/FixedPoint.sol",
              "id": 660,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 1816,
              "src": "774:32:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "./InputHelpers.sol",
              "id": 661,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 1043,
              "src": "808:28:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/AssetHelpers.sol",
              "file": "./AssetHelpers.sol",
              "id": 662,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 267,
              "src": "837:28:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "./BalancerErrors.sol",
              "id": 663,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 656,
              "src": "866:30:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/BasePool.sol",
              "file": "../../pools/BasePool.sol",
              "id": 664,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 7929,
              "src": "898:34:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/ProtocolFeesCollector.sol",
              "file": "../../vault/ProtocolFeesCollector.sol",
              "id": 665,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 16288,
              "src": "933:47:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IWETH.sol",
              "file": "../../vault/interfaces/IWETH.sol",
              "id": 666,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 21282,
              "src": "981:42:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "../../vault/interfaces/IVault.sol",
              "id": 667,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 21267,
              "src": "1024:43:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/BalanceAllocation.sol",
              "file": "../../vault/balances/BalanceAllocation.sol",
              "id": 668,
              "nodeType": "ImportDirective",
              "scope": 901,
              "sourceUnit": 19058,
              "src": "1068:52:4",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 670,
                    "name": "AssetHelpers",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 266,
                    "src": "1468:12:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_AssetHelpers_$266",
                      "typeString": "contract AssetHelpers"
                    }
                  },
                  "id": 671,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1468:12:4"
                }
              ],
              "contractDependencies": [
                266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 669,
                "nodeType": "StructuredDocumentation",
                "src": "1122:317:4",
                "text": " @dev This contract simply builds on top of the Balancer V2 architecture to provide useful helpers to users.\n It connects different functionalities of the protocol components to allow accessing information that would\n have required a more cumbersome setup if we wanted to provide these already built-in."
              },
              "fullyImplemented": true,
              "id": 900,
              "linearizedBaseContracts": [
                900,
                266
              ],
              "name": "BalancerHelpers",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 674,
                  "libraryName": {
                    "id": 672,
                    "name": "Math",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3350,
                    "src": "1493:4:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Math_$3350",
                      "typeString": "library Math"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1487:23:4",
                  "typeName": {
                    "id": 673,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1502:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 677,
                  "libraryName": {
                    "id": 675,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "1521:17:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1515:36:4",
                  "typeName": {
                    "id": 676,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1543:7:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                },
                {
                  "id": 681,
                  "libraryName": {
                    "id": 678,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "1562:17:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1556:38:4",
                  "typeName": {
                    "baseType": {
                      "id": 679,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1584:7:4",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "id": 680,
                    "nodeType": "ArrayTypeName",
                    "src": "1584:9:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                      "typeString": "bytes32[]"
                    }
                  }
                },
                {
                  "constant": false,
                  "functionSelector": "fbfa77cf",
                  "id": 683,
                  "mutability": "immutable",
                  "name": "vault",
                  "nodeType": "VariableDeclaration",
                  "scope": 900,
                  "src": "1600:29:4",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IVault_$21266",
                    "typeString": "contract IVault"
                  },
                  "typeName": {
                    "id": 682,
                    "name": "IVault",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21266,
                    "src": "1600:6:4",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IVault_$21266",
                      "typeString": "contract IVault"
                    }
                  },
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 697,
                    "nodeType": "Block",
                    "src": "1691:31:4",
                    "statements": [
                      {
                        "expression": {
                          "id": 695,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 693,
                            "name": "vault",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 683,
                            "src": "1701:5:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IVault_$21266",
                              "typeString": "contract IVault"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 694,
                            "name": "_vault",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 685,
                            "src": "1709:6:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IVault_$21266",
                              "typeString": "contract IVault"
                            }
                          },
                          "src": "1701:14:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "id": 696,
                        "nodeType": "ExpressionStatement",
                        "src": "1701:14:4"
                      }
                    ]
                  },
                  "id": 698,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 688,
                              "name": "_vault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 685,
                              "src": "1676:6:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 689,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "WETH",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21265,
                            "src": "1676:11:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IWETH_$21281_$",
                              "typeString": "function () view external returns (contract IWETH)"
                            }
                          },
                          "id": 690,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1676:13:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        }
                      ],
                      "id": 691,
                      "modifierName": {
                        "id": 687,
                        "name": "AssetHelpers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 266,
                        "src": "1663:12:4",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_AssetHelpers_$266_$",
                          "typeString": "type(contract AssetHelpers)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1663:27:4"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 686,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 685,
                        "mutability": "mutable",
                        "name": "_vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 698,
                        "src": "1648:13:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 684,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "1648:6:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1647:15:4"
                  },
                  "returnParameters": {
                    "id": 692,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1691:0:4"
                  },
                  "scope": 900,
                  "src": "1636:86:4",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 760,
                    "nodeType": "Block",
                    "src": "1937:516:4",
                    "statements": [
                      {
                        "assignments": [
                          715,
                          null
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 715,
                            "mutability": "mutable",
                            "name": "pool",
                            "nodeType": "VariableDeclaration",
                            "scope": 760,
                            "src": "1948:12:4",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 714,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1948:7:4",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          },
                          null
                        ],
                        "id": 720,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 718,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 700,
                              "src": "1980:6:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 716,
                              "name": "vault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 683,
                              "src": "1966:5:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 717,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getPool",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20963,
                            "src": "1966:13:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) view external returns (address,enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 719,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1966:21:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_address_$_t_enum$_PoolSpecialization_$20940_$",
                            "typeString": "tuple(address,enum IVault.PoolSpecialization)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1947:40:4"
                      },
                      {
                        "assignments": [
                          725,
                          727
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 725,
                            "mutability": "mutable",
                            "name": "balances",
                            "nodeType": "VariableDeclaration",
                            "scope": 760,
                            "src": "1998:25:4",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 723,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1998:7:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 724,
                              "nodeType": "ArrayTypeName",
                              "src": "1998:9:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 727,
                            "mutability": "mutable",
                            "name": "lastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 760,
                            "src": "2025:23:4",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 726,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2025:7:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 733,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 729,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 700,
                              "src": "2082:6:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "expression": {
                                "id": 730,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 706,
                                "src": "2090:7:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_memory_ptr",
                                  "typeString": "struct IVault.JoinPoolRequest memory"
                                }
                              },
                              "id": 731,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assets",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21048,
                              "src": "2090:14:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            ],
                            "id": 728,
                            "name": "_validateAssetsAndGetBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 899,
                            "src": "2052:29:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "function (bytes32,contract IAsset[] memory) view returns (uint256[] memory,uint256)"
                            }
                          },
                          "id": 732,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2052:53:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1997:108:4"
                      },
                      {
                        "assignments": [
                          735
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 735,
                            "mutability": "mutable",
                            "name": "feesCollector",
                            "nodeType": "VariableDeclaration",
                            "scope": 760,
                            "src": "2115:35:4",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                              "typeString": "contract ProtocolFeesCollector"
                            },
                            "typeName": {
                              "id": 734,
                              "name": "ProtocolFeesCollector",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 16287,
                              "src": "2115:21:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                "typeString": "contract ProtocolFeesCollector"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 739,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 736,
                              "name": "vault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 683,
                              "src": "2153:5:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 737,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getProtocolFeesCollector",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21253,
                            "src": "2153:30:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ProtocolFeesCollector_$16287_$",
                              "typeString": "function () view external returns (contract ProtocolFeesCollector)"
                            }
                          },
                          "id": 738,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2153:32:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                            "typeString": "contract ProtocolFeesCollector"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2115:70:4"
                      },
                      {
                        "expression": {
                          "id": 758,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 740,
                                "name": "bptOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 709,
                                "src": "2197:6:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 741,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 712,
                                "src": "2205:9:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "id": 742,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "2196:19:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256,uint256[] memory)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 747,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 700,
                                "src": "2256:6:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 748,
                                "name": "sender",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 702,
                                "src": "2276:6:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              {
                                "id": 749,
                                "name": "recipient",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 704,
                                "src": "2296:9:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              {
                                "id": 750,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 725,
                                "src": "2319:8:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 751,
                                "name": "lastChangeBlock",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 727,
                                "src": "2341:15:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 752,
                                    "name": "feesCollector",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 735,
                                    "src": "2370:13:4",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                      "typeString": "contract ProtocolFeesCollector"
                                    }
                                  },
                                  "id": 753,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "getSwapFeePercentage",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 16191,
                                  "src": "2370:34:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view external returns (uint256)"
                                  }
                                },
                                "id": 754,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2370:36:4",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "expression": {
                                  "id": 755,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 706,
                                  "src": "2420:7:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_memory_ptr",
                                    "typeString": "struct IVault.JoinPoolRequest memory"
                                  }
                                },
                                "id": 756,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "userData",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 21053,
                                "src": "2420:16:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              ],
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 744,
                                    "name": "pool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 715,
                                    "src": "2227:4:4",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 743,
                                  "name": "BasePool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7928,
                                  "src": "2218:8:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_BasePool_$7928_$",
                                    "typeString": "type(contract BasePool)"
                                  }
                                },
                                "id": 745,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2218:14:4",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_BasePool_$7928",
                                  "typeString": "contract BasePool"
                                }
                              },
                              "id": 746,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "queryJoin",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 7238,
                              "src": "2218:24:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) external returns (uint256,uint256[] memory)"
                              }
                            },
                            "id": 757,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2218:228:4",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256,uint256[] memory)"
                            }
                          },
                          "src": "2196:250:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 759,
                        "nodeType": "ExpressionStatement",
                        "src": "2196:250:4"
                      }
                    ]
                  },
                  "functionSelector": "9ebbf05d",
                  "id": 761,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "queryJoin",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 707,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 700,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 761,
                        "src": "1756:14:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 699,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1756:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 702,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 761,
                        "src": "1780:14:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 701,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1780:7:4",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 704,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 761,
                        "src": "1804:17:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 703,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1804:7:4",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 706,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 761,
                        "src": "1831:37:4",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_memory_ptr",
                          "typeString": "struct IVault.JoinPoolRequest"
                        },
                        "typeName": {
                          "id": 705,
                          "name": "IVault.JoinPoolRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21056,
                          "src": "1831:22:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_storage_ptr",
                            "typeString": "struct IVault.JoinPoolRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1746:128:4"
                  },
                  "returnParameters": {
                    "id": 713,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 709,
                        "mutability": "mutable",
                        "name": "bptOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 761,
                        "src": "1893:14:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 708,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1893:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 712,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 761,
                        "src": "1909:26:4",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 710,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1909:7:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 711,
                          "nodeType": "ArrayTypeName",
                          "src": "1909:9:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1892:44:4"
                  },
                  "scope": 900,
                  "src": "1728:725:4",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 823,
                    "nodeType": "Block",
                    "src": "2668:516:4",
                    "statements": [
                      {
                        "assignments": [
                          778,
                          null
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 778,
                            "mutability": "mutable",
                            "name": "pool",
                            "nodeType": "VariableDeclaration",
                            "scope": 823,
                            "src": "2679:12:4",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 777,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "2679:7:4",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          },
                          null
                        ],
                        "id": 783,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 781,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 763,
                              "src": "2711:6:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 779,
                              "name": "vault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 683,
                              "src": "2697:5:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 780,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getPool",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20963,
                            "src": "2697:13:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) view external returns (address,enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 782,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2697:21:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_address_$_t_enum$_PoolSpecialization_$20940_$",
                            "typeString": "tuple(address,enum IVault.PoolSpecialization)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2678:40:4"
                      },
                      {
                        "assignments": [
                          788,
                          790
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 788,
                            "mutability": "mutable",
                            "name": "balances",
                            "nodeType": "VariableDeclaration",
                            "scope": 823,
                            "src": "2729:25:4",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 786,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2729:7:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 787,
                              "nodeType": "ArrayTypeName",
                              "src": "2729:9:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 790,
                            "mutability": "mutable",
                            "name": "lastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 823,
                            "src": "2756:23:4",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 789,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2756:7:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 796,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 792,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 763,
                              "src": "2813:6:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "expression": {
                                "id": 793,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 769,
                                "src": "2821:7:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_memory_ptr",
                                  "typeString": "struct IVault.ExitPoolRequest memory"
                                }
                              },
                              "id": 794,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assets",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21071,
                              "src": "2821:14:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            ],
                            "id": 791,
                            "name": "_validateAssetsAndGetBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 899,
                            "src": "2783:29:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "function (bytes32,contract IAsset[] memory) view returns (uint256[] memory,uint256)"
                            }
                          },
                          "id": 795,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2783:53:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2728:108:4"
                      },
                      {
                        "assignments": [
                          798
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 798,
                            "mutability": "mutable",
                            "name": "feesCollector",
                            "nodeType": "VariableDeclaration",
                            "scope": 823,
                            "src": "2846:35:4",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                              "typeString": "contract ProtocolFeesCollector"
                            },
                            "typeName": {
                              "id": 797,
                              "name": "ProtocolFeesCollector",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 16287,
                              "src": "2846:21:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                "typeString": "contract ProtocolFeesCollector"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 802,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 799,
                              "name": "vault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 683,
                              "src": "2884:5:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 800,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getProtocolFeesCollector",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21253,
                            "src": "2884:30:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ProtocolFeesCollector_$16287_$",
                              "typeString": "function () view external returns (contract ProtocolFeesCollector)"
                            }
                          },
                          "id": 801,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2884:32:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                            "typeString": "contract ProtocolFeesCollector"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2846:70:4"
                      },
                      {
                        "expression": {
                          "id": 821,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 803,
                                "name": "bptIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 772,
                                "src": "2928:5:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 804,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 775,
                                "src": "2935:10:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "id": 805,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "2927:19:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256,uint256[] memory)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 810,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 763,
                                "src": "2987:6:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 811,
                                "name": "sender",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 765,
                                "src": "3007:6:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              {
                                "id": 812,
                                "name": "recipient",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 767,
                                "src": "3027:9:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              {
                                "id": 813,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 788,
                                "src": "3050:8:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 814,
                                "name": "lastChangeBlock",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 790,
                                "src": "3072:15:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 815,
                                    "name": "feesCollector",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 798,
                                    "src": "3101:13:4",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                      "typeString": "contract ProtocolFeesCollector"
                                    }
                                  },
                                  "id": 816,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "getSwapFeePercentage",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 16191,
                                  "src": "3101:34:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view external returns (uint256)"
                                  }
                                },
                                "id": 817,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3101:36:4",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "expression": {
                                  "id": 818,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 769,
                                  "src": "3151:7:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_memory_ptr",
                                    "typeString": "struct IVault.ExitPoolRequest memory"
                                  }
                                },
                                "id": 819,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "userData",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 21076,
                                "src": "3151:16:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              ],
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 807,
                                    "name": "pool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 778,
                                    "src": "2958:4:4",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 806,
                                  "name": "BasePool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7928,
                                  "src": "2949:8:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_BasePool_$7928_$",
                                    "typeString": "type(contract BasePool)"
                                  }
                                },
                                "id": 808,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2949:14:4",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_BasePool_$7928",
                                  "typeString": "contract BasePool"
                                }
                              },
                              "id": 809,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "queryExit",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 7288,
                              "src": "2949:24:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) external returns (uint256,uint256[] memory)"
                              }
                            },
                            "id": 820,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2949:228:4",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256,uint256[] memory)"
                            }
                          },
                          "src": "2927:250:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 822,
                        "nodeType": "ExpressionStatement",
                        "src": "2927:250:4"
                      }
                    ]
                  },
                  "functionSelector": "c7b2c52c",
                  "id": 824,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "queryExit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 770,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 763,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 824,
                        "src": "2487:14:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 762,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2487:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 765,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 824,
                        "src": "2511:14:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 764,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2511:7:4",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 767,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 824,
                        "src": "2535:17:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 766,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2535:7:4",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 769,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 824,
                        "src": "2562:37:4",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_memory_ptr",
                          "typeString": "struct IVault.ExitPoolRequest"
                        },
                        "typeName": {
                          "id": 768,
                          "name": "IVault.ExitPoolRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21079,
                          "src": "2562:22:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_storage_ptr",
                            "typeString": "struct IVault.ExitPoolRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2477:128:4"
                  },
                  "returnParameters": {
                    "id": 776,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 772,
                        "mutability": "mutable",
                        "name": "bptIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 824,
                        "src": "2624:13:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 771,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2624:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 775,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 824,
                        "src": "2639:27:4",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 773,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2639:7:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 774,
                          "nodeType": "ArrayTypeName",
                          "src": "2639:9:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2623:44:4"
                  },
                  "scope": 900,
                  "src": "2459:725:4",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 898,
                    "nodeType": "Block",
                    "src": "3380:482:4",
                    "statements": [
                      {
                        "assignments": [
                          840
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 840,
                            "mutability": "mutable",
                            "name": "actualTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 898,
                            "src": "3390:28:4",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 838,
                                "name": "IERC20",
                                "nodeType": "UserDefinedTypeName",
                                "referencedDeclaration": 5095,
                                "src": "3390:6:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 839,
                              "nodeType": "ArrayTypeName",
                              "src": "3390:8:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                "typeString": "contract IERC20[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 841,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3390:28:4"
                      },
                      {
                        "assignments": [
                          845
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 845,
                            "mutability": "mutable",
                            "name": "expectedTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 898,
                            "src": "3428:30:4",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 843,
                                "name": "IERC20",
                                "nodeType": "UserDefinedTypeName",
                                "referencedDeclaration": 5095,
                                "src": "3428:6:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 844,
                              "nodeType": "ArrayTypeName",
                              "src": "3428:8:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                "typeString": "contract IERC20[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 849,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 847,
                              "name": "expectedAssets",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 829,
                              "src": "3480:14:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            ],
                            "id": 846,
                            "name": "_translateToIERC20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              202,
                              249
                            ],
                            "referencedDeclaration": 249,
                            "src": "3461:18:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$",
                              "typeString": "function (contract IAsset[] memory) view returns (contract IERC20[] memory)"
                            }
                          },
                          "id": 848,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3461:34:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3428:67:4"
                      },
                      {
                        "expression": {
                          "id": 858,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 850,
                                "name": "actualTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 840,
                                "src": "3507:12:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              {
                                "id": 851,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 833,
                                "src": "3521:8:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 852,
                                "name": "lastChangeBlock",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 835,
                                "src": "3531:15:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 853,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "3506:41:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(contract IERC20[] memory,uint256[] memory,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 856,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 826,
                                "src": "3570:6:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "id": 854,
                                "name": "vault",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 683,
                                "src": "3550:5:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IVault_$21266",
                                  "typeString": "contract IVault"
                                }
                              },
                              "id": 855,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "getPoolTokens",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21033,
                              "src": "3550:19:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                                "typeString": "function (bytes32) view external returns (contract IERC20[] memory,uint256[] memory,uint256)"
                              }
                            },
                            "id": 857,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3550:27:4",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(contract IERC20[] memory,uint256[] memory,uint256)"
                            }
                          },
                          "src": "3506:71:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 859,
                        "nodeType": "ExpressionStatement",
                        "src": "3506:71:4"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 863,
                                "name": "actualTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 840,
                                "src": "3623:12:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 864,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "3623:19:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 865,
                                "name": "expectedTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 845,
                                "src": "3644:14:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 866,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "3644:21:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 860,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "3587:12:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 862,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "3587:35:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 867,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3587:79:4",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 868,
                        "nodeType": "ExpressionStatement",
                        "src": "3587:79:4"
                      },
                      {
                        "body": {
                          "id": 896,
                          "nodeType": "Block",
                          "src": "3727:129:4",
                          "statements": [
                            {
                              "assignments": [
                                881
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 881,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 896,
                                  "src": "3741:12:4",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 880,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "3741:6:4",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 885,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 882,
                                  "name": "actualTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 840,
                                  "src": "3756:12:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 884,
                                "indexExpression": {
                                  "id": 883,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 870,
                                  "src": "3769:1:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3756:15:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3741:30:4"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    "id": 891,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 887,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 881,
                                      "src": "3794:5:4",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "baseExpression": {
                                        "id": 888,
                                        "name": "expectedTokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 845,
                                        "src": "3803:14:4",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                          "typeString": "contract IERC20[] memory"
                                        }
                                      },
                                      "id": 890,
                                      "indexExpression": {
                                        "id": 889,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 870,
                                        "src": "3818:1:4",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "3803:17:4",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "src": "3794:26:4",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 892,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3822:6:4",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 893,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKENS_MISMATCH",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 621,
                                    "src": "3822:22:4",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 886,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3785:8:4",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 894,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3785:60:4",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 895,
                              "nodeType": "ExpressionStatement",
                              "src": "3785:60:4"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 876,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 873,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 870,
                            "src": "3697:1:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 874,
                              "name": "actualTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 840,
                              "src": "3701:12:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 875,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "3701:19:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3697:23:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 897,
                        "initializationExpression": {
                          "assignments": [
                            870
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 870,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 897,
                              "src": "3682:9:4",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 869,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "3682:7:4",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 872,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 871,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3694:1:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "3682:13:4"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 878,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "3722:3:4",
                            "subExpression": {
                              "id": 877,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 870,
                              "src": "3724:1:4",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 879,
                          "nodeType": "ExpressionStatement",
                          "src": "3722:3:4"
                        },
                        "nodeType": "ForStatement",
                        "src": "3677:179:4"
                      }
                    ]
                  },
                  "id": 899,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_validateAssetsAndGetBalances",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 830,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 826,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 899,
                        "src": "3229:14:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 825,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3229:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 829,
                        "mutability": "mutable",
                        "name": "expectedAssets",
                        "nodeType": "VariableDeclaration",
                        "scope": 899,
                        "src": "3245:30:4",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                          "typeString": "contract IAsset[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 827,
                            "name": "IAsset",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20645,
                            "src": "3245:6:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAsset_$20645",
                              "typeString": "contract IAsset"
                            }
                          },
                          "id": 828,
                          "nodeType": "ArrayTypeName",
                          "src": "3245:8:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                            "typeString": "contract IAsset[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3228:48:4"
                  },
                  "returnParameters": {
                    "id": 836,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 833,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 899,
                        "src": "3324:25:4",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 831,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "3324:7:4",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 832,
                          "nodeType": "ArrayTypeName",
                          "src": "3324:9:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 835,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 899,
                        "src": "3351:23:4",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 834,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3351:7:4",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3323:52:4"
                  },
                  "scope": 900,
                  "src": "3190:672:4",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 901,
              "src": "1440:2424:4"
            }
          ],
          "src": "688:3177:4"
        },
        "id": 4
      },
      "src.sol/amm/lib/helpers/IAuthentication.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/helpers/IAuthentication.sol",
          "exportedSymbols": {
            "IAuthentication": [
              911
            ]
          },
          "id": 912,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 902,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:5"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "fullyImplemented": false,
              "id": 911,
              "linearizedBaseContracts": [
                911
              ],
              "name": "IAuthentication",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "documentation": {
                    "id": 903,
                    "nodeType": "StructuredDocumentation",
                    "src": "745:116:5",
                    "text": " @dev Returns the action identifier associated with the external function described by `selector`."
                  },
                  "functionSelector": "851c1bb3",
                  "id": 910,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getActionId",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 906,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 905,
                        "mutability": "mutable",
                        "name": "selector",
                        "nodeType": "VariableDeclaration",
                        "scope": 910,
                        "src": "887:15:5",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes4",
                          "typeString": "bytes4"
                        },
                        "typeName": {
                          "id": 904,
                          "name": "bytes4",
                          "nodeType": "ElementaryTypeName",
                          "src": "887:6:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes4",
                            "typeString": "bytes4"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "886:17:5"
                  },
                  "returnParameters": {
                    "id": 909,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 908,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 910,
                        "src": "927:7:5",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 907,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "927:7:5",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "926:9:5"
                  },
                  "scope": 911,
                  "src": "866:70:5",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 912,
              "src": "713:225:5"
            }
          ],
          "src": "688:251:5"
        },
        "id": 5
      },
      "src.sol/amm/lib/helpers/InputHelpers.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
          "exportedSymbols": {
            "InputHelpers": [
              1042
            ]
          },
          "id": 1043,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 913,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:6"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../openzeppelin/IERC20.sol",
              "id": 914,
              "nodeType": "ImportDirective",
              "scope": 1043,
              "sourceUnit": 5096,
              "src": "713:36:6",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "./BalancerErrors.sol",
              "id": 915,
              "nodeType": "ImportDirective",
              "scope": 1043,
              "sourceUnit": 656,
              "src": "751:30:6",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAsset.sol",
              "file": "../../vault/interfaces/IAsset.sol",
              "id": 916,
              "nodeType": "ImportDirective",
              "scope": 1043,
              "sourceUnit": 20646,
              "src": "783:43:6",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "fullyImplemented": true,
              "id": 1042,
              "linearizedBaseContracts": [
                1042
              ],
              "name": "InputHelpers",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 931,
                    "nodeType": "Block",
                    "src": "923:63:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 926,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 924,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 918,
                                "src": "942:1:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "id": 925,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 920,
                                "src": "947:1:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "942:6:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 927,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "950:6:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 928,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INPUT_LENGTH_MISMATCH",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 411,
                              "src": "950:28:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 923,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "933:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 929,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "933:46:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 930,
                        "nodeType": "ExpressionStatement",
                        "src": "933:46:6"
                      }
                    ]
                  },
                  "id": 932,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "ensureInputLengthMatch",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 921,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 918,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 932,
                        "src": "887:9:6",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 917,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "887:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 920,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 932,
                        "src": "898:9:6",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 919,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "898:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "886:22:6"
                  },
                  "returnParameters": {
                    "id": 922,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "923:0:6"
                  },
                  "scope": 1042,
                  "src": "855:131:6",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 953,
                    "nodeType": "Block",
                    "src": "1101:73:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 948,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 944,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 942,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 934,
                                  "src": "1120:1:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 943,
                                  "name": "b",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 936,
                                  "src": "1125:1:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1120:6:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 947,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 945,
                                  "name": "b",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 936,
                                  "src": "1130:1:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 946,
                                  "name": "c",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 938,
                                  "src": "1135:1:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1130:6:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "1120:16:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 949,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1138:6:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 950,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INPUT_LENGTH_MISMATCH",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 411,
                              "src": "1138:28:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 941,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1111:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 951,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1111:56:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 952,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:56:6"
                      }
                    ]
                  },
                  "id": 954,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "ensureInputLengthMatch",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 939,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 934,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 954,
                        "src": "1033:9:6",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 933,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1033:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 936,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 954,
                        "src": "1052:9:6",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 935,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1052:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 938,
                        "mutability": "mutable",
                        "name": "c",
                        "nodeType": "VariableDeclaration",
                        "scope": 954,
                        "src": "1071:9:6",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 937,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1071:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1023:63:6"
                  },
                  "returnParameters": {
                    "id": 940,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1101:0:6"
                  },
                  "scope": 1042,
                  "src": "992:182:6",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 971,
                    "nodeType": "Block",
                    "src": "1246:208:6",
                    "statements": [
                      {
                        "assignments": [
                          964
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 964,
                            "mutability": "mutable",
                            "name": "addressArray",
                            "nodeType": "VariableDeclaration",
                            "scope": 971,
                            "src": "1256:29:6",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                              "typeString": "address[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 962,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "1256:7:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "id": 963,
                              "nodeType": "ArrayTypeName",
                              "src": "1256:9:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                                "typeString": "address[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 965,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1256:29:6"
                      },
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "1360:45:6",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "1374:21:6",
                              "value": {
                                "name": "array",
                                "nodeType": "YulIdentifier",
                                "src": "1390:5:6"
                              },
                              "variableNames": [
                                {
                                  "name": "addressArray",
                                  "nodeType": "YulIdentifier",
                                  "src": "1374:12:6"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 964,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1374:12:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 957,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1390:5:6",
                            "valueSize": 1
                          }
                        ],
                        "id": 966,
                        "nodeType": "InlineAssembly",
                        "src": "1351:54:6"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 968,
                              "name": "addressArray",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 964,
                              "src": "1434:12:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            ],
                            "id": 967,
                            "name": "ensureArrayIsSorted",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              972,
                              990,
                              1041
                            ],
                            "referencedDeclaration": 1041,
                            "src": "1414:19:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (address[] memory) pure"
                            }
                          },
                          "id": 969,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1414:33:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 970,
                        "nodeType": "ExpressionStatement",
                        "src": "1414:33:6"
                      }
                    ]
                  },
                  "id": 972,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "ensureArrayIsSorted",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 958,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 957,
                        "mutability": "mutable",
                        "name": "array",
                        "nodeType": "VariableDeclaration",
                        "scope": 972,
                        "src": "1209:21:6",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                          "typeString": "contract IAsset[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 955,
                            "name": "IAsset",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20645,
                            "src": "1209:6:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAsset_$20645",
                              "typeString": "contract IAsset"
                            }
                          },
                          "id": 956,
                          "nodeType": "ArrayTypeName",
                          "src": "1209:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                            "typeString": "contract IAsset[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1208:23:6"
                  },
                  "returnParameters": {
                    "id": 959,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1246:0:6"
                  },
                  "scope": 1042,
                  "src": "1180:274:6",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 989,
                    "nodeType": "Block",
                    "src": "1526:208:6",
                    "statements": [
                      {
                        "assignments": [
                          982
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 982,
                            "mutability": "mutable",
                            "name": "addressArray",
                            "nodeType": "VariableDeclaration",
                            "scope": 989,
                            "src": "1536:29:6",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                              "typeString": "address[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 980,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "1536:7:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "id": 981,
                              "nodeType": "ArrayTypeName",
                              "src": "1536:9:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                                "typeString": "address[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 983,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1536:29:6"
                      },
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "1640:45:6",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "1654:21:6",
                              "value": {
                                "name": "array",
                                "nodeType": "YulIdentifier",
                                "src": "1670:5:6"
                              },
                              "variableNames": [
                                {
                                  "name": "addressArray",
                                  "nodeType": "YulIdentifier",
                                  "src": "1654:12:6"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 982,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1654:12:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 975,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1670:5:6",
                            "valueSize": 1
                          }
                        ],
                        "id": 984,
                        "nodeType": "InlineAssembly",
                        "src": "1631:54:6"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 986,
                              "name": "addressArray",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 982,
                              "src": "1714:12:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            ],
                            "id": 985,
                            "name": "ensureArrayIsSorted",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              972,
                              990,
                              1041
                            ],
                            "referencedDeclaration": 1041,
                            "src": "1694:19:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (address[] memory) pure"
                            }
                          },
                          "id": 987,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1694:33:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 988,
                        "nodeType": "ExpressionStatement",
                        "src": "1694:33:6"
                      }
                    ]
                  },
                  "id": 990,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "ensureArrayIsSorted",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 976,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 975,
                        "mutability": "mutable",
                        "name": "array",
                        "nodeType": "VariableDeclaration",
                        "scope": 990,
                        "src": "1489:21:6",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 973,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1489:6:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 974,
                          "nodeType": "ArrayTypeName",
                          "src": "1489:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1488:23:6"
                  },
                  "returnParameters": {
                    "id": 977,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1526:0:6"
                  },
                  "scope": 1042,
                  "src": "1460:274:6",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1040,
                    "nodeType": "Block",
                    "src": "1807:307:6",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 999,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 996,
                              "name": "array",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 993,
                              "src": "1821:5:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            },
                            "id": 997,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "1821:12:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "hexValue": "32",
                            "id": 998,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1836:1:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "src": "1821:16:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1002,
                        "nodeType": "IfStatement",
                        "src": "1817:53:6",
                        "trueBody": {
                          "id": 1001,
                          "nodeType": "Block",
                          "src": "1839:31:6",
                          "statements": [
                            {
                              "functionReturnParameters": 995,
                              "id": 1000,
                              "nodeType": "Return",
                              "src": "1853:7:6"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          1004
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1004,
                            "mutability": "mutable",
                            "name": "previous",
                            "nodeType": "VariableDeclaration",
                            "scope": 1040,
                            "src": "1880:16:6",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 1003,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1880:7:6",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1008,
                        "initialValue": {
                          "baseExpression": {
                            "id": 1005,
                            "name": "array",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 993,
                            "src": "1899:5:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                              "typeString": "address[] memory"
                            }
                          },
                          "id": 1007,
                          "indexExpression": {
                            "hexValue": "30",
                            "id": 1006,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1905:1:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "1899:8:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1880:27:6"
                      },
                      {
                        "body": {
                          "id": 1038,
                          "nodeType": "Block",
                          "src": "1960:148:6",
                          "statements": [
                            {
                              "assignments": [
                                1021
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 1021,
                                  "mutability": "mutable",
                                  "name": "current",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 1038,
                                  "src": "1974:15:6",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  "typeName": {
                                    "id": 1020,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "1974:7:6",
                                    "stateMutability": "nonpayable",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 1025,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 1022,
                                  "name": "array",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 993,
                                  "src": "1992:5:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                    "typeString": "address[] memory"
                                  }
                                },
                                "id": 1024,
                                "indexExpression": {
                                  "id": 1023,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1010,
                                  "src": "1998:1:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "1992:8:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "1974:26:6"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    "id": 1029,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 1027,
                                      "name": "previous",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1004,
                                      "src": "2023:8:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "<",
                                    "rightExpression": {
                                      "id": 1028,
                                      "name": "current",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1021,
                                      "src": "2034:7:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    "src": "2023:18:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 1030,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2043:6:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 1031,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "UNSORTED_ARRAY",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 405,
                                    "src": "2043:21:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1026,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2014:8:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 1032,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2014:51:6",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 1033,
                              "nodeType": "ExpressionStatement",
                              "src": "2014:51:6"
                            },
                            {
                              "expression": {
                                "id": 1036,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 1034,
                                  "name": "previous",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1004,
                                  "src": "2079:8:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 1035,
                                  "name": "current",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1021,
                                  "src": "2090:7:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "src": "2079:18:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "id": 1037,
                              "nodeType": "ExpressionStatement",
                              "src": "2079:18:6"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1016,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1013,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1010,
                            "src": "1937:1:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 1014,
                              "name": "array",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 993,
                              "src": "1941:5:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            },
                            "id": 1015,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "1941:12:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1937:16:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1039,
                        "initializationExpression": {
                          "assignments": [
                            1010
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 1010,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 1039,
                              "src": "1922:9:6",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 1009,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1922:7:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 1012,
                          "initialValue": {
                            "hexValue": "31",
                            "id": 1011,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1934:1:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "1922:13:6"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 1018,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "1955:3:6",
                            "subExpression": {
                              "id": 1017,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1010,
                              "src": "1957:1:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 1019,
                          "nodeType": "ExpressionStatement",
                          "src": "1955:3:6"
                        },
                        "nodeType": "ForStatement",
                        "src": "1917:191:6"
                      }
                    ]
                  },
                  "id": 1041,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "ensureArrayIsSorted",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 994,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 993,
                        "mutability": "mutable",
                        "name": "array",
                        "nodeType": "VariableDeclaration",
                        "scope": 1041,
                        "src": "1769:22:6",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                          "typeString": "address[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 991,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "1769:7:6",
                            "stateMutability": "nonpayable",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 992,
                          "nodeType": "ArrayTypeName",
                          "src": "1769:9:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                            "typeString": "address[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1768:24:6"
                  },
                  "returnParameters": {
                    "id": 995,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1807:0:6"
                  },
                  "scope": 1042,
                  "src": "1740:374:6",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 1043,
              "src": "828:1288:6"
            }
          ],
          "src": "688:1429:6"
        },
        "id": 6
      },
      "src.sol/amm/lib/helpers/SignaturesValidator.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/helpers/SignaturesValidator.sol",
          "exportedSymbols": {
            "SignaturesValidator": [
              1293
            ]
          },
          "id": 1294,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 1044,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:7"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "./BalancerErrors.sol",
              "id": 1045,
              "nodeType": "ImportDirective",
              "scope": 1294,
              "sourceUnit": 656,
              "src": "713:30:7",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/EIP712.sol",
              "file": "../openzeppelin/EIP712.sol",
              "id": 1046,
              "nodeType": "ImportDirective",
              "scope": 1294,
              "sourceUnit": 3891,
              "src": "745:36:7",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/ISignaturesValidator.sol",
              "file": "../../vault/interfaces/ISignaturesValidator.sol",
              "id": 1047,
              "nodeType": "ImportDirective",
              "scope": 1294,
              "sourceUnit": 20823,
              "src": "782:57:7",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 1049,
                    "name": "ISignaturesValidator",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20822,
                    "src": "1259:20:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ISignaturesValidator_$20822",
                      "typeString": "contract ISignaturesValidator"
                    }
                  },
                  "id": 1050,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1259:20:7"
                },
                {
                  "baseName": {
                    "id": 1051,
                    "name": "EIP712",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3890,
                    "src": "1281:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_EIP712_$3890",
                      "typeString": "contract EIP712"
                    }
                  },
                  "id": 1052,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1281:6:7"
                }
              ],
              "contractDependencies": [
                3890,
                20822
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 1048,
                "nodeType": "StructuredDocumentation",
                "src": "841:376:7",
                "text": " @dev Utility for signing Solidity function calls.\n This contract relies on the fact that Solidity contracts can be called with extra calldata, and enables\n metatransaction schemes by appending an EIP712 signature of the original calldata at the end.\n Derived contracts must implement the `_typeHash` function to map function selectors to EIP712 structs."
              },
              "fullyImplemented": false,
              "id": 1293,
              "linearizedBaseContracts": [
                1293,
                3890,
                20822
              ],
              "name": "SignaturesValidator",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": true,
                  "id": 1057,
                  "mutability": "constant",
                  "name": "_EXTRA_CALLDATA_LENGTH",
                  "nodeType": "VariableDeclaration",
                  "scope": 1293,
                  "src": "1488:57:7",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1053,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1488:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "commonType": {
                      "typeIdentifier": "t_rational_128_by_1",
                      "typeString": "int_const 128"
                    },
                    "id": 1056,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "leftExpression": {
                      "hexValue": "34",
                      "id": 1054,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1539:1:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_4_by_1",
                        "typeString": "int_const 4"
                      },
                      "value": "4"
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "*",
                    "rightExpression": {
                      "hexValue": "3332",
                      "id": 1055,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1543:2:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "1539:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_128_by_1",
                      "typeString": "int_const 128"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1061,
                  "mutability": "mutable",
                  "name": "_nextNonce",
                  "nodeType": "VariableDeclaration",
                  "scope": 1293,
                  "src": "1599:47:7",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                    "typeString": "mapping(address => uint256)"
                  },
                  "typeName": {
                    "id": 1060,
                    "keyType": {
                      "id": 1058,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "1607:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1599:27:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                      "typeString": "mapping(address => uint256)"
                    },
                    "valueType": {
                      "id": 1059,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "1618:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1070,
                    "nodeType": "Block",
                    "src": "1703:64:7",
                    "statements": []
                  },
                  "id": 1071,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 1066,
                          "name": "name",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1063,
                          "src": "1692:4:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "hexValue": "31",
                          "id": 1067,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1698:3:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6",
                            "typeString": "literal_string \"1\""
                          },
                          "value": "1"
                        }
                      ],
                      "id": 1068,
                      "modifierName": {
                        "id": 1065,
                        "name": "EIP712",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3890,
                        "src": "1685:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_EIP712_$3890_$",
                          "typeString": "type(contract EIP712)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1685:17:7"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1064,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1063,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 1071,
                        "src": "1665:18:7",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 1062,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1665:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1664:20:7"
                  },
                  "returnParameters": {
                    "id": 1069,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1703:0:7"
                  },
                  "scope": 1293,
                  "src": "1653:114:7",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    20813
                  ],
                  "body": {
                    "id": 1080,
                    "nodeType": "Block",
                    "src": "1844:44:7",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 1077,
                            "name": "_domainSeparatorV4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3861,
                            "src": "1861:18:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$",
                              "typeString": "function () view returns (bytes32)"
                            }
                          },
                          "id": 1078,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1861:20:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 1076,
                        "id": 1079,
                        "nodeType": "Return",
                        "src": "1854:27:7"
                      }
                    ]
                  },
                  "functionSelector": "ed24911d",
                  "id": 1081,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getDomainSeparator",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 1073,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1817:8:7"
                  },
                  "parameters": {
                    "id": 1072,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1800:2:7"
                  },
                  "returnParameters": {
                    "id": 1076,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1075,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1081,
                        "src": "1835:7:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 1074,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1835:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1834:9:7"
                  },
                  "scope": 1293,
                  "src": "1773:115:7",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    20821
                  ],
                  "body": {
                    "id": 1093,
                    "nodeType": "Block",
                    "src": "1971:40:7",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "id": 1089,
                            "name": "_nextNonce",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1061,
                            "src": "1988:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 1091,
                          "indexExpression": {
                            "id": 1090,
                            "name": "user",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1083,
                            "src": "1999:4:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "1988:16:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1088,
                        "id": 1092,
                        "nodeType": "Return",
                        "src": "1981:23:7"
                      }
                    ]
                  },
                  "functionSelector": "90193b7c",
                  "id": 1094,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getNextNonce",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 1085,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1944:8:7"
                  },
                  "parameters": {
                    "id": 1084,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1083,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 1094,
                        "src": "1916:12:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 1082,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1916:7:7",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1915:14:7"
                  },
                  "returnParameters": {
                    "id": 1088,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1087,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1094,
                        "src": "1962:7:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1086,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1962:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1961:9:7"
                  },
                  "scope": 1293,
                  "src": "1894:117:7",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 1117,
                    "nodeType": "Block",
                    "src": "2206:120:7",
                    "statements": [
                      {
                        "assignments": [
                          1103
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1103,
                            "mutability": "mutable",
                            "name": "nextNonce",
                            "nodeType": "VariableDeclaration",
                            "scope": 1117,
                            "src": "2216:17:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1102,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2216:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1108,
                        "initialValue": {
                          "id": 1107,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "++",
                          "prefix": false,
                          "src": "2236:18:7",
                          "subExpression": {
                            "baseExpression": {
                              "id": 1104,
                              "name": "_nextNonce",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1061,
                              "src": "2236:10:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 1106,
                            "indexExpression": {
                              "id": 1105,
                              "name": "user",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1097,
                              "src": "2247:4:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "2236:16:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2216:38:7"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 1111,
                                  "name": "user",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1097,
                                  "src": "2291:4:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 1112,
                                  "name": "nextNonce",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1103,
                                  "src": "2297:9:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 1110,
                                "name": "_isSignatureValid",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1208,
                                "src": "2273:17:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$",
                                  "typeString": "function (address,uint256) view returns (bool)"
                                }
                              },
                              "id": 1113,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2273:34:7",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "id": 1114,
                              "name": "errorCode",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1099,
                              "src": "2309:9:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1109,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2264:8:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1115,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2264:55:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1116,
                        "nodeType": "ExpressionStatement",
                        "src": "2264:55:7"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1095,
                    "nodeType": "StructuredDocumentation",
                    "src": "2017:114:7",
                    "text": " @dev Reverts with `errorCode` unless a valid signature for `user` was appended to the calldata."
                  },
                  "id": 1118,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_validateSignature",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1100,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1097,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 1118,
                        "src": "2164:12:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 1096,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2164:7:7",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1099,
                        "mutability": "mutable",
                        "name": "errorCode",
                        "nodeType": "VariableDeclaration",
                        "scope": 1118,
                        "src": "2178:17:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1098,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2178:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2163:33:7"
                  },
                  "returnParameters": {
                    "id": 1101,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2206:0:7"
                  },
                  "scope": 1293,
                  "src": "2136:190:7",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1207,
                    "nodeType": "Block",
                    "src": "2416:1086:7",
                    "statements": [
                      {
                        "assignments": [
                          1128
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1128,
                            "mutability": "mutable",
                            "name": "deadline",
                            "nodeType": "VariableDeclaration",
                            "scope": 1207,
                            "src": "2426:16:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1127,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2426:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1131,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 1129,
                            "name": "_deadline",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1228,
                            "src": "2445:9:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$",
                              "typeString": "function () pure returns (uint256)"
                            }
                          },
                          "id": 1130,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2445:11:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2426:30:7"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1135,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1132,
                            "name": "deadline",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1128,
                            "src": "2623:8:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 1133,
                              "name": "block",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -4,
                              "src": "2634:5:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_block",
                                "typeString": "block"
                              }
                            },
                            "id": 1134,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "src": "2634:15:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2623:26:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1139,
                        "nodeType": "IfStatement",
                        "src": "2619:69:7",
                        "trueBody": {
                          "id": 1138,
                          "nodeType": "Block",
                          "src": "2651:37:7",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "66616c7365",
                                "id": 1136,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2672:5:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "false"
                              },
                              "functionReturnParameters": 1126,
                              "id": 1137,
                              "nodeType": "Return",
                              "src": "2665:12:7"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          1141
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1141,
                            "mutability": "mutable",
                            "name": "typeHash",
                            "nodeType": "VariableDeclaration",
                            "scope": 1207,
                            "src": "2698:16:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 1140,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "2698:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1144,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 1142,
                            "name": "_typeHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1214,
                            "src": "2717:9:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$",
                              "typeString": "function () view returns (bytes32)"
                            }
                          },
                          "id": 1143,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2717:11:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2698:30:7"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 1150,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1145,
                            "name": "typeHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1141,
                            "src": "2742:8:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "arguments": [
                              {
                                "hexValue": "30",
                                "id": 1148,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2762:1:7",
                                "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": 1147,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "2754:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_bytes32_$",
                                "typeString": "type(bytes32)"
                              },
                              "typeName": {
                                "id": 1146,
                                "name": "bytes32",
                                "nodeType": "ElementaryTypeName",
                                "src": "2754:7:7",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 1149,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2754:10:7",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "2742:22:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1154,
                        "nodeType": "IfStatement",
                        "src": "2738:175:7",
                        "trueBody": {
                          "id": 1153,
                          "nodeType": "Block",
                          "src": "2766:147:7",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "66616c7365",
                                "id": 1151,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2897:5:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "false"
                              },
                              "functionReturnParameters": 1126,
                              "id": 1152,
                              "nodeType": "Return",
                              "src": "2890:12:7"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          1156
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1156,
                            "mutability": "mutable",
                            "name": "structHash",
                            "nodeType": "VariableDeclaration",
                            "scope": 1207,
                            "src": "3035:18:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 1155,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "3035:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1171,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 1160,
                                  "name": "typeHash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1141,
                                  "src": "3077:8:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "arguments": [
                                    {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "id": 1162,
                                        "name": "_calldata",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1282,
                                        "src": "3097:9:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$__$returns$_t_bytes_memory_ptr_$",
                                          "typeString": "function () pure returns (bytes memory)"
                                        }
                                      },
                                      "id": 1163,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3097:11:7",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    ],
                                    "id": 1161,
                                    "name": "keccak256",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -8,
                                    "src": "3087:9:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                      "typeString": "function (bytes memory) pure returns (bytes32)"
                                    }
                                  },
                                  "id": 1164,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3087:22:7",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 1165,
                                    "name": "msg",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -15,
                                    "src": "3111:3:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_message",
                                      "typeString": "msg"
                                    }
                                  },
                                  "id": 1166,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "src": "3111:10:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                },
                                {
                                  "id": 1167,
                                  "name": "nonce",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1122,
                                  "src": "3123:5:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 1168,
                                  "name": "deadline",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1128,
                                  "src": "3130:8:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 1158,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "3066:3:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 1159,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encode",
                                "nodeType": "MemberAccess",
                                "src": "3066:10:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 1169,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3066:73:7",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 1157,
                            "name": "keccak256",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -8,
                            "src": "3056:9:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 1170,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3056:84:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3035:105:7"
                      },
                      {
                        "assignments": [
                          1173
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1173,
                            "mutability": "mutable",
                            "name": "digest",
                            "nodeType": "VariableDeclaration",
                            "scope": 1207,
                            "src": "3150:14:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 1172,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "3150:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1177,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 1175,
                              "name": "structHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1156,
                              "src": "3184:10:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 1174,
                            "name": "_hashTypedDataV4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3880,
                            "src": "3167:16:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$",
                              "typeString": "function (bytes32) view returns (bytes32)"
                            }
                          },
                          "id": 1176,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3167:28:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3150:45:7"
                      },
                      {
                        "assignments": [
                          1179,
                          1181,
                          1183
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1179,
                            "mutability": "mutable",
                            "name": "v",
                            "nodeType": "VariableDeclaration",
                            "scope": 1207,
                            "src": "3206:7:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            },
                            "typeName": {
                              "id": 1178,
                              "name": "uint8",
                              "nodeType": "ElementaryTypeName",
                              "src": "3206:5:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 1181,
                            "mutability": "mutable",
                            "name": "r",
                            "nodeType": "VariableDeclaration",
                            "scope": 1207,
                            "src": "3215:9:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 1180,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "3215:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 1183,
                            "mutability": "mutable",
                            "name": "s",
                            "nodeType": "VariableDeclaration",
                            "scope": 1207,
                            "src": "3226:9:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 1182,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "3226:7:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1186,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 1184,
                            "name": "_signature",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1263,
                            "src": "3239:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint8_$_t_bytes32_$_t_bytes32_$",
                              "typeString": "function () pure returns (uint8,bytes32,bytes32)"
                            }
                          },
                          "id": 1185,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3239:12:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint8_$_t_bytes32_$_t_bytes32_$",
                            "typeString": "tuple(uint8,bytes32,bytes32)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3205:46:7"
                      },
                      {
                        "assignments": [
                          1188
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1188,
                            "mutability": "mutable",
                            "name": "recoveredAddress",
                            "nodeType": "VariableDeclaration",
                            "scope": 1207,
                            "src": "3262:24:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 1187,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "3262:7:7",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1195,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 1190,
                              "name": "digest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1173,
                              "src": "3299:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 1191,
                              "name": "v",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1179,
                              "src": "3307:1:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            },
                            {
                              "id": 1192,
                              "name": "r",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1181,
                              "src": "3310:1:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 1193,
                              "name": "s",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1183,
                              "src": "3313:1:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 1189,
                            "name": "ecrecover",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -6,
                            "src": "3289:9:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
                              "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
                            }
                          },
                          "id": 1194,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3289:26:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3262:53:7"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 1205,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 1201,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 1196,
                              "name": "recoveredAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1188,
                              "src": "3437:16:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 1199,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3465:1:7",
                                  "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": 1198,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3457:7:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 1197,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3457:7:7",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 1200,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3457:10:7",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "src": "3437:30:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 1204,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 1202,
                              "name": "recoveredAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1188,
                              "src": "3471:16:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "id": 1203,
                              "name": "user",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1120,
                              "src": "3491:4:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "src": "3471:24:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "3437:58:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 1126,
                        "id": 1206,
                        "nodeType": "Return",
                        "src": "3430:65:7"
                      }
                    ]
                  },
                  "id": 1208,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_isSignatureValid",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1123,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1120,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 1208,
                        "src": "2359:12:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 1119,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2359:7:7",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1122,
                        "mutability": "mutable",
                        "name": "nonce",
                        "nodeType": "VariableDeclaration",
                        "scope": 1208,
                        "src": "2373:13:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1121,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2373:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2358:29:7"
                  },
                  "returnParameters": {
                    "id": 1126,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1125,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1208,
                        "src": "2410:4:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 1124,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2410:4:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2409:6:7"
                  },
                  "scope": 1293,
                  "src": "2332:1170:7",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "documentation": {
                    "id": 1209,
                    "nodeType": "StructuredDocumentation",
                    "src": "3508:383:7",
                    "text": " @dev Returns the EIP712 type hash for the current entry point function, which can be identified by its function\n selector (available as `msg.sig`).\n The typehash must conform to the following format:\n  <name>(bytes calldata, address sender, uint256 nonce, uint256 deadline)\n If 0x00, all signatures will be considered invalid."
                  },
                  "id": 1214,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_typeHash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1210,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3914:2:7"
                  },
                  "returnParameters": {
                    "id": 1213,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1212,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1214,
                        "src": "3948:7:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 1211,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3948:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3947:9:7"
                  },
                  "scope": 1293,
                  "src": "3896:61:7",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1227,
                    "nodeType": "Block",
                    "src": "4173:149:7",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 1223,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4312:1:7",
                                  "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": 1222,
                                "name": "_decodeExtraCalldataWord",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1292,
                                "src": "4287:24:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_bytes32_$",
                                  "typeString": "function (uint256) pure returns (bytes32)"
                                }
                              },
                              "id": 1224,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4287:27:7",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 1221,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "4279:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            },
                            "typeName": {
                              "id": 1220,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4279:7:7",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 1225,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4279:36:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1219,
                        "id": 1226,
                        "nodeType": "Return",
                        "src": "4272:43:7"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1215,
                    "nodeType": "StructuredDocumentation",
                    "src": "3963:152:7",
                    "text": " @dev Extracts the signature deadline from extra calldata.\n This function returns bogus data if no signature is included."
                  },
                  "id": 1228,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_deadline",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1216,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4138:2:7"
                  },
                  "returnParameters": {
                    "id": 1219,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1218,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1228,
                        "src": "4164:7:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1217,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4164:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4163:9:7"
                  },
                  "scope": 1293,
                  "src": "4120:202:7",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1262,
                    "nodeType": "Block",
                    "src": "4748:235:7",
                    "statements": [
                      {
                        "expression": {
                          "id": 1248,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1238,
                            "name": "v",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1232,
                            "src": "4838:1:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "hexValue": "30783230",
                                        "id": 1244,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "4881:4:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_32_by_1",
                                          "typeString": "int_const 32"
                                        },
                                        "value": "0x20"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_32_by_1",
                                          "typeString": "int_const 32"
                                        }
                                      ],
                                      "id": 1243,
                                      "name": "_decodeExtraCalldataWord",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1292,
                                      "src": "4856:24:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_bytes32_$",
                                        "typeString": "function (uint256) pure returns (bytes32)"
                                      }
                                    },
                                    "id": 1245,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "4856:30:7",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 1242,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "4848:7:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": {
                                    "id": 1241,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4848:7:7",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 1246,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4848:39:7",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 1240,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4842:5:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint8_$",
                                "typeString": "type(uint8)"
                              },
                              "typeName": {
                                "id": 1239,
                                "name": "uint8",
                                "nodeType": "ElementaryTypeName",
                                "src": "4842:5:7",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 1247,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4842:46:7",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "4838:50:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 1249,
                        "nodeType": "ExpressionStatement",
                        "src": "4838:50:7"
                      },
                      {
                        "expression": {
                          "id": 1254,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1250,
                            "name": "r",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1234,
                            "src": "4898:1:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "hexValue": "30783430",
                                "id": 1252,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4927:4:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_64_by_1",
                                  "typeString": "int_const 64"
                                },
                                "value": "0x40"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_64_by_1",
                                  "typeString": "int_const 64"
                                }
                              ],
                              "id": 1251,
                              "name": "_decodeExtraCalldataWord",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1292,
                              "src": "4902:24:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (uint256) pure returns (bytes32)"
                              }
                            },
                            "id": 1253,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4902:30:7",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4898:34:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 1255,
                        "nodeType": "ExpressionStatement",
                        "src": "4898:34:7"
                      },
                      {
                        "expression": {
                          "id": 1260,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1256,
                            "name": "s",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1236,
                            "src": "4942:1:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "hexValue": "30783630",
                                "id": 1258,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4971:4:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_96_by_1",
                                  "typeString": "int_const 96"
                                },
                                "value": "0x60"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_96_by_1",
                                  "typeString": "int_const 96"
                                }
                              ],
                              "id": 1257,
                              "name": "_decodeExtraCalldataWord",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1292,
                              "src": "4946:24:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (uint256) pure returns (bytes32)"
                              }
                            },
                            "id": 1259,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4946:30:7",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4942:34:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 1261,
                        "nodeType": "ExpressionStatement",
                        "src": "4942:34:7"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1229,
                    "nodeType": "StructuredDocumentation",
                    "src": "4328:265:7",
                    "text": " @dev Extracts the signature parameters from extra calldata.\n This function returns bogus data if no signature is included. This is not a security risk, as that data would not\n be considered a valid signature in the first place."
                  },
                  "id": 1263,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_signature",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1230,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4617:2:7"
                  },
                  "returnParameters": {
                    "id": 1237,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1232,
                        "mutability": "mutable",
                        "name": "v",
                        "nodeType": "VariableDeclaration",
                        "scope": 1263,
                        "src": "4680:7:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 1231,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "4680:5:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1234,
                        "mutability": "mutable",
                        "name": "r",
                        "nodeType": "VariableDeclaration",
                        "scope": 1263,
                        "src": "4701:9:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 1233,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4701:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1236,
                        "mutability": "mutable",
                        "name": "s",
                        "nodeType": "VariableDeclaration",
                        "scope": 1263,
                        "src": "4724:9:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 1235,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4724:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4666:77:7"
                  },
                  "scope": 1293,
                  "src": "4598:385:7",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1281,
                    "nodeType": "Block",
                    "src": "5239:435:7",
                    "statements": [
                      {
                        "expression": {
                          "id": 1272,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1269,
                            "name": "result",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1267,
                            "src": "5249:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 1270,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "5258:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1271,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "data",
                            "nodeType": "MemberAccess",
                            "src": "5258:8:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_calldata_ptr",
                              "typeString": "bytes calldata"
                            }
                          },
                          "src": "5249:17:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1273,
                        "nodeType": "ExpressionStatement",
                        "src": "5249:17:7"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1277,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 1274,
                              "name": "result",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1267,
                              "src": "5366:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 1275,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "5366:13:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "id": 1276,
                            "name": "_EXTRA_CALLDATA_LENGTH",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1057,
                            "src": "5382:22:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5366:38:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1280,
                        "nodeType": "IfStatement",
                        "src": "5362:306:7",
                        "trueBody": {
                          "id": 1279,
                          "nodeType": "Block",
                          "src": "5406:262:7",
                          "statements": [
                            {
                              "AST": {
                                "nodeType": "YulBlock",
                                "src": "5489:169:7",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "name": "result",
                                          "nodeType": "YulIdentifier",
                                          "src": "5592:6:7"
                                        },
                                        {
                                          "arguments": [
                                            {
                                              "arguments": [],
                                              "functionName": {
                                                "name": "calldatasize",
                                                "nodeType": "YulIdentifier",
                                                "src": "5604:12:7"
                                              },
                                              "nodeType": "YulFunctionCall",
                                              "src": "5604:14:7"
                                            },
                                            {
                                              "name": "_EXTRA_CALLDATA_LENGTH",
                                              "nodeType": "YulIdentifier",
                                              "src": "5620:22:7"
                                            }
                                          ],
                                          "functionName": {
                                            "name": "sub",
                                            "nodeType": "YulIdentifier",
                                            "src": "5600:3:7"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "5600:43:7"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mstore",
                                        "nodeType": "YulIdentifier",
                                        "src": "5585:6:7"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "5585:59:7"
                                    },
                                    "nodeType": "YulExpressionStatement",
                                    "src": "5585:59:7"
                                  }
                                ]
                              },
                              "evmVersion": "istanbul",
                              "externalReferences": [
                                {
                                  "declaration": 1057,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "5620:22:7",
                                  "valueSize": 1
                                },
                                {
                                  "declaration": 1267,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "5592:6:7",
                                  "valueSize": 1
                                }
                              ],
                              "id": 1278,
                              "nodeType": "InlineAssembly",
                              "src": "5480:178:7"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1264,
                    "nodeType": "StructuredDocumentation",
                    "src": "4989:180:7",
                    "text": " @dev Returns the original calldata, without the extra bytes containing the signature.\n This function returns bogus data if no signature is included."
                  },
                  "id": 1282,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calldata",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1265,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5192:2:7"
                  },
                  "returnParameters": {
                    "id": 1268,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1267,
                        "mutability": "mutable",
                        "name": "result",
                        "nodeType": "VariableDeclaration",
                        "scope": 1282,
                        "src": "5218:19:7",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 1266,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "5218:5:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5217:21:7"
                  },
                  "scope": 1293,
                  "src": "5174:500:7",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1291,
                    "nodeType": "Block",
                    "src": "5981:185:7",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "6056:104:7",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "6070:80:7",
                              "value": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "arguments": [
                                          {
                                            "arguments": [],
                                            "functionName": {
                                              "name": "calldatasize",
                                              "nodeType": "YulIdentifier",
                                              "src": "6101:12:7"
                                            },
                                            "nodeType": "YulFunctionCall",
                                            "src": "6101:14:7"
                                          },
                                          {
                                            "name": "_EXTRA_CALLDATA_LENGTH",
                                            "nodeType": "YulIdentifier",
                                            "src": "6117:22:7"
                                          }
                                        ],
                                        "functionName": {
                                          "name": "sub",
                                          "nodeType": "YulIdentifier",
                                          "src": "6097:3:7"
                                        },
                                        "nodeType": "YulFunctionCall",
                                        "src": "6097:43:7"
                                      },
                                      {
                                        "name": "offset",
                                        "nodeType": "YulIdentifier",
                                        "src": "6142:6:7"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "6093:3:7"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "6093:56:7"
                                  }
                                ],
                                "functionName": {
                                  "name": "calldataload",
                                  "nodeType": "YulIdentifier",
                                  "src": "6080:12:7"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "6080:70:7"
                              },
                              "variableNames": [
                                {
                                  "name": "result",
                                  "nodeType": "YulIdentifier",
                                  "src": "6070:6:7"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 1057,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6117:22:7",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1285,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6142:6:7",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1288,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6070:6:7",
                            "valueSize": 1
                          }
                        ],
                        "id": 1290,
                        "nodeType": "InlineAssembly",
                        "src": "6047:113:7"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1283,
                    "nodeType": "StructuredDocumentation",
                    "src": "5680:208:7",
                    "text": " @dev Returns a 256 bit word from 'extra' calldata, at some offset from the expected end of the original calldata.\n This function returns bogus data if no signature is included."
                  },
                  "id": 1292,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_decodeExtraCalldataWord",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1286,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1285,
                        "mutability": "mutable",
                        "name": "offset",
                        "nodeType": "VariableDeclaration",
                        "scope": 1292,
                        "src": "5927:14:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1284,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5927:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5926:16:7"
                  },
                  "returnParameters": {
                    "id": 1289,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1288,
                        "mutability": "mutable",
                        "name": "result",
                        "nodeType": "VariableDeclaration",
                        "scope": 1292,
                        "src": "5965:14:7",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 1287,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5965:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5964:16:7"
                  },
                  "scope": 1293,
                  "src": "5893:273:7",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 1294,
              "src": "1218:4950:7"
            }
          ],
          "src": "688:5481:7"
        },
        "id": 7
      },
      "src.sol/amm/lib/helpers/TemporarilyPausable.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/helpers/TemporarilyPausable.sol",
          "exportedSymbols": {
            "TemporarilyPausable": [
              1473
            ]
          },
          "id": 1474,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 1295,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:8"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "./BalancerErrors.sol",
              "id": 1296,
              "nodeType": "ImportDirective",
              "scope": 1474,
              "sourceUnit": 656,
              "src": "713:30:8",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "documentation": {
                "id": 1297,
                "nodeType": "StructuredDocumentation",
                "src": "745:1099:8",
                "text": " @dev Allows for a contract to be paused during an initial period after deployment, disabling functionality. Can be\n used as an emergency switch in case a security vulnerability or threat is identified.\n The contract can only be paused during the Pause Window, a period that starts at deployment. It can also be\n unpaused and repaused any number of times during this period. This is intended to serve as a safety measure: it lets\n system managers react quickly to potentially dangerous situations, knowing that this action is reversible if careful\n analysis later determines there was a false alarm.\n If the contract is paused when the Pause Window finishes, it will remain in the paused state through an additional\n Buffer Period, after which it will be automatically unpaused forever. This is to ensure there is always enough time\n to react to an emergency, even if the threat is discovered shortly before the Pause Window expires.\n Note that since the contract can only be paused within the Pause Window, unpausing during the Buffer Period is\n irreversible."
              },
              "fullyImplemented": true,
              "id": 1473,
              "linearizedBaseContracts": [
                1473
              ],
              "name": "TemporarilyPausable",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": true,
                  "id": 1300,
                  "mutability": "constant",
                  "name": "_MAX_PAUSE_WINDOW_DURATION",
                  "nodeType": "VariableDeclaration",
                  "scope": 1473,
                  "src": "2049:61:8",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1298,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2049:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "3930",
                    "id": 1299,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2103:7:8",
                    "subdenomination": "days",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_7776000_by_1",
                      "typeString": "int_const 7776000"
                    },
                    "value": "90"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 1303,
                  "mutability": "constant",
                  "name": "_MAX_BUFFER_PERIOD_DURATION",
                  "nodeType": "VariableDeclaration",
                  "scope": 1473,
                  "src": "2116:62:8",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1301,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2116:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "3330",
                    "id": 1302,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2171:7:8",
                    "subdenomination": "days",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_2592000_by_1",
                      "typeString": "int_const 2592000"
                    },
                    "value": "30"
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 1305,
                  "mutability": "immutable",
                  "name": "_pauseWindowEndTime",
                  "nodeType": "VariableDeclaration",
                  "scope": 1473,
                  "src": "2185:45:8",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1304,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2185:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 1307,
                  "mutability": "immutable",
                  "name": "_bufferPeriodEndTime",
                  "nodeType": "VariableDeclaration",
                  "scope": 1473,
                  "src": "2236:46:8",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1306,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2236:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 1309,
                  "mutability": "mutable",
                  "name": "_paused",
                  "nodeType": "VariableDeclaration",
                  "scope": 1473,
                  "src": "2289:20:8",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1308,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2289:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "anonymous": false,
                  "id": 1313,
                  "name": "PausedStateChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 1312,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1311,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "paused",
                        "nodeType": "VariableDeclaration",
                        "scope": 1313,
                        "src": "2341:11:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 1310,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2341:4:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2340:13:8"
                  },
                  "src": "2316:38:8"
                },
                {
                  "body": {
                    "id": 1353,
                    "nodeType": "Block",
                    "src": "2431:418:8",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1323,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1321,
                                "name": "pauseWindowDuration",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1315,
                                "src": "2450:19:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 1322,
                                "name": "_MAX_PAUSE_WINDOW_DURATION",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1300,
                                "src": "2473:26:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "2450:49:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1324,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2501:6:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1325,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_PAUSE_WINDOW_DURATION",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 495,
                              "src": "2501:32:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1320,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2441:8:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1326,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2441:93:8",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1327,
                        "nodeType": "ExpressionStatement",
                        "src": "2441:93:8"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1331,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1329,
                                "name": "bufferPeriodDuration",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1317,
                                "src": "2553:20:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 1330,
                                "name": "_MAX_BUFFER_PERIOD_DURATION",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1303,
                                "src": "2577:27:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "2553:51:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1332,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2606:6:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1333,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_BUFFER_PERIOD_DURATION",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 498,
                              "src": "2606:33:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1328,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2544:8:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1334,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2544:96:8",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1335,
                        "nodeType": "ExpressionStatement",
                        "src": "2544:96:8"
                      },
                      {
                        "assignments": [
                          1337
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1337,
                            "mutability": "mutable",
                            "name": "pauseWindowEndTime",
                            "nodeType": "VariableDeclaration",
                            "scope": 1353,
                            "src": "2651:26:8",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1336,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2651:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1342,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1341,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 1338,
                              "name": "block",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -4,
                              "src": "2680:5:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_block",
                                "typeString": "block"
                              }
                            },
                            "id": 1339,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "src": "2680:15:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 1340,
                            "name": "pauseWindowDuration",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1315,
                            "src": "2698:19:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2680:37:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2651:66:8"
                      },
                      {
                        "expression": {
                          "id": 1345,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1343,
                            "name": "_pauseWindowEndTime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1305,
                            "src": "2728:19:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 1344,
                            "name": "pauseWindowEndTime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1337,
                            "src": "2750:18:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2728:40:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1346,
                        "nodeType": "ExpressionStatement",
                        "src": "2728:40:8"
                      },
                      {
                        "expression": {
                          "id": 1351,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1347,
                            "name": "_bufferPeriodEndTime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1307,
                            "src": "2778:20:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1350,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 1348,
                              "name": "pauseWindowEndTime",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1337,
                              "src": "2801:18:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "+",
                            "rightExpression": {
                              "id": 1349,
                              "name": "bufferPeriodDuration",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1317,
                              "src": "2822:20:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "2801:41:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2778:64:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1352,
                        "nodeType": "ExpressionStatement",
                        "src": "2778:64:8"
                      }
                    ]
                  },
                  "id": 1354,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1318,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1315,
                        "mutability": "mutable",
                        "name": "pauseWindowDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 1354,
                        "src": "2372:27:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1314,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2372:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1317,
                        "mutability": "mutable",
                        "name": "bufferPeriodDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 1354,
                        "src": "2401:28:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1316,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2401:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2371:59:8"
                  },
                  "returnParameters": {
                    "id": 1319,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2431:0:8"
                  },
                  "scope": 1473,
                  "src": "2360:489:8",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1361,
                    "nodeType": "Block",
                    "src": "2943:46:8",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 1357,
                            "name": "_ensureNotPaused",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1440,
                            "src": "2953:16:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$__$",
                              "typeString": "function () view"
                            }
                          },
                          "id": 1358,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2953:18:8",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1359,
                        "nodeType": "ExpressionStatement",
                        "src": "2953:18:8"
                      },
                      {
                        "id": 1360,
                        "nodeType": "PlaceholderStatement",
                        "src": "2981:1:8"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1355,
                    "nodeType": "StructuredDocumentation",
                    "src": "2855:58:8",
                    "text": " @dev Reverts if the contract is paused."
                  },
                  "id": 1362,
                  "name": "whenNotPaused",
                  "nodeType": "ModifierDefinition",
                  "parameters": {
                    "id": 1356,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2940:2:8"
                  },
                  "src": "2918:71:8",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1388,
                    "nodeType": "Block",
                    "src": "3330:153:8",
                    "statements": [
                      {
                        "expression": {
                          "id": 1376,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1372,
                            "name": "paused",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1366,
                            "src": "3340:6:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 1375,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "!",
                            "prefix": true,
                            "src": "3349:15:8",
                            "subExpression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 1373,
                                "name": "_isNotPaused",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1456,
                                "src": "3350:12:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                                  "typeString": "function () view returns (bool)"
                                }
                              },
                              "id": 1374,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3350:14:8",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "3340:24:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1377,
                        "nodeType": "ExpressionStatement",
                        "src": "3340:24:8"
                      },
                      {
                        "expression": {
                          "id": 1381,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1378,
                            "name": "pauseWindowEndTime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1368,
                            "src": "3374:18:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 1379,
                              "name": "_getPauseWindowEndTime",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1464,
                              "src": "3395:22:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 1380,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3395:24:8",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3374:45:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1382,
                        "nodeType": "ExpressionStatement",
                        "src": "3374:45:8"
                      },
                      {
                        "expression": {
                          "id": 1386,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1383,
                            "name": "bufferPeriodEndTime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1370,
                            "src": "3429:19:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 1384,
                              "name": "_getBufferPeriodEndTime",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1472,
                              "src": "3451:23:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 1385,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3451:25:8",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3429:47:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1387,
                        "nodeType": "ExpressionStatement",
                        "src": "3429:47:8"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1363,
                    "nodeType": "StructuredDocumentation",
                    "src": "2995:137:8",
                    "text": " @dev Returns the current contract pause status, as well as the end times of the Pause Window and Buffer\n Period."
                  },
                  "functionSelector": "1c0de051",
                  "id": 1389,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getPausedState",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1364,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3160:2:8"
                  },
                  "returnParameters": {
                    "id": 1371,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1366,
                        "mutability": "mutable",
                        "name": "paused",
                        "nodeType": "VariableDeclaration",
                        "scope": 1389,
                        "src": "3223:11:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 1365,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3223:4:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1368,
                        "mutability": "mutable",
                        "name": "pauseWindowEndTime",
                        "nodeType": "VariableDeclaration",
                        "scope": 1389,
                        "src": "3248:26:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1367,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3248:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1370,
                        "mutability": "mutable",
                        "name": "bufferPeriodEndTime",
                        "nodeType": "VariableDeclaration",
                        "scope": 1389,
                        "src": "3288:27:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1369,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3288:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3209:116:8"
                  },
                  "scope": 1473,
                  "src": "3137:346:8",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 1427,
                    "nodeType": "Block",
                    "src": "3801:316:8",
                    "statements": [
                      {
                        "condition": {
                          "id": 1395,
                          "name": "paused",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1392,
                          "src": "3815:6:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 1417,
                          "nodeType": "Block",
                          "src": "3935:108:8",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 1412,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "expression": {
                                        "id": 1408,
                                        "name": "block",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -4,
                                        "src": "3958:5:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_block",
                                          "typeString": "block"
                                        }
                                      },
                                      "id": 1409,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "timestamp",
                                      "nodeType": "MemberAccess",
                                      "src": "3958:15:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "<",
                                    "rightExpression": {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "id": 1410,
                                        "name": "_getBufferPeriodEndTime",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1472,
                                        "src": "3976:23:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                          "typeString": "function () view returns (uint256)"
                                        }
                                      },
                                      "id": 1411,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3976:25:8",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3958:43:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 1413,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "4003:6:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 1414,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "BUFFER_PERIOD_EXPIRED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 558,
                                    "src": "4003:28:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1407,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3949:8:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 1415,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3949:83:8",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 1416,
                              "nodeType": "ExpressionStatement",
                              "src": "3949:83:8"
                            }
                          ]
                        },
                        "id": 1418,
                        "nodeType": "IfStatement",
                        "src": "3811:232:8",
                        "trueBody": {
                          "id": 1406,
                          "nodeType": "Block",
                          "src": "3823:106:8",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 1401,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "expression": {
                                        "id": 1397,
                                        "name": "block",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -4,
                                        "src": "3846:5:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_block",
                                          "typeString": "block"
                                        }
                                      },
                                      "id": 1398,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "timestamp",
                                      "nodeType": "MemberAccess",
                                      "src": "3846:15:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "<",
                                    "rightExpression": {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "id": 1399,
                                        "name": "_getPauseWindowEndTime",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1464,
                                        "src": "3864:22:8",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                          "typeString": "function () view returns (uint256)"
                                        }
                                      },
                                      "id": 1400,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3864:24:8",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3846:42:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 1402,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3890:6:8",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 1403,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "PAUSE_WINDOW_EXPIRED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 492,
                                    "src": "3890:27:8",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1396,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3837:8:8",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 1404,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3837:81:8",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 1405,
                              "nodeType": "ExpressionStatement",
                              "src": "3837:81:8"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 1421,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1419,
                            "name": "_paused",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1309,
                            "src": "4053:7:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 1420,
                            "name": "paused",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1392,
                            "src": "4063:6:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "4053:16:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1422,
                        "nodeType": "ExpressionStatement",
                        "src": "4053:16:8"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 1424,
                              "name": "paused",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1392,
                              "src": "4103:6:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 1423,
                            "name": "PausedStateChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1313,
                            "src": "4084:18:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bool_$returns$__$",
                              "typeString": "function (bool)"
                            }
                          },
                          "id": 1425,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4084:26:8",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1426,
                        "nodeType": "EmitStatement",
                        "src": "4079:31:8"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1390,
                    "nodeType": "StructuredDocumentation",
                    "src": "3489:265:8",
                    "text": " @dev Sets the pause state to `paused`. The contract can only be paused until the end of the Pause Window, and\n unpaused until the end of the Buffer Period.\n Once the Buffer Period expires, this function reverts unconditionally."
                  },
                  "id": 1428,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setPaused",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1393,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1392,
                        "mutability": "mutable",
                        "name": "paused",
                        "nodeType": "VariableDeclaration",
                        "scope": 1428,
                        "src": "3779:11:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 1391,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3779:4:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3778:13:8"
                  },
                  "returnParameters": {
                    "id": 1394,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3801:0:8"
                  },
                  "scope": 1473,
                  "src": "3759:358:8",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1439,
                    "nodeType": "Block",
                    "src": "4228:56:8",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 1433,
                                "name": "_isNotPaused",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1456,
                                "src": "4247:12:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                                  "typeString": "function () view returns (bool)"
                                }
                              },
                              "id": 1434,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4247:14:8",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1435,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4263:6:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1436,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "PAUSED",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 489,
                              "src": "4263:13:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1432,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4238:8:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1437,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4238:39:8",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1438,
                        "nodeType": "ExpressionStatement",
                        "src": "4238:39:8"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1429,
                    "nodeType": "StructuredDocumentation",
                    "src": "4123:58:8",
                    "text": " @dev Reverts if the contract is paused."
                  },
                  "id": 1440,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_ensureNotPaused",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1430,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4211:2:8"
                  },
                  "returnParameters": {
                    "id": 1431,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4228:0:8"
                  },
                  "scope": 1473,
                  "src": "4186:98:8",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1455,
                    "nodeType": "Block",
                    "src": "4563:184:8",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 1453,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1450,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "expression": {
                                "id": 1446,
                                "name": "block",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -4,
                                "src": "4685:5:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_block",
                                  "typeString": "block"
                                }
                              },
                              "id": 1447,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "timestamp",
                              "nodeType": "MemberAccess",
                              "src": "4685:15:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": ">",
                            "rightExpression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 1448,
                                "name": "_getBufferPeriodEndTime",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1472,
                                "src": "4703:23:8",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 1449,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4703:25:8",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "4685:43:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "||",
                          "rightExpression": {
                            "id": 1452,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "!",
                            "prefix": true,
                            "src": "4732:8:8",
                            "subExpression": {
                              "id": 1451,
                              "name": "_paused",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1309,
                              "src": "4733:7:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "4685:55:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 1445,
                        "id": 1454,
                        "nodeType": "Return",
                        "src": "4678:62:8"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1441,
                    "nodeType": "StructuredDocumentation",
                    "src": "4290:215:8",
                    "text": " @dev Returns true if the contract is unpaused.\n Once the Buffer Period expires, the gas cost of calling this function is reduced dramatically, as storage is no\n longer accessed."
                  },
                  "id": 1456,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_isNotPaused",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1442,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4531:2:8"
                  },
                  "returnParameters": {
                    "id": 1445,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1444,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1456,
                        "src": "4557:4:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 1443,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4557:4:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4556:6:8"
                  },
                  "scope": 1473,
                  "src": "4510:237:8",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1463,
                    "nodeType": "Block",
                    "src": "4925:43:8",
                    "statements": [
                      {
                        "expression": {
                          "id": 1461,
                          "name": "_pauseWindowEndTime",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1305,
                          "src": "4942:19:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1460,
                        "id": 1462,
                        "nodeType": "Return",
                        "src": "4935:26:8"
                      }
                    ]
                  },
                  "id": 1464,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getPauseWindowEndTime",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1457,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4891:2:8"
                  },
                  "returnParameters": {
                    "id": 1460,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1459,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1464,
                        "src": "4916:7:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1458,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4916:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4915:9:8"
                  },
                  "scope": 1473,
                  "src": "4860:108:8",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 1471,
                    "nodeType": "Block",
                    "src": "5040:44:8",
                    "statements": [
                      {
                        "expression": {
                          "id": 1469,
                          "name": "_bufferPeriodEndTime",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1307,
                          "src": "5057:20:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1468,
                        "id": 1470,
                        "nodeType": "Return",
                        "src": "5050:27:8"
                      }
                    ]
                  },
                  "id": 1472,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getBufferPeriodEndTime",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1465,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5006:2:8"
                  },
                  "returnParameters": {
                    "id": 1468,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1467,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1472,
                        "src": "5031:7:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1466,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5031:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5030:9:8"
                  },
                  "scope": 1473,
                  "src": "4974:110:8",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 1474,
              "src": "1845:3241:8"
            }
          ],
          "src": "688:4399:8"
        },
        "id": 8
      },
      "src.sol/amm/lib/math/FixedPoint.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
          "exportedSymbols": {
            "FixedPoint": [
              1815
            ]
          },
          "id": 1816,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 1475,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:9"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/LogExpMath.sol",
              "file": "./LogExpMath.sol",
              "id": 1476,
              "nodeType": "ImportDirective",
              "scope": 1816,
              "sourceUnit": 3085,
              "src": "713:26:9",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 1477,
              "nodeType": "ImportDirective",
              "scope": 1816,
              "sourceUnit": 656,
              "src": "740:39:9",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "fullyImplemented": true,
              "id": 1815,
              "linearizedBaseContracts": [
                1815
              ],
              "name": "FixedPoint",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": true,
                  "id": 1480,
                  "mutability": "constant",
                  "name": "ONE",
                  "nodeType": "VariableDeclaration",
                  "scope": 1815,
                  "src": "861:36:9",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1478,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "861:7:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "31653138",
                    "id": 1479,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "893:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1000000000000000000_by_1",
                      "typeString": "int_const 1000000000000000000"
                    },
                    "value": "1e18"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1483,
                  "mutability": "constant",
                  "name": "MAX_POW_RELATIVE_ERROR",
                  "nodeType": "VariableDeclaration",
                  "scope": 1815,
                  "src": "924:56:9",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1481,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "924:7:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "3130303030",
                    "id": 1482,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "975:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_10000_by_1",
                      "typeString": "int_const 10000"
                    },
                    "value": "10000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1486,
                  "mutability": "constant",
                  "name": "MIN_POW_BASE_FREE_EXPONENT",
                  "nodeType": "VariableDeclaration",
                  "scope": 1815,
                  "src": "1089:61:9",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1484,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1089:7:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "302e37653138",
                    "id": 1485,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1144:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_700000000000000000_by_1",
                      "typeString": "int_const 700000000000000000"
                    },
                    "value": "0.7e18"
                  },
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1511,
                    "nodeType": "Block",
                    "src": "1224:172:9",
                    "statements": [
                      {
                        "assignments": [
                          1496
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1496,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 1511,
                            "src": "1307:9:9",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1495,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1307:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1500,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1499,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1497,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1488,
                            "src": "1319:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 1498,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1490,
                            "src": "1323:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1319:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1307:17:9"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1504,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1502,
                                "name": "c",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1496,
                                "src": "1343:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 1503,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1488,
                                "src": "1348:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1343:6:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1505,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1351:6:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1506,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ADD_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 372,
                              "src": "1351:19:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1501,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1334:8:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1507,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1334:37:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1508,
                        "nodeType": "ExpressionStatement",
                        "src": "1334:37:9"
                      },
                      {
                        "expression": {
                          "id": 1509,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1496,
                          "src": "1388:1:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1494,
                        "id": 1510,
                        "nodeType": "Return",
                        "src": "1381:8:9"
                      }
                    ]
                  },
                  "id": 1512,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "add",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1491,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1488,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 1512,
                        "src": "1170:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1487,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1170:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1490,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 1512,
                        "src": "1181:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1489,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1181:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1169:22:9"
                  },
                  "returnParameters": {
                    "id": 1494,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1493,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1512,
                        "src": "1215:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1492,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1215:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1214:9:9"
                  },
                  "scope": 1815,
                  "src": "1157:239:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1537,
                    "nodeType": "Block",
                    "src": "1469:172:9",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1524,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1522,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1516,
                                "src": "1561:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 1523,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1514,
                                "src": "1566:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1561:6:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1525,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1569:6:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1526,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SUB_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 375,
                              "src": "1569:19:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1521,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1552:8:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1527,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1552:37:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1528,
                        "nodeType": "ExpressionStatement",
                        "src": "1552:37:9"
                      },
                      {
                        "assignments": [
                          1530
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1530,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 1537,
                            "src": "1599:9:9",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1529,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1599:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1534,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1533,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1531,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1514,
                            "src": "1611:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "id": 1532,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1516,
                            "src": "1615:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1611:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1599:17:9"
                      },
                      {
                        "expression": {
                          "id": 1535,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1530,
                          "src": "1633:1:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1520,
                        "id": 1536,
                        "nodeType": "Return",
                        "src": "1626:8:9"
                      }
                    ]
                  },
                  "id": 1538,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "sub",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1517,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1514,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 1538,
                        "src": "1415:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1513,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1415:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1516,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 1538,
                        "src": "1426:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1515,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1426:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1414:22:9"
                  },
                  "returnParameters": {
                    "id": 1520,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1519,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1538,
                        "src": "1460:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1518,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1460:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1459:9:9"
                  },
                  "scope": 1815,
                  "src": "1402:239:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1571,
                    "nodeType": "Block",
                    "src": "1718:138:9",
                    "statements": [
                      {
                        "assignments": [
                          1548
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1548,
                            "mutability": "mutable",
                            "name": "product",
                            "nodeType": "VariableDeclaration",
                            "scope": 1571,
                            "src": "1728:15:9",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1547,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1728:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1552,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1551,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1549,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1540,
                            "src": "1746:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "*",
                          "rightExpression": {
                            "id": 1550,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1542,
                            "src": "1750:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1746:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1728:23:9"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 1562,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1556,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 1554,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1540,
                                  "src": "1770:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "hexValue": "30",
                                  "id": 1555,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1775:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "1770:6:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1561,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 1559,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 1557,
                                    "name": "product",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1548,
                                    "src": "1780:7:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 1558,
                                    "name": "a",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1540,
                                    "src": "1790:1:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "1780:11:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 1560,
                                  "name": "b",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1542,
                                  "src": "1795:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1780:16:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "1770:26:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1563,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1798:6:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1564,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MUL_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 381,
                              "src": "1798:19:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1553,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1761:8:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1565,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1761:57:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1566,
                        "nodeType": "ExpressionStatement",
                        "src": "1761:57:9"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1569,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1567,
                            "name": "product",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1548,
                            "src": "1836:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 1568,
                            "name": "ONE",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1480,
                            "src": "1846:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1836:13:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1546,
                        "id": 1570,
                        "nodeType": "Return",
                        "src": "1829:20:9"
                      }
                    ]
                  },
                  "id": 1572,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "mulDown",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1543,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1540,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 1572,
                        "src": "1664:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1539,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1664:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1542,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 1572,
                        "src": "1675:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1541,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1675:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1663:22:9"
                  },
                  "returnParameters": {
                    "id": 1546,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1545,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1572,
                        "src": "1709:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1544,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1709:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1708:9:9"
                  },
                  "scope": 1815,
                  "src": "1647:209:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1619,
                    "nodeType": "Block",
                    "src": "1931:548:9",
                    "statements": [
                      {
                        "assignments": [
                          1582
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1582,
                            "mutability": "mutable",
                            "name": "product",
                            "nodeType": "VariableDeclaration",
                            "scope": 1619,
                            "src": "1941:15:9",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1581,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1941:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1586,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1585,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1583,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1574,
                            "src": "1959:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "*",
                          "rightExpression": {
                            "id": 1584,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1576,
                            "src": "1963:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1959:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1941:23:9"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 1596,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1590,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 1588,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1574,
                                  "src": "1983:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "hexValue": "30",
                                  "id": 1589,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1988:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "1983:6:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1595,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 1593,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 1591,
                                    "name": "product",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1582,
                                    "src": "1993:7:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 1592,
                                    "name": "a",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1574,
                                    "src": "2003:1:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "1993:11:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 1594,
                                  "name": "b",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1576,
                                  "src": "2008:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1993:16:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "1983:26:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1597,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2011:6:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1598,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MUL_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 381,
                              "src": "2011:19:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1587,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1974:8:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1599,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1974:57:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1600,
                        "nodeType": "ExpressionStatement",
                        "src": "1974:57:9"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1603,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1601,
                            "name": "product",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1582,
                            "src": "2046:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 1602,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2057:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2046:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 1617,
                          "nodeType": "Block",
                          "src": "2099:374:9",
                          "statements": [
                            {
                              "expression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1615,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 1612,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "components": [
                                          {
                                            "commonType": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            "id": 1609,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftExpression": {
                                              "id": 1607,
                                              "name": "product",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 1582,
                                              "src": "2439:7:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "nodeType": "BinaryOperation",
                                            "operator": "-",
                                            "rightExpression": {
                                              "hexValue": "31",
                                              "id": 1608,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "kind": "number",
                                              "lValueRequested": false,
                                              "nodeType": "Literal",
                                              "src": "2449:1:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_rational_1_by_1",
                                                "typeString": "int_const 1"
                                              },
                                              "value": "1"
                                            },
                                            "src": "2439:11:9",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "id": 1610,
                                        "isConstant": false,
                                        "isInlineArray": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "TupleExpression",
                                        "src": "2438:13:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "/",
                                      "rightExpression": {
                                        "id": 1611,
                                        "name": "ONE",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1480,
                                        "src": "2454:3:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "2438:19:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 1613,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "2437:21:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "hexValue": "31",
                                  "id": 1614,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2461:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "2437:25:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 1580,
                              "id": 1616,
                              "nodeType": "Return",
                              "src": "2430:32:9"
                            }
                          ]
                        },
                        "id": 1618,
                        "nodeType": "IfStatement",
                        "src": "2042:431:9",
                        "trueBody": {
                          "id": 1606,
                          "nodeType": "Block",
                          "src": "2060:33:9",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 1604,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2081:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 1580,
                              "id": 1605,
                              "nodeType": "Return",
                              "src": "2074:8:9"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 1620,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "mulUp",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1577,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1574,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 1620,
                        "src": "1877:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1573,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1877:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1576,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 1620,
                        "src": "1888:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1575,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1888:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1876:22:9"
                  },
                  "returnParameters": {
                    "id": 1580,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1579,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1620,
                        "src": "1922:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1578,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1922:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1921:9:9"
                  },
                  "scope": 1815,
                  "src": "1862:617:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1665,
                    "nodeType": "Block",
                    "src": "2556:284:9",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1632,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1630,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1624,
                                "src": "2575:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 1631,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2580:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "2575:6:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1633,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2583:6:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1634,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ZERO_DIVISION",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 384,
                              "src": "2583:20:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1629,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2566:8:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1635,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2566:38:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1636,
                        "nodeType": "ExpressionStatement",
                        "src": "2566:38:9"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1639,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1637,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1622,
                            "src": "2619:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 1638,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2624:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2619:6:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 1663,
                          "nodeType": "Block",
                          "src": "2666:168:9",
                          "statements": [
                            {
                              "assignments": [
                                1644
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 1644,
                                  "mutability": "mutable",
                                  "name": "aInflated",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 1663,
                                  "src": "2680:17:9",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 1643,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2680:7:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 1648,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1647,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 1645,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1622,
                                  "src": "2700:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "id": 1646,
                                  "name": "ONE",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1480,
                                  "src": "2704:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2700:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2680:27:9"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 1654,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 1652,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 1650,
                                        "name": "aInflated",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1644,
                                        "src": "2730:9:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "/",
                                      "rightExpression": {
                                        "id": 1651,
                                        "name": "a",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1622,
                                        "src": "2742:1:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "2730:13:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "id": 1653,
                                      "name": "ONE",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1480,
                                      "src": "2747:3:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "2730:20:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 1655,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2752:6:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 1656,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "DIV_INTERNAL",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 387,
                                    "src": "2752:19:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1649,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2721:8:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 1657,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2721:51:9",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 1658,
                              "nodeType": "ExpressionStatement",
                              "src": "2721:51:9"
                            },
                            {
                              "expression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1661,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 1659,
                                  "name": "aInflated",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1644,
                                  "src": "2810:9:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "/",
                                "rightExpression": {
                                  "id": 1660,
                                  "name": "b",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1624,
                                  "src": "2822:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2810:13:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 1628,
                              "id": 1662,
                              "nodeType": "Return",
                              "src": "2803:20:9"
                            }
                          ]
                        },
                        "id": 1664,
                        "nodeType": "IfStatement",
                        "src": "2615:219:9",
                        "trueBody": {
                          "id": 1642,
                          "nodeType": "Block",
                          "src": "2627:33:9",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 1640,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2648:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 1628,
                              "id": 1641,
                              "nodeType": "Return",
                              "src": "2641:8:9"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 1666,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "divDown",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1625,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1622,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 1666,
                        "src": "2502:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1621,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2502:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1624,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 1666,
                        "src": "2513:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1623,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2513:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2501:22:9"
                  },
                  "returnParameters": {
                    "id": 1628,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1627,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1666,
                        "src": "2547:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1626,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2547:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2546:9:9"
                  },
                  "scope": 1815,
                  "src": "2485:355:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1717,
                    "nodeType": "Block",
                    "src": "2915:613:9",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1678,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1676,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1670,
                                "src": "2934:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 1677,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2939:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "2934:6:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1679,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2942:6:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1680,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ZERO_DIVISION",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 384,
                              "src": "2942:20:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1675,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2925:8:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1681,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2925:38:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1682,
                        "nodeType": "ExpressionStatement",
                        "src": "2925:38:9"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1685,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1683,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1668,
                            "src": "2978:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 1684,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2983:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2978:6:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 1715,
                          "nodeType": "Block",
                          "src": "3025:497:9",
                          "statements": [
                            {
                              "assignments": [
                                1690
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 1690,
                                  "mutability": "mutable",
                                  "name": "aInflated",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 1715,
                                  "src": "3039:17:9",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 1689,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3039:7:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 1694,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1693,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 1691,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1668,
                                  "src": "3059:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "id": 1692,
                                  "name": "ONE",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1480,
                                  "src": "3063:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3059:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3039:27:9"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 1700,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 1698,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 1696,
                                        "name": "aInflated",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1690,
                                        "src": "3089:9:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "/",
                                      "rightExpression": {
                                        "id": 1697,
                                        "name": "a",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1668,
                                        "src": "3101:1:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3089:13:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "id": 1699,
                                      "name": "ONE",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1480,
                                      "src": "3106:3:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3089:20:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 1701,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3111:6:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 1702,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "DIV_INTERNAL",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 387,
                                    "src": "3111:19:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1695,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3080:8:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 1703,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3080:51:9",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 1704,
                              "nodeType": "ExpressionStatement",
                              "src": "3080:51:9"
                            },
                            {
                              "expression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1713,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 1710,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "components": [
                                          {
                                            "commonType": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            "id": 1707,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftExpression": {
                                              "id": 1705,
                                              "name": "aInflated",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 1690,
                                              "src": "3488:9:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "nodeType": "BinaryOperation",
                                            "operator": "-",
                                            "rightExpression": {
                                              "hexValue": "31",
                                              "id": 1706,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "kind": "number",
                                              "lValueRequested": false,
                                              "nodeType": "Literal",
                                              "src": "3500:1:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_rational_1_by_1",
                                                "typeString": "int_const 1"
                                              },
                                              "value": "1"
                                            },
                                            "src": "3488:13:9",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "id": 1708,
                                        "isConstant": false,
                                        "isInlineArray": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "TupleExpression",
                                        "src": "3487:15:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "/",
                                      "rightExpression": {
                                        "id": 1709,
                                        "name": "b",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1670,
                                        "src": "3505:1:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3487:19:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 1711,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "3486:21:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "hexValue": "31",
                                  "id": 1712,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3510:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "3486:25:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 1674,
                              "id": 1714,
                              "nodeType": "Return",
                              "src": "3479:32:9"
                            }
                          ]
                        },
                        "id": 1716,
                        "nodeType": "IfStatement",
                        "src": "2974:548:9",
                        "trueBody": {
                          "id": 1688,
                          "nodeType": "Block",
                          "src": "2986:33:9",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 1686,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3007:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 1674,
                              "id": 1687,
                              "nodeType": "Return",
                              "src": "3000:8:9"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 1718,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "divUp",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1671,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1668,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 1718,
                        "src": "2861:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1667,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2861:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1670,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 1718,
                        "src": "2872:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1669,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2872:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2860:22:9"
                  },
                  "returnParameters": {
                    "id": 1674,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1673,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1718,
                        "src": "2906:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1672,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2906:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2905:9:9"
                  },
                  "scope": 1815,
                  "src": "2846:682:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1759,
                    "nodeType": "Block",
                    "src": "3831:241:9",
                    "statements": [
                      {
                        "assignments": [
                          1729
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1729,
                            "mutability": "mutable",
                            "name": "raw",
                            "nodeType": "VariableDeclaration",
                            "scope": 1759,
                            "src": "3841:11:9",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1728,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3841:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1735,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 1732,
                              "name": "x",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1721,
                              "src": "3870:1:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 1733,
                              "name": "y",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1723,
                              "src": "3873:1:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 1730,
                              "name": "LogExpMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3084,
                              "src": "3855:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_LogExpMath_$3084_$",
                                "typeString": "type(library LogExpMath)"
                              }
                            },
                            "id": 1731,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "pow",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2057,
                            "src": "3855:14:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 1734,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3855:20:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3841:34:9"
                      },
                      {
                        "assignments": [
                          1737
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1737,
                            "mutability": "mutable",
                            "name": "maxError",
                            "nodeType": "VariableDeclaration",
                            "scope": 1759,
                            "src": "3885:16:9",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1736,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3885:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1745,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 1740,
                                  "name": "raw",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1729,
                                  "src": "3914:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 1741,
                                  "name": "MAX_POW_RELATIVE_ERROR",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1483,
                                  "src": "3919:22:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 1739,
                                "name": "mulUp",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1620,
                                "src": "3908:5:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 1742,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3908:34:9",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "31",
                              "id": 1743,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3944:1:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              }
                            ],
                            "id": 1738,
                            "name": "add",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1512,
                            "src": "3904:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 1744,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3904:42:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3885:61:9"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1748,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1746,
                            "name": "raw",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1729,
                            "src": "3961:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "id": 1747,
                            "name": "maxError",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1737,
                            "src": "3967:8:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3961:14:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 1757,
                          "nodeType": "Block",
                          "src": "4016:50:9",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 1753,
                                    "name": "raw",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1729,
                                    "src": "4041:3:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 1754,
                                    "name": "maxError",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1737,
                                    "src": "4046:8:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1752,
                                  "name": "sub",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1538,
                                  "src": "4037:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 1755,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4037:18:9",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 1727,
                              "id": 1756,
                              "nodeType": "Return",
                              "src": "4030:25:9"
                            }
                          ]
                        },
                        "id": 1758,
                        "nodeType": "IfStatement",
                        "src": "3957:109:9",
                        "trueBody": {
                          "id": 1751,
                          "nodeType": "Block",
                          "src": "3977:33:9",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 1749,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3998:1:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 1727,
                              "id": 1750,
                              "nodeType": "Return",
                              "src": "3991:8:9"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1719,
                    "nodeType": "StructuredDocumentation",
                    "src": "3534:221:9",
                    "text": " @dev Returns x^y, assuming both are fixed point numbers, rounding down. The result is guaranteed to not be above\n the true value (that is, the error function expected - actual is always positive)."
                  },
                  "id": 1760,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "powDown",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1724,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1721,
                        "mutability": "mutable",
                        "name": "x",
                        "nodeType": "VariableDeclaration",
                        "scope": 1760,
                        "src": "3777:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1720,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3777:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1723,
                        "mutability": "mutable",
                        "name": "y",
                        "nodeType": "VariableDeclaration",
                        "scope": 1760,
                        "src": "3788:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1722,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3788:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3776:22:9"
                  },
                  "returnParameters": {
                    "id": 1727,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1726,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1760,
                        "src": "3822:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1725,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3822:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3821:9:9"
                  },
                  "scope": 1815,
                  "src": "3760:312:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1793,
                    "nodeType": "Block",
                    "src": "4371:158:9",
                    "statements": [
                      {
                        "assignments": [
                          1771
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1771,
                            "mutability": "mutable",
                            "name": "raw",
                            "nodeType": "VariableDeclaration",
                            "scope": 1793,
                            "src": "4381:11:9",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1770,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4381:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1777,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 1774,
                              "name": "x",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1763,
                              "src": "4410:1:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 1775,
                              "name": "y",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1765,
                              "src": "4413:1:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 1772,
                              "name": "LogExpMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3084,
                              "src": "4395:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_LogExpMath_$3084_$",
                                "typeString": "type(library LogExpMath)"
                              }
                            },
                            "id": 1773,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "pow",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2057,
                            "src": "4395:14:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 1776,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4395:20:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4381:34:9"
                      },
                      {
                        "assignments": [
                          1779
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1779,
                            "mutability": "mutable",
                            "name": "maxError",
                            "nodeType": "VariableDeclaration",
                            "scope": 1793,
                            "src": "4425:16:9",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1778,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4425:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1787,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 1782,
                                  "name": "raw",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1771,
                                  "src": "4454:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 1783,
                                  "name": "MAX_POW_RELATIVE_ERROR",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1483,
                                  "src": "4459:22:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 1781,
                                "name": "mulUp",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1620,
                                "src": "4448:5:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 1784,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4448:34:9",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "31",
                              "id": 1785,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4484:1:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              }
                            ],
                            "id": 1780,
                            "name": "add",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1512,
                            "src": "4444:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 1786,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4444:42:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4425:61:9"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 1789,
                              "name": "raw",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1771,
                              "src": "4508:3:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 1790,
                              "name": "maxError",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1779,
                              "src": "4513:8:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1788,
                            "name": "add",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1512,
                            "src": "4504:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 1791,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4504:18:9",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1769,
                        "id": 1792,
                        "nodeType": "Return",
                        "src": "4497:25:9"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1761,
                    "nodeType": "StructuredDocumentation",
                    "src": "4078:219:9",
                    "text": " @dev Returns x^y, assuming both are fixed point numbers, rounding up. The result is guaranteed to not be below\n the true value (that is, the error function expected - actual is always negative)."
                  },
                  "id": 1794,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "powUp",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1766,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1763,
                        "mutability": "mutable",
                        "name": "x",
                        "nodeType": "VariableDeclaration",
                        "scope": 1794,
                        "src": "4317:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1762,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4317:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1765,
                        "mutability": "mutable",
                        "name": "y",
                        "nodeType": "VariableDeclaration",
                        "scope": 1794,
                        "src": "4328:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1764,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4328:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4316:22:9"
                  },
                  "returnParameters": {
                    "id": 1769,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1768,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1794,
                        "src": "4362:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1767,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4362:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4361:9:9"
                  },
                  "scope": 1815,
                  "src": "4302:227:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 1813,
                    "nodeType": "Block",
                    "src": "4875:49:9",
                    "statements": [
                      {
                        "expression": {
                          "condition": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1804,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 1802,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1797,
                                  "src": "4893:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "id": 1803,
                                  "name": "ONE",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1480,
                                  "src": "4897:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4893:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              }
                            ],
                            "id": 1805,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "4892:9:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "hexValue": "30",
                            "id": 1810,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4916:1:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "id": 1811,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "4892:25:9",
                          "trueExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1808,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 1806,
                                  "name": "ONE",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1480,
                                  "src": "4905:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "id": 1807,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1797,
                                  "src": "4911:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4905:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 1809,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "4904:9:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1801,
                        "id": 1812,
                        "nodeType": "Return",
                        "src": "4885:32:9"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1795,
                    "nodeType": "StructuredDocumentation",
                    "src": "4535:272:9",
                    "text": " @dev Returns the complement of a value (1 - x), capped to 0 if x is larger than 1.\n Useful when computing the complement for values with some level of relative error, as it strips this error and\n prevents intermediate negative values."
                  },
                  "id": 1814,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "complement",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1798,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1797,
                        "mutability": "mutable",
                        "name": "x",
                        "nodeType": "VariableDeclaration",
                        "scope": 1814,
                        "src": "4832:9:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1796,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4832:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4831:11:9"
                  },
                  "returnParameters": {
                    "id": 1801,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1800,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 1814,
                        "src": "4866:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1799,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4866:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4865:9:9"
                  },
                  "scope": 1815,
                  "src": "4812:112:9",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 1816,
              "src": "836:4090:9"
            }
          ],
          "src": "688:4239:9"
        },
        "id": 9
      },
      "src.sol/amm/lib/math/LogExpMath.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/math/LogExpMath.sol",
          "exportedSymbols": {
            "LogExpMath": [
              3084
            ]
          },
          "id": 3085,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 1817,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "692:23:10"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 1818,
              "nodeType": "ImportDirective",
              "scope": 3085,
              "sourceUnit": 656,
              "src": "717:39:10",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 1819,
                "nodeType": "StructuredDocumentation",
                "src": "781:446:10",
                "text": " @dev Exponentiation and logarithm functions for 18 decimal fixed point numbers (both base and exponent/argument).\n Exponentiation and logarithm with arbitrary bases (x^y and log_x(y)) are implemented by conversion to natural\n exponentiation and logarithm (where the base is Euler's number).\n @author Fernando Martinelli - @fernandomartinelli\n @author Sergio Yuhjtman - @sergioyuhjtman\n @author Daniel Fernandez - @dmf7z"
              },
              "fullyImplemented": true,
              "id": 3084,
              "linearizedBaseContracts": [
                3084
              ],
              "name": "LogExpMath",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": true,
                  "id": 1822,
                  "mutability": "constant",
                  "name": "ONE_18",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "1508:29:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1820,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1508:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "31653138",
                    "id": 1821,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1533:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1000000000000000000_by_1",
                      "typeString": "int_const 1000000000000000000"
                    },
                    "value": "1e18"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1825,
                  "mutability": "constant",
                  "name": "ONE_20",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "1698:29:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1823,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1698:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "31653230",
                    "id": 1824,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1723:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_100000000000000000000_by_1",
                      "typeString": "int_const 100000000000000000000"
                    },
                    "value": "1e20"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1828,
                  "mutability": "constant",
                  "name": "ONE_36",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "1733:29:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1826,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1733:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "31653336",
                    "id": 1827,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1758:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1000000000000000000000000000000000000_by_1",
                      "typeString": "int_const 1000...(29 digits omitted)...0000"
                    },
                    "value": "1e36"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1831,
                  "mutability": "constant",
                  "name": "MAX_NATURAL_EXPONENT",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2279:45:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1829,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2279:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "313330653138",
                    "id": 1830,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2318:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_130000000000000000000_by_1",
                      "typeString": "int_const 130000000000000000000"
                    },
                    "value": "130e18"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1835,
                  "mutability": "constant",
                  "name": "MIN_NATURAL_EXPONENT",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2330:45:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1832,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2330:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "id": 1834,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "-",
                    "prefix": true,
                    "src": "2369:6:10",
                    "subExpression": {
                      "hexValue": "3431653138",
                      "id": 1833,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2370:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_41000000000000000000_by_1",
                        "typeString": "int_const 41000000000000000000"
                      },
                      "value": "41e18"
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_minus_41000000000000000000_by_1",
                      "typeString": "int_const -41000000000000000000"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1840,
                  "mutability": "constant",
                  "name": "LN_36_LOWER_BOUND",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2526:49:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1836,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2526:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 1839,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1837,
                      "name": "ONE_18",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1822,
                      "src": "2562:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31653137",
                      "id": 1838,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2571:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_100000000000000000_by_1",
                        "typeString": "int_const 100000000000000000"
                      },
                      "value": "1e17"
                    },
                    "src": "2562:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1845,
                  "mutability": "constant",
                  "name": "LN_36_UPPER_BOUND",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2581:49:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1841,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2581:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 1844,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1842,
                      "name": "ONE_18",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1822,
                      "src": "2617:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "+",
                    "rightExpression": {
                      "hexValue": "31653137",
                      "id": 1843,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2626:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_100000000000000000_by_1",
                        "typeString": "int_const 100000000000000000"
                      },
                      "value": "1e17"
                    },
                    "src": "2617:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1855,
                  "mutability": "constant",
                  "name": "MILD_EXPONENT_BOUND",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2637:63:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1846,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2637:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1854,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_rational_28948022309329048855892746252171976963317496166410141009864396001978282409984_by_1",
                        "typeString": "int_const 2894...(69 digits omitted)...9984"
                      },
                      "id": 1849,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "32",
                        "id": 1847,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2676:1:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_2_by_1",
                          "typeString": "int_const 2"
                        },
                        "value": "2"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "hexValue": "323534",
                        "id": 1848,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2679:3:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_254_by_1",
                          "typeString": "int_const 254"
                        },
                        "value": "254"
                      },
                      "src": "2676:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_28948022309329048855892746252171976963317496166410141009864396001978282409984_by_1",
                        "typeString": "int_const 2894...(69 digits omitted)...9984"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "arguments": [
                        {
                          "id": 1852,
                          "name": "ONE_20",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1825,
                          "src": "2693:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "id": 1851,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "2685:7:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint256_$",
                          "typeString": "type(uint256)"
                        },
                        "typeName": {
                          "id": 1850,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2685:7:10",
                          "typeDescriptions": {}
                        }
                      },
                      "id": 1853,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2685:15:10",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2676:24:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1858,
                  "mutability": "constant",
                  "name": "x0",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2735:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1856,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2735:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "313238303030303030303030303030303030303030",
                    "id": 1857,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2756:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_128000000000000000000_by_1",
                      "typeString": "int_const 128000000000000000000"
                    },
                    "value": "128000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1861,
                  "mutability": "constant",
                  "name": "a0",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2791:77:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1859,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2791:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "3338383737303834303539393435393530393232323030303030303030303030303030303030303030303030303030303030303030303030",
                    "id": 1860,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2812:56:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_38877084059945950922200000000000000000000000000000000000_by_1",
                      "typeString": "int_const 3887...(48 digits omitted)...0000"
                    },
                    "value": "38877084059945950922200000000000000000000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1864,
                  "mutability": "constant",
                  "name": "x1",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2899:41:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1862,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2899:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "3634303030303030303030303030303030303030",
                    "id": 1863,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2920:20:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_64000000000000000000_by_1",
                      "typeString": "int_const 64000000000000000000"
                    },
                    "value": "64000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1867,
                  "mutability": "constant",
                  "name": "a1",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "2954:49:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1865,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2954:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "36323335313439303830383131363136383832393130303030303030",
                    "id": 1866,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2975:28:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_6235149080811616882910000000_by_1",
                      "typeString": "int_const 6235149080811616882910000000"
                    },
                    "value": "6235149080811616882910000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1870,
                  "mutability": "constant",
                  "name": "x2",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3063:43:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1868,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3063:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "33323030303030303030303030303030303030303030",
                    "id": 1869,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3084:22:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_3200000000000000000000_by_1",
                      "typeString": "int_const 3200000000000000000000"
                    },
                    "value": "3200000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1873,
                  "mutability": "constant",
                  "name": "a2",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3120:55:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1871,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3120:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "37383936323936303138323638303639353136313030303030303030303030303030",
                    "id": 1872,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3141:34:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_7896296018268069516100000000000000_by_1",
                      "typeString": "int_const 7896...(26 digits omitted)...0000"
                    },
                    "value": "7896296018268069516100000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1876,
                  "mutability": "constant",
                  "name": "x3",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3192:43:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1874,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3192:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "31363030303030303030303030303030303030303030",
                    "id": 1875,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3213:22:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1600000000000000000000_by_1",
                      "typeString": "int_const 1600000000000000000000"
                    },
                    "value": "1600000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1879,
                  "mutability": "constant",
                  "name": "a3",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3249:48:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1877,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3249:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "383838363131303532303530373837323633363736303030303030",
                    "id": 1878,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3270:27:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_888611052050787263676000000_by_1",
                      "typeString": "int_const 888611052050787263676000000"
                    },
                    "value": "888611052050787263676000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1882,
                  "mutability": "constant",
                  "name": "x4",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3314:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1880,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3314:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "383030303030303030303030303030303030303030",
                    "id": 1881,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3335:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_800000000000000000000_by_1",
                      "typeString": "int_const 800000000000000000000"
                    },
                    "value": "800000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1885,
                  "mutability": "constant",
                  "name": "a4",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3370:45:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1883,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3370:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "323938303935373938373034313732383237343734303030",
                    "id": 1884,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3391:24:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_298095798704172827474000_by_1",
                      "typeString": "int_const 298095798704172827474000"
                    },
                    "value": "298095798704172827474000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1888,
                  "mutability": "constant",
                  "name": "x5",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3432:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1886,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3432:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "343030303030303030303030303030303030303030",
                    "id": 1887,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3453:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_400000000000000000000_by_1",
                      "typeString": "int_const 400000000000000000000"
                    },
                    "value": "400000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1891,
                  "mutability": "constant",
                  "name": "a5",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3488:43:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1889,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3488:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "35343539383135303033333134343233393037383130",
                    "id": 1890,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3509:22:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_5459815003314423907810_by_1",
                      "typeString": "int_const 5459815003314423907810"
                    },
                    "value": "5459815003314423907810"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1894,
                  "mutability": "constant",
                  "name": "x6",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3548:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1892,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3548:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "323030303030303030303030303030303030303030",
                    "id": 1893,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3569:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_200000000000000000000_by_1",
                      "typeString": "int_const 200000000000000000000"
                    },
                    "value": "200000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1897,
                  "mutability": "constant",
                  "name": "a6",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3604:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1895,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3604:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "373338393035363039383933303635303232373233",
                    "id": 1896,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3625:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_738905609893065022723_by_1",
                      "typeString": "int_const 738905609893065022723"
                    },
                    "value": "738905609893065022723"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1900,
                  "mutability": "constant",
                  "name": "x7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3663:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1898,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3663:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "313030303030303030303030303030303030303030",
                    "id": 1899,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3684:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_100000000000000000000_by_1",
                      "typeString": "int_const 100000000000000000000"
                    },
                    "value": "100000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1903,
                  "mutability": "constant",
                  "name": "a7",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3719:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1901,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3719:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "323731383238313832383435393034353233353336",
                    "id": 1902,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3740:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_271828182845904523536_by_1",
                      "typeString": "int_const 271828182845904523536"
                    },
                    "value": "271828182845904523536"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1906,
                  "mutability": "constant",
                  "name": "x8",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3778:41:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1904,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3778:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "3530303030303030303030303030303030303030",
                    "id": 1905,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3799:20:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_50000000000000000000_by_1",
                      "typeString": "int_const 50000000000000000000"
                    },
                    "value": "50000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1909,
                  "mutability": "constant",
                  "name": "a8",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3834:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1907,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3834:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "313634383732313237303730303132383134363835",
                    "id": 1908,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3855:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_164872127070012814685_by_1",
                      "typeString": "int_const 164872127070012814685"
                    },
                    "value": "164872127070012814685"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1912,
                  "mutability": "constant",
                  "name": "x9",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3893:41:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1910,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3893:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "3235303030303030303030303030303030303030",
                    "id": 1911,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3914:20:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_25000000000000000000_by_1",
                      "typeString": "int_const 25000000000000000000"
                    },
                    "value": "25000000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1915,
                  "mutability": "constant",
                  "name": "a9",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "3949:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1913,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3949:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "313238343032353431363638373734313438343037",
                    "id": 1914,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3970:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_128402541668774148407_by_1",
                      "typeString": "int_const 128402541668774148407"
                    },
                    "value": "128402541668774148407"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1918,
                  "mutability": "constant",
                  "name": "x10",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "4008:42:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1916,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4008:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "3132353030303030303030303030303030303030",
                    "id": 1917,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4030:20:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_12500000000000000000_by_1",
                      "typeString": "int_const 12500000000000000000"
                    },
                    "value": "12500000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1921,
                  "mutability": "constant",
                  "name": "a10",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "4065:43:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1919,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4065:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "313133333134383435333036363832363331363833",
                    "id": 1920,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4087:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_113314845306682631683_by_1",
                      "typeString": "int_const 113314845306682631683"
                    },
                    "value": "113314845306682631683"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1924,
                  "mutability": "constant",
                  "name": "x11",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "4126:41:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1922,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4126:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "36323530303030303030303030303030303030",
                    "id": 1923,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4148:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_6250000000000000000_by_1",
                      "typeString": "int_const 6250000000000000000"
                    },
                    "value": "6250000000000000000"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 1927,
                  "mutability": "constant",
                  "name": "a11",
                  "nodeType": "VariableDeclaration",
                  "scope": 3084,
                  "src": "4182:43:10",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 1925,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4182:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": {
                    "hexValue": "313036343439343435383931373835393432393536",
                    "id": 1926,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "4204:21:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_106449445891785942956_by_1",
                      "typeString": "int_const 106449445891785942956"
                    },
                    "value": "106449445891785942956"
                  },
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 2056,
                    "nodeType": "Block",
                    "src": "4530:2123:10",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1939,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1937,
                            "name": "y",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1932,
                            "src": "4544:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 1938,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4549:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4544:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1946,
                        "nodeType": "IfStatement",
                        "src": "4540:131:10",
                        "trueBody": {
                          "id": 1945,
                          "nodeType": "Block",
                          "src": "4552:119:10",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 1942,
                                    "name": "ONE_18",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1822,
                                    "src": "4653:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  ],
                                  "id": 1941,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "4645:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": {
                                    "id": 1940,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4645:7:10",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 1943,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4645:15:10",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 1936,
                              "id": 1944,
                              "nodeType": "Return",
                              "src": "4638:22:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1949,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1947,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1930,
                            "src": "4685:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 1948,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4690:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4685:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1953,
                        "nodeType": "IfStatement",
                        "src": "4681:45:10",
                        "trueBody": {
                          "id": 1952,
                          "nodeType": "Block",
                          "src": "4693:33:10",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 1950,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4714:1:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 1936,
                              "id": 1951,
                              "nodeType": "Return",
                              "src": "4707:8:10"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1959,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1955,
                                "name": "x",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1930,
                                "src": "5105:1:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1",
                                  "typeString": "int_const 5789...(69 digits omitted)...9968"
                                },
                                "id": 1958,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "hexValue": "32",
                                  "id": 1956,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "5109:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_2_by_1",
                                    "typeString": "int_const 2"
                                  },
                                  "value": "2"
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "**",
                                "rightExpression": {
                                  "hexValue": "323535",
                                  "id": 1957,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "5112:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_255_by_1",
                                    "typeString": "int_const 255"
                                  },
                                  "value": "255"
                                },
                                "src": "5109:6:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1",
                                  "typeString": "int_const 5789...(69 digits omitted)...9968"
                                }
                              },
                              "src": "5105:10:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1960,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5117:6:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1961,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "X_OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 390,
                              "src": "5117:22:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1954,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5096:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1962,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5096:44:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1963,
                        "nodeType": "ExpressionStatement",
                        "src": "5096:44:10"
                      },
                      {
                        "assignments": [
                          1965
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1965,
                            "mutability": "mutable",
                            "name": "x_int256",
                            "nodeType": "VariableDeclaration",
                            "scope": 2056,
                            "src": "5150:15:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 1964,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5150:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1970,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 1968,
                              "name": "x",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1930,
                              "src": "5175:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1967,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "5168:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": {
                              "id": 1966,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5168:6:10",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 1969,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5168:9:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5150:27:10"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1974,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1972,
                                "name": "y",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1932,
                                "src": "5540:1:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "id": 1973,
                                "name": "MILD_EXPONENT_BOUND",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1855,
                                "src": "5544:19:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5540:23:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 1975,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5565:6:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 1976,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "Y_OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 393,
                              "src": "5565:22:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1971,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5531:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 1977,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5531:57:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1978,
                        "nodeType": "ExpressionStatement",
                        "src": "5531:57:10"
                      },
                      {
                        "assignments": [
                          1980
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1980,
                            "mutability": "mutable",
                            "name": "y_int256",
                            "nodeType": "VariableDeclaration",
                            "scope": 2056,
                            "src": "5598:15:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 1979,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5598:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1985,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 1983,
                              "name": "y",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1932,
                              "src": "5623:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1982,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "5616:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": {
                              "id": 1981,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5616:6:10",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 1984,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5616:9:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5598:27:10"
                      },
                      {
                        "assignments": [
                          1987
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1987,
                            "mutability": "mutable",
                            "name": "logx_times_y",
                            "nodeType": "VariableDeclaration",
                            "scope": 2056,
                            "src": "5636:19:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 1986,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5636:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1988,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5636:19:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 1995,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 1991,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 1989,
                              "name": "LN_36_LOWER_BOUND",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1840,
                              "src": "5669:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 1990,
                              "name": "x_int256",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1965,
                              "src": "5689:8:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "5669:28:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 1994,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 1992,
                              "name": "x_int256",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1965,
                              "src": "5701:8:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 1993,
                              "name": "LN_36_UPPER_BOUND",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1845,
                              "src": "5712:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "5701:28:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "5669:60:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 2031,
                          "nodeType": "Block",
                          "src": "6284:63:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2029,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2023,
                                  "name": "logx_times_y",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1987,
                                  "src": "6298:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2028,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "arguments": [
                                      {
                                        "id": 2025,
                                        "name": "x_int256",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1965,
                                        "src": "6316:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      ],
                                      "id": 2024,
                                      "name": "ln",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2857,
                                      "src": "6313:2:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                        "typeString": "function (int256) pure returns (int256)"
                                      }
                                    },
                                    "id": 2026,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "6313:12:10",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2027,
                                    "name": "y_int256",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1980,
                                    "src": "6328:8:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "6313:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "6298:38:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2030,
                              "nodeType": "ExpressionStatement",
                              "src": "6298:38:10"
                            }
                          ]
                        },
                        "id": 2032,
                        "nodeType": "IfStatement",
                        "src": "5665:682:10",
                        "trueBody": {
                          "id": 2022,
                          "nodeType": "Block",
                          "src": "5731:547:10",
                          "statements": [
                            {
                              "assignments": [
                                1997
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 1997,
                                  "mutability": "mutable",
                                  "name": "ln_36_x",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 2022,
                                  "src": "5745:14:10",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "typeName": {
                                    "id": 1996,
                                    "name": "int256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5745:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 2001,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 1999,
                                    "name": "x_int256",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1965,
                                    "src": "5768:8:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  ],
                                  "id": 1998,
                                  "name": "ln_36",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3083,
                                  "src": "5762:5:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                    "typeString": "function (int256) pure returns (int256)"
                                  }
                                },
                                "id": 2000,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5762:15:10",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "5745:32:10"
                            },
                            {
                              "expression": {
                                "id": 2020,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2002,
                                  "name": "logx_times_y",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1987,
                                  "src": "6178:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 2018,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2008,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "components": [
                                            {
                                              "commonType": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              },
                                              "id": 2005,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "leftExpression": {
                                                "id": 2003,
                                                "name": "ln_36_x",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 1997,
                                                "src": "6195:7:10",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_int256",
                                                  "typeString": "int256"
                                                }
                                              },
                                              "nodeType": "BinaryOperation",
                                              "operator": "/",
                                              "rightExpression": {
                                                "id": 2004,
                                                "name": "ONE_18",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 1822,
                                                "src": "6205:6:10",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_int256",
                                                  "typeString": "int256"
                                                }
                                              },
                                              "src": "6195:16:10",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              }
                                            }
                                          ],
                                          "id": 2006,
                                          "isConstant": false,
                                          "isInlineArray": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "TupleExpression",
                                          "src": "6194:18:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2007,
                                          "name": "y_int256",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1980,
                                          "src": "6215:8:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "6194:29:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "+",
                                      "rightExpression": {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2017,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "components": [
                                            {
                                              "commonType": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              },
                                              "id": 2014,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "leftExpression": {
                                                "components": [
                                                  {
                                                    "commonType": {
                                                      "typeIdentifier": "t_int256",
                                                      "typeString": "int256"
                                                    },
                                                    "id": 2011,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "leftExpression": {
                                                      "id": 2009,
                                                      "name": "ln_36_x",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 1997,
                                                      "src": "6228:7:10",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_int256",
                                                        "typeString": "int256"
                                                      }
                                                    },
                                                    "nodeType": "BinaryOperation",
                                                    "operator": "%",
                                                    "rightExpression": {
                                                      "id": 2010,
                                                      "name": "ONE_18",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 1822,
                                                      "src": "6238:6:10",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_int256",
                                                        "typeString": "int256"
                                                      }
                                                    },
                                                    "src": "6228:16:10",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_int256",
                                                      "typeString": "int256"
                                                    }
                                                  }
                                                ],
                                                "id": 2012,
                                                "isConstant": false,
                                                "isInlineArray": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "nodeType": "TupleExpression",
                                                "src": "6227:18:10",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_int256",
                                                  "typeString": "int256"
                                                }
                                              },
                                              "nodeType": "BinaryOperation",
                                              "operator": "*",
                                              "rightExpression": {
                                                "id": 2013,
                                                "name": "y_int256",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 1980,
                                                "src": "6248:8:10",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_int256",
                                                  "typeString": "int256"
                                                }
                                              },
                                              "src": "6227:29:10",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              }
                                            }
                                          ],
                                          "id": 2015,
                                          "isConstant": false,
                                          "isInlineArray": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "TupleExpression",
                                          "src": "6226:31:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "/",
                                        "rightExpression": {
                                          "id": 2016,
                                          "name": "ONE_18",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1822,
                                          "src": "6260:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "6226:40:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "src": "6194:72:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "id": 2019,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "6193:74:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "6178:89:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2021,
                              "nodeType": "ExpressionStatement",
                              "src": "6178:89:10"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 2035,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2033,
                            "name": "logx_times_y",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1987,
                            "src": "6356:12:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "/=",
                          "rightHandSide": {
                            "id": 2034,
                            "name": "ONE_18",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1822,
                            "src": "6372:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "6356:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2036,
                        "nodeType": "ExpressionStatement",
                        "src": "6356:22:10"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 2044,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2040,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2038,
                                  "name": "MIN_NATURAL_EXPONENT",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1835,
                                  "src": "6474:20:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<=",
                                "rightExpression": {
                                  "id": 2039,
                                  "name": "logx_times_y",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1987,
                                  "src": "6498:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "6474:36:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2043,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2041,
                                  "name": "logx_times_y",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1987,
                                  "src": "6514:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<=",
                                "rightExpression": {
                                  "id": 2042,
                                  "name": "MAX_NATURAL_EXPONENT",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1831,
                                  "src": "6530:20:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "6514:36:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "6474:76:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 2045,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6564:6:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 2046,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "PRODUCT_OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 396,
                              "src": "6564:28:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2037,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6452:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 2047,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6452:150:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2048,
                        "nodeType": "ExpressionStatement",
                        "src": "6452:150:10"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 2052,
                                  "name": "logx_times_y",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1987,
                                  "src": "6632:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                ],
                                "id": 2051,
                                "name": "exp",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2484,
                                "src": "6628:3:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                  "typeString": "function (int256) pure returns (int256)"
                                }
                              },
                              "id": 2053,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6628:17:10",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            ],
                            "id": 2050,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "6620:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            },
                            "typeName": {
                              "id": 2049,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "6620:7:10",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 2054,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6620:26:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1936,
                        "id": 2055,
                        "nodeType": "Return",
                        "src": "6613:33:10"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 1928,
                    "nodeType": "StructuredDocumentation",
                    "src": "4244:214:10",
                    "text": " @dev Exponentiation (x^y) with unsigned 18 decimal fixed point base and exponent.\n Reverts if ln(x) * y is smaller than `MIN_NATURAL_EXPONENT`, or larger than `MAX_NATURAL_EXPONENT`."
                  },
                  "id": 2057,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "pow",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 1933,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1930,
                        "mutability": "mutable",
                        "name": "x",
                        "nodeType": "VariableDeclaration",
                        "scope": 2057,
                        "src": "4476:9:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1929,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4476:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 1932,
                        "mutability": "mutable",
                        "name": "y",
                        "nodeType": "VariableDeclaration",
                        "scope": 2057,
                        "src": "4487:9:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1931,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4487:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4475:22:10"
                  },
                  "returnParameters": {
                    "id": 1936,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 1935,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 2057,
                        "src": "4521:7:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1934,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4521:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4520:9:10"
                  },
                  "scope": 3084,
                  "src": "4463:2190:10",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 2483,
                    "nodeType": "Block",
                    "src": "6920:5321:10",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 2072,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2068,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2066,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "6939:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">=",
                                "rightExpression": {
                                  "id": 2067,
                                  "name": "MIN_NATURAL_EXPONENT",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1835,
                                  "src": "6944:20:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "6939:25:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2071,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2069,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "6968:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<=",
                                "rightExpression": {
                                  "id": 2070,
                                  "name": "MAX_NATURAL_EXPONENT",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1831,
                                  "src": "6973:20:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "6968:25:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "6939:54:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 2073,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6995:6:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 2074,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INVALID_EXPONENT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 399,
                              "src": "6995:23:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2065,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6930:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 2075,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6930:89:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2076,
                        "nodeType": "ExpressionStatement",
                        "src": "6930:89:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2079,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2077,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "7034:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 2078,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "7038:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "7034:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2092,
                        "nodeType": "IfStatement",
                        "src": "7030:353:10",
                        "trueBody": {
                          "id": 2091,
                          "nodeType": "Block",
                          "src": "7041:342:10",
                          "statements": [
                            {
                              "expression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    },
                                    "id": 2088,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "components": [
                                        {
                                          "commonType": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          },
                                          "id": 2082,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "leftExpression": {
                                            "id": 2080,
                                            "name": "ONE_18",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 1822,
                                            "src": "7345:6:10",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          },
                                          "nodeType": "BinaryOperation",
                                          "operator": "*",
                                          "rightExpression": {
                                            "id": 2081,
                                            "name": "ONE_18",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 1822,
                                            "src": "7354:6:10",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          },
                                          "src": "7345:15:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        }
                                      ],
                                      "id": 2083,
                                      "isConstant": false,
                                      "isInlineArray": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "TupleExpression",
                                      "src": "7344:17:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "/",
                                    "rightExpression": {
                                      "arguments": [
                                        {
                                          "id": 2086,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "UnaryOperation",
                                          "operator": "-",
                                          "prefix": true,
                                          "src": "7368:2:10",
                                          "subExpression": {
                                            "id": 2085,
                                            "name": "x",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 2060,
                                            "src": "7369:1:10",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          },
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        ],
                                        "id": 2084,
                                        "name": "exp",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2484,
                                        "src": "7364:3:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                          "typeString": "function (int256) pure returns (int256)"
                                        }
                                      },
                                      "id": 2087,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "7364:7:10",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "src": "7344:27:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  }
                                ],
                                "id": 2089,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7343:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "functionReturnParameters": 2064,
                              "id": 2090,
                              "nodeType": "Return",
                              "src": "7336:36:10"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          2094
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2094,
                            "mutability": "mutable",
                            "name": "firstAN",
                            "nodeType": "VariableDeclaration",
                            "scope": 2483,
                            "src": "8684:14:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2093,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8684:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2095,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8684:14:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2098,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2096,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "8712:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2097,
                            "name": "x0",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1858,
                            "src": "8717:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "8712:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2110,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2108,
                              "name": "x",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2060,
                              "src": "8789:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": ">=",
                            "rightExpression": {
                              "id": 2109,
                              "name": "x1",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1864,
                              "src": "8794:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "8789:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 2124,
                            "nodeType": "Block",
                            "src": "8862:66:10",
                            "statements": [
                              {
                                "expression": {
                                  "id": 2122,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 2120,
                                    "name": "firstAN",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2094,
                                    "src": "8876:7:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "hexValue": "31",
                                    "id": 2121,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "8886:1:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "8876:11:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "id": 2123,
                                "nodeType": "ExpressionStatement",
                                "src": "8876:11:10"
                              }
                            ]
                          },
                          "id": 2125,
                          "nodeType": "IfStatement",
                          "src": "8785:143:10",
                          "trueBody": {
                            "id": 2119,
                            "nodeType": "Block",
                            "src": "8798:58:10",
                            "statements": [
                              {
                                "expression": {
                                  "id": 2113,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 2111,
                                    "name": "x",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2060,
                                    "src": "8812:1:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "-=",
                                  "rightHandSide": {
                                    "id": 2112,
                                    "name": "x1",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1864,
                                    "src": "8817:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "8812:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "id": 2114,
                                "nodeType": "ExpressionStatement",
                                "src": "8812:7:10"
                              },
                              {
                                "expression": {
                                  "id": 2117,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 2115,
                                    "name": "firstAN",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2094,
                                    "src": "8833:7:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "id": 2116,
                                    "name": "a1",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1867,
                                    "src": "8843:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "8833:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "id": 2118,
                                "nodeType": "ExpressionStatement",
                                "src": "8833:12:10"
                              }
                            ]
                          }
                        },
                        "id": 2126,
                        "nodeType": "IfStatement",
                        "src": "8708:220:10",
                        "trueBody": {
                          "id": 2107,
                          "nodeType": "Block",
                          "src": "8721:58:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2101,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2099,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "8735:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2100,
                                  "name": "x0",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1858,
                                  "src": "8740:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "8735:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2102,
                              "nodeType": "ExpressionStatement",
                              "src": "8735:7:10"
                            },
                            {
                              "expression": {
                                "id": 2105,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2103,
                                  "name": "firstAN",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2094,
                                  "src": "8756:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 2104,
                                  "name": "a0",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1861,
                                  "src": "8766:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "8756:12:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2106,
                              "nodeType": "ExpressionStatement",
                              "src": "8756:12:10"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 2129,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2127,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "9078:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "*=",
                          "rightHandSide": {
                            "hexValue": "313030",
                            "id": 2128,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "9083:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_100_by_1",
                              "typeString": "int_const 100"
                            },
                            "value": "100"
                          },
                          "src": "9078:8:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2130,
                        "nodeType": "ExpressionStatement",
                        "src": "9078:8:10"
                      },
                      {
                        "assignments": [
                          2132
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2132,
                            "mutability": "mutable",
                            "name": "product",
                            "nodeType": "VariableDeclaration",
                            "scope": 2483,
                            "src": "9298:14:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2131,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9298:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2134,
                        "initialValue": {
                          "id": 2133,
                          "name": "ONE_20",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1825,
                          "src": "9315:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9298:23:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2137,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2135,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "9336:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2136,
                            "name": "x2",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1870,
                            "src": "9341:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "9336:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2152,
                        "nodeType": "IfStatement",
                        "src": "9332:92:10",
                        "trueBody": {
                          "id": 2151,
                          "nodeType": "Block",
                          "src": "9345:79:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2140,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2138,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "9359:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2139,
                                  "name": "x2",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1870,
                                  "src": "9364:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9359:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2141,
                              "nodeType": "ExpressionStatement",
                              "src": "9359:7:10"
                            },
                            {
                              "expression": {
                                "id": 2149,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2142,
                                  "name": "product",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2132,
                                  "src": "9380:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2148,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2145,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2143,
                                          "name": "product",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2132,
                                          "src": "9391:7:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2144,
                                          "name": "a2",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1873,
                                          "src": "9401:2:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "9391:12:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2146,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "9390:14:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2147,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "9407:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "9390:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9380:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2150,
                              "nodeType": "ExpressionStatement",
                              "src": "9380:33:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2155,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2153,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "9437:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2154,
                            "name": "x3",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1876,
                            "src": "9442:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "9437:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2170,
                        "nodeType": "IfStatement",
                        "src": "9433:92:10",
                        "trueBody": {
                          "id": 2169,
                          "nodeType": "Block",
                          "src": "9446:79:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2158,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2156,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "9460:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2157,
                                  "name": "x3",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1876,
                                  "src": "9465:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9460:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2159,
                              "nodeType": "ExpressionStatement",
                              "src": "9460:7:10"
                            },
                            {
                              "expression": {
                                "id": 2167,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2160,
                                  "name": "product",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2132,
                                  "src": "9481:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2166,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2163,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2161,
                                          "name": "product",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2132,
                                          "src": "9492:7:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2162,
                                          "name": "a3",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1879,
                                          "src": "9502:2:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "9492:12:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2164,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "9491:14:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2165,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "9508:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "9491:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9481:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2168,
                              "nodeType": "ExpressionStatement",
                              "src": "9481:33:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2173,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2171,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "9538:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2172,
                            "name": "x4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1882,
                            "src": "9543:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "9538:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2188,
                        "nodeType": "IfStatement",
                        "src": "9534:92:10",
                        "trueBody": {
                          "id": 2187,
                          "nodeType": "Block",
                          "src": "9547:79:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2176,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2174,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "9561:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2175,
                                  "name": "x4",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1882,
                                  "src": "9566:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9561:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2177,
                              "nodeType": "ExpressionStatement",
                              "src": "9561:7:10"
                            },
                            {
                              "expression": {
                                "id": 2185,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2178,
                                  "name": "product",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2132,
                                  "src": "9582:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2184,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2181,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2179,
                                          "name": "product",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2132,
                                          "src": "9593:7:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2180,
                                          "name": "a4",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1885,
                                          "src": "9603:2:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "9593:12:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2182,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "9592:14:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2183,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "9609:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "9592:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9582:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2186,
                              "nodeType": "ExpressionStatement",
                              "src": "9582:33:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2191,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2189,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "9639:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2190,
                            "name": "x5",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1888,
                            "src": "9644:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "9639:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2206,
                        "nodeType": "IfStatement",
                        "src": "9635:92:10",
                        "trueBody": {
                          "id": 2205,
                          "nodeType": "Block",
                          "src": "9648:79:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2194,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2192,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "9662:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2193,
                                  "name": "x5",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1888,
                                  "src": "9667:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9662:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2195,
                              "nodeType": "ExpressionStatement",
                              "src": "9662:7:10"
                            },
                            {
                              "expression": {
                                "id": 2203,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2196,
                                  "name": "product",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2132,
                                  "src": "9683:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2202,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2199,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2197,
                                          "name": "product",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2132,
                                          "src": "9694:7:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2198,
                                          "name": "a5",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1891,
                                          "src": "9704:2:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "9694:12:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2200,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "9693:14:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2201,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "9710:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "9693:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9683:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2204,
                              "nodeType": "ExpressionStatement",
                              "src": "9683:33:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2209,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2207,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "9740:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2208,
                            "name": "x6",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1894,
                            "src": "9745:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "9740:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2224,
                        "nodeType": "IfStatement",
                        "src": "9736:92:10",
                        "trueBody": {
                          "id": 2223,
                          "nodeType": "Block",
                          "src": "9749:79:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2212,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2210,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "9763:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2211,
                                  "name": "x6",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1894,
                                  "src": "9768:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9763:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2213,
                              "nodeType": "ExpressionStatement",
                              "src": "9763:7:10"
                            },
                            {
                              "expression": {
                                "id": 2221,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2214,
                                  "name": "product",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2132,
                                  "src": "9784:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2220,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2217,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2215,
                                          "name": "product",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2132,
                                          "src": "9795:7:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2216,
                                          "name": "a6",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1897,
                                          "src": "9805:2:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "9795:12:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2218,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "9794:14:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2219,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "9811:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "9794:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9784:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2222,
                              "nodeType": "ExpressionStatement",
                              "src": "9784:33:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2227,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2225,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "9841:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2226,
                            "name": "x7",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1900,
                            "src": "9846:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "9841:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2242,
                        "nodeType": "IfStatement",
                        "src": "9837:92:10",
                        "trueBody": {
                          "id": 2241,
                          "nodeType": "Block",
                          "src": "9850:79:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2230,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2228,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "9864:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2229,
                                  "name": "x7",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1900,
                                  "src": "9869:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9864:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2231,
                              "nodeType": "ExpressionStatement",
                              "src": "9864:7:10"
                            },
                            {
                              "expression": {
                                "id": 2239,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2232,
                                  "name": "product",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2132,
                                  "src": "9885:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2238,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2235,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2233,
                                          "name": "product",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2132,
                                          "src": "9896:7:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2234,
                                          "name": "a7",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1903,
                                          "src": "9906:2:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "9896:12:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2236,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "9895:14:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2237,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "9912:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "9895:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9885:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2240,
                              "nodeType": "ExpressionStatement",
                              "src": "9885:33:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2245,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2243,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "9942:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2244,
                            "name": "x8",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1906,
                            "src": "9947:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "9942:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2260,
                        "nodeType": "IfStatement",
                        "src": "9938:92:10",
                        "trueBody": {
                          "id": 2259,
                          "nodeType": "Block",
                          "src": "9951:79:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2248,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2246,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "9965:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2247,
                                  "name": "x8",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1906,
                                  "src": "9970:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9965:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2249,
                              "nodeType": "ExpressionStatement",
                              "src": "9965:7:10"
                            },
                            {
                              "expression": {
                                "id": 2257,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2250,
                                  "name": "product",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2132,
                                  "src": "9986:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2256,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2253,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2251,
                                          "name": "product",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2132,
                                          "src": "9997:7:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2252,
                                          "name": "a8",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1909,
                                          "src": "10007:2:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "9997:12:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2254,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "9996:14:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2255,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "10013:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "9996:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9986:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2258,
                              "nodeType": "ExpressionStatement",
                              "src": "9986:33:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2263,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2261,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "10043:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2262,
                            "name": "x9",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1912,
                            "src": "10048:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "10043:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2278,
                        "nodeType": "IfStatement",
                        "src": "10039:92:10",
                        "trueBody": {
                          "id": 2277,
                          "nodeType": "Block",
                          "src": "10052:79:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2266,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2264,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2060,
                                  "src": "10066:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 2265,
                                  "name": "x9",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1912,
                                  "src": "10071:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "10066:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2267,
                              "nodeType": "ExpressionStatement",
                              "src": "10066:7:10"
                            },
                            {
                              "expression": {
                                "id": 2275,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2268,
                                  "name": "product",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2132,
                                  "src": "10087:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2274,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2271,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2269,
                                          "name": "product",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2132,
                                          "src": "10098:7:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2270,
                                          "name": "a9",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1915,
                                          "src": "10108:2:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "10098:12:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2272,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "10097:14:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2273,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "10114:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "10097:23:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "10087:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2276,
                              "nodeType": "ExpressionStatement",
                              "src": "10087:33:10"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          2280
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2280,
                            "mutability": "mutable",
                            "name": "seriesSum",
                            "nodeType": "VariableDeclaration",
                            "scope": 2483,
                            "src": "10435:16:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2279,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10435:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2282,
                        "initialValue": {
                          "id": 2281,
                          "name": "ONE_20",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1825,
                          "src": "10454:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10435:25:10"
                      },
                      {
                        "assignments": [
                          2284
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2284,
                            "mutability": "mutable",
                            "name": "term",
                            "nodeType": "VariableDeclaration",
                            "scope": 2483,
                            "src": "10525:11:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2283,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10525:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2285,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10525:11:10"
                      },
                      {
                        "expression": {
                          "id": 2288,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2286,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "10645:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 2287,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2060,
                            "src": "10652:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "10645:8:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2289,
                        "nodeType": "ExpressionStatement",
                        "src": "10645:8:10"
                      },
                      {
                        "expression": {
                          "id": 2292,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2290,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "10663:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2291,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "10676:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "10663:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2293,
                        "nodeType": "ExpressionStatement",
                        "src": "10663:17:10"
                      },
                      {
                        "expression": {
                          "id": 2304,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2294,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "10917:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2303,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2300,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2297,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2295,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "10926:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2296,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "10933:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "10926:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2298,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "10925:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2299,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "10938:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "10925:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2301,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "10924:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "32",
                              "id": 2302,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "10948:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            },
                            "src": "10924:25:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "10917:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2305,
                        "nodeType": "ExpressionStatement",
                        "src": "10917:32:10"
                      },
                      {
                        "expression": {
                          "id": 2308,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2306,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "10959:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2307,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "10972:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "10959:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2309,
                        "nodeType": "ExpressionStatement",
                        "src": "10959:17:10"
                      },
                      {
                        "expression": {
                          "id": 2320,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2310,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "10987:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2319,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2316,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2313,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2311,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "10996:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2312,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11003:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "10996:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2314,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "10995:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2315,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11008:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "10995:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2317,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "10994:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "33",
                              "id": 2318,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11018:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_3_by_1",
                                "typeString": "int_const 3"
                              },
                              "value": "3"
                            },
                            "src": "10994:25:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "10987:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2321,
                        "nodeType": "ExpressionStatement",
                        "src": "10987:32:10"
                      },
                      {
                        "expression": {
                          "id": 2324,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2322,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11029:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2323,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11042:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11029:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2325,
                        "nodeType": "ExpressionStatement",
                        "src": "11029:17:10"
                      },
                      {
                        "expression": {
                          "id": 2336,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2326,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11057:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2335,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2332,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2329,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2327,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11066:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2328,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11073:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11066:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2330,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11065:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2331,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11078:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11065:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2333,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11064:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "34",
                              "id": 2334,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11088:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_4_by_1",
                                "typeString": "int_const 4"
                              },
                              "value": "4"
                            },
                            "src": "11064:25:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11057:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2337,
                        "nodeType": "ExpressionStatement",
                        "src": "11057:32:10"
                      },
                      {
                        "expression": {
                          "id": 2340,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2338,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11099:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2339,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11112:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11099:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2341,
                        "nodeType": "ExpressionStatement",
                        "src": "11099:17:10"
                      },
                      {
                        "expression": {
                          "id": 2352,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2342,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11127:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2351,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2348,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2345,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2343,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11136:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2344,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11143:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11136:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2346,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11135:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2347,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11148:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11135:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2349,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11134:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "35",
                              "id": 2350,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11158:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_5_by_1",
                                "typeString": "int_const 5"
                              },
                              "value": "5"
                            },
                            "src": "11134:25:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11127:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2353,
                        "nodeType": "ExpressionStatement",
                        "src": "11127:32:10"
                      },
                      {
                        "expression": {
                          "id": 2356,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2354,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11169:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2355,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11182:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11169:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2357,
                        "nodeType": "ExpressionStatement",
                        "src": "11169:17:10"
                      },
                      {
                        "expression": {
                          "id": 2368,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2358,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11197:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2367,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2364,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2361,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2359,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11206:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2360,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11213:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11206:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2362,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11205:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2363,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11218:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11205:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2365,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11204:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "36",
                              "id": 2366,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11228:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_6_by_1",
                                "typeString": "int_const 6"
                              },
                              "value": "6"
                            },
                            "src": "11204:25:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11197:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2369,
                        "nodeType": "ExpressionStatement",
                        "src": "11197:32:10"
                      },
                      {
                        "expression": {
                          "id": 2372,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2370,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11239:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2371,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11252:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11239:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2373,
                        "nodeType": "ExpressionStatement",
                        "src": "11239:17:10"
                      },
                      {
                        "expression": {
                          "id": 2384,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2374,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11267:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2383,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2380,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2377,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2375,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11276:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2376,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11283:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11276:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2378,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11275:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2379,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11288:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11275:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2381,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11274:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "37",
                              "id": 2382,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11298:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_7_by_1",
                                "typeString": "int_const 7"
                              },
                              "value": "7"
                            },
                            "src": "11274:25:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11267:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2385,
                        "nodeType": "ExpressionStatement",
                        "src": "11267:32:10"
                      },
                      {
                        "expression": {
                          "id": 2388,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2386,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11309:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2387,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11322:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11309:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2389,
                        "nodeType": "ExpressionStatement",
                        "src": "11309:17:10"
                      },
                      {
                        "expression": {
                          "id": 2400,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2390,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11337:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2399,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2396,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2393,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2391,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11346:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2392,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11353:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11346:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2394,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11345:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2395,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11358:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11345:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2397,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11344:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "38",
                              "id": 2398,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11368:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            "src": "11344:25:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11337:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2401,
                        "nodeType": "ExpressionStatement",
                        "src": "11337:32:10"
                      },
                      {
                        "expression": {
                          "id": 2404,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2402,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11379:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2403,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11392:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11379:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2405,
                        "nodeType": "ExpressionStatement",
                        "src": "11379:17:10"
                      },
                      {
                        "expression": {
                          "id": 2416,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2406,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11407:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2415,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2412,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2409,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2407,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11416:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2408,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11423:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11416:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2410,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11415:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2411,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11428:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11415:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2413,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11414:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "39",
                              "id": 2414,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11438:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_9_by_1",
                                "typeString": "int_const 9"
                              },
                              "value": "9"
                            },
                            "src": "11414:25:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11407:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2417,
                        "nodeType": "ExpressionStatement",
                        "src": "11407:32:10"
                      },
                      {
                        "expression": {
                          "id": 2420,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2418,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11449:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2419,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11462:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11449:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2421,
                        "nodeType": "ExpressionStatement",
                        "src": "11449:17:10"
                      },
                      {
                        "expression": {
                          "id": 2432,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2422,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11477:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2431,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2428,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2425,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2423,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11486:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2424,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11493:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11486:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2426,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11485:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2427,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11498:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11485:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2429,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11484:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "3130",
                              "id": 2430,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11508:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_10_by_1",
                                "typeString": "int_const 10"
                              },
                              "value": "10"
                            },
                            "src": "11484:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11477:33:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2433,
                        "nodeType": "ExpressionStatement",
                        "src": "11477:33:10"
                      },
                      {
                        "expression": {
                          "id": 2436,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2434,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11520:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2435,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11533:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11520:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2437,
                        "nodeType": "ExpressionStatement",
                        "src": "11520:17:10"
                      },
                      {
                        "expression": {
                          "id": 2448,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2438,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11548:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2447,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2444,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2441,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2439,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11557:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2440,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11564:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11557:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2442,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11556:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2443,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11569:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11556:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2445,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11555:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "3131",
                              "id": 2446,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11579:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_11_by_1",
                                "typeString": "int_const 11"
                              },
                              "value": "11"
                            },
                            "src": "11555:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11548:33:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2449,
                        "nodeType": "ExpressionStatement",
                        "src": "11548:33:10"
                      },
                      {
                        "expression": {
                          "id": 2452,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2450,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11591:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2451,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11604:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11591:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2453,
                        "nodeType": "ExpressionStatement",
                        "src": "11591:17:10"
                      },
                      {
                        "expression": {
                          "id": 2464,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2454,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11619:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2463,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2460,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2457,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2455,
                                          "name": "term",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2284,
                                          "src": "11628:4:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2456,
                                          "name": "x",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2060,
                                          "src": "11635:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "11628:8:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2458,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "11627:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2459,
                                    "name": "ONE_20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1825,
                                    "src": "11640:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "11627:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2461,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11626:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "3132",
                              "id": 2462,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11650:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_12_by_1",
                                "typeString": "int_const 12"
                              },
                              "value": "12"
                            },
                            "src": "11626:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11619:33:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2465,
                        "nodeType": "ExpressionStatement",
                        "src": "11619:33:10"
                      },
                      {
                        "expression": {
                          "id": 2468,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2466,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2280,
                            "src": "11662:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "id": 2467,
                            "name": "term",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2284,
                            "src": "11675:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "11662:17:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2469,
                        "nodeType": "ExpressionStatement",
                        "src": "11662:17:10"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2481,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2478,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 2475,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "components": [
                                          {
                                            "commonType": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            },
                                            "id": 2472,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftExpression": {
                                              "id": 2470,
                                              "name": "product",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 2132,
                                              "src": "12187:7:10",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              }
                                            },
                                            "nodeType": "BinaryOperation",
                                            "operator": "*",
                                            "rightExpression": {
                                              "id": 2471,
                                              "name": "seriesSum",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 2280,
                                              "src": "12197:9:10",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              }
                                            },
                                            "src": "12187:19:10",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          }
                                        ],
                                        "id": 2473,
                                        "isConstant": false,
                                        "isInlineArray": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "TupleExpression",
                                        "src": "12186:21:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "/",
                                      "rightExpression": {
                                        "id": 2474,
                                        "name": "ONE_20",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1825,
                                        "src": "12210:6:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "src": "12186:30:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "id": 2476,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "12185:32:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "id": 2477,
                                  "name": "firstAN",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2094,
                                  "src": "12220:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "12185:42:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2479,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "12184:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "hexValue": "313030",
                            "id": 2480,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "12231:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_100_by_1",
                              "typeString": "int_const 100"
                            },
                            "value": "100"
                          },
                          "src": "12184:50:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 2064,
                        "id": 2482,
                        "nodeType": "Return",
                        "src": "12177:57:10"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 2058,
                    "nodeType": "StructuredDocumentation",
                    "src": "6659:202:10",
                    "text": " @dev Natural exponentiaton (e^x) with signed 18 decimal fixed point exponent.\n Reverts if `x` is smaller than MIN_NATURAL_EXPONENT, or larger than `MAX_NATURAL_EXPONENT`."
                  },
                  "id": 2484,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exp",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 2061,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 2060,
                        "mutability": "mutable",
                        "name": "x",
                        "nodeType": "VariableDeclaration",
                        "scope": 2484,
                        "src": "6879:8:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2059,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6879:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6878:10:10"
                  },
                  "returnParameters": {
                    "id": 2064,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 2063,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 2484,
                        "src": "6912:6:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2062,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6912:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6911:8:10"
                  },
                  "scope": 3084,
                  "src": "6866:5375:10",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 2856,
                    "nodeType": "Block",
                    "src": "12399:5036:10",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              },
                              "id": 2495,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 2493,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2487,
                                "src": "12501:1:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 2494,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "12505:1:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "12501:5:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 2496,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "12508:6:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 2497,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 402,
                              "src": "12508:20:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2492,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "12492:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 2498,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12492:37:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2499,
                        "nodeType": "ExpressionStatement",
                        "src": "12492:37:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2502,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2500,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "12544:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "id": 2501,
                            "name": "ONE_18",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1822,
                            "src": "12548:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "12544:10:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2515,
                        "nodeType": "IfStatement",
                        "src": "12540:381:10",
                        "trueBody": {
                          "id": 2514,
                          "nodeType": "Block",
                          "src": "12556:365:10",
                          "statements": [
                            {
                              "expression": {
                                "components": [
                                  {
                                    "id": 2511,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "UnaryOperation",
                                    "operator": "-",
                                    "prefix": true,
                                    "src": "12883:26:10",
                                    "subExpression": {
                                      "arguments": [
                                        {
                                          "commonType": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          },
                                          "id": 2509,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "leftExpression": {
                                            "components": [
                                              {
                                                "commonType": {
                                                  "typeIdentifier": "t_int256",
                                                  "typeString": "int256"
                                                },
                                                "id": 2506,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "leftExpression": {
                                                  "id": 2504,
                                                  "name": "ONE_18",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 1822,
                                                  "src": "12888:6:10",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                },
                                                "nodeType": "BinaryOperation",
                                                "operator": "*",
                                                "rightExpression": {
                                                  "id": 2505,
                                                  "name": "ONE_18",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 1822,
                                                  "src": "12897:6:10",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                },
                                                "src": "12888:15:10",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_int256",
                                                  "typeString": "int256"
                                                }
                                              }
                                            ],
                                            "id": 2507,
                                            "isConstant": false,
                                            "isInlineArray": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "lValueRequested": false,
                                            "nodeType": "TupleExpression",
                                            "src": "12887:17:10",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          },
                                          "nodeType": "BinaryOperation",
                                          "operator": "/",
                                          "rightExpression": {
                                            "id": 2508,
                                            "name": "a",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 2487,
                                            "src": "12907:1:10",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          },
                                          "src": "12887:21:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        ],
                                        "id": 2503,
                                        "name": "ln",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2857,
                                        "src": "12884:2:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                          "typeString": "function (int256) pure returns (int256)"
                                        }
                                      },
                                      "id": 2510,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "12884:25:10",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  }
                                ],
                                "id": 2512,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "12882:28:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "functionReturnParameters": 2491,
                              "id": 2513,
                              "nodeType": "Return",
                              "src": "12875:35:10"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          2517
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2517,
                            "mutability": "mutable",
                            "name": "sum",
                            "nodeType": "VariableDeclaration",
                            "scope": 2856,
                            "src": "14246:10:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2516,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "14246:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2519,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 2518,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "14259:1:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14246:14:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2524,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2520,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "14274:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2523,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2521,
                              "name": "a0",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1861,
                              "src": "14279:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "id": 2522,
                              "name": "ONE_18",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1822,
                              "src": "14284:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "14279:11:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "14274:16:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2534,
                        "nodeType": "IfStatement",
                        "src": "14270:114:10",
                        "trueBody": {
                          "id": 2533,
                          "nodeType": "Block",
                          "src": "14292:92:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2527,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2525,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "14306:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "/=",
                                "rightHandSide": {
                                  "id": 2526,
                                  "name": "a0",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1861,
                                  "src": "14311:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "14306:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2528,
                              "nodeType": "ExpressionStatement",
                              "src": "14306:7:10"
                            },
                            {
                              "expression": {
                                "id": 2531,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2529,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "14364:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2530,
                                  "name": "x0",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1858,
                                  "src": "14371:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "14364:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2532,
                              "nodeType": "ExpressionStatement",
                              "src": "14364:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2539,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2535,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "14398:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2538,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2536,
                              "name": "a1",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1867,
                              "src": "14403:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "id": 2537,
                              "name": "ONE_18",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1822,
                              "src": "14408:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "14403:11:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "14398:16:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2549,
                        "nodeType": "IfStatement",
                        "src": "14394:114:10",
                        "trueBody": {
                          "id": 2548,
                          "nodeType": "Block",
                          "src": "14416:92:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2542,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2540,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "14430:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "/=",
                                "rightHandSide": {
                                  "id": 2541,
                                  "name": "a1",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1867,
                                  "src": "14435:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "14430:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2543,
                              "nodeType": "ExpressionStatement",
                              "src": "14430:7:10"
                            },
                            {
                              "expression": {
                                "id": 2546,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2544,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "14488:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2545,
                                  "name": "x1",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1864,
                                  "src": "14495:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "14488:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2547,
                              "nodeType": "ExpressionStatement",
                              "src": "14488:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 2552,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2550,
                            "name": "sum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2517,
                            "src": "14639:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "*=",
                          "rightHandSide": {
                            "hexValue": "313030",
                            "id": 2551,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "14646:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_100_by_1",
                              "typeString": "int_const 100"
                            },
                            "value": "100"
                          },
                          "src": "14639:10:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2553,
                        "nodeType": "ExpressionStatement",
                        "src": "14639:10:10"
                      },
                      {
                        "expression": {
                          "id": 2556,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2554,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "14659:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "*=",
                          "rightHandSide": {
                            "hexValue": "313030",
                            "id": 2555,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "14664:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_100_by_1",
                              "typeString": "int_const 100"
                            },
                            "value": "100"
                          },
                          "src": "14659:8:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2557,
                        "nodeType": "ExpressionStatement",
                        "src": "14659:8:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2560,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2558,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "14794:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2559,
                            "name": "a2",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1873,
                            "src": "14799:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "14794:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2575,
                        "nodeType": "IfStatement",
                        "src": "14790:82:10",
                        "trueBody": {
                          "id": 2574,
                          "nodeType": "Block",
                          "src": "14803:69:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2568,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2561,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "14817:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2567,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2564,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2562,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "14822:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2563,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "14826:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "14822:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2565,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "14821:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2566,
                                    "name": "a2",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1873,
                                    "src": "14836:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "14821:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "14817:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2569,
                              "nodeType": "ExpressionStatement",
                              "src": "14817:21:10"
                            },
                            {
                              "expression": {
                                "id": 2572,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2570,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "14852:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2571,
                                  "name": "x2",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1870,
                                  "src": "14859:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "14852:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2573,
                              "nodeType": "ExpressionStatement",
                              "src": "14852:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2578,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2576,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "14886:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2577,
                            "name": "a3",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1879,
                            "src": "14891:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "14886:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2593,
                        "nodeType": "IfStatement",
                        "src": "14882:82:10",
                        "trueBody": {
                          "id": 2592,
                          "nodeType": "Block",
                          "src": "14895:69:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2586,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2579,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "14909:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2585,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2582,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2580,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "14914:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2581,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "14918:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "14914:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2583,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "14913:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2584,
                                    "name": "a3",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1879,
                                    "src": "14928:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "14913:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "14909:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2587,
                              "nodeType": "ExpressionStatement",
                              "src": "14909:21:10"
                            },
                            {
                              "expression": {
                                "id": 2590,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2588,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "14944:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2589,
                                  "name": "x3",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1876,
                                  "src": "14951:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "14944:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2591,
                              "nodeType": "ExpressionStatement",
                              "src": "14944:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2596,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2594,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "14978:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2595,
                            "name": "a4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1885,
                            "src": "14983:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "14978:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2611,
                        "nodeType": "IfStatement",
                        "src": "14974:82:10",
                        "trueBody": {
                          "id": 2610,
                          "nodeType": "Block",
                          "src": "14987:69:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2604,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2597,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "15001:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2603,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2600,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2598,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "15006:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2599,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "15010:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "15006:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2601,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "15005:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2602,
                                    "name": "a4",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1885,
                                    "src": "15020:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "15005:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15001:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2605,
                              "nodeType": "ExpressionStatement",
                              "src": "15001:21:10"
                            },
                            {
                              "expression": {
                                "id": 2608,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2606,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "15036:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2607,
                                  "name": "x4",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1882,
                                  "src": "15043:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15036:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2609,
                              "nodeType": "ExpressionStatement",
                              "src": "15036:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2614,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2612,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "15070:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2613,
                            "name": "a5",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1891,
                            "src": "15075:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "15070:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2629,
                        "nodeType": "IfStatement",
                        "src": "15066:82:10",
                        "trueBody": {
                          "id": 2628,
                          "nodeType": "Block",
                          "src": "15079:69:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2622,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2615,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "15093:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2621,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2618,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2616,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "15098:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2617,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "15102:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "15098:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2619,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "15097:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2620,
                                    "name": "a5",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1891,
                                    "src": "15112:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "15097:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15093:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2623,
                              "nodeType": "ExpressionStatement",
                              "src": "15093:21:10"
                            },
                            {
                              "expression": {
                                "id": 2626,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2624,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "15128:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2625,
                                  "name": "x5",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1888,
                                  "src": "15135:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15128:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2627,
                              "nodeType": "ExpressionStatement",
                              "src": "15128:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2632,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2630,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "15162:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2631,
                            "name": "a6",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1897,
                            "src": "15167:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "15162:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2647,
                        "nodeType": "IfStatement",
                        "src": "15158:82:10",
                        "trueBody": {
                          "id": 2646,
                          "nodeType": "Block",
                          "src": "15171:69:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2640,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2633,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "15185:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2639,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2636,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2634,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "15190:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2635,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "15194:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "15190:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2637,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "15189:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2638,
                                    "name": "a6",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1897,
                                    "src": "15204:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "15189:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15185:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2641,
                              "nodeType": "ExpressionStatement",
                              "src": "15185:21:10"
                            },
                            {
                              "expression": {
                                "id": 2644,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2642,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "15220:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2643,
                                  "name": "x6",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1894,
                                  "src": "15227:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15220:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2645,
                              "nodeType": "ExpressionStatement",
                              "src": "15220:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2650,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2648,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "15254:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2649,
                            "name": "a7",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1903,
                            "src": "15259:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "15254:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2665,
                        "nodeType": "IfStatement",
                        "src": "15250:82:10",
                        "trueBody": {
                          "id": 2664,
                          "nodeType": "Block",
                          "src": "15263:69:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2658,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2651,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "15277:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2657,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2654,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2652,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "15282:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2653,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "15286:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "15282:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2655,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "15281:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2656,
                                    "name": "a7",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1903,
                                    "src": "15296:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "15281:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15277:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2659,
                              "nodeType": "ExpressionStatement",
                              "src": "15277:21:10"
                            },
                            {
                              "expression": {
                                "id": 2662,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2660,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "15312:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2661,
                                  "name": "x7",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1900,
                                  "src": "15319:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15312:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2663,
                              "nodeType": "ExpressionStatement",
                              "src": "15312:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2668,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2666,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "15346:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2667,
                            "name": "a8",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1909,
                            "src": "15351:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "15346:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2683,
                        "nodeType": "IfStatement",
                        "src": "15342:82:10",
                        "trueBody": {
                          "id": 2682,
                          "nodeType": "Block",
                          "src": "15355:69:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2676,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2669,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "15369:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2675,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2672,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2670,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "15374:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2671,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "15378:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "15374:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2673,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "15373:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2674,
                                    "name": "a8",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1909,
                                    "src": "15388:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "15373:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15369:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2677,
                              "nodeType": "ExpressionStatement",
                              "src": "15369:21:10"
                            },
                            {
                              "expression": {
                                "id": 2680,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2678,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "15404:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2679,
                                  "name": "x8",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1906,
                                  "src": "15411:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15404:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2681,
                              "nodeType": "ExpressionStatement",
                              "src": "15404:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2686,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2684,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "15438:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2685,
                            "name": "a9",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1915,
                            "src": "15443:2:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "15438:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2701,
                        "nodeType": "IfStatement",
                        "src": "15434:82:10",
                        "trueBody": {
                          "id": 2700,
                          "nodeType": "Block",
                          "src": "15447:69:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2694,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2687,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "15461:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2693,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2690,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2688,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "15466:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2689,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "15470:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "15466:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2691,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "15465:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2692,
                                    "name": "a9",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1915,
                                    "src": "15480:2:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "15465:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15461:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2695,
                              "nodeType": "ExpressionStatement",
                              "src": "15461:21:10"
                            },
                            {
                              "expression": {
                                "id": 2698,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2696,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "15496:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2697,
                                  "name": "x9",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1912,
                                  "src": "15503:2:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15496:9:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2699,
                              "nodeType": "ExpressionStatement",
                              "src": "15496:9:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2704,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2702,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "15530:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2703,
                            "name": "a10",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1921,
                            "src": "15535:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "15530:8:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2719,
                        "nodeType": "IfStatement",
                        "src": "15526:85:10",
                        "trueBody": {
                          "id": 2718,
                          "nodeType": "Block",
                          "src": "15540:71:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2712,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2705,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "15554:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2711,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2708,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2706,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "15559:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2707,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "15563:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "15559:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2709,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "15558:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2710,
                                    "name": "a10",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1921,
                                    "src": "15573:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "15558:18:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15554:22:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2713,
                              "nodeType": "ExpressionStatement",
                              "src": "15554:22:10"
                            },
                            {
                              "expression": {
                                "id": 2716,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2714,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "15590:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2715,
                                  "name": "x10",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1918,
                                  "src": "15597:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15590:10:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2717,
                              "nodeType": "ExpressionStatement",
                              "src": "15590:10:10"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2722,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 2720,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2487,
                            "src": "15625:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 2721,
                            "name": "a11",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1927,
                            "src": "15630:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "15625:8:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 2737,
                        "nodeType": "IfStatement",
                        "src": "15621:85:10",
                        "trueBody": {
                          "id": 2736,
                          "nodeType": "Block",
                          "src": "15635:71:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2730,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2723,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "15649:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2729,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        },
                                        "id": 2726,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 2724,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 2487,
                                          "src": "15654:1:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "id": 2725,
                                          "name": "ONE_20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1825,
                                          "src": "15658:6:10",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        },
                                        "src": "15654:10:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "id": 2727,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "15653:12:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 2728,
                                    "name": "a11",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1927,
                                    "src": "15668:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "15653:18:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15649:22:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2731,
                              "nodeType": "ExpressionStatement",
                              "src": "15649:22:10"
                            },
                            {
                              "expression": {
                                "id": 2734,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2732,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "15685:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "+=",
                                "rightHandSide": {
                                  "id": 2733,
                                  "name": "x11",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1924,
                                  "src": "15692:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "15685:10:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2735,
                              "nodeType": "ExpressionStatement",
                              "src": "15685:10:10"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          2739
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2739,
                            "mutability": "mutable",
                            "name": "z",
                            "nodeType": "VariableDeclaration",
                            "scope": 2856,
                            "src": "16208:8:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2738,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16208:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2752,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2751,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2745,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 2742,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 2740,
                                        "name": "a",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2487,
                                        "src": "16221:1:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "-",
                                      "rightExpression": {
                                        "id": 2741,
                                        "name": "ONE_20",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1825,
                                        "src": "16225:6:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "src": "16221:10:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "id": 2743,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "16220:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "id": 2744,
                                  "name": "ONE_20",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1825,
                                  "src": "16235:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "16220:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2746,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "16219:23:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2749,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2747,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2487,
                                  "src": "16246:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "id": 2748,
                                  "name": "ONE_20",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1825,
                                  "src": "16250:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "16246:10:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2750,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "16245:12:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16219:38:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16208:49:10"
                      },
                      {
                        "assignments": [
                          2754
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2754,
                            "mutability": "mutable",
                            "name": "z_squared",
                            "nodeType": "VariableDeclaration",
                            "scope": 2856,
                            "src": "16267:16:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2753,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16267:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2761,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2760,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2757,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2755,
                                  "name": "z",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2739,
                                  "src": "16287:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "id": 2756,
                                  "name": "z",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2739,
                                  "src": "16291:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "16287:5:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2758,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "16286:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 2759,
                            "name": "ONE_20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1825,
                            "src": "16296:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16286:16:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16267:35:10"
                      },
                      {
                        "assignments": [
                          2763
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2763,
                            "mutability": "mutable",
                            "name": "num",
                            "nodeType": "VariableDeclaration",
                            "scope": 2856,
                            "src": "16383:10:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2762,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16383:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2765,
                        "initialValue": {
                          "id": 2764,
                          "name": "z",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2739,
                          "src": "16396:1:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16383:14:10"
                      },
                      {
                        "assignments": [
                          2767
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2767,
                            "mutability": "mutable",
                            "name": "seriesSum",
                            "nodeType": "VariableDeclaration",
                            "scope": 2856,
                            "src": "16511:16:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2766,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16511:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2769,
                        "initialValue": {
                          "id": 2768,
                          "name": "num",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2763,
                          "src": "16530:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16511:22:10"
                      },
                      {
                        "expression": {
                          "id": 2777,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2770,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2763,
                            "src": "16604:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2776,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2773,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 2771,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2763,
                                    "src": "16611:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2772,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2754,
                                    "src": "16617:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "16611:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2774,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "16610:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 2775,
                              "name": "ONE_20",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1825,
                              "src": "16630:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "16610:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16604:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2778,
                        "nodeType": "ExpressionStatement",
                        "src": "16604:32:10"
                      },
                      {
                        "expression": {
                          "id": 2783,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2779,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2767,
                            "src": "16646:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2782,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2780,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2763,
                              "src": "16659:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "33",
                              "id": 2781,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "16665:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_3_by_1",
                                "typeString": "int_const 3"
                              },
                              "value": "3"
                            },
                            "src": "16659:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16646:20:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2784,
                        "nodeType": "ExpressionStatement",
                        "src": "16646:20:10"
                      },
                      {
                        "expression": {
                          "id": 2792,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2785,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2763,
                            "src": "16677:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2791,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2788,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 2786,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2763,
                                    "src": "16684:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2787,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2754,
                                    "src": "16690:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "16684:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2789,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "16683:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 2790,
                              "name": "ONE_20",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1825,
                              "src": "16703:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "16683:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16677:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2793,
                        "nodeType": "ExpressionStatement",
                        "src": "16677:32:10"
                      },
                      {
                        "expression": {
                          "id": 2798,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2794,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2767,
                            "src": "16719:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2797,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2795,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2763,
                              "src": "16732:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "35",
                              "id": 2796,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "16738:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_5_by_1",
                                "typeString": "int_const 5"
                              },
                              "value": "5"
                            },
                            "src": "16732:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16719:20:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2799,
                        "nodeType": "ExpressionStatement",
                        "src": "16719:20:10"
                      },
                      {
                        "expression": {
                          "id": 2807,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2800,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2763,
                            "src": "16750:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2806,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2803,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 2801,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2763,
                                    "src": "16757:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2802,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2754,
                                    "src": "16763:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "16757:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2804,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "16756:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 2805,
                              "name": "ONE_20",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1825,
                              "src": "16776:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "16756:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16750:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2808,
                        "nodeType": "ExpressionStatement",
                        "src": "16750:32:10"
                      },
                      {
                        "expression": {
                          "id": 2813,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2809,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2767,
                            "src": "16792:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2812,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2810,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2763,
                              "src": "16805:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "37",
                              "id": 2811,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "16811:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_7_by_1",
                                "typeString": "int_const 7"
                              },
                              "value": "7"
                            },
                            "src": "16805:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16792:20:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2814,
                        "nodeType": "ExpressionStatement",
                        "src": "16792:20:10"
                      },
                      {
                        "expression": {
                          "id": 2822,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2815,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2763,
                            "src": "16823:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2821,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2818,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 2816,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2763,
                                    "src": "16830:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2817,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2754,
                                    "src": "16836:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "16830:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2819,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "16829:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 2820,
                              "name": "ONE_20",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1825,
                              "src": "16849:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "16829:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16823:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2823,
                        "nodeType": "ExpressionStatement",
                        "src": "16823:32:10"
                      },
                      {
                        "expression": {
                          "id": 2828,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2824,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2767,
                            "src": "16865:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2827,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2825,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2763,
                              "src": "16878:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "39",
                              "id": 2826,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "16884:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_9_by_1",
                                "typeString": "int_const 9"
                              },
                              "value": "9"
                            },
                            "src": "16878:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16865:20:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2829,
                        "nodeType": "ExpressionStatement",
                        "src": "16865:20:10"
                      },
                      {
                        "expression": {
                          "id": 2837,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2830,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2763,
                            "src": "16896:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2836,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2833,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 2831,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2763,
                                    "src": "16903:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2832,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2754,
                                    "src": "16909:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "16903:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2834,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "16902:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 2835,
                              "name": "ONE_20",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1825,
                              "src": "16922:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "16902:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16896:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2838,
                        "nodeType": "ExpressionStatement",
                        "src": "16896:32:10"
                      },
                      {
                        "expression": {
                          "id": 2843,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2839,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2767,
                            "src": "16938:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2842,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2840,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2763,
                              "src": "16951:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "3131",
                              "id": 2841,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "16957:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_11_by_1",
                                "typeString": "int_const 11"
                              },
                              "value": "11"
                            },
                            "src": "16951:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "16938:21:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2844,
                        "nodeType": "ExpressionStatement",
                        "src": "16938:21:10"
                      },
                      {
                        "expression": {
                          "id": 2847,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2845,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2767,
                            "src": "17118:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "*=",
                          "rightHandSide": {
                            "hexValue": "32",
                            "id": 2846,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "17131:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "src": "17118:14:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2848,
                        "nodeType": "ExpressionStatement",
                        "src": "17118:14:10"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2854,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2851,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2849,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2517,
                                  "src": "17406:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "id": 2850,
                                  "name": "seriesSum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2767,
                                  "src": "17412:9:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "17406:15:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2852,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "17405:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "hexValue": "313030",
                            "id": 2853,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "17425:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_100_by_1",
                              "typeString": "int_const 100"
                            },
                            "value": "100"
                          },
                          "src": "17405:23:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 2491,
                        "id": 2855,
                        "nodeType": "Return",
                        "src": "17398:30:10"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 2485,
                    "nodeType": "StructuredDocumentation",
                    "src": "12247:94:10",
                    "text": " @dev Natural logarithm (ln(a)) with signed 18 decimal fixed point argument."
                  },
                  "id": 2857,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "ln",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 2488,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 2487,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 2857,
                        "src": "12358:8:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2486,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12358:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12357:10:10"
                  },
                  "returnParameters": {
                    "id": 2491,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 2490,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 2857,
                        "src": "12391:6:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2489,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12391:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12390:8:10"
                  },
                  "scope": 3084,
                  "src": "12346:5089:10",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 2928,
                    "nodeType": "Block",
                    "src": "17628:749:10",
                    "statements": [
                      {
                        "assignments": [
                          2868
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2868,
                            "mutability": "mutable",
                            "name": "logBase",
                            "nodeType": "VariableDeclaration",
                            "scope": 2928,
                            "src": "17858:14:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2867,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17858:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2869,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17858:14:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 2876,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2872,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2870,
                              "name": "LN_36_LOWER_BOUND",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1840,
                              "src": "17886:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 2871,
                              "name": "base",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2862,
                              "src": "17906:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "17886:24:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2875,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2873,
                              "name": "base",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2862,
                              "src": "17914:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 2874,
                              "name": "LN_36_UPPER_BOUND",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1845,
                              "src": "17921:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "17914:24:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "17886:52:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 2892,
                          "nodeType": "Block",
                          "src": "17992:52:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2890,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2884,
                                  "name": "logBase",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2868,
                                  "src": "18006:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2889,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "arguments": [
                                      {
                                        "id": 2886,
                                        "name": "base",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2862,
                                        "src": "18019:4:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      ],
                                      "id": 2885,
                                      "name": "ln",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2857,
                                      "src": "18016:2:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                        "typeString": "function (int256) pure returns (int256)"
                                      }
                                    },
                                    "id": 2887,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "18016:8:10",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2888,
                                    "name": "ONE_18",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1822,
                                    "src": "18027:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "18016:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "18006:27:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2891,
                              "nodeType": "ExpressionStatement",
                              "src": "18006:27:10"
                            }
                          ]
                        },
                        "id": 2893,
                        "nodeType": "IfStatement",
                        "src": "17882:162:10",
                        "trueBody": {
                          "id": 2883,
                          "nodeType": "Block",
                          "src": "17940:46:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2881,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2877,
                                  "name": "logBase",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2868,
                                  "src": "17954:7:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 2879,
                                      "name": "base",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2862,
                                      "src": "17970:4:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    ],
                                    "id": 2878,
                                    "name": "ln_36",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3083,
                                    "src": "17964:5:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                      "typeString": "function (int256) pure returns (int256)"
                                    }
                                  },
                                  "id": 2880,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "17964:11:10",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "17954:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2882,
                              "nodeType": "ExpressionStatement",
                              "src": "17954:21:10"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          2895
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2895,
                            "mutability": "mutable",
                            "name": "logArg",
                            "nodeType": "VariableDeclaration",
                            "scope": 2928,
                            "src": "18054:13:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2894,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18054:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2896,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18054:13:10"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 2903,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2899,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2897,
                              "name": "LN_36_LOWER_BOUND",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1840,
                              "src": "18081:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 2898,
                              "name": "arg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2860,
                              "src": "18101:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "18081:23:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2902,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2900,
                              "name": "arg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2860,
                              "src": "18108:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 2901,
                              "name": "LN_36_UPPER_BOUND",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1845,
                              "src": "18114:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "18108:23:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "18081:50:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 2919,
                          "nodeType": "Block",
                          "src": "18183:50:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2917,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2911,
                                  "name": "logArg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2895,
                                  "src": "18197:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2916,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "arguments": [
                                      {
                                        "id": 2913,
                                        "name": "arg",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2860,
                                        "src": "18209:3:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      ],
                                      "id": 2912,
                                      "name": "ln",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2857,
                                      "src": "18206:2:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                        "typeString": "function (int256) pure returns (int256)"
                                      }
                                    },
                                    "id": 2914,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "18206:7:10",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2915,
                                    "name": "ONE_18",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1822,
                                    "src": "18216:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "18206:16:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "18197:25:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2918,
                              "nodeType": "ExpressionStatement",
                              "src": "18197:25:10"
                            }
                          ]
                        },
                        "id": 2920,
                        "nodeType": "IfStatement",
                        "src": "18077:156:10",
                        "trueBody": {
                          "id": 2910,
                          "nodeType": "Block",
                          "src": "18133:44:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 2908,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 2904,
                                  "name": "logArg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2895,
                                  "src": "18147:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 2906,
                                      "name": "arg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2860,
                                      "src": "18162:3:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    ],
                                    "id": 2905,
                                    "name": "ln_36",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3083,
                                    "src": "18156:5:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_int256_$returns$_t_int256_$",
                                      "typeString": "function (int256) pure returns (int256)"
                                    }
                                  },
                                  "id": 2907,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "18156:10:10",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "18147:19:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 2909,
                              "nodeType": "ExpressionStatement",
                              "src": "18147:19:10"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2926,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2923,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2921,
                                  "name": "logArg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2895,
                                  "src": "18344:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "id": 2922,
                                  "name": "ONE_18",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1822,
                                  "src": "18353:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "18344:15:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2924,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "18343:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 2925,
                            "name": "logBase",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2868,
                            "src": "18363:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "18343:27:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 2866,
                        "id": 2927,
                        "nodeType": "Return",
                        "src": "18336:34:10"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 2858,
                    "nodeType": "StructuredDocumentation",
                    "src": "17441:113:10",
                    "text": " @dev Logarithm (log(arg, base), with signed 18 decimal fixed point base and argument argument."
                  },
                  "id": 2929,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "log",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 2863,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 2860,
                        "mutability": "mutable",
                        "name": "arg",
                        "nodeType": "VariableDeclaration",
                        "scope": 2929,
                        "src": "17572:10:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2859,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17572:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 2862,
                        "mutability": "mutable",
                        "name": "base",
                        "nodeType": "VariableDeclaration",
                        "scope": 2929,
                        "src": "17584:11:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2861,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17584:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "17571:25:10"
                  },
                  "returnParameters": {
                    "id": 2866,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 2865,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 2929,
                        "src": "17620:6:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2864,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17620:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "17619:8:10"
                  },
                  "scope": 3084,
                  "src": "17559:818:10",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3082,
                    "nodeType": "Block",
                    "src": "18690:1658:10",
                    "statements": [
                      {
                        "expression": {
                          "id": 2939,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2937,
                            "name": "x",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2932,
                            "src": "18904:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "*=",
                          "rightHandSide": {
                            "id": 2938,
                            "name": "ONE_18",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1822,
                            "src": "18909:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "18904:11:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2940,
                        "nodeType": "ExpressionStatement",
                        "src": "18904:11:10"
                      },
                      {
                        "assignments": [
                          2942
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2942,
                            "mutability": "mutable",
                            "name": "z",
                            "nodeType": "VariableDeclaration",
                            "scope": 3082,
                            "src": "19276:8:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2941,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "19276:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2955,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2954,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2948,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 2945,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 2943,
                                        "name": "x",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2932,
                                        "src": "19289:1:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "-",
                                      "rightExpression": {
                                        "id": 2944,
                                        "name": "ONE_36",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1828,
                                        "src": "19293:6:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "src": "19289:10:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "id": 2946,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "19288:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "id": 2947,
                                  "name": "ONE_36",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1828,
                                  "src": "19303:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "19288:21:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2949,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "19287:23:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2952,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2950,
                                  "name": "x",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2932,
                                  "src": "19314:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "id": 2951,
                                  "name": "ONE_36",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1828,
                                  "src": "19318:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "19314:10:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2953,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "19313:12:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19287:38:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19276:49:10"
                      },
                      {
                        "assignments": [
                          2957
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2957,
                            "mutability": "mutable",
                            "name": "z_squared",
                            "nodeType": "VariableDeclaration",
                            "scope": 3082,
                            "src": "19335:16:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2956,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "19335:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2964,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2963,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 2960,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 2958,
                                  "name": "z",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2942,
                                  "src": "19355:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "id": 2959,
                                  "name": "z",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2942,
                                  "src": "19359:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "19355:5:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "id": 2961,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "19354:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 2962,
                            "name": "ONE_36",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1828,
                            "src": "19364:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19354:16:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19335:35:10"
                      },
                      {
                        "assignments": [
                          2966
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2966,
                            "mutability": "mutable",
                            "name": "num",
                            "nodeType": "VariableDeclaration",
                            "scope": 3082,
                            "src": "19451:10:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2965,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "19451:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2968,
                        "initialValue": {
                          "id": 2967,
                          "name": "z",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2942,
                          "src": "19464:1:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19451:14:10"
                      },
                      {
                        "assignments": [
                          2970
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 2970,
                            "mutability": "mutable",
                            "name": "seriesSum",
                            "nodeType": "VariableDeclaration",
                            "scope": 3082,
                            "src": "19579:16:10",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 2969,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "19579:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 2972,
                        "initialValue": {
                          "id": 2971,
                          "name": "num",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2966,
                          "src": "19598:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19579:22:10"
                      },
                      {
                        "expression": {
                          "id": 2980,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2973,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "19672:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2979,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2976,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 2974,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2966,
                                    "src": "19679:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2975,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2957,
                                    "src": "19685:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "19679:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2977,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "19678:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 2978,
                              "name": "ONE_36",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1828,
                              "src": "19698:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "19678:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19672:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2981,
                        "nodeType": "ExpressionStatement",
                        "src": "19672:32:10"
                      },
                      {
                        "expression": {
                          "id": 2986,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2982,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2970,
                            "src": "19714:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2985,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2983,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2966,
                              "src": "19727:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "33",
                              "id": 2984,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "19733:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_3_by_1",
                                "typeString": "int_const 3"
                              },
                              "value": "3"
                            },
                            "src": "19727:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19714:20:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2987,
                        "nodeType": "ExpressionStatement",
                        "src": "19714:20:10"
                      },
                      {
                        "expression": {
                          "id": 2995,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2988,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "19745:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 2994,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 2991,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 2989,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2966,
                                    "src": "19752:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 2990,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2957,
                                    "src": "19758:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "19752:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 2992,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "19751:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 2993,
                              "name": "ONE_36",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1828,
                              "src": "19771:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "19751:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19745:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2996,
                        "nodeType": "ExpressionStatement",
                        "src": "19745:32:10"
                      },
                      {
                        "expression": {
                          "id": 3001,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 2997,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2970,
                            "src": "19787:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3000,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 2998,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2966,
                              "src": "19800:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "35",
                              "id": 2999,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "19806:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_5_by_1",
                                "typeString": "int_const 5"
                              },
                              "value": "5"
                            },
                            "src": "19800:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19787:20:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3002,
                        "nodeType": "ExpressionStatement",
                        "src": "19787:20:10"
                      },
                      {
                        "expression": {
                          "id": 3010,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3003,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "19818:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3009,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 3006,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 3004,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2966,
                                    "src": "19825:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 3005,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2957,
                                    "src": "19831:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "19825:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 3007,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "19824:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 3008,
                              "name": "ONE_36",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1828,
                              "src": "19844:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "19824:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19818:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3011,
                        "nodeType": "ExpressionStatement",
                        "src": "19818:32:10"
                      },
                      {
                        "expression": {
                          "id": 3016,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3012,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2970,
                            "src": "19860:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3015,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 3013,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2966,
                              "src": "19873:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "37",
                              "id": 3014,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "19879:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_7_by_1",
                                "typeString": "int_const 7"
                              },
                              "value": "7"
                            },
                            "src": "19873:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19860:20:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3017,
                        "nodeType": "ExpressionStatement",
                        "src": "19860:20:10"
                      },
                      {
                        "expression": {
                          "id": 3025,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3018,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "19891:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3024,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 3021,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 3019,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2966,
                                    "src": "19898:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 3020,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2957,
                                    "src": "19904:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "19898:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 3022,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "19897:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 3023,
                              "name": "ONE_36",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1828,
                              "src": "19917:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "19897:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19891:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3026,
                        "nodeType": "ExpressionStatement",
                        "src": "19891:32:10"
                      },
                      {
                        "expression": {
                          "id": 3031,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3027,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2970,
                            "src": "19933:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3030,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 3028,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2966,
                              "src": "19946:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "39",
                              "id": 3029,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "19952:1:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_9_by_1",
                                "typeString": "int_const 9"
                              },
                              "value": "9"
                            },
                            "src": "19946:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19933:20:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3032,
                        "nodeType": "ExpressionStatement",
                        "src": "19933:20:10"
                      },
                      {
                        "expression": {
                          "id": 3040,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3033,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "19964:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3039,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 3036,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 3034,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2966,
                                    "src": "19971:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 3035,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2957,
                                    "src": "19977:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "19971:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 3037,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "19970:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 3038,
                              "name": "ONE_36",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1828,
                              "src": "19990:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "19970:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "19964:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3041,
                        "nodeType": "ExpressionStatement",
                        "src": "19964:32:10"
                      },
                      {
                        "expression": {
                          "id": 3046,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3042,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2970,
                            "src": "20006:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3045,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 3043,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2966,
                              "src": "20019:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "3131",
                              "id": 3044,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "20025:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_11_by_1",
                                "typeString": "int_const 11"
                              },
                              "value": "11"
                            },
                            "src": "20019:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "20006:21:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3047,
                        "nodeType": "ExpressionStatement",
                        "src": "20006:21:10"
                      },
                      {
                        "expression": {
                          "id": 3055,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3048,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "20038:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3054,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 3051,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 3049,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2966,
                                    "src": "20045:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 3050,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2957,
                                    "src": "20051:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "20045:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 3052,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "20044:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 3053,
                              "name": "ONE_36",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1828,
                              "src": "20064:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "20044:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "20038:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3056,
                        "nodeType": "ExpressionStatement",
                        "src": "20038:32:10"
                      },
                      {
                        "expression": {
                          "id": 3061,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3057,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2970,
                            "src": "20080:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3060,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 3058,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2966,
                              "src": "20093:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "3133",
                              "id": 3059,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "20099:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_13_by_1",
                                "typeString": "int_const 13"
                              },
                              "value": "13"
                            },
                            "src": "20093:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "20080:21:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3062,
                        "nodeType": "ExpressionStatement",
                        "src": "20080:21:10"
                      },
                      {
                        "expression": {
                          "id": 3070,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3063,
                            "name": "num",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "20112:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3069,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 3066,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 3064,
                                    "name": "num",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2966,
                                    "src": "20119:3:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "id": 3065,
                                    "name": "z_squared",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2957,
                                    "src": "20125:9:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "20119:15:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "id": 3067,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "20118:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "id": 3068,
                              "name": "ONE_36",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1828,
                              "src": "20138:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "src": "20118:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "20112:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3071,
                        "nodeType": "ExpressionStatement",
                        "src": "20112:32:10"
                      },
                      {
                        "expression": {
                          "id": 3076,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3072,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2970,
                            "src": "20154:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "id": 3075,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 3073,
                              "name": "num",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2966,
                              "src": "20167:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "/",
                            "rightExpression": {
                              "hexValue": "3135",
                              "id": 3074,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "20173:2:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_15_by_1",
                                "typeString": "int_const 15"
                              },
                              "value": "15"
                            },
                            "src": "20167:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "20154:21:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3077,
                        "nodeType": "ExpressionStatement",
                        "src": "20154:21:10"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3080,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3078,
                            "name": "seriesSum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2970,
                            "src": "20328:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "*",
                          "rightExpression": {
                            "hexValue": "32",
                            "id": 3079,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "20340:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "src": "20328:13:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 2936,
                        "id": 3081,
                        "nodeType": "Return",
                        "src": "20321:20:10"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 2930,
                    "nodeType": "StructuredDocumentation",
                    "src": "18383:247:10",
                    "text": " @dev High precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,\n for x close to one.\n Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND."
                  },
                  "id": 3083,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "ln_36",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 2933,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 2932,
                        "mutability": "mutable",
                        "name": "x",
                        "nodeType": "VariableDeclaration",
                        "scope": 3083,
                        "src": "18650:8:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2931,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "18650:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "18649:10:10"
                  },
                  "returnParameters": {
                    "id": 2936,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 2935,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3083,
                        "src": "18682:6:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 2934,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "18682:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "18681:8:10"
                  },
                  "scope": 3084,
                  "src": "18635:1713:10",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 3085,
              "src": "1228:19122:10"
            }
          ],
          "src": "692:19659:10"
        },
        "id": 10
      },
      "src.sol/amm/lib/math/Math.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/math/Math.sol",
          "exportedSymbols": {
            "Math": [
              3350
            ]
          },
          "id": 3351,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 3086,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:11"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 3087,
              "nodeType": "ImportDirective",
              "scope": 3351,
              "sourceUnit": 656,
              "src": "58:39:11",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 3088,
                "nodeType": "StructuredDocumentation",
                "src": "99:138:11",
                "text": " @dev Wrappers over Solidity's arithmetic operations with added overflow checks.\n Adapted from OpenZeppelin's SafeMath library"
              },
              "fullyImplemented": true,
              "id": 3350,
              "linearizedBaseContracts": [
                3350
              ],
              "name": "Math",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 3114,
                    "nodeType": "Block",
                    "src": "434:99:11",
                    "statements": [
                      {
                        "assignments": [
                          3099
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3099,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 3114,
                            "src": "444:9:11",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 3098,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "444:7:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3103,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3102,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3100,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3091,
                            "src": "456:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 3101,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3093,
                            "src": "460:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "456:5:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "444:17:11"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 3107,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 3105,
                                "name": "c",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3099,
                                "src": "480:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 3106,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3091,
                                "src": "485:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "480:6:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3108,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "488:6:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3109,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ADD_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 372,
                              "src": "488:19:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3104,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "471:8:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3110,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "471:37:11",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3111,
                        "nodeType": "ExpressionStatement",
                        "src": "471:37:11"
                      },
                      {
                        "expression": {
                          "id": 3112,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3099,
                          "src": "525:1:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3097,
                        "id": 3113,
                        "nodeType": "Return",
                        "src": "518:8:11"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3089,
                    "nodeType": "StructuredDocumentation",
                    "src": "257:105:11",
                    "text": " @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow."
                  },
                  "id": 3115,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "add",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3094,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3091,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3115,
                        "src": "380:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3090,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "380:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3093,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3115,
                        "src": "391:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3092,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "391:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "379:22:11"
                  },
                  "returnParameters": {
                    "id": 3097,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3096,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3115,
                        "src": "425:7:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3095,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "425:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "424:9:11"
                  },
                  "scope": 3350,
                  "src": "367:166:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3155,
                    "nodeType": "Block",
                    "src": "699:130:11",
                    "statements": [
                      {
                        "assignments": [
                          3126
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3126,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 3155,
                            "src": "709:8:11",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 3125,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "709:6:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3130,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3129,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3127,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3118,
                            "src": "720:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 3128,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3120,
                            "src": "724:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "720:5:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "709:16:11"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 3148,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    "id": 3138,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 3134,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3132,
                                        "name": "b",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3120,
                                        "src": "745:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": ">=",
                                      "rightExpression": {
                                        "hexValue": "30",
                                        "id": 3133,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "750:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        "value": "0"
                                      },
                                      "src": "745:6:11",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "&&",
                                    "rightExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 3137,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3135,
                                        "name": "c",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3126,
                                        "src": "755:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": ">=",
                                      "rightExpression": {
                                        "id": 3136,
                                        "name": "a",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3118,
                                        "src": "760:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "src": "755:6:11",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "src": "745:16:11",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "id": 3139,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "744:18:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    "id": 3146,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 3142,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3140,
                                        "name": "b",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3120,
                                        "src": "767:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "<",
                                      "rightExpression": {
                                        "hexValue": "30",
                                        "id": 3141,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "771:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        "value": "0"
                                      },
                                      "src": "767:5:11",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "&&",
                                    "rightExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 3145,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3143,
                                        "name": "c",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3126,
                                        "src": "776:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "<",
                                      "rightExpression": {
                                        "id": 3144,
                                        "name": "a",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3118,
                                        "src": "780:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "src": "776:5:11",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "src": "767:14:11",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "id": 3147,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "766:16:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "744:38:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3149,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "784:6:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3150,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ADD_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 372,
                              "src": "784:19:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3131,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "735:8:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3151,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "735:69:11",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3152,
                        "nodeType": "ExpressionStatement",
                        "src": "735:69:11"
                      },
                      {
                        "expression": {
                          "id": 3153,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3126,
                          "src": "821:1:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 3124,
                        "id": 3154,
                        "nodeType": "Return",
                        "src": "814:8:11"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3116,
                    "nodeType": "StructuredDocumentation",
                    "src": "539:91:11",
                    "text": " @dev Returns the addition of two signed integers, reverting on overflow."
                  },
                  "id": 3156,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "add",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3121,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3118,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3156,
                        "src": "648:8:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 3117,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "648:6:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3120,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3156,
                        "src": "658:8:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 3119,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "658:6:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "647:20:11"
                  },
                  "returnParameters": {
                    "id": 3124,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3123,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3156,
                        "src": "691:6:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 3122,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "691:6:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "690:8:11"
                  },
                  "scope": 3350,
                  "src": "635:194:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3182,
                    "nodeType": "Block",
                    "src": "1015:99:11",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 3169,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 3167,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3161,
                                "src": "1034:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 3168,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3159,
                                "src": "1039:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1034:6:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3170,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1042:6:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3171,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SUB_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 375,
                              "src": "1042:19:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3166,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1025:8:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3172,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1025:37:11",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3173,
                        "nodeType": "ExpressionStatement",
                        "src": "1025:37:11"
                      },
                      {
                        "assignments": [
                          3175
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3175,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 3182,
                            "src": "1072:9:11",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 3174,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1072:7:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3179,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3178,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3176,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3159,
                            "src": "1084:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "id": 3177,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3161,
                            "src": "1088:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1084:5:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1072:17:11"
                      },
                      {
                        "expression": {
                          "id": 3180,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3175,
                          "src": "1106:1:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3165,
                        "id": 3181,
                        "nodeType": "Return",
                        "src": "1099:8:11"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3157,
                    "nodeType": "StructuredDocumentation",
                    "src": "835:108:11",
                    "text": " @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow."
                  },
                  "id": 3183,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "sub",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3162,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3159,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3183,
                        "src": "961:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3158,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "961:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3161,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3183,
                        "src": "972:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3160,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "972:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "960:22:11"
                  },
                  "returnParameters": {
                    "id": 3165,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3164,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3183,
                        "src": "1006:7:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3163,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1006:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1005:9:11"
                  },
                  "scope": 3350,
                  "src": "948:166:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3223,
                    "nodeType": "Block",
                    "src": "1283:130:11",
                    "statements": [
                      {
                        "assignments": [
                          3194
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3194,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 3223,
                            "src": "1293:8:11",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 3193,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1293:6:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3198,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3197,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3195,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3186,
                            "src": "1304:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "id": 3196,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3188,
                            "src": "1308:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "1304:5:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1293:16:11"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 3216,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    "id": 3206,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 3202,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3200,
                                        "name": "b",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3188,
                                        "src": "1329:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": ">=",
                                      "rightExpression": {
                                        "hexValue": "30",
                                        "id": 3201,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "1334:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        "value": "0"
                                      },
                                      "src": "1329:6:11",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "&&",
                                    "rightExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 3205,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3203,
                                        "name": "c",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3194,
                                        "src": "1339:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "<=",
                                      "rightExpression": {
                                        "id": 3204,
                                        "name": "a",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3186,
                                        "src": "1344:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "src": "1339:6:11",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "src": "1329:16:11",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "id": 3207,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1328:18:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    "id": 3214,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 3210,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3208,
                                        "name": "b",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3188,
                                        "src": "1351:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "<",
                                      "rightExpression": {
                                        "hexValue": "30",
                                        "id": 3209,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "1355:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        "value": "0"
                                      },
                                      "src": "1351:5:11",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "&&",
                                    "rightExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      },
                                      "id": 3213,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 3211,
                                        "name": "c",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3194,
                                        "src": "1360:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": ">",
                                      "rightExpression": {
                                        "id": 3212,
                                        "name": "a",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3186,
                                        "src": "1364:1:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "src": "1360:5:11",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "src": "1351:14:11",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "id": 3215,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1350:16:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "1328:38:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3217,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1368:6:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3218,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SUB_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 375,
                              "src": "1368:19:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3199,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1319:8:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3219,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1319:69:11",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3220,
                        "nodeType": "ExpressionStatement",
                        "src": "1319:69:11"
                      },
                      {
                        "expression": {
                          "id": 3221,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3194,
                          "src": "1405:1:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 3192,
                        "id": 3222,
                        "nodeType": "Return",
                        "src": "1398:8:11"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3184,
                    "nodeType": "StructuredDocumentation",
                    "src": "1120:94:11",
                    "text": " @dev Returns the subtraction of two signed integers, reverting on overflow."
                  },
                  "id": 3224,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "sub",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3189,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3186,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3224,
                        "src": "1232:8:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 3185,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1232:6:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3188,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3224,
                        "src": "1242:8:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 3187,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1242:6:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1231:20:11"
                  },
                  "returnParameters": {
                    "id": 3192,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3191,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3224,
                        "src": "1275:6:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 3190,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1275:6:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1274:8:11"
                  },
                  "scope": 3350,
                  "src": "1219:194:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3241,
                    "nodeType": "Block",
                    "src": "1562:38:11",
                    "statements": [
                      {
                        "expression": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 3236,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 3234,
                              "name": "a",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3227,
                              "src": "1579:1:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": ">=",
                            "rightExpression": {
                              "id": 3235,
                              "name": "b",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3229,
                              "src": "1584:1:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1579:6:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "id": 3238,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3229,
                            "src": "1592:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 3239,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "1579:14:11",
                          "trueExpression": {
                            "id": 3237,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3227,
                            "src": "1588:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3233,
                        "id": 3240,
                        "nodeType": "Return",
                        "src": "1572:21:11"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3225,
                    "nodeType": "StructuredDocumentation",
                    "src": "1419:71:11",
                    "text": " @dev Returns the largest of two numbers of 256 bits."
                  },
                  "id": 3242,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "max",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3230,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3227,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3242,
                        "src": "1508:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3226,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1508:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3229,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3242,
                        "src": "1519:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3228,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1519:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1507:22:11"
                  },
                  "returnParameters": {
                    "id": 3233,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3232,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3242,
                        "src": "1553:7:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3231,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1553:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1552:9:11"
                  },
                  "scope": 3350,
                  "src": "1495:105:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3259,
                    "nodeType": "Block",
                    "src": "1750:37:11",
                    "statements": [
                      {
                        "expression": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 3254,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 3252,
                              "name": "a",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3245,
                              "src": "1767:1:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 3253,
                              "name": "b",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3247,
                              "src": "1771:1:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1767:5:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "id": 3256,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3247,
                            "src": "1779:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 3257,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "1767:13:11",
                          "trueExpression": {
                            "id": 3255,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3245,
                            "src": "1775:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3251,
                        "id": 3258,
                        "nodeType": "Return",
                        "src": "1760:20:11"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3243,
                    "nodeType": "StructuredDocumentation",
                    "src": "1606:72:11",
                    "text": " @dev Returns the smallest of two numbers of 256 bits."
                  },
                  "id": 3260,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "min",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3248,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3245,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3260,
                        "src": "1696:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3244,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1696:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3247,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3260,
                        "src": "1707:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3246,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1707:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1695:22:11"
                  },
                  "returnParameters": {
                    "id": 3251,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3250,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3260,
                        "src": "1741:7:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3249,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1741:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1740:9:11"
                  },
                  "scope": 3350,
                  "src": "1683:104:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3291,
                    "nodeType": "Block",
                    "src": "1860:113:11",
                    "statements": [
                      {
                        "assignments": [
                          3270
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3270,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 3291,
                            "src": "1870:9:11",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 3269,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1870:7:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3274,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3273,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3271,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3262,
                            "src": "1882:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "*",
                          "rightExpression": {
                            "id": 3272,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3264,
                            "src": "1886:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1882:5:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1870:17:11"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 3284,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 3278,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 3276,
                                  "name": "a",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3262,
                                  "src": "1906:1:11",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "hexValue": "30",
                                  "id": 3277,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1911:1:11",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "1906:6:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 3283,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 3281,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 3279,
                                    "name": "c",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3270,
                                    "src": "1916:1:11",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 3280,
                                    "name": "a",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3262,
                                    "src": "1920:1:11",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "1916:5:11",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 3282,
                                  "name": "b",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3264,
                                  "src": "1925:1:11",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1916:10:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "1906:20:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3285,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1928:6:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3286,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MUL_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 381,
                              "src": "1928:19:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3275,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1897:8:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3287,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1897:51:11",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3288,
                        "nodeType": "ExpressionStatement",
                        "src": "1897:51:11"
                      },
                      {
                        "expression": {
                          "id": 3289,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3270,
                          "src": "1965:1:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3268,
                        "id": 3290,
                        "nodeType": "Return",
                        "src": "1958:8:11"
                      }
                    ]
                  },
                  "id": 3292,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "mul",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3265,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3262,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3292,
                        "src": "1806:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3261,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1806:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3264,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3292,
                        "src": "1817:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3263,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1817:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1805:22:11"
                  },
                  "returnParameters": {
                    "id": 3268,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3267,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3292,
                        "src": "1851:7:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3266,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1851:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1850:9:11"
                  },
                  "scope": 3350,
                  "src": "1793:180:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3313,
                    "nodeType": "Block",
                    "src": "2050:77:11",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 3304,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 3302,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3296,
                                "src": "2069:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 3303,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2074:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "2069:6:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3305,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2077:6:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3306,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ZERO_DIVISION",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 384,
                              "src": "2077:20:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3301,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2060:8:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3307,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2060:38:11",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3308,
                        "nodeType": "ExpressionStatement",
                        "src": "2060:38:11"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3311,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3309,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3294,
                            "src": "2115:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 3310,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3296,
                            "src": "2119:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2115:5:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3300,
                        "id": 3312,
                        "nodeType": "Return",
                        "src": "2108:12:11"
                      }
                    ]
                  },
                  "id": 3314,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "divDown",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3297,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3294,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3314,
                        "src": "1996:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3293,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1996:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3296,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3314,
                        "src": "2007:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3295,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2007:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1995:22:11"
                  },
                  "returnParameters": {
                    "id": 3300,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3299,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3314,
                        "src": "2041:7:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3298,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2041:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2040:9:11"
                  },
                  "scope": 3350,
                  "src": "1979:148:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3348,
                    "nodeType": "Block",
                    "src": "2202:163:11",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 3326,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 3324,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3318,
                                "src": "2221:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 3325,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2226:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "2221:6:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3327,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2229:6:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3328,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ZERO_DIVISION",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 384,
                              "src": "2229:20:11",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3323,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2212:8:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3329,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2212:38:11",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3330,
                        "nodeType": "ExpressionStatement",
                        "src": "2212:38:11"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3333,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3331,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3316,
                            "src": "2265:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 3332,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2270:1:11",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2265:6:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 3346,
                          "nodeType": "Block",
                          "src": "2312:47:11",
                          "statements": [
                            {
                              "expression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 3344,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "hexValue": "31",
                                  "id": 3337,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2333:1:11",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 3343,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "id": 3340,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 3338,
                                          "name": "a",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 3316,
                                          "src": "2338:1:11",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "-",
                                        "rightExpression": {
                                          "hexValue": "31",
                                          "id": 3339,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "2342:1:11",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_rational_1_by_1",
                                            "typeString": "int_const 1"
                                          },
                                          "value": "1"
                                        },
                                        "src": "2338:5:11",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "id": 3341,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "2337:7:11",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "/",
                                  "rightExpression": {
                                    "id": 3342,
                                    "name": "b",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3318,
                                    "src": "2347:1:11",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "2337:11:11",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2333:15:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 3322,
                              "id": 3345,
                              "nodeType": "Return",
                              "src": "2326:22:11"
                            }
                          ]
                        },
                        "id": 3347,
                        "nodeType": "IfStatement",
                        "src": "2261:98:11",
                        "trueBody": {
                          "id": 3336,
                          "nodeType": "Block",
                          "src": "2273:33:11",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 3334,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2294:1:11",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 3322,
                              "id": 3335,
                              "nodeType": "Return",
                              "src": "2287:8:11"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 3349,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "divUp",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3319,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3316,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 3349,
                        "src": "2148:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3315,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2148:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3318,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 3349,
                        "src": "2159:9:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3317,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2159:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2147:22:11"
                  },
                  "returnParameters": {
                    "id": 3322,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3321,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3349,
                        "src": "2193:7:11",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3320,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2193:7:11",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2192:9:11"
                  },
                  "scope": 3350,
                  "src": "2133:232:11",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 3351,
              "src": "238:2129:11"
            }
          ],
          "src": "33:2335:11"
        },
        "id": 11
      },
      "src.sol/amm/lib/openzeppelin/AccessControl.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/AccessControl.sol",
          "exportedSymbols": {
            "AccessControl": [
              3630
            ]
          },
          "id": 3631,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 3352,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:12"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 3353,
              "nodeType": "ImportDirective",
              "scope": 3631,
              "sourceUnit": 656,
              "src": "58:39:12",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/EnumerableSet.sol",
              "file": "./EnumerableSet.sol",
              "id": 3354,
              "nodeType": "ImportDirective",
              "scope": 3631,
              "sourceUnit": 5018,
              "src": "99:29:12",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "documentation": {
                "id": 3355,
                "nodeType": "StructuredDocumentation",
                "src": "130:1276:12",
                "text": " @dev Contract module that allows children to implement role-based access\n control mechanisms.\n Roles are referred to by their `bytes32` identifier. These should be exposed\n in the external API and be unique. The best way to achieve this is by\n using `public constant` hash digests:\n ```\n bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n ```\n Roles can be used to represent a set of permissions. To restrict access to a\n function call, use {hasRole}:\n ```\n function foo() public {\n     require(hasRole(MY_ROLE, msg.sender));\n     ...\n }\n ```\n Roles can be granted and revoked dynamically via the {grantRole} and\n {revokeRole} functions. Each role has an associated admin role, and only\n accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n that only accounts with this role will be able to grant or revoke other\n roles. More complex role relationships can be created by using\n {_setRoleAdmin}.\n WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n grant and revoke this role. Extra precautions should be taken to secure\n accounts that have been granted it."
              },
              "fullyImplemented": true,
              "id": 3630,
              "linearizedBaseContracts": [
                3630
              ],
              "name": "AccessControl",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 3358,
                  "libraryName": {
                    "id": 3356,
                    "name": "EnumerableSet",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5017,
                    "src": "1451:13:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_EnumerableSet_$5017",
                      "typeString": "library EnumerableSet"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1445:49:12",
                  "typeName": {
                    "id": 3357,
                    "name": "EnumerableSet.AddressSet",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4822,
                    "src": "1469:24:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                      "typeString": "struct EnumerableSet.AddressSet"
                    }
                  }
                },
                {
                  "canonicalName": "AccessControl.RoleData",
                  "id": 3363,
                  "members": [
                    {
                      "constant": false,
                      "id": 3360,
                      "mutability": "mutable",
                      "name": "members",
                      "nodeType": "VariableDeclaration",
                      "scope": 3363,
                      "src": "1526:32:12",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                        "typeString": "struct EnumerableSet.AddressSet"
                      },
                      "typeName": {
                        "id": 3359,
                        "name": "EnumerableSet.AddressSet",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 4822,
                        "src": "1526:24:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                          "typeString": "struct EnumerableSet.AddressSet"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 3362,
                      "mutability": "mutable",
                      "name": "adminRole",
                      "nodeType": "VariableDeclaration",
                      "scope": 3363,
                      "src": "1568:17:12",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 3361,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1568:7:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "RoleData",
                  "nodeType": "StructDefinition",
                  "scope": 3630,
                  "src": "1500:92:12",
                  "visibility": "public"
                },
                {
                  "constant": false,
                  "id": 3367,
                  "mutability": "mutable",
                  "name": "_roles",
                  "nodeType": "VariableDeclaration",
                  "scope": 3630,
                  "src": "1598:43:12",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                    "typeString": "mapping(bytes32 => struct AccessControl.RoleData)"
                  },
                  "typeName": {
                    "id": 3366,
                    "keyType": {
                      "id": 3364,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1606:7:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1598:28:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                      "typeString": "mapping(bytes32 => struct AccessControl.RoleData)"
                    },
                    "valueType": {
                      "id": 3365,
                      "name": "RoleData",
                      "nodeType": "UserDefinedTypeName",
                      "referencedDeclaration": 3363,
                      "src": "1617:8:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_RoleData_$3363_storage_ptr",
                        "typeString": "struct AccessControl.RoleData"
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "functionSelector": "a217fddf",
                  "id": 3370,
                  "mutability": "constant",
                  "name": "DEFAULT_ADMIN_ROLE",
                  "nodeType": "VariableDeclaration",
                  "scope": 3630,
                  "src": "1648:49:12",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3368,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1648:7:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": {
                    "hexValue": "30783030",
                    "id": 3369,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1693:4:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_0_by_1",
                      "typeString": "int_const 0"
                    },
                    "value": "0x00"
                  },
                  "visibility": "public"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 3371,
                    "nodeType": "StructuredDocumentation",
                    "src": "1704:292:12",
                    "text": " @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n {RoleAdminChanged} not being emitted signaling this.\n _Available since v3.1._"
                  },
                  "id": 3379,
                  "name": "RoleAdminChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 3378,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3373,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3379,
                        "src": "2024:20:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3372,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2024:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3375,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "previousAdminRole",
                        "nodeType": "VariableDeclaration",
                        "scope": 3379,
                        "src": "2046:33:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3374,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2046:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3377,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "newAdminRole",
                        "nodeType": "VariableDeclaration",
                        "scope": 3379,
                        "src": "2081:28:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3376,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2081:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2023:87:12"
                  },
                  "src": "2001:110:12"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 3380,
                    "nodeType": "StructuredDocumentation",
                    "src": "2117:198:12",
                    "text": " @dev Emitted when `account` is granted `role`.\n `sender` is the account that originated the contract call, an admin role\n bearer except when using {_setupRole}."
                  },
                  "id": 3388,
                  "name": "RoleGranted",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 3387,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3382,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3388,
                        "src": "2338:20:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3381,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2338:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3384,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3388,
                        "src": "2360:23:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3383,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2360:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3386,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 3388,
                        "src": "2385:22:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3385,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2385:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2337:71:12"
                  },
                  "src": "2320:89:12"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 3389,
                    "nodeType": "StructuredDocumentation",
                    "src": "2415:275:12",
                    "text": " @dev Emitted when `account` is revoked `role`.\n `sender` is the account that originated the contract call:\n   - if using `revokeRole`, it is the admin role bearer\n   - if using `renounceRole`, it is the role bearer (i.e. `account`)"
                  },
                  "id": 3397,
                  "name": "RoleRevoked",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 3396,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3391,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3397,
                        "src": "2713:20:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3390,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2713:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3393,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3397,
                        "src": "2735:23:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3392,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2735:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3395,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 3397,
                        "src": "2760:22:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3394,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2760:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2712:71:12"
                  },
                  "src": "2695:89:12"
                },
                {
                  "body": {
                    "id": 3415,
                    "nodeType": "Block",
                    "src": "2954:62:12",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 3412,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3402,
                              "src": "3001:7:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "expression": {
                                "baseExpression": {
                                  "id": 3407,
                                  "name": "_roles",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3367,
                                  "src": "2971:6:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                    "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                  }
                                },
                                "id": 3409,
                                "indexExpression": {
                                  "id": 3408,
                                  "name": "role",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3400,
                                  "src": "2978:4:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "2971:12:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                  "typeString": "struct AccessControl.RoleData storage ref"
                                }
                              },
                              "id": 3410,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "members",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3360,
                              "src": "2971:20:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                                "typeString": "struct EnumerableSet.AddressSet storage ref"
                              }
                            },
                            "id": 3411,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "contains",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4961,
                            "src": "2971:29:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                              "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) view returns (bool)"
                            }
                          },
                          "id": 3413,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2971:38:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 3406,
                        "id": 3414,
                        "nodeType": "Return",
                        "src": "2964:45:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3398,
                    "nodeType": "StructuredDocumentation",
                    "src": "2790:76:12",
                    "text": " @dev Returns `true` if `account` has been granted `role`."
                  },
                  "functionSelector": "91d14854",
                  "id": 3416,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "hasRole",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3403,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3400,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3416,
                        "src": "2888:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3399,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2888:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3402,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3416,
                        "src": "2902:15:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3401,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2902:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2887:31:12"
                  },
                  "returnParameters": {
                    "id": 3406,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3405,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3416,
                        "src": "2948:4:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 3404,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2948:4:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2947:6:12"
                  },
                  "scope": 3630,
                  "src": "2871:145:12",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3431,
                    "nodeType": "Block",
                    "src": "3256:53:12",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "expression": {
                                "baseExpression": {
                                  "id": 3424,
                                  "name": "_roles",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3367,
                                  "src": "3273:6:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                    "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                  }
                                },
                                "id": 3426,
                                "indexExpression": {
                                  "id": 3425,
                                  "name": "role",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3419,
                                  "src": "3280:4:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3273:12:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                  "typeString": "struct AccessControl.RoleData storage ref"
                                }
                              },
                              "id": 3427,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "members",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3360,
                              "src": "3273:20:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                                "typeString": "struct EnumerableSet.AddressSet storage ref"
                              }
                            },
                            "id": 3428,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4974,
                            "src": "3273:27:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                              "typeString": "function (struct EnumerableSet.AddressSet storage pointer) view returns (uint256)"
                            }
                          },
                          "id": 3429,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3273:29:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3423,
                        "id": 3430,
                        "nodeType": "Return",
                        "src": "3266:36:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3417,
                    "nodeType": "StructuredDocumentation",
                    "src": "3022:157:12",
                    "text": " @dev Returns the number of accounts that have `role`. Can be used\n together with {getRoleMember} to enumerate all bearers of a role."
                  },
                  "functionSelector": "ca15c873",
                  "id": 3432,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getRoleMemberCount",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3420,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3419,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3432,
                        "src": "3212:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3418,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3212:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3211:14:12"
                  },
                  "returnParameters": {
                    "id": 3423,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3422,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3432,
                        "src": "3247:7:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3421,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3247:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3246:9:12"
                  },
                  "scope": 3630,
                  "src": "3184:125:12",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3450,
                    "nodeType": "Block",
                    "src": "3976:54:12",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 3447,
                              "name": "index",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3437,
                              "src": "4017:5:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "expression": {
                                "baseExpression": {
                                  "id": 3442,
                                  "name": "_roles",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3367,
                                  "src": "3993:6:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                    "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                  }
                                },
                                "id": 3444,
                                "indexExpression": {
                                  "id": 3443,
                                  "name": "role",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3435,
                                  "src": "4000:4:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3993:12:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                  "typeString": "struct AccessControl.RoleData storage ref"
                                }
                              },
                              "id": 3445,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "members",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3360,
                              "src": "3993:20:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                                "typeString": "struct EnumerableSet.AddressSet storage ref"
                              }
                            },
                            "id": 3446,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "at",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 5000,
                            "src": "3993:23:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                              "typeString": "function (struct EnumerableSet.AddressSet storage pointer,uint256) view returns (address)"
                            }
                          },
                          "id": 3448,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3993:30:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 3441,
                        "id": 3449,
                        "nodeType": "Return",
                        "src": "3986:37:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3433,
                    "nodeType": "StructuredDocumentation",
                    "src": "3315:574:12",
                    "text": " @dev Returns one of the accounts that have `role`. `index` must be a\n value between 0 and {getRoleMemberCount}, non-inclusive.\n Role bearers are not sorted in any particular way, and their ordering may\n change at any point.\n WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n you perform all queries on the same block. See the following\n https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n for more information."
                  },
                  "functionSelector": "9010d07c",
                  "id": 3451,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getRoleMember",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3438,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3435,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3451,
                        "src": "3917:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3434,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3917:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3437,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 3451,
                        "src": "3931:13:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3436,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3931:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3916:29:12"
                  },
                  "returnParameters": {
                    "id": 3441,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3440,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3451,
                        "src": "3967:7:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3439,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3967:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3966:9:12"
                  },
                  "scope": 3630,
                  "src": "3894:136:12",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3464,
                    "nodeType": "Block",
                    "src": "4277:46:12",
                    "statements": [
                      {
                        "expression": {
                          "expression": {
                            "baseExpression": {
                              "id": 3459,
                              "name": "_roles",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3367,
                              "src": "4294:6:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                              }
                            },
                            "id": 3461,
                            "indexExpression": {
                              "id": 3460,
                              "name": "role",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3454,
                              "src": "4301:4:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "4294:12:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                              "typeString": "struct AccessControl.RoleData storage ref"
                            }
                          },
                          "id": 3462,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "adminRole",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3362,
                          "src": "4294:22:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 3458,
                        "id": 3463,
                        "nodeType": "Return",
                        "src": "4287:29:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3452,
                    "nodeType": "StructuredDocumentation",
                    "src": "4036:170:12",
                    "text": " @dev Returns the admin role that controls `role`. See {grantRole} and\n {revokeRole}.\n To change a role's admin, use {_setRoleAdmin}."
                  },
                  "functionSelector": "248a9ca3",
                  "id": 3465,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getRoleAdmin",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3455,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3454,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3465,
                        "src": "4233:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3453,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4233:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4232:14:12"
                  },
                  "returnParameters": {
                    "id": 3458,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3457,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3465,
                        "src": "4268:7:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3456,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4268:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4267:9:12"
                  },
                  "scope": 3630,
                  "src": "4211:112:12",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3491,
                    "nodeType": "Block",
                    "src": "4638:137:12",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "baseExpression": {
                                      "id": 3475,
                                      "name": "_roles",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3367,
                                      "src": "4665:6:12",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                        "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                      }
                                    },
                                    "id": 3477,
                                    "indexExpression": {
                                      "id": 3476,
                                      "name": "role",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3468,
                                      "src": "4672:4:12",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "4665:12:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                      "typeString": "struct AccessControl.RoleData storage ref"
                                    }
                                  },
                                  "id": 3478,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "adminRole",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3362,
                                  "src": "4665:22:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 3479,
                                    "name": "msg",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -15,
                                    "src": "4689:3:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_message",
                                      "typeString": "msg"
                                    }
                                  },
                                  "id": 3480,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "src": "4689:10:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                ],
                                "id": 3474,
                                "name": "hasRole",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3416,
                                "src": "4657:7:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$",
                                  "typeString": "function (bytes32,address) view returns (bool)"
                                }
                              },
                              "id": 3481,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4657:43:12",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3482,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4702:6:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3483,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "GRANT_SENDER_NOT_ADMIN",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 549,
                              "src": "4702:29:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3473,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4648:8:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3484,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4648:84:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3485,
                        "nodeType": "ExpressionStatement",
                        "src": "4648:84:12"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 3487,
                              "name": "role",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3468,
                              "src": "4754:4:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 3488,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3470,
                              "src": "4760:7:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 3486,
                            "name": "_grantRole",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3605,
                            "src": "4743:10:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                              "typeString": "function (bytes32,address)"
                            }
                          },
                          "id": 3489,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4743:25:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3490,
                        "nodeType": "ExpressionStatement",
                        "src": "4743:25:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3466,
                    "nodeType": "StructuredDocumentation",
                    "src": "4329:239:12",
                    "text": " @dev Grants `role` to `account`.\n If `account` had not been already granted `role`, emits a {RoleGranted}\n event.\n Requirements:\n - the caller must have ``role``'s admin role."
                  },
                  "functionSelector": "2f2ff15d",
                  "id": 3492,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "grantRole",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3471,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3468,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3492,
                        "src": "4592:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3467,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4592:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3470,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3492,
                        "src": "4606:15:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3469,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4606:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4591:31:12"
                  },
                  "returnParameters": {
                    "id": 3472,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4638:0:12"
                  },
                  "scope": 3630,
                  "src": "4573:202:12",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3518,
                    "nodeType": "Block",
                    "src": "5083:139:12",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "baseExpression": {
                                      "id": 3502,
                                      "name": "_roles",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3367,
                                      "src": "5110:6:12",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                        "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                      }
                                    },
                                    "id": 3504,
                                    "indexExpression": {
                                      "id": 3503,
                                      "name": "role",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3495,
                                      "src": "5117:4:12",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "5110:12:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                      "typeString": "struct AccessControl.RoleData storage ref"
                                    }
                                  },
                                  "id": 3505,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "adminRole",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3362,
                                  "src": "5110:22:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 3506,
                                    "name": "msg",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -15,
                                    "src": "5134:3:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_message",
                                      "typeString": "msg"
                                    }
                                  },
                                  "id": 3507,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "src": "5134:10:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                ],
                                "id": 3501,
                                "name": "hasRole",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3416,
                                "src": "5102:7:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$",
                                  "typeString": "function (bytes32,address) view returns (bool)"
                                }
                              },
                              "id": 3508,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5102:43:12",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3509,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5147:6:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3510,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "REVOKE_SENDER_NOT_ADMIN",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 552,
                              "src": "5147:30:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3500,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5093:8:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3511,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5093:85:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3512,
                        "nodeType": "ExpressionStatement",
                        "src": "5093:85:12"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 3514,
                              "name": "role",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3495,
                              "src": "5201:4:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 3515,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3497,
                              "src": "5207:7:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 3513,
                            "name": "_revokeRole",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3629,
                            "src": "5189:11:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                              "typeString": "function (bytes32,address)"
                            }
                          },
                          "id": 3516,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5189:26:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3517,
                        "nodeType": "ExpressionStatement",
                        "src": "5189:26:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3493,
                    "nodeType": "StructuredDocumentation",
                    "src": "4781:231:12",
                    "text": " @dev Revokes `role` from `account`.\n If `account` had already been granted `role`, emits a {RoleRevoked} event.\n Requirements:\n - the caller must have ``role``'s admin role."
                  },
                  "functionSelector": "d547741f",
                  "id": 3519,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "revokeRole",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3498,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3495,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3519,
                        "src": "5037:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3494,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5037:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3497,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3519,
                        "src": "5051:15:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3496,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5051:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5036:31:12"
                  },
                  "returnParameters": {
                    "id": 3499,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5083:0:12"
                  },
                  "scope": 3630,
                  "src": "5017:205:12",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3541,
                    "nodeType": "Block",
                    "src": "5781:121:12",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 3531,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 3528,
                                "name": "account",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3524,
                                "src": "5800:7:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "expression": {
                                  "id": 3529,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -15,
                                  "src": "5811:3:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 3530,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "5811:10:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "5800:21:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3532,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5823:6:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3533,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "RENOUNCE_SENDER_NOT_ALLOWED",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 555,
                              "src": "5823:34:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3527,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5791:8:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3534,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5791:67:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3535,
                        "nodeType": "ExpressionStatement",
                        "src": "5791:67:12"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 3537,
                              "name": "role",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3522,
                              "src": "5881:4:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 3538,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3524,
                              "src": "5887:7:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 3536,
                            "name": "_revokeRole",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3629,
                            "src": "5869:11:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                              "typeString": "function (bytes32,address)"
                            }
                          },
                          "id": 3539,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5869:26:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3540,
                        "nodeType": "ExpressionStatement",
                        "src": "5869:26:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3520,
                    "nodeType": "StructuredDocumentation",
                    "src": "5228:480:12",
                    "text": " @dev Revokes `role` from the calling account.\n Roles are often managed via {grantRole} and {revokeRole}: this function's\n purpose is to provide a mechanism for accounts to lose their privileges\n if they are compromised (such as when a trusted device is misplaced).\n If the calling account had been granted `role`, emits a {RoleRevoked}\n event.\n Requirements:\n - the caller must be `account`."
                  },
                  "functionSelector": "36568abe",
                  "id": 3542,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "renounceRole",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3525,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3522,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3542,
                        "src": "5735:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3521,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5735:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3524,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3542,
                        "src": "5749:15:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3523,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5749:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5734:31:12"
                  },
                  "returnParameters": {
                    "id": 3526,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5781:0:12"
                  },
                  "scope": 3630,
                  "src": "5713:189:12",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3555,
                    "nodeType": "Block",
                    "src": "6535:42:12",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 3551,
                              "name": "role",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3545,
                              "src": "6556:4:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 3552,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3547,
                              "src": "6562:7:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 3550,
                            "name": "_grantRole",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3605,
                            "src": "6545:10:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                              "typeString": "function (bytes32,address)"
                            }
                          },
                          "id": 3553,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6545:25:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3554,
                        "nodeType": "ExpressionStatement",
                        "src": "6545:25:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3543,
                    "nodeType": "StructuredDocumentation",
                    "src": "5908:554:12",
                    "text": " @dev Grants `role` to `account`.\n If `account` had not been already granted `role`, emits a {RoleGranted}\n event. Note that unlike {grantRole}, this function doesn't perform any\n checks on the calling account.\n [WARNING]\n ====\n This function should only be called from the constructor when setting\n up the initial roles for the system.\n Using this function in any other way is effectively circumventing the admin\n system imposed by {AccessControl}.\n ===="
                  },
                  "id": 3556,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setupRole",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3548,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3545,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3556,
                        "src": "6487:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3544,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6487:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3547,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3556,
                        "src": "6501:15:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3546,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6501:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6486:31:12"
                  },
                  "returnParameters": {
                    "id": 3549,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6535:0:12"
                  },
                  "scope": 3630,
                  "src": "6467:110:12",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3580,
                    "nodeType": "Block",
                    "src": "6775:123:12",
                    "statements": [
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 3565,
                              "name": "role",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3559,
                              "src": "6807:4:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "expression": {
                                "baseExpression": {
                                  "id": 3566,
                                  "name": "_roles",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3367,
                                  "src": "6813:6:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                    "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                  }
                                },
                                "id": 3568,
                                "indexExpression": {
                                  "id": 3567,
                                  "name": "role",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3559,
                                  "src": "6820:4:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "6813:12:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                  "typeString": "struct AccessControl.RoleData storage ref"
                                }
                              },
                              "id": 3569,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "adminRole",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3362,
                              "src": "6813:22:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 3570,
                              "name": "adminRole",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3561,
                              "src": "6837:9:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 3564,
                            "name": "RoleAdminChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3379,
                            "src": "6790:16:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_bytes32_$_t_bytes32_$returns$__$",
                              "typeString": "function (bytes32,bytes32,bytes32)"
                            }
                          },
                          "id": 3571,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6790:57:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3572,
                        "nodeType": "EmitStatement",
                        "src": "6785:62:12"
                      },
                      {
                        "expression": {
                          "id": 3578,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "baseExpression": {
                                "id": 3573,
                                "name": "_roles",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3367,
                                "src": "6857:6:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                  "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                }
                              },
                              "id": 3575,
                              "indexExpression": {
                                "id": 3574,
                                "name": "role",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3559,
                                "src": "6864:4:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6857:12:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                "typeString": "struct AccessControl.RoleData storage ref"
                              }
                            },
                            "id": 3576,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "adminRole",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3362,
                            "src": "6857:22:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 3577,
                            "name": "adminRole",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3561,
                            "src": "6882:9:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "6857:34:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 3579,
                        "nodeType": "ExpressionStatement",
                        "src": "6857:34:12"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3557,
                    "nodeType": "StructuredDocumentation",
                    "src": "6583:114:12",
                    "text": " @dev Sets `adminRole` as ``role``'s admin role.\n Emits a {RoleAdminChanged} event."
                  },
                  "id": 3581,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setRoleAdmin",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3562,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3559,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3581,
                        "src": "6725:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3558,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6725:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3561,
                        "mutability": "mutable",
                        "name": "adminRole",
                        "nodeType": "VariableDeclaration",
                        "scope": 3581,
                        "src": "6739:17:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3560,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6739:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6724:33:12"
                  },
                  "returnParameters": {
                    "id": 3563,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6775:0:12"
                  },
                  "scope": 3630,
                  "src": "6702:196:12",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3604,
                    "nodeType": "Block",
                    "src": "6963:123:12",
                    "statements": [
                      {
                        "condition": {
                          "arguments": [
                            {
                              "id": 3593,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3585,
                              "src": "7002:7:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "expression": {
                                "baseExpression": {
                                  "id": 3588,
                                  "name": "_roles",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3367,
                                  "src": "6977:6:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                    "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                  }
                                },
                                "id": 3590,
                                "indexExpression": {
                                  "id": 3589,
                                  "name": "role",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3583,
                                  "src": "6984:4:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "6977:12:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                  "typeString": "struct AccessControl.RoleData storage ref"
                                }
                              },
                              "id": 3591,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "members",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3360,
                              "src": "6977:20:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                                "typeString": "struct EnumerableSet.AddressSet storage ref"
                              }
                            },
                            "id": 3592,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4863,
                            "src": "6977:24:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$4822_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                              "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) returns (bool)"
                            }
                          },
                          "id": 3594,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6977:33:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 3603,
                        "nodeType": "IfStatement",
                        "src": "6973:107:12",
                        "trueBody": {
                          "id": 3602,
                          "nodeType": "Block",
                          "src": "7012:68:12",
                          "statements": [
                            {
                              "eventCall": {
                                "arguments": [
                                  {
                                    "id": 3596,
                                    "name": "role",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3583,
                                    "src": "7043:4:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 3597,
                                    "name": "account",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3585,
                                    "src": "7049:7:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 3598,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "7058:3:12",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 3599,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "7058:10:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  ],
                                  "id": 3595,
                                  "name": "RoleGranted",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3388,
                                  "src": "7031:11:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_address_$returns$__$",
                                    "typeString": "function (bytes32,address,address)"
                                  }
                                },
                                "id": 3600,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7031:38:12",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 3601,
                              "nodeType": "EmitStatement",
                              "src": "7026:43:12"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 3605,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_grantRole",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3586,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3583,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3605,
                        "src": "6924:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3582,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6924:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3585,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3605,
                        "src": "6938:15:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3584,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6938:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6923:31:12"
                  },
                  "returnParameters": {
                    "id": 3587,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6963:0:12"
                  },
                  "scope": 3630,
                  "src": "6904:182:12",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 3628,
                    "nodeType": "Block",
                    "src": "7152:126:12",
                    "statements": [
                      {
                        "condition": {
                          "arguments": [
                            {
                              "id": 3617,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3609,
                              "src": "7194:7:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "expression": {
                                "baseExpression": {
                                  "id": 3612,
                                  "name": "_roles",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3367,
                                  "src": "7166:6:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RoleData_$3363_storage_$",
                                    "typeString": "mapping(bytes32 => struct AccessControl.RoleData storage ref)"
                                  }
                                },
                                "id": 3614,
                                "indexExpression": {
                                  "id": 3613,
                                  "name": "role",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3607,
                                  "src": "7173:4:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "7166:12:12",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_RoleData_$3363_storage",
                                  "typeString": "struct AccessControl.RoleData storage ref"
                                }
                              },
                              "id": 3615,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "members",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3360,
                              "src": "7166:20:12",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                                "typeString": "struct EnumerableSet.AddressSet storage ref"
                              }
                            },
                            "id": 3616,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "remove",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4943,
                            "src": "7166:27:12",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$4822_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                              "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) returns (bool)"
                            }
                          },
                          "id": 3618,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7166:36:12",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 3627,
                        "nodeType": "IfStatement",
                        "src": "7162:110:12",
                        "trueBody": {
                          "id": 3626,
                          "nodeType": "Block",
                          "src": "7204:68:12",
                          "statements": [
                            {
                              "eventCall": {
                                "arguments": [
                                  {
                                    "id": 3620,
                                    "name": "role",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3607,
                                    "src": "7235:4:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 3621,
                                    "name": "account",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3609,
                                    "src": "7241:7:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 3622,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "7250:3:12",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 3623,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "7250:10:12",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  ],
                                  "id": 3619,
                                  "name": "RoleRevoked",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3397,
                                  "src": "7223:11:12",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_address_$returns$__$",
                                    "typeString": "function (bytes32,address,address)"
                                  }
                                },
                                "id": 3624,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7223:38:12",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 3625,
                              "nodeType": "EmitStatement",
                              "src": "7218:43:12"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 3629,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_revokeRole",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3610,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3607,
                        "mutability": "mutable",
                        "name": "role",
                        "nodeType": "VariableDeclaration",
                        "scope": 3629,
                        "src": "7113:12:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3606,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7113:7:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3609,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3629,
                        "src": "7127:15:12",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3608,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "7127:7:12",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7112:31:12"
                  },
                  "returnParameters": {
                    "id": 3611,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7152:0:12"
                  },
                  "scope": 3630,
                  "src": "7092:186:12",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 3631,
              "src": "1407:5873:12"
            }
          ],
          "src": "33:7248:12"
        },
        "id": 12
      },
      "src.sol/amm/lib/openzeppelin/Address.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/Address.sol",
          "exportedSymbols": {
            "Address": [
              3688
            ]
          },
          "id": 3689,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 3632,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:13"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 3633,
              "nodeType": "ImportDirective",
              "scope": 3689,
              "sourceUnit": 656,
              "src": "58:39:13",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 3634,
                "nodeType": "StructuredDocumentation",
                "src": "99:67:13",
                "text": " @dev Collection of functions related to the address type"
              },
              "fullyImplemented": true,
              "id": 3688,
              "linearizedBaseContracts": [
                3688
              ],
              "name": "Address",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 3650,
                    "nodeType": "Block",
                    "src": "825:367:13",
                    "statements": [
                      {
                        "assignments": [
                          3643
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3643,
                            "mutability": "mutable",
                            "name": "size",
                            "nodeType": "VariableDeclaration",
                            "scope": 3650,
                            "src": "1022:12:13",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 3642,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1022:7:13",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3644,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1022:12:13"
                      },
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "1109:52:13",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "1123:28:13",
                              "value": {
                                "arguments": [
                                  {
                                    "name": "account",
                                    "nodeType": "YulIdentifier",
                                    "src": "1143:7:13"
                                  }
                                ],
                                "functionName": {
                                  "name": "extcodesize",
                                  "nodeType": "YulIdentifier",
                                  "src": "1131:11:13"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "1131:20:13"
                              },
                              "variableNames": [
                                {
                                  "name": "size",
                                  "nodeType": "YulIdentifier",
                                  "src": "1123:4:13"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 3637,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1143:7:13",
                            "valueSize": 1
                          },
                          {
                            "declaration": 3643,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1123:4:13",
                            "valueSize": 1
                          }
                        ],
                        "id": 3645,
                        "nodeType": "InlineAssembly",
                        "src": "1100:61:13"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3648,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 3646,
                            "name": "size",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3643,
                            "src": "1177:4:13",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 3647,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1184:1:13",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "1177:8:13",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 3641,
                        "id": 3649,
                        "nodeType": "Return",
                        "src": "1170:15:13"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3635,
                    "nodeType": "StructuredDocumentation",
                    "src": "189:565:13",
                    "text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n  - an externally-owned account\n  - a contract in construction\n  - an address where a contract will be created\n  - an address where a contract lived, but was destroyed\n ===="
                  },
                  "id": 3651,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "isContract",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3638,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3637,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3651,
                        "src": "779:15:13",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3636,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "779:7:13",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "778:17:13"
                  },
                  "returnParameters": {
                    "id": 3641,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3640,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3651,
                        "src": "819:4:13",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 3639,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "819:4:13",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "818:6:13"
                  },
                  "scope": 3688,
                  "src": "759:433:13",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3686,
                    "nodeType": "Block",
                    "src": "2180:298:13",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 3666,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 3662,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -28,
                                      "src": "2207:4:13",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_Address_$3688",
                                        "typeString": "library Address"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_Address_$3688",
                                        "typeString": "library Address"
                                      }
                                    ],
                                    "id": 3661,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2199:7:13",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": {
                                      "id": 3660,
                                      "name": "address",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2199:7:13",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 3663,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2199:13:13",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "id": 3664,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "balance",
                                "nodeType": "MemberAccess",
                                "src": "2199:21:13",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 3665,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3656,
                                "src": "2224:6:13",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "2199:31:13",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3667,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2232:6:13",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3668,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ADDRESS_INSUFFICIENT_BALANCE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 540,
                              "src": "2232:35:13",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3659,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2190:8:13",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3669,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2190:78:13",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3670,
                        "nodeType": "ExpressionStatement",
                        "src": "2190:78:13"
                      },
                      {
                        "assignments": [
                          3672,
                          null
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3672,
                            "mutability": "mutable",
                            "name": "success",
                            "nodeType": "VariableDeclaration",
                            "scope": 3686,
                            "src": "2357:12:13",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 3671,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "2357:4:13",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "visibility": "internal"
                          },
                          null
                        ],
                        "id": 3679,
                        "initialValue": {
                          "arguments": [
                            {
                              "hexValue": "",
                              "id": 3677,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2407:2:13",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                "typeString": "literal_string \"\""
                              },
                              "value": ""
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                "typeString": "literal_string \"\""
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                  "typeString": "literal_string \"\""
                                }
                              ],
                              "expression": {
                                "id": 3673,
                                "name": "recipient",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3654,
                                "src": "2375:9:13",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "id": 3674,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "call",
                              "nodeType": "MemberAccess",
                              "src": "2375:14:13",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                                "typeString": "function (bytes memory) payable returns (bool,bytes memory)"
                              }
                            },
                            "id": 3676,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "names": [
                              "value"
                            ],
                            "nodeType": "FunctionCallOptions",
                            "options": [
                              {
                                "id": 3675,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3656,
                                "src": "2398:6:13",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "src": "2375:31:13",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value",
                              "typeString": "function (bytes memory) payable returns (bool,bytes memory)"
                            }
                          },
                          "id": 3678,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2375:35:13",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                            "typeString": "tuple(bool,bytes memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2356:54:13"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 3681,
                              "name": "success",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3672,
                              "src": "2429:7:13",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 3682,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2438:6:13",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 3683,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ADDRESS_CANNOT_SEND_VALUE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 543,
                              "src": "2438:32:13",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3680,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2420:8:13",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 3684,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2420:51:13",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3685,
                        "nodeType": "ExpressionStatement",
                        "src": "2420:51:13"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3652,
                    "nodeType": "StructuredDocumentation",
                    "src": "1198:906:13",
                    "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]."
                  },
                  "id": 3687,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "sendValue",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3657,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3654,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 3687,
                        "src": "2128:25:13",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 3653,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2128:15:13",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3656,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 3687,
                        "src": "2155:14:13",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3655,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2155:7:13",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2127:43:13"
                  },
                  "returnParameters": {
                    "id": 3658,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2180:0:13"
                  },
                  "scope": 3688,
                  "src": "2109:369:13",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 3689,
              "src": "167:2313:13"
            }
          ],
          "src": "33:2448:13"
        },
        "id": 13
      },
      "src.sol/amm/lib/openzeppelin/Create2.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/Create2.sol",
          "exportedSymbols": {
            "Create2": [
              3797
            ]
          },
          "id": 3798,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 3690,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:14"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 3691,
              "nodeType": "ImportDirective",
              "scope": 3798,
              "sourceUnit": 656,
              "src": "58:39:14",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 3692,
                "nodeType": "StructuredDocumentation",
                "src": "99:367:14",
                "text": " @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n `CREATE2` can be used to compute in advance the address where a smart\n contract will be deployed, which allows for interesting new mechanisms known\n as 'counterfactual interactions'.\n See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n information."
              },
              "fullyImplemented": true,
              "id": 3797,
              "linearizedBaseContracts": [
                3797
              ],
              "name": "Create2",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 3739,
                    "nodeType": "Block",
                    "src": "1150:423:14",
                    "statements": [
                      {
                        "assignments": [
                          3705
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3705,
                            "mutability": "mutable",
                            "name": "addr",
                            "nodeType": "VariableDeclaration",
                            "scope": 3739,
                            "src": "1160:12:14",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 3704,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1160:7:14",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3706,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1160:12:14"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 3714,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 3710,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -28,
                                      "src": "1198:4:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_Create2_$3797",
                                        "typeString": "library Create2"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_Create2_$3797",
                                        "typeString": "library Create2"
                                      }
                                    ],
                                    "id": 3709,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1190:7:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": {
                                      "id": 3708,
                                      "name": "address",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "1190:7:14",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 3711,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "1190:13:14",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "id": 3712,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "balance",
                                "nodeType": "MemberAccess",
                                "src": "1190:21:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 3713,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3695,
                                "src": "1215:6:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1190:31:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "435245415445325f494e53554646494349454e545f42414c414e4345",
                              "id": 3715,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1223:30:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_2aeee4534c5f10d1783514f399421362ae3c6ef4687e81ecfd3e4ee82e81307f",
                                "typeString": "literal_string \"CREATE2_INSUFFICIENT_BALANCE\""
                              },
                              "value": "CREATE2_INSUFFICIENT_BALANCE"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_2aeee4534c5f10d1783514f399421362ae3c6ef4687e81ecfd3e4ee82e81307f",
                                "typeString": "literal_string \"CREATE2_INSUFFICIENT_BALANCE\""
                              }
                            ],
                            "id": 3707,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "1182:7:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 3716,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1182:72:14",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3717,
                        "nodeType": "ExpressionStatement",
                        "src": "1182:72:14"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 3722,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 3719,
                                  "name": "bytecode",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3699,
                                  "src": "1272:8:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "id": 3720,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "1272:15:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 3721,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "1291:1:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "1272:20:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "435245415445325f42595445434f44455f5a45524f",
                              "id": 3723,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1294:23:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_e1ba132d421c12698d650afa3deba12f9ef08eab57aae4d8c8332657faf108fc",
                                "typeString": "literal_string \"CREATE2_BYTECODE_ZERO\""
                              },
                              "value": "CREATE2_BYTECODE_ZERO"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_e1ba132d421c12698d650afa3deba12f9ef08eab57aae4d8c8332657faf108fc",
                                "typeString": "literal_string \"CREATE2_BYTECODE_ZERO\""
                              }
                            ],
                            "id": 3718,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "1264:7:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 3724,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1264:54:14",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3725,
                        "nodeType": "ExpressionStatement",
                        "src": "1264:54:14"
                      },
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "1393:91:14",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "1407:67:14",
                              "value": {
                                "arguments": [
                                  {
                                    "name": "amount",
                                    "nodeType": "YulIdentifier",
                                    "src": "1423:6:14"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "bytecode",
                                        "nodeType": "YulIdentifier",
                                        "src": "1435:8:14"
                                      },
                                      {
                                        "kind": "number",
                                        "nodeType": "YulLiteral",
                                        "src": "1445:4:14",
                                        "type": "",
                                        "value": "0x20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "1431:3:14"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "1431:19:14"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "bytecode",
                                        "nodeType": "YulIdentifier",
                                        "src": "1458:8:14"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "mload",
                                      "nodeType": "YulIdentifier",
                                      "src": "1452:5:14"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "1452:15:14"
                                  },
                                  {
                                    "name": "salt",
                                    "nodeType": "YulIdentifier",
                                    "src": "1469:4:14"
                                  }
                                ],
                                "functionName": {
                                  "name": "create2",
                                  "nodeType": "YulIdentifier",
                                  "src": "1415:7:14"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "1415:59:14"
                              },
                              "variableNames": [
                                {
                                  "name": "addr",
                                  "nodeType": "YulIdentifier",
                                  "src": "1407:4:14"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 3705,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1407:4:14",
                            "valueSize": 1
                          },
                          {
                            "declaration": 3695,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1423:6:14",
                            "valueSize": 1
                          },
                          {
                            "declaration": 3699,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1435:8:14",
                            "valueSize": 1
                          },
                          {
                            "declaration": 3699,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1458:8:14",
                            "valueSize": 1
                          },
                          {
                            "declaration": 3697,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1469:4:14",
                            "valueSize": 1
                          }
                        ],
                        "id": 3726,
                        "nodeType": "InlineAssembly",
                        "src": "1384:100:14"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 3733,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 3728,
                                "name": "addr",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3705,
                                "src": "1501:4:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 3731,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1517:1:14",
                                    "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": 3730,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "1509:7:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 3729,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "1509:7:14",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 3732,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1509:10:14",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "1501:18:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "435245415445325f4445504c4f595f4641494c4544",
                              "id": 3734,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1521:23:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_71db1c0de03fce50db004ce1a4abf214be4bf858ae9e7e5ea1d0b0cdaccd9d9f",
                                "typeString": "literal_string \"CREATE2_DEPLOY_FAILED\""
                              },
                              "value": "CREATE2_DEPLOY_FAILED"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_71db1c0de03fce50db004ce1a4abf214be4bf858ae9e7e5ea1d0b0cdaccd9d9f",
                                "typeString": "literal_string \"CREATE2_DEPLOY_FAILED\""
                              }
                            ],
                            "id": 3727,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "1493:7:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 3735,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1493:52:14",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3736,
                        "nodeType": "ExpressionStatement",
                        "src": "1493:52:14"
                      },
                      {
                        "expression": {
                          "id": 3737,
                          "name": "addr",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3705,
                          "src": "1562:4:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 3703,
                        "id": 3738,
                        "nodeType": "Return",
                        "src": "1555:11:14"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3693,
                    "nodeType": "StructuredDocumentation",
                    "src": "489:560:14",
                    "text": " @dev Deploys a contract using `CREATE2`. The address where the contract\n will be deployed can be known in advance via {computeAddress}.\n The bytecode for a contract can be obtained from Solidity with\n `type(contractName).creationCode`.\n Requirements:\n - `bytecode` must not be empty.\n - `salt` must have not been used for `bytecode` already.\n - the factory must have a balance of at least `amount`.\n - if `amount` is non-zero, `bytecode` must have a `payable` constructor."
                  },
                  "id": 3740,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "deploy",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3700,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3695,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 3740,
                        "src": "1070:14:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3694,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1070:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3697,
                        "mutability": "mutable",
                        "name": "salt",
                        "nodeType": "VariableDeclaration",
                        "scope": 3740,
                        "src": "1086:12:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3696,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1086:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3699,
                        "mutability": "mutable",
                        "name": "bytecode",
                        "nodeType": "VariableDeclaration",
                        "scope": 3740,
                        "src": "1100:21:14",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 3698,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1100:5:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1069:53:14"
                  },
                  "returnParameters": {
                    "id": 3703,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3702,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3740,
                        "src": "1141:7:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3701,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1141:7:14",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1140:9:14"
                  },
                  "scope": 3797,
                  "src": "1054:519:14",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3759,
                    "nodeType": "Block",
                    "src": "1869:73:14",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 3751,
                              "name": "salt",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3743,
                              "src": "1901:4:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 3752,
                              "name": "bytecodeHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3745,
                              "src": "1907:12:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 3755,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -28,
                                  "src": "1929:4:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Create2_$3797",
                                    "typeString": "library Create2"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Create2_$3797",
                                    "typeString": "library Create2"
                                  }
                                ],
                                "id": 3754,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1921:7:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 3753,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "1921:7:14",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 3756,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1921:13:14",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 3750,
                            "name": "computeAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              3760,
                              3796
                            ],
                            "referencedDeclaration": 3796,
                            "src": "1886:14:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$_t_address_$returns$_t_address_$",
                              "typeString": "function (bytes32,bytes32,address) pure returns (address)"
                            }
                          },
                          "id": 3757,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1886:49:14",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 3749,
                        "id": 3758,
                        "nodeType": "Return",
                        "src": "1879:56:14"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3741,
                    "nodeType": "StructuredDocumentation",
                    "src": "1579:193:14",
                    "text": " @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n `bytecodeHash` or `salt` will result in a new destination address."
                  },
                  "id": 3760,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "computeAddress",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3746,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3743,
                        "mutability": "mutable",
                        "name": "salt",
                        "nodeType": "VariableDeclaration",
                        "scope": 3760,
                        "src": "1801:12:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3742,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1801:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3745,
                        "mutability": "mutable",
                        "name": "bytecodeHash",
                        "nodeType": "VariableDeclaration",
                        "scope": 3760,
                        "src": "1815:20:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3744,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1815:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1800:36:14"
                  },
                  "returnParameters": {
                    "id": 3749,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3748,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3760,
                        "src": "1860:7:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3747,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1860:7:14",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1859:9:14"
                  },
                  "scope": 3797,
                  "src": "1777:165:14",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3795,
                    "nodeType": "Block",
                    "src": "2295:166:14",
                    "statements": [
                      {
                        "assignments": [
                          3773
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3773,
                            "mutability": "mutable",
                            "name": "_data",
                            "nodeType": "VariableDeclaration",
                            "scope": 3795,
                            "src": "2305:13:14",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 3772,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "2305:7:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 3786,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "hexValue": "30786666",
                                      "id": 3779,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "2368:4:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_255_by_1",
                                        "typeString": "int_const 255"
                                      },
                                      "value": "0xff"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_rational_255_by_1",
                                        "typeString": "int_const 255"
                                      }
                                    ],
                                    "id": 3778,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2361:6:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_bytes1_$",
                                      "typeString": "type(bytes1)"
                                    },
                                    "typeName": {
                                      "id": 3777,
                                      "name": "bytes1",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2361:6:14",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 3780,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2361:12:14",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes1",
                                    "typeString": "bytes1"
                                  }
                                },
                                {
                                  "id": 3781,
                                  "name": "deployer",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3767,
                                  "src": "2375:8:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 3782,
                                  "name": "salt",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3763,
                                  "src": "2385:4:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 3783,
                                  "name": "bytecodeHash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3765,
                                  "src": "2391:12:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes1",
                                    "typeString": "bytes1"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "expression": {
                                  "id": 3775,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "2344:3:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 3776,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encodePacked",
                                "nodeType": "MemberAccess",
                                "src": "2344:16:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 3784,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2344:60:14",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 3774,
                            "name": "keccak256",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -8,
                            "src": "2321:9:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 3785,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2321:93:14",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2305:109:14"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 3791,
                                  "name": "_data",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3773,
                                  "src": "2447:5:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 3790,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2439:7:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": {
                                  "id": 3789,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2439:7:14",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 3792,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2439:14:14",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3788,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "2431:7:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 3787,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "2431:7:14",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 3793,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2431:23:14",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "functionReturnParameters": 3771,
                        "id": 3794,
                        "nodeType": "Return",
                        "src": "2424:30:14"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3761,
                    "nodeType": "StructuredDocumentation",
                    "src": "1948:232:14",
                    "text": " @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}."
                  },
                  "id": 3796,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "computeAddress",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3768,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3763,
                        "mutability": "mutable",
                        "name": "salt",
                        "nodeType": "VariableDeclaration",
                        "scope": 3796,
                        "src": "2209:12:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3762,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2209:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3765,
                        "mutability": "mutable",
                        "name": "bytecodeHash",
                        "nodeType": "VariableDeclaration",
                        "scope": 3796,
                        "src": "2223:20:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3764,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2223:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3767,
                        "mutability": "mutable",
                        "name": "deployer",
                        "nodeType": "VariableDeclaration",
                        "scope": 3796,
                        "src": "2245:16:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3766,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2245:7:14",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2208:54:14"
                  },
                  "returnParameters": {
                    "id": 3771,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3770,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3796,
                        "src": "2286:7:14",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3769,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2286:7:14",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2285:9:14"
                  },
                  "scope": 3797,
                  "src": "2185:276:14",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 3798,
              "src": "467:1996:14"
            }
          ],
          "src": "33:2431:14"
        },
        "id": 14
      },
      "src.sol/amm/lib/openzeppelin/EIP712.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/EIP712.sol",
          "exportedSymbols": {
            "EIP712": [
              3890
            ]
          },
          "id": 3891,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 3799,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:15"
            },
            {
              "abstract": true,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "documentation": {
                "id": 3800,
                "nodeType": "StructuredDocumentation",
                "src": "58:1142:15",
                "text": " @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n they need in their contracts using a combination of `abi.encode` and `keccak256`.\n This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n ({_hashTypedDataV4}).\n The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n the chain id to protect against replay attacks on an eventual fork of the chain.\n NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n _Available since v3.4._"
              },
              "fullyImplemented": true,
              "id": 3890,
              "linearizedBaseContracts": [
                3890
              ],
              "name": "EIP712",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": false,
                  "id": 3802,
                  "mutability": "immutable",
                  "name": "_HASHED_NAME",
                  "nodeType": "VariableDeclaration",
                  "scope": 3890,
                  "src": "1277:38:15",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3801,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1277:7:15",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 3804,
                  "mutability": "immutable",
                  "name": "_HASHED_VERSION",
                  "nodeType": "VariableDeclaration",
                  "scope": 3890,
                  "src": "1321:41:15",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3803,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1321:7:15",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 3806,
                  "mutability": "immutable",
                  "name": "_TYPE_HASH",
                  "nodeType": "VariableDeclaration",
                  "scope": 3890,
                  "src": "1368:36:15",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 3805,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1368:7:15",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 3838,
                    "nodeType": "Block",
                    "src": "2075:225:15",
                    "statements": [
                      {
                        "expression": {
                          "id": 3821,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3814,
                            "name": "_HASHED_NAME",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3802,
                            "src": "2085:12:15",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "id": 3818,
                                    "name": "name",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3809,
                                    "src": "2116:4:15",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_string_memory_ptr",
                                      "typeString": "string memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_string_memory_ptr",
                                      "typeString": "string memory"
                                    }
                                  ],
                                  "id": 3817,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "2110:5:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
                                    "typeString": "type(bytes storage pointer)"
                                  },
                                  "typeName": {
                                    "id": 3816,
                                    "name": "bytes",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2110:5:15",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 3819,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2110:11:15",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              ],
                              "id": 3815,
                              "name": "keccak256",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -8,
                              "src": "2100:9:15",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                "typeString": "function (bytes memory) pure returns (bytes32)"
                              }
                            },
                            "id": 3820,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2100:22:15",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "2085:37:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 3822,
                        "nodeType": "ExpressionStatement",
                        "src": "2085:37:15"
                      },
                      {
                        "expression": {
                          "id": 3830,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3823,
                            "name": "_HASHED_VERSION",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3804,
                            "src": "2132:15:15",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "id": 3827,
                                    "name": "version",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3811,
                                    "src": "2166:7:15",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_string_memory_ptr",
                                      "typeString": "string memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_string_memory_ptr",
                                      "typeString": "string memory"
                                    }
                                  ],
                                  "id": 3826,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "2160:5:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
                                    "typeString": "type(bytes storage pointer)"
                                  },
                                  "typeName": {
                                    "id": 3825,
                                    "name": "bytes",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2160:5:15",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 3828,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2160:14:15",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              ],
                              "id": 3824,
                              "name": "keccak256",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -8,
                              "src": "2150:9:15",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                "typeString": "function (bytes memory) pure returns (bytes32)"
                              }
                            },
                            "id": 3829,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2150:25:15",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "2132:43:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 3831,
                        "nodeType": "ExpressionStatement",
                        "src": "2132:43:15"
                      },
                      {
                        "expression": {
                          "id": 3836,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3832,
                            "name": "_TYPE_HASH",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3806,
                            "src": "2185:10:15",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429",
                                "id": 3834,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "string",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2208:84:15",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f",
                                  "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\""
                                },
                                "value": "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f",
                                  "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\""
                                }
                              ],
                              "id": 3833,
                              "name": "keccak256",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -8,
                              "src": "2198:9:15",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                                "typeString": "function (bytes memory) pure returns (bytes32)"
                              }
                            },
                            "id": 3835,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2198:95:15",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "2185:108:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 3837,
                        "nodeType": "ExpressionStatement",
                        "src": "2185:108:15"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3807,
                    "nodeType": "StructuredDocumentation",
                    "src": "1456:559:15",
                    "text": " @dev Initializes the domain separator and parameter caches.\n The meaning of `name` and `version` is specified in\n https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n - `version`: the current major version of the signing domain.\n NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n contract upgrade]."
                  },
                  "id": 3839,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3812,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3809,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 3839,
                        "src": "2032:18:15",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 3808,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "2032:6:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3811,
                        "mutability": "mutable",
                        "name": "version",
                        "nodeType": "VariableDeclaration",
                        "scope": 3839,
                        "src": "2052:21:15",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 3810,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "2052:6:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2031:43:15"
                  },
                  "returnParameters": {
                    "id": 3813,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2075:0:15"
                  },
                  "scope": 3890,
                  "src": "2020:280:15",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3860,
                    "nodeType": "Block",
                    "src": "2456:118:15",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 3848,
                                  "name": "_TYPE_HASH",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3806,
                                  "src": "2494:10:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 3849,
                                  "name": "_HASHED_NAME",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3802,
                                  "src": "2506:12:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 3850,
                                  "name": "_HASHED_VERSION",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3804,
                                  "src": "2520:15:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 3851,
                                    "name": "_getChainId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3889,
                                    "src": "2537:11:15",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                      "typeString": "function () view returns (uint256)"
                                    }
                                  },
                                  "id": 3852,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2537:13:15",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "arguments": [
                                    {
                                      "id": 3855,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -28,
                                      "src": "2560:4:15",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_EIP712_$3890",
                                        "typeString": "contract EIP712"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_EIP712_$3890",
                                        "typeString": "contract EIP712"
                                      }
                                    ],
                                    "id": 3854,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2552:7:15",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": {
                                      "id": 3853,
                                      "name": "address",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2552:7:15",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 3856,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2552:13:15",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "expression": {
                                  "id": 3846,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "2483:3:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 3847,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encode",
                                "nodeType": "MemberAccess",
                                "src": "2483:10:15",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 3857,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2483:83:15",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 3845,
                            "name": "keccak256",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -8,
                            "src": "2473:9:15",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 3858,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2473:94:15",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 3844,
                        "id": 3859,
                        "nodeType": "Return",
                        "src": "2466:101:15"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3840,
                    "nodeType": "StructuredDocumentation",
                    "src": "2306:75:15",
                    "text": " @dev Returns the domain separator for the current chain."
                  },
                  "id": 3861,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_domainSeparatorV4",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3841,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2413:2:15"
                  },
                  "returnParameters": {
                    "id": 3844,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3843,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3861,
                        "src": "2447:7:15",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3842,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2447:7:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2446:9:15"
                  },
                  "scope": 3890,
                  "src": "2386:188:15",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3879,
                    "nodeType": "Block",
                    "src": "3285:97:15",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "hexValue": "1901",
                                  "id": 3872,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "string",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3329:10:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541",
                                    "typeString": "literal_string \"\u0019\u0001\""
                                  },
                                  "value": "\u0019\u0001"
                                },
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 3873,
                                    "name": "_domainSeparatorV4",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3861,
                                    "src": "3341:18:15",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$",
                                      "typeString": "function () view returns (bytes32)"
                                    }
                                  },
                                  "id": 3874,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3341:20:15",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 3875,
                                  "name": "structHash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3864,
                                  "src": "3363:10:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541",
                                    "typeString": "literal_string \"\u0019\u0001\""
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "expression": {
                                  "id": 3870,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "3312:3:15",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 3871,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encodePacked",
                                "nodeType": "MemberAccess",
                                "src": "3312:16:15",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 3876,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3312:62:15",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 3869,
                            "name": "keccak256",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -8,
                            "src": "3302:9:15",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 3877,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3302:73:15",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 3868,
                        "id": 3878,
                        "nodeType": "Return",
                        "src": "3295:80:15"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3862,
                    "nodeType": "StructuredDocumentation",
                    "src": "2580:614:15",
                    "text": " @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n function returns the hash of the fully encoded EIP712 message for this domain.\n This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n ```solidity\n bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     keccak256(\"Mail(address to,string contents)\"),\n     mailTo,\n     keccak256(bytes(mailContents))\n )));\n address signer = ECDSA.recover(digest, signature);\n ```"
                  },
                  "id": 3880,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_hashTypedDataV4",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3865,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3864,
                        "mutability": "mutable",
                        "name": "structHash",
                        "nodeType": "VariableDeclaration",
                        "scope": 3880,
                        "src": "3225:18:15",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3863,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3225:7:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3224:20:15"
                  },
                  "returnParameters": {
                    "id": 3868,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3867,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3880,
                        "src": "3276:7:15",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 3866,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3276:7:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3275:9:15"
                  },
                  "scope": 3890,
                  "src": "3199:183:15",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 3888,
                    "nodeType": "Block",
                    "src": "3450:365:15",
                    "statements": [
                      {
                        "expression": {
                          "id": 3885,
                          "name": "this",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -28,
                          "src": "3685:4:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_EIP712_$3890",
                            "typeString": "contract EIP712"
                          }
                        },
                        "id": 3886,
                        "nodeType": "ExpressionStatement",
                        "src": "3685:4:15"
                      },
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "3765:44:15",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "3779:20:15",
                              "value": {
                                "arguments": [],
                                "functionName": {
                                  "name": "chainid",
                                  "nodeType": "YulIdentifier",
                                  "src": "3790:7:15"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "3790:9:15"
                              },
                              "variableNames": [
                                {
                                  "name": "chainId",
                                  "nodeType": "YulIdentifier",
                                  "src": "3779:7:15"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 3883,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3779:7:15",
                            "valueSize": 1
                          }
                        ],
                        "id": 3887,
                        "nodeType": "InlineAssembly",
                        "src": "3756:53:15"
                      }
                    ]
                  },
                  "id": 3889,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getChainId",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3881,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3408:2:15"
                  },
                  "returnParameters": {
                    "id": 3884,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3883,
                        "mutability": "mutable",
                        "name": "chainId",
                        "nodeType": "VariableDeclaration",
                        "scope": 3889,
                        "src": "3433:15:15",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3882,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3433:7:15",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3432:17:15"
                  },
                  "scope": 3890,
                  "src": "3388:427:15",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 3891,
              "src": "1201:2616:15"
            }
          ],
          "src": "33:3785:15"
        },
        "id": 15
      },
      "src.sol/amm/lib/openzeppelin/ERC20.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/ERC20.sol",
          "exportedSymbols": {
            "ERC20": [
              4401
            ]
          },
          "id": 4402,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 3892,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:16"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 3893,
              "nodeType": "ImportDirective",
              "scope": 4402,
              "sourceUnit": 656,
              "src": "58:39:16",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "./IERC20.sol",
              "id": 3894,
              "nodeType": "ImportDirective",
              "scope": 4402,
              "sourceUnit": 5096,
              "src": "99:22:16",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeMath.sol",
              "file": "./SafeMath.sol",
              "id": 3895,
              "nodeType": "ImportDirective",
              "scope": 4402,
              "sourceUnit": 5390,
              "src": "122:24:16",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 3897,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "1329:6:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "id": 3898,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1329:6:16"
                }
              ],
              "contractDependencies": [
                5095
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 3896,
                "nodeType": "StructuredDocumentation",
                "src": "148:1162:16",
                "text": " @dev Implementation of the {IERC20} interface.\n This implementation is agnostic to the way tokens are created. This means\n that a supply mechanism has to be added in a derived contract using {_mint}.\n For a generic mechanism see {ERC20PresetMinterPauser}.\n TIP: For a detailed writeup see our guide\n https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n to implement supply mechanisms].\n We have followed general OpenZeppelin guidelines: functions revert instead\n of returning `false` on failure. This behavior is nonetheless conventional\n and does not conflict with the expectations of ERC20 applications.\n Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n This allows applications to reconstruct the allowance for all accounts just\n by listening to said events. Other implementations of the EIP may not emit\n these events, as it isn't required by the specification.\n Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n functions have been added to mitigate the well-known issues around setting\n allowances. See {IERC20-approve}."
              },
              "fullyImplemented": true,
              "id": 4401,
              "linearizedBaseContracts": [
                4401,
                5095
              ],
              "name": "ERC20",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 3901,
                  "libraryName": {
                    "id": 3899,
                    "name": "SafeMath",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5389,
                    "src": "1348:8:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeMath_$5389",
                      "typeString": "library SafeMath"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1342:27:16",
                  "typeName": {
                    "id": 3900,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1361:7:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 3905,
                  "mutability": "mutable",
                  "name": "_balances",
                  "nodeType": "VariableDeclaration",
                  "scope": 4401,
                  "src": "1375:45:16",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                    "typeString": "mapping(address => uint256)"
                  },
                  "typeName": {
                    "id": 3904,
                    "keyType": {
                      "id": 3902,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "1383:7:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1375:27:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                      "typeString": "mapping(address => uint256)"
                    },
                    "valueType": {
                      "id": 3903,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "1394:7:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 3911,
                  "mutability": "mutable",
                  "name": "_allowances",
                  "nodeType": "VariableDeclaration",
                  "scope": 4401,
                  "src": "1427:67:16",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                    "typeString": "mapping(address => mapping(address => uint256))"
                  },
                  "typeName": {
                    "id": 3910,
                    "keyType": {
                      "id": 3906,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "1435:7:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1427:47:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                      "typeString": "mapping(address => mapping(address => uint256))"
                    },
                    "valueType": {
                      "id": 3909,
                      "keyType": {
                        "id": 3907,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "1454:7:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "nodeType": "Mapping",
                      "src": "1446:27:16",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                        "typeString": "mapping(address => uint256)"
                      },
                      "valueType": {
                        "id": 3908,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1465:7:16",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 3913,
                  "mutability": "mutable",
                  "name": "_totalSupply",
                  "nodeType": "VariableDeclaration",
                  "scope": 4401,
                  "src": "1501:28:16",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3912,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1501:7:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 3915,
                  "mutability": "mutable",
                  "name": "_name",
                  "nodeType": "VariableDeclaration",
                  "scope": 4401,
                  "src": "1536:20:16",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_storage",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 3914,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1536:6:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 3917,
                  "mutability": "mutable",
                  "name": "_symbol",
                  "nodeType": "VariableDeclaration",
                  "scope": 4401,
                  "src": "1562:22:16",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_storage",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 3916,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1562:6:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 3919,
                  "mutability": "mutable",
                  "name": "_decimals",
                  "nodeType": "VariableDeclaration",
                  "scope": 4401,
                  "src": "1590:23:16",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 3918,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "1590:5:16",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 3939,
                    "nodeType": "Block",
                    "src": "1992:81:16",
                    "statements": [
                      {
                        "expression": {
                          "id": 3929,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3927,
                            "name": "_name",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3915,
                            "src": "2002:5:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_string_storage",
                              "typeString": "string storage ref"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 3928,
                            "name": "name_",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3922,
                            "src": "2010:5:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_string_memory_ptr",
                              "typeString": "string memory"
                            }
                          },
                          "src": "2002:13:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage",
                            "typeString": "string storage ref"
                          }
                        },
                        "id": 3930,
                        "nodeType": "ExpressionStatement",
                        "src": "2002:13:16"
                      },
                      {
                        "expression": {
                          "id": 3933,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3931,
                            "name": "_symbol",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3917,
                            "src": "2025:7:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_string_storage",
                              "typeString": "string storage ref"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 3932,
                            "name": "symbol_",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3924,
                            "src": "2035:7:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_string_memory_ptr",
                              "typeString": "string memory"
                            }
                          },
                          "src": "2025:17:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage",
                            "typeString": "string storage ref"
                          }
                        },
                        "id": 3934,
                        "nodeType": "ExpressionStatement",
                        "src": "2025:17:16"
                      },
                      {
                        "expression": {
                          "id": 3937,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 3935,
                            "name": "_decimals",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3919,
                            "src": "2052:9:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "hexValue": "3138",
                            "id": 3936,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2064:2:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_18_by_1",
                              "typeString": "int_const 18"
                            },
                            "value": "18"
                          },
                          "src": "2052:14:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 3938,
                        "nodeType": "ExpressionStatement",
                        "src": "2052:14:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3920,
                    "nodeType": "StructuredDocumentation",
                    "src": "1620:311:16",
                    "text": " @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n a default value of 18.\n To select a different value for {decimals}, use {_setupDecimals}.\n All three of these values are immutable: they can only be set once during\n construction."
                  },
                  "id": 3940,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3925,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3922,
                        "mutability": "mutable",
                        "name": "name_",
                        "nodeType": "VariableDeclaration",
                        "scope": 3940,
                        "src": "1948:19:16",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 3921,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1948:6:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3924,
                        "mutability": "mutable",
                        "name": "symbol_",
                        "nodeType": "VariableDeclaration",
                        "scope": 3940,
                        "src": "1969:21:16",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 3923,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1969:6:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1947:44:16"
                  },
                  "returnParameters": {
                    "id": 3926,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1992:0:16"
                  },
                  "scope": 4401,
                  "src": "1936:137:16",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3948,
                    "nodeType": "Block",
                    "src": "2190:29:16",
                    "statements": [
                      {
                        "expression": {
                          "id": 3946,
                          "name": "_name",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3915,
                          "src": "2207:5:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage",
                            "typeString": "string storage ref"
                          }
                        },
                        "functionReturnParameters": 3945,
                        "id": 3947,
                        "nodeType": "Return",
                        "src": "2200:12:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3941,
                    "nodeType": "StructuredDocumentation",
                    "src": "2079:54:16",
                    "text": " @dev Returns the name of the token."
                  },
                  "functionSelector": "06fdde03",
                  "id": 3949,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "name",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3942,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2151:2:16"
                  },
                  "returnParameters": {
                    "id": 3945,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3944,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3949,
                        "src": "2175:13:16",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 3943,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "2175:6:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2174:15:16"
                  },
                  "scope": 4401,
                  "src": "2138:81:16",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3957,
                    "nodeType": "Block",
                    "src": "2386:31:16",
                    "statements": [
                      {
                        "expression": {
                          "id": 3955,
                          "name": "_symbol",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3917,
                          "src": "2403:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage",
                            "typeString": "string storage ref"
                          }
                        },
                        "functionReturnParameters": 3954,
                        "id": 3956,
                        "nodeType": "Return",
                        "src": "2396:14:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3950,
                    "nodeType": "StructuredDocumentation",
                    "src": "2225:102:16",
                    "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name."
                  },
                  "functionSelector": "95d89b41",
                  "id": 3958,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "symbol",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3951,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2347:2:16"
                  },
                  "returnParameters": {
                    "id": 3954,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3953,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3958,
                        "src": "2371:13:16",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 3952,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "2371:6:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2370:15:16"
                  },
                  "scope": 4401,
                  "src": "2332:85:16",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 3966,
                    "nodeType": "Block",
                    "src": "3088:33:16",
                    "statements": [
                      {
                        "expression": {
                          "id": 3964,
                          "name": "_decimals",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3919,
                          "src": "3105:9:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "functionReturnParameters": 3963,
                        "id": 3965,
                        "nodeType": "Return",
                        "src": "3098:16:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3959,
                    "nodeType": "StructuredDocumentation",
                    "src": "2423:612:16",
                    "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5,05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n called.\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}."
                  },
                  "functionSelector": "313ce567",
                  "id": 3967,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "decimals",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 3960,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3057:2:16"
                  },
                  "returnParameters": {
                    "id": 3963,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3962,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3967,
                        "src": "3081:5:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 3961,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "3081:5:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3080:7:16"
                  },
                  "scope": 4401,
                  "src": "3040:81:16",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5026
                  ],
                  "body": {
                    "id": 3976,
                    "nodeType": "Block",
                    "src": "3243:36:16",
                    "statements": [
                      {
                        "expression": {
                          "id": 3974,
                          "name": "_totalSupply",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 3913,
                          "src": "3260:12:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3973,
                        "id": 3975,
                        "nodeType": "Return",
                        "src": "3253:19:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3968,
                    "nodeType": "StructuredDocumentation",
                    "src": "3127:49:16",
                    "text": " @dev See {IERC20-totalSupply}."
                  },
                  "functionSelector": "18160ddd",
                  "id": 3977,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "totalSupply",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 3970,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3216:8:16"
                  },
                  "parameters": {
                    "id": 3969,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3201:2:16"
                  },
                  "returnParameters": {
                    "id": 3973,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3972,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3977,
                        "src": "3234:7:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3971,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3234:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3233:9:16"
                  },
                  "scope": 4401,
                  "src": "3181:98:16",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5034
                  ],
                  "body": {
                    "id": 3990,
                    "nodeType": "Block",
                    "src": "3412:42:16",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "id": 3986,
                            "name": "_balances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3905,
                            "src": "3429:9:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 3988,
                          "indexExpression": {
                            "id": 3987,
                            "name": "account",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3980,
                            "src": "3439:7:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3429:18:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 3985,
                        "id": 3989,
                        "nodeType": "Return",
                        "src": "3422:25:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3978,
                    "nodeType": "StructuredDocumentation",
                    "src": "3285:47:16",
                    "text": " @dev See {IERC20-balanceOf}."
                  },
                  "functionSelector": "70a08231",
                  "id": 3991,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "balanceOf",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 3982,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3385:8:16"
                  },
                  "parameters": {
                    "id": 3981,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3980,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 3991,
                        "src": "3356:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3979,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3356:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3355:17:16"
                  },
                  "returnParameters": {
                    "id": 3985,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3984,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 3991,
                        "src": "3403:7:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3983,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3403:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3402:9:16"
                  },
                  "scope": 4401,
                  "src": "3337:117:16",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5044
                  ],
                  "body": {
                    "id": 4011,
                    "nodeType": "Block",
                    "src": "3749:78:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 4003,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "3769:3:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 4004,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "3769:10:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4005,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3994,
                              "src": "3781:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4006,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3996,
                              "src": "3792:6:16",
                              "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": 4002,
                            "name": "_transfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4217,
                            "src": "3759:9:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4007,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3759:40:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4008,
                        "nodeType": "ExpressionStatement",
                        "src": "3759:40:16"
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 4009,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3816:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 4001,
                        "id": 4010,
                        "nodeType": "Return",
                        "src": "3809:11:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 3992,
                    "nodeType": "StructuredDocumentation",
                    "src": "3460:192:16",
                    "text": " @dev See {IERC20-transfer}.\n Requirements:\n - `recipient` cannot be the zero address.\n - the caller must have a balance of at least `amount`."
                  },
                  "functionSelector": "a9059cbb",
                  "id": 4012,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "transfer",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 3998,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3725:8:16"
                  },
                  "parameters": {
                    "id": 3997,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 3994,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 4012,
                        "src": "3675:17:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 3993,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3675:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 3996,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4012,
                        "src": "3694:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 3995,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3694:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3674:35:16"
                  },
                  "returnParameters": {
                    "id": 4001,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4000,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4012,
                        "src": "3743:4:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 3999,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3743:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3742:6:16"
                  },
                  "scope": 4401,
                  "src": "3657:170:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5054
                  ],
                  "body": {
                    "id": 4029,
                    "nodeType": "Block",
                    "src": "3983:51:16",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "baseExpression": {
                              "id": 4023,
                              "name": "_allowances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3911,
                              "src": "4000:11:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(address => uint256))"
                              }
                            },
                            "id": 4025,
                            "indexExpression": {
                              "id": 4024,
                              "name": "owner",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4015,
                              "src": "4012:5:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "4000:18:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 4027,
                          "indexExpression": {
                            "id": 4026,
                            "name": "spender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4017,
                            "src": "4019:7:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4000:27:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 4022,
                        "id": 4028,
                        "nodeType": "Return",
                        "src": "3993:34:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4013,
                    "nodeType": "StructuredDocumentation",
                    "src": "3833:47:16",
                    "text": " @dev See {IERC20-allowance}."
                  },
                  "functionSelector": "dd62ed3e",
                  "id": 4030,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "allowance",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 4019,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3956:8:16"
                  },
                  "parameters": {
                    "id": 4018,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4015,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 4030,
                        "src": "3904:13:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4014,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3904:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4017,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 4030,
                        "src": "3919:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4016,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3919:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3903:32:16"
                  },
                  "returnParameters": {
                    "id": 4022,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4021,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4030,
                        "src": "3974:7:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4020,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3974:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3973:9:16"
                  },
                  "scope": 4401,
                  "src": "3885:149:16",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5064
                  ],
                  "body": {
                    "id": 4050,
                    "nodeType": "Block",
                    "src": "4261:75:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 4042,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "4280:3:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 4043,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "4280:10:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4044,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4033,
                              "src": "4292:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4045,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4035,
                              "src": "4301:6:16",
                              "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": 4041,
                            "name": "_approve",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4378,
                            "src": "4271:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4046,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4271:37:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4047,
                        "nodeType": "ExpressionStatement",
                        "src": "4271:37:16"
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 4048,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4325:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 4040,
                        "id": 4049,
                        "nodeType": "Return",
                        "src": "4318:11:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4031,
                    "nodeType": "StructuredDocumentation",
                    "src": "4040:127:16",
                    "text": " @dev See {IERC20-approve}.\n Requirements:\n - `spender` cannot be the zero address."
                  },
                  "functionSelector": "095ea7b3",
                  "id": 4051,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "approve",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 4037,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4237:8:16"
                  },
                  "parameters": {
                    "id": 4036,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4033,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 4051,
                        "src": "4189:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4032,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4189:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4035,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4051,
                        "src": "4206:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4034,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4206:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4188:33:16"
                  },
                  "returnParameters": {
                    "id": 4040,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4039,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4051,
                        "src": "4255:4:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4038,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4255:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4254:6:16"
                  },
                  "scope": 4401,
                  "src": "4172:164:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5076
                  ],
                  "body": {
                    "id": 4089,
                    "nodeType": "Block",
                    "src": "4945:244:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4065,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4054,
                              "src": "4965:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4066,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4056,
                              "src": "4973:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4067,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4058,
                              "src": "4984:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4064,
                            "name": "_transfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4217,
                            "src": "4955:9:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4068,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4955:36:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4069,
                        "nodeType": "ExpressionStatement",
                        "src": "4955:36:16"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4071,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4054,
                              "src": "5023:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "expression": {
                                "id": 4072,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "5043:3:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 4073,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "5043:10:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 4081,
                                  "name": "amount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4058,
                                  "src": "5103:6:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 4082,
                                    "name": "Errors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 655,
                                    "src": "5111:6:16",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                      "typeString": "type(library Errors)"
                                    }
                                  },
                                  "id": 4083,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "ERC20_TRANSFER_EXCEEDS_ALLOWANCE",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 525,
                                  "src": "5111:39:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 4074,
                                      "name": "_allowances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3911,
                                      "src": "5067:11:16",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                        "typeString": "mapping(address => mapping(address => uint256))"
                                      }
                                    },
                                    "id": 4076,
                                    "indexExpression": {
                                      "id": 4075,
                                      "name": "sender",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4054,
                                      "src": "5079:6:16",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "5067:19:16",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                      "typeString": "mapping(address => uint256)"
                                    }
                                  },
                                  "id": 4079,
                                  "indexExpression": {
                                    "expression": {
                                      "id": 4077,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "5087:3:16",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 4078,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "5087:10:16",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "5067:31:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 4080,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sub",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5388,
                                "src": "5067:35:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 4084,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5067:84:16",
                              "tryCall": false,
                              "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": 4070,
                            "name": "_approve",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4378,
                            "src": "5001:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4085,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5001:160:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4086,
                        "nodeType": "ExpressionStatement",
                        "src": "5001:160:16"
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 4087,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "5178:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 4063,
                        "id": 4088,
                        "nodeType": "Return",
                        "src": "5171:11:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4052,
                    "nodeType": "StructuredDocumentation",
                    "src": "4342:456:16",
                    "text": " @dev See {IERC20-transferFrom}.\n Emits an {Approval} event indicating the updated allowance. This is not\n required by the EIP. See the note at the beginning of {ERC20}.\n Requirements:\n - `sender` and `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`.\n - the caller must have allowance for ``sender``'s tokens of at least\n `amount`."
                  },
                  "functionSelector": "23b872dd",
                  "id": 4090,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "transferFrom",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 4060,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4921:8:16"
                  },
                  "parameters": {
                    "id": 4059,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4054,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 4090,
                        "src": "4834:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4053,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4834:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4056,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 4090,
                        "src": "4858:17:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4055,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4858:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4058,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4090,
                        "src": "4885:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4057,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4885:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4824:81:16"
                  },
                  "returnParameters": {
                    "id": 4063,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4062,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4090,
                        "src": "4939:4:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4061,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4939:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4938:6:16"
                  },
                  "scope": 4401,
                  "src": "4803:386:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 4117,
                    "nodeType": "Block",
                    "src": "5678:117:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 4101,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "5697:3:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 4102,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "5697:10:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4103,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4093,
                              "src": "5709:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 4111,
                                  "name": "addedValue",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4095,
                                  "src": "5755:10:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 4104,
                                      "name": "_allowances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3911,
                                      "src": "5718:11:16",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                        "typeString": "mapping(address => mapping(address => uint256))"
                                      }
                                    },
                                    "id": 4107,
                                    "indexExpression": {
                                      "expression": {
                                        "id": 4105,
                                        "name": "msg",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -15,
                                        "src": "5730:3:16",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_message",
                                          "typeString": "msg"
                                        }
                                      },
                                      "id": 4106,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sender",
                                      "nodeType": "MemberAccess",
                                      "src": "5730:10:16",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address_payable",
                                        "typeString": "address payable"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "5718:23:16",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                      "typeString": "mapping(address => uint256)"
                                    }
                                  },
                                  "id": 4109,
                                  "indexExpression": {
                                    "id": 4108,
                                    "name": "spender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4093,
                                    "src": "5742:7:16",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "5718:32:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 4110,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "add",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5342,
                                "src": "5718:36:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 4112,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5718:48:16",
                              "tryCall": false,
                              "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": 4100,
                            "name": "_approve",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4378,
                            "src": "5688:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4113,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5688:79:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4114,
                        "nodeType": "ExpressionStatement",
                        "src": "5688:79:16"
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 4115,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "5784:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 4099,
                        "id": 4116,
                        "nodeType": "Return",
                        "src": "5777:11:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4091,
                    "nodeType": "StructuredDocumentation",
                    "src": "5195:384:16",
                    "text": " @dev Atomically increases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address."
                  },
                  "functionSelector": "39509351",
                  "id": 4118,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "increaseAllowance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4096,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4093,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 4118,
                        "src": "5611:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4092,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5611:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4095,
                        "mutability": "mutable",
                        "name": "addedValue",
                        "nodeType": "VariableDeclaration",
                        "scope": 4118,
                        "src": "5628:18:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4094,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5628:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5610:37:16"
                  },
                  "returnParameters": {
                    "id": 4099,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4098,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4118,
                        "src": "5672:4:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4097,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "5672:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5671:6:16"
                  },
                  "scope": 4401,
                  "src": "5584:211:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 4147,
                    "nodeType": "Block",
                    "src": "6381:213:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 4129,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "6413:3:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 4130,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "6413:10:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4131,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4121,
                              "src": "6437:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 4139,
                                  "name": "subtractedValue",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4123,
                                  "src": "6495:15:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 4140,
                                    "name": "Errors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 655,
                                    "src": "6512:6:16",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                      "typeString": "type(library Errors)"
                                    }
                                  },
                                  "id": 4141,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "ERC20_DECREASED_ALLOWANCE_BELOW_ZERO",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 528,
                                  "src": "6512:43:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 4132,
                                      "name": "_allowances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3911,
                                      "src": "6458:11:16",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                        "typeString": "mapping(address => mapping(address => uint256))"
                                      }
                                    },
                                    "id": 4135,
                                    "indexExpression": {
                                      "expression": {
                                        "id": 4133,
                                        "name": "msg",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -15,
                                        "src": "6470:3:16",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_message",
                                          "typeString": "msg"
                                        }
                                      },
                                      "id": 4134,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sender",
                                      "nodeType": "MemberAccess",
                                      "src": "6470:10:16",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address_payable",
                                        "typeString": "address payable"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "6458:23:16",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                      "typeString": "mapping(address => uint256)"
                                    }
                                  },
                                  "id": 4137,
                                  "indexExpression": {
                                    "id": 4136,
                                    "name": "spender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4121,
                                    "src": "6482:7:16",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "6458:32:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 4138,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sub",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5388,
                                "src": "6458:36:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 4142,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6458:98:16",
                              "tryCall": false,
                              "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": 4128,
                            "name": "_approve",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4378,
                            "src": "6391:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4143,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6391:175:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4144,
                        "nodeType": "ExpressionStatement",
                        "src": "6391:175:16"
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 4145,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6583:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 4127,
                        "id": 4146,
                        "nodeType": "Return",
                        "src": "6576:11:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4119,
                    "nodeType": "StructuredDocumentation",
                    "src": "5801:476:16",
                    "text": " @dev Atomically decreases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address.\n - `spender` must have allowance for the caller of at least\n `subtractedValue`."
                  },
                  "functionSelector": "a457c2d7",
                  "id": 4148,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "decreaseAllowance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4124,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4121,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 4148,
                        "src": "6309:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4120,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6309:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4123,
                        "mutability": "mutable",
                        "name": "subtractedValue",
                        "nodeType": "VariableDeclaration",
                        "scope": 4148,
                        "src": "6326:23:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4122,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6326:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6308:42:16"
                  },
                  "returnParameters": {
                    "id": 4127,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4126,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4148,
                        "src": "6375:4:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4125,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "6375:4:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6374:6:16"
                  },
                  "scope": 4401,
                  "src": "6282:312:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 4216,
                    "nodeType": "Block",
                    "src": "7185:442:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 4164,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 4159,
                                "name": "sender",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4151,
                                "src": "7204:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 4162,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7222:1:16",
                                    "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": 4161,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "7214:7:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 4160,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "7214:7:16",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 4163,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7214:10:16",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "7204:20:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 4165,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "7226:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4166,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ERC20_TRANSFER_FROM_ZERO_ADDRESS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 507,
                              "src": "7226:39:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4158,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "7195:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4167,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7195:71:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4168,
                        "nodeType": "ExpressionStatement",
                        "src": "7195:71:16"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 4175,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 4170,
                                "name": "recipient",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4153,
                                "src": "7285:9:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 4173,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7306:1:16",
                                    "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": 4172,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "7298:7:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 4171,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "7298:7:16",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 4174,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7298:10:16",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "7285:23:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 4176,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "7310:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4177,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ERC20_TRANSFER_TO_ZERO_ADDRESS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 510,
                              "src": "7310:37:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4169,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "7276:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4178,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7276:72:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4179,
                        "nodeType": "ExpressionStatement",
                        "src": "7276:72:16"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4181,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4151,
                              "src": "7380:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4182,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4153,
                              "src": "7388:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4183,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4155,
                              "src": "7399:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4180,
                            "name": "_beforeTokenTransfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4400,
                            "src": "7359:20:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4184,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7359:47:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4185,
                        "nodeType": "ExpressionStatement",
                        "src": "7359:47:16"
                      },
                      {
                        "expression": {
                          "id": 4197,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 4186,
                              "name": "_balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3905,
                              "src": "7417:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 4188,
                            "indexExpression": {
                              "id": 4187,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4151,
                              "src": "7427:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "7417:17:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 4193,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4155,
                                "src": "7459:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "expression": {
                                  "id": 4194,
                                  "name": "Errors",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 655,
                                  "src": "7467:6:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                    "typeString": "type(library Errors)"
                                  }
                                },
                                "id": 4195,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "ERC20_TRANSFER_EXCEEDS_BALANCE",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 531,
                                "src": "7467:37:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 4189,
                                  "name": "_balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3905,
                                  "src": "7437:9:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                    "typeString": "mapping(address => uint256)"
                                  }
                                },
                                "id": 4191,
                                "indexExpression": {
                                  "id": 4190,
                                  "name": "sender",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4151,
                                  "src": "7447:6:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "7437:17:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4192,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5388,
                              "src": "7437:21:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4196,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7437:68:16",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7417:88:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4198,
                        "nodeType": "ExpressionStatement",
                        "src": "7417:88:16"
                      },
                      {
                        "expression": {
                          "id": 4208,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 4199,
                              "name": "_balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3905,
                              "src": "7515:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 4201,
                            "indexExpression": {
                              "id": 4200,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4153,
                              "src": "7525:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "7515:20:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 4206,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4155,
                                "src": "7563:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 4202,
                                  "name": "_balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3905,
                                  "src": "7538:9:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                    "typeString": "mapping(address => uint256)"
                                  }
                                },
                                "id": 4204,
                                "indexExpression": {
                                  "id": 4203,
                                  "name": "recipient",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4153,
                                  "src": "7548:9:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "7538:20:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4205,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5342,
                              "src": "7538:24:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4207,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7538:32:16",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7515:55:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4209,
                        "nodeType": "ExpressionStatement",
                        "src": "7515:55:16"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 4211,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4151,
                              "src": "7594:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4212,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4153,
                              "src": "7602:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4213,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4155,
                              "src": "7613:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4210,
                            "name": "Transfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5085,
                            "src": "7585:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4214,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7585:35:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4215,
                        "nodeType": "EmitStatement",
                        "src": "7580:40:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4149,
                    "nodeType": "StructuredDocumentation",
                    "src": "6600:463:16",
                    "text": " @dev Moves tokens `amount` from `sender` to `recipient`.\n This is internal function is equivalent to {transfer}, and can be used to\n e.g. implement automatic token fees, slashing mechanisms, etc.\n Emits a {Transfer} event.\n Requirements:\n - `sender` cannot be the zero address.\n - `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`."
                  },
                  "id": 4217,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_transfer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4156,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4151,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 4217,
                        "src": "7096:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4150,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "7096:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4153,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 4217,
                        "src": "7120:17:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4152,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "7120:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4155,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4217,
                        "src": "7147:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4154,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7147:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7086:81:16"
                  },
                  "returnParameters": {
                    "id": 4157,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7185:0:16"
                  },
                  "scope": 4401,
                  "src": "7068:559:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4272,
                    "nodeType": "Block",
                    "src": "7963:306:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 4231,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 4226,
                                "name": "account",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4220,
                                "src": "7982:7:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 4229,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "8001:1:16",
                                    "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": 4228,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "7993:7:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 4227,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "7993:7:16",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 4230,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7993:10:16",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "7982:21:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 4232,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "8005:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4233,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ERC20_MINT_TO_ZERO_ADDRESS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 513,
                              "src": "8005:33:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4225,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "7973:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4234,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7973:66:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4235,
                        "nodeType": "ExpressionStatement",
                        "src": "7973:66:16"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 4239,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "8079:1:16",
                                  "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": 4238,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "8071:7:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 4237,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "8071:7:16",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 4240,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8071:10:16",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4241,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4220,
                              "src": "8083:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4242,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4222,
                              "src": "8092:6:16",
                              "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": 4236,
                            "name": "_beforeTokenTransfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4400,
                            "src": "8050:20:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4243,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8050:49:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4244,
                        "nodeType": "ExpressionStatement",
                        "src": "8050:49:16"
                      },
                      {
                        "expression": {
                          "id": 4250,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 4245,
                            "name": "_totalSupply",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3913,
                            "src": "8110:12:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 4248,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4222,
                                "src": "8142:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 4246,
                                "name": "_totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3913,
                                "src": "8125:12:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4247,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5342,
                              "src": "8125:16:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4249,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8125:24:16",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8110:39:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4251,
                        "nodeType": "ExpressionStatement",
                        "src": "8110:39:16"
                      },
                      {
                        "expression": {
                          "id": 4261,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 4252,
                              "name": "_balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3905,
                              "src": "8159:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 4254,
                            "indexExpression": {
                              "id": 4253,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4220,
                              "src": "8169:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "8159:18:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 4259,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4222,
                                "src": "8203:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 4255,
                                  "name": "_balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3905,
                                  "src": "8180:9:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                    "typeString": "mapping(address => uint256)"
                                  }
                                },
                                "id": 4257,
                                "indexExpression": {
                                  "id": 4256,
                                  "name": "account",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4220,
                                  "src": "8190:7:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "8180:18:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4258,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5342,
                              "src": "8180:22:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4260,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8180:30:16",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8159:51:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4262,
                        "nodeType": "ExpressionStatement",
                        "src": "8159:51:16"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 4266,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "8242:1:16",
                                  "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": 4265,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "8234:7:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 4264,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "8234:7:16",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 4267,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8234:10:16",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4268,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4220,
                              "src": "8246:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4269,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4222,
                              "src": "8255:6:16",
                              "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": 4263,
                            "name": "Transfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5085,
                            "src": "8225:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4270,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8225:37:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4271,
                        "nodeType": "EmitStatement",
                        "src": "8220:42:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4218,
                    "nodeType": "StructuredDocumentation",
                    "src": "7633:260:16",
                    "text": "@dev Creates `amount` tokens and assigns them to `account`, increasing\n the total supply.\n Emits a {Transfer} event with `from` set to the zero address.\n Requirements:\n - `to` cannot be the zero address."
                  },
                  "id": 4273,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_mint",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4223,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4220,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 4273,
                        "src": "7913:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4219,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "7913:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4222,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4273,
                        "src": "7930:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4221,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7930:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7912:33:16"
                  },
                  "returnParameters": {
                    "id": 4224,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7963:0:16"
                  },
                  "scope": 4401,
                  "src": "7898:371:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4330,
                    "nodeType": "Block",
                    "src": "8654:345:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 4287,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 4282,
                                "name": "account",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4276,
                                "src": "8673:7:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 4285,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "8692:1:16",
                                    "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": 4284,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "8684:7:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 4283,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "8684:7:16",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 4286,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8684:10:16",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "8673:21:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 4288,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "8696:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4289,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ERC20_BURN_FROM_ZERO_ADDRESS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 516,
                              "src": "8696:35:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4281,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "8664:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4290,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8664:68:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4291,
                        "nodeType": "ExpressionStatement",
                        "src": "8664:68:16"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4293,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4276,
                              "src": "8764:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 4296,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "8781:1:16",
                                  "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": 4295,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "8773:7:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 4294,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "8773:7:16",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 4297,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8773:10:16",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4298,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4278,
                              "src": "8785:6:16",
                              "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": 4292,
                            "name": "_beforeTokenTransfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4400,
                            "src": "8743:20:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4299,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8743:49:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4300,
                        "nodeType": "ExpressionStatement",
                        "src": "8743:49:16"
                      },
                      {
                        "expression": {
                          "id": 4312,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 4301,
                              "name": "_balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3905,
                              "src": "8803:9:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 4303,
                            "indexExpression": {
                              "id": 4302,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4276,
                              "src": "8813:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "8803:18:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 4308,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4278,
                                "src": "8847:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "expression": {
                                  "id": 4309,
                                  "name": "Errors",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 655,
                                  "src": "8855:6:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                    "typeString": "type(library Errors)"
                                  }
                                },
                                "id": 4310,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "ERC20_BURN_EXCEEDS_ALLOWANCE",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 534,
                                "src": "8855:35:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 4304,
                                  "name": "_balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3905,
                                  "src": "8824:9:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                    "typeString": "mapping(address => uint256)"
                                  }
                                },
                                "id": 4306,
                                "indexExpression": {
                                  "id": 4305,
                                  "name": "account",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4276,
                                  "src": "8834:7:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "8824:18:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4307,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5388,
                              "src": "8824:22:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4311,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8824:67:16",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8803:88:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4313,
                        "nodeType": "ExpressionStatement",
                        "src": "8803:88:16"
                      },
                      {
                        "expression": {
                          "id": 4319,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 4314,
                            "name": "_totalSupply",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3913,
                            "src": "8901:12:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 4317,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4278,
                                "src": "8933:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 4315,
                                "name": "_totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3913,
                                "src": "8916:12:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4316,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5360,
                              "src": "8916:16:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4318,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8916:24:16",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8901:39:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4320,
                        "nodeType": "ExpressionStatement",
                        "src": "8901:39:16"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 4322,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4276,
                              "src": "8964:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 4325,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "8981:1:16",
                                  "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": 4324,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "8973:7:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 4323,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "8973:7:16",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 4326,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8973:10:16",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4327,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4278,
                              "src": "8985:6:16",
                              "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": 4321,
                            "name": "Transfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5085,
                            "src": "8955:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4328,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8955:37:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4329,
                        "nodeType": "EmitStatement",
                        "src": "8950:42:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4274,
                    "nodeType": "StructuredDocumentation",
                    "src": "8275:309:16",
                    "text": " @dev Destroys `amount` tokens from `account`, reducing the\n total supply.\n Emits a {Transfer} event with `to` set to the zero address.\n Requirements:\n - `account` cannot be the zero address.\n - `account` must have at least `amount` tokens."
                  },
                  "id": 4331,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_burn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4279,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4276,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 4331,
                        "src": "8604:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4275,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8604:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4278,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4331,
                        "src": "8621:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4277,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8621:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8603:33:16"
                  },
                  "returnParameters": {
                    "id": 4280,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "8654:0:16"
                  },
                  "scope": 4401,
                  "src": "8589:410:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4377,
                    "nodeType": "Block",
                    "src": "9535:259:16",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 4347,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 4342,
                                "name": "owner",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4334,
                                "src": "9554:5:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 4345,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "9571:1:16",
                                    "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": 4344,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "9563:7:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 4343,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "9563:7:16",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 4346,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9563:10:16",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "9554:19:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 4348,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "9575:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4349,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ERC20_APPROVE_FROM_ZERO_ADDRESS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 519,
                              "src": "9575:38:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4341,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "9545:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4350,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9545:69:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4351,
                        "nodeType": "ExpressionStatement",
                        "src": "9545:69:16"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 4358,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 4353,
                                "name": "spender",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4336,
                                "src": "9633:7:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 4356,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "9652:1:16",
                                    "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": 4355,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "9644:7:16",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 4354,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "9644:7:16",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 4357,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9644:10:16",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "9633:21:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 4359,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "9656:6:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4360,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ERC20_APPROVE_TO_ZERO_ADDRESS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 522,
                              "src": "9656:36:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4352,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "9624:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4361,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9624:69:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4362,
                        "nodeType": "ExpressionStatement",
                        "src": "9624:69:16"
                      },
                      {
                        "expression": {
                          "id": 4369,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "baseExpression": {
                                "id": 4363,
                                "name": "_allowances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3911,
                                "src": "9704:11:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                  "typeString": "mapping(address => mapping(address => uint256))"
                                }
                              },
                              "id": 4366,
                              "indexExpression": {
                                "id": 4364,
                                "name": "owner",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4334,
                                "src": "9716:5:16",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "9704:18:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 4367,
                            "indexExpression": {
                              "id": 4365,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4336,
                              "src": "9723:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "9704:27:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 4368,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4338,
                            "src": "9734:6:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "9704:36:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4370,
                        "nodeType": "ExpressionStatement",
                        "src": "9704:36:16"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 4372,
                              "name": "owner",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4334,
                              "src": "9764:5:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4373,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4336,
                              "src": "9771:7:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4374,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4338,
                              "src": "9780:6:16",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4371,
                            "name": "Approval",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5094,
                            "src": "9755:8:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4375,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9755:32:16",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4376,
                        "nodeType": "EmitStatement",
                        "src": "9750:37:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4332,
                    "nodeType": "StructuredDocumentation",
                    "src": "9005:412:16",
                    "text": " @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n This internal function is equivalent to `approve`, and can be used to\n e.g. set automatic allowances for certain subsystems, etc.\n Emits an {Approval} event.\n Requirements:\n - `owner` cannot be the zero address.\n - `spender` cannot be the zero address."
                  },
                  "id": 4378,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_approve",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4339,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4334,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 4378,
                        "src": "9449:13:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4333,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "9449:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4336,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 4378,
                        "src": "9472:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4335,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "9472:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4338,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4378,
                        "src": "9497:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4337,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9497:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9439:78:16"
                  },
                  "returnParameters": {
                    "id": 4340,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "9535:0:16"
                  },
                  "scope": 4401,
                  "src": "9422:372:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4388,
                    "nodeType": "Block",
                    "src": "10167:38:16",
                    "statements": [
                      {
                        "expression": {
                          "id": 4386,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 4384,
                            "name": "_decimals",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3919,
                            "src": "10177:9:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 4385,
                            "name": "decimals_",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4381,
                            "src": "10189:9:16",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "10177:21:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "id": 4387,
                        "nodeType": "ExpressionStatement",
                        "src": "10177:21:16"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4379,
                    "nodeType": "StructuredDocumentation",
                    "src": "9800:312:16",
                    "text": " @dev Sets {decimals} to a value other than the default one of 18.\n WARNING: This function should only be called from the constructor. Most\n applications that interact with token contracts will not expect\n {decimals} to ever change, and may work incorrectly if it does."
                  },
                  "id": 4389,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setupDecimals",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4382,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4381,
                        "mutability": "mutable",
                        "name": "decimals_",
                        "nodeType": "VariableDeclaration",
                        "scope": 4389,
                        "src": "10141:15:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 4380,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "10141:5:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10140:17:16"
                  },
                  "returnParameters": {
                    "id": 4383,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "10167:0:16"
                  },
                  "scope": 4401,
                  "src": "10117:88:16",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4399,
                    "nodeType": "Block",
                    "src": "10911:2:16",
                    "statements": []
                  },
                  "documentation": {
                    "id": 4390,
                    "nodeType": "StructuredDocumentation",
                    "src": "10211:576:16",
                    "text": " @dev Hook that is called before any transfer of tokens. This includes\n minting and burning.\n Calling conditions:\n - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n will be to transferred to `to`.\n - when `from` is zero, `amount` tokens will be minted for `to`.\n - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n - `from` and `to` are never both zero.\n To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]."
                  },
                  "id": 4400,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_beforeTokenTransfer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4397,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4392,
                        "mutability": "mutable",
                        "name": "from",
                        "nodeType": "VariableDeclaration",
                        "scope": 4400,
                        "src": "10831:12:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4391,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "10831:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4394,
                        "mutability": "mutable",
                        "name": "to",
                        "nodeType": "VariableDeclaration",
                        "scope": 4400,
                        "src": "10853:10:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4393,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "10853:7:16",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4396,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4400,
                        "src": "10873:14:16",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4395,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "10873:7:16",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10821:72:16"
                  },
                  "returnParameters": {
                    "id": 4398,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "10911:0:16"
                  },
                  "scope": 4401,
                  "src": "10792:121:16",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                }
              ],
              "scope": 4402,
              "src": "1311:9604:16"
            }
          ],
          "src": "33:10883:16"
        },
        "id": 16
      },
      "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/ERC20Burnable.sol",
          "exportedSymbols": {
            "ERC20Burnable": [
              4458
            ]
          },
          "id": 4459,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 4403,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:17"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ERC20.sol",
              "file": "./ERC20.sol",
              "id": 4404,
              "nodeType": "ImportDirective",
              "scope": 4459,
              "sourceUnit": 4402,
              "src": "58:21:17",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 4406,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4401,
                    "src": "325:5:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$4401",
                      "typeString": "contract ERC20"
                    }
                  },
                  "id": 4407,
                  "nodeType": "InheritanceSpecifier",
                  "src": "325:5:17"
                }
              ],
              "contractDependencies": [
                4401,
                5095
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 4405,
                "nodeType": "StructuredDocumentation",
                "src": "81:208:17",
                "text": " @dev Extension of {ERC20} that allows token holders to destroy both their own\n tokens and those that they have an allowance for, in a way that can be\n recognized off-chain (via event analysis)."
              },
              "fullyImplemented": false,
              "id": 4458,
              "linearizedBaseContracts": [
                4458,
                4401,
                5095
              ],
              "name": "ERC20Burnable",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 4410,
                  "libraryName": {
                    "id": 4408,
                    "name": "SafeMath",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5389,
                    "src": "343:8:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeMath_$5389",
                      "typeString": "library SafeMath"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "337:27:17",
                  "typeName": {
                    "id": 4409,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "356:7:17",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "body": {
                    "id": 4422,
                    "nodeType": "Block",
                    "src": "518:42:17",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 4417,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "534:3:17",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 4418,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "534:10:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4419,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4413,
                              "src": "546:6:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4416,
                            "name": "_burn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4331,
                            "src": "528:5:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,uint256)"
                            }
                          },
                          "id": 4420,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "528:25:17",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4421,
                        "nodeType": "ExpressionStatement",
                        "src": "528:25:17"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4411,
                    "nodeType": "StructuredDocumentation",
                    "src": "370:98:17",
                    "text": " @dev Destroys `amount` tokens from the caller.\n See {ERC20-_burn}."
                  },
                  "functionSelector": "42966c68",
                  "id": 4423,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "burn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4414,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4413,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4423,
                        "src": "487:14:17",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4412,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "487:7:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "486:16:17"
                  },
                  "returnParameters": {
                    "id": 4415,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "518:0:17"
                  },
                  "scope": 4458,
                  "src": "473:87:17",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 4456,
                    "nodeType": "Block",
                    "src": "932:217:17",
                    "statements": [
                      {
                        "assignments": [
                          4432
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4432,
                            "mutability": "mutable",
                            "name": "decreasedAllowance",
                            "nodeType": "VariableDeclaration",
                            "scope": 4456,
                            "src": "942:26:17",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 4431,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "942:7:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 4443,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 4439,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4428,
                              "src": "1006:6:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 4440,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1014:6:17",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4441,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ERC20_BURN_EXCEEDS_ALLOWANCE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 534,
                              "src": "1014:35:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 4434,
                                  "name": "account",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4426,
                                  "src": "981:7:17",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 4435,
                                    "name": "msg",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -15,
                                    "src": "990:3:17",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_message",
                                      "typeString": "msg"
                                    }
                                  },
                                  "id": 4436,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "src": "990:10:17",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                ],
                                "id": 4433,
                                "name": "allowance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4030,
                                "src": "971:9:17",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$",
                                  "typeString": "function (address,address) view returns (uint256)"
                                }
                              },
                              "id": 4437,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "971:30:17",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 4438,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 5388,
                            "src": "971:34:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 4442,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "971:79:17",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "942:108:17"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4445,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4426,
                              "src": "1070:7:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "expression": {
                                "id": 4446,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "1079:3:17",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 4447,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "1079:10:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 4448,
                              "name": "decreasedAllowance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4432,
                              "src": "1091:18:17",
                              "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": 4444,
                            "name": "_approve",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4378,
                            "src": "1061:8:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 4449,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1061:49:17",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4450,
                        "nodeType": "ExpressionStatement",
                        "src": "1061:49:17"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4452,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4426,
                              "src": "1126:7:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 4453,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4428,
                              "src": "1135:6:17",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4451,
                            "name": "_burn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4331,
                            "src": "1120:5:17",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,uint256)"
                            }
                          },
                          "id": 4454,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1120:22:17",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4455,
                        "nodeType": "ExpressionStatement",
                        "src": "1120:22:17"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4424,
                    "nodeType": "StructuredDocumentation",
                    "src": "566:295:17",
                    "text": " @dev Destroys `amount` tokens from `account`, deducting from the caller's\n allowance.\n See {ERC20-_burn} and {ERC20-allowance}.\n Requirements:\n - the caller must have allowance for ``accounts``'s tokens of at least\n `amount`."
                  },
                  "functionSelector": "79cc6790",
                  "id": 4457,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "burnFrom",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4429,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4426,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 4457,
                        "src": "884:15:17",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4425,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "884:7:17",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4428,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 4457,
                        "src": "901:14:17",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4427,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "901:7:17",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "883:33:17"
                  },
                  "returnParameters": {
                    "id": 4430,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "932:0:17"
                  },
                  "scope": 4458,
                  "src": "866:283:17",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                }
              ],
              "scope": 4459,
              "src": "290:861:17"
            }
          ],
          "src": "33:1119:17"
        },
        "id": 17
      },
      "src.sol/amm/lib/openzeppelin/EnumerableMap.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/EnumerableMap.sol",
          "exportedSymbols": {
            "EnumerableMap": [
              4810
            ]
          },
          "id": 4811,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 4460,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:18"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "./IERC20.sol",
              "id": 4461,
              "nodeType": "ImportDirective",
              "scope": 4811,
              "sourceUnit": 5096,
              "src": "869:22:18",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 4462,
              "nodeType": "ImportDirective",
              "scope": 4811,
              "sourceUnit": 656,
              "src": "893:39:18",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 4463,
                "nodeType": "StructuredDocumentation",
                "src": "934:607:18",
                "text": " @dev Library for managing an enumerable variant of Solidity's\n https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n type.\n Maps have the following properties:\n - Entries are added, removed, and checked for existence in constant time\n (O(1)).\n - Entries are enumerated in O(n). No guarantees are made on the ordering.\n ```\n contract Example {\n     // Add the library methods\n     using EnumerableMap for EnumerableMap.UintToAddressMap;\n     // Declare a set state variable\n     EnumerableMap.UintToAddressMap private myMap;\n }\n ```"
              },
              "fullyImplemented": true,
              "id": 4810,
              "linearizedBaseContracts": [
                4810
              ],
              "name": "EnumerableMap",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "canonicalName": "EnumerableMap.IERC20ToBytes32MapEntry",
                  "id": 4468,
                  "members": [
                    {
                      "constant": false,
                      "id": 4465,
                      "mutability": "mutable",
                      "name": "_key",
                      "nodeType": "VariableDeclaration",
                      "scope": 4468,
                      "src": "1820:11:18",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IERC20_$5095",
                        "typeString": "contract IERC20"
                      },
                      "typeName": {
                        "id": 4464,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "1820:6:18",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 4467,
                      "mutability": "mutable",
                      "name": "_value",
                      "nodeType": "VariableDeclaration",
                      "scope": 4468,
                      "src": "1841:14:18",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 4466,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1841:7:18",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "IERC20ToBytes32MapEntry",
                  "nodeType": "StructDefinition",
                  "scope": 4810,
                  "src": "1779:83:18",
                  "visibility": "public"
                },
                {
                  "canonicalName": "EnumerableMap.IERC20ToBytes32Map",
                  "id": 4479,
                  "members": [
                    {
                      "constant": false,
                      "id": 4470,
                      "mutability": "mutable",
                      "name": "_length",
                      "nodeType": "VariableDeclaration",
                      "scope": 4479,
                      "src": "1944:15:18",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4469,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1944:7:18",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 4474,
                      "mutability": "mutable",
                      "name": "_entries",
                      "nodeType": "VariableDeclaration",
                      "scope": 4479,
                      "src": "2011:52:18",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                        "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry)"
                      },
                      "typeName": {
                        "id": 4473,
                        "keyType": {
                          "id": 4471,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2019:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "Mapping",
                        "src": "2011:43:18",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                          "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry)"
                        },
                        "valueType": {
                          "id": 4472,
                          "name": "IERC20ToBytes32MapEntry",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4468,
                          "src": "2030:23:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry"
                          }
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 4478,
                      "mutability": "mutable",
                      "name": "_indexes",
                      "nodeType": "VariableDeclaration",
                      "scope": 4479,
                      "src": "2212:35:18",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                        "typeString": "mapping(contract IERC20 => uint256)"
                      },
                      "typeName": {
                        "id": 4477,
                        "keyType": {
                          "id": 4475,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "2220:6:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "nodeType": "Mapping",
                        "src": "2212:26:18",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                          "typeString": "mapping(contract IERC20 => uint256)"
                        },
                        "valueType": {
                          "id": 4476,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2230:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "IERC20ToBytes32Map",
                  "nodeType": "StructDefinition",
                  "scope": 4810,
                  "src": "1868:386:18",
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 4553,
                    "nodeType": "Block",
                    "src": "2607:733:18",
                    "statements": [
                      {
                        "assignments": [
                          4492
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4492,
                            "mutability": "mutable",
                            "name": "keyIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 4553,
                            "src": "2715:16:18",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 4491,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2715:7:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 4497,
                        "initialValue": {
                          "baseExpression": {
                            "expression": {
                              "id": 4493,
                              "name": "map",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4482,
                              "src": "2734:3:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 4494,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_indexes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4478,
                            "src": "2734:12:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                              "typeString": "mapping(contract IERC20 => uint256)"
                            }
                          },
                          "id": 4496,
                          "indexExpression": {
                            "id": 4495,
                            "name": "key",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4484,
                            "src": "2747:3:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2734:17:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2715:36:18"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4500,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 4498,
                            "name": "keyIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4492,
                            "src": "2811:8:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 4499,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2823:1:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2811:13:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 4551,
                          "nodeType": "Block",
                          "src": "3242:92:18",
                          "statements": [
                            {
                              "expression": {
                                "id": 4547,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "baseExpression": {
                                      "expression": {
                                        "id": 4538,
                                        "name": "map",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4482,
                                        "src": "3256:3:18",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                        }
                                      },
                                      "id": 4543,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "_entries",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 4474,
                                      "src": "3256:12:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                                        "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry storage ref)"
                                      }
                                    },
                                    "id": 4544,
                                    "indexExpression": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 4542,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 4540,
                                        "name": "keyIndex",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 4492,
                                        "src": "3269:8:18",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "-",
                                      "rightExpression": {
                                        "hexValue": "31",
                                        "id": 4541,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "3280:1:18",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        },
                                        "value": "1"
                                      },
                                      "src": "3269:12:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "3256:26:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                                    }
                                  },
                                  "id": 4545,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "_value",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4467,
                                  "src": "3256:33:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 4546,
                                  "name": "value",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4486,
                                  "src": "3292:5:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "3256:41:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 4548,
                              "nodeType": "ExpressionStatement",
                              "src": "3256:41:18"
                            },
                            {
                              "expression": {
                                "hexValue": "66616c7365",
                                "id": 4549,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3318:5:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "false"
                              },
                              "functionReturnParameters": 4490,
                              "id": 4550,
                              "nodeType": "Return",
                              "src": "3311:12:18"
                            }
                          ]
                        },
                        "id": 4552,
                        "nodeType": "IfStatement",
                        "src": "2807:527:18",
                        "trueBody": {
                          "id": 4537,
                          "nodeType": "Block",
                          "src": "2826:410:18",
                          "statements": [
                            {
                              "assignments": [
                                4502
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 4502,
                                  "mutability": "mutable",
                                  "name": "previousLength",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 4537,
                                  "src": "2840:22:18",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 4501,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2840:7:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 4505,
                              "initialValue": {
                                "expression": {
                                  "id": 4503,
                                  "name": "map",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4482,
                                  "src": "2865:3:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                  }
                                },
                                "id": 4504,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "_length",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 4470,
                                "src": "2865:11:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2840:36:18"
                            },
                            {
                              "expression": {
                                "id": 4515,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4506,
                                      "name": "map",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4482,
                                      "src": "2890:3:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                        "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                      }
                                    },
                                    "id": 4509,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_entries",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4474,
                                    "src": "2890:12:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                                      "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry storage ref)"
                                    }
                                  },
                                  "id": 4510,
                                  "indexExpression": {
                                    "id": 4508,
                                    "name": "previousLength",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4502,
                                    "src": "2903:14:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "2890:28:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 4512,
                                      "name": "key",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4484,
                                      "src": "2953:3:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 4513,
                                      "name": "value",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4486,
                                      "src": "2966:5:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 4511,
                                    "name": "IERC20ToBytes32MapEntry",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4468,
                                    "src": "2921:23:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr_$",
                                      "typeString": "type(struct EnumerableMap.IERC20ToBytes32MapEntry storage pointer)"
                                    }
                                  },
                                  "id": 4514,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "structConstructorCall",
                                  "lValueRequested": false,
                                  "names": [
                                    "_key",
                                    "_value"
                                  ],
                                  "nodeType": "FunctionCall",
                                  "src": "2921:53:18",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_memory_ptr",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry memory"
                                  }
                                },
                                "src": "2890:84:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                                  "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                                }
                              },
                              "id": 4516,
                              "nodeType": "ExpressionStatement",
                              "src": "2890:84:18"
                            },
                            {
                              "expression": {
                                "id": 4523,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 4517,
                                    "name": "map",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4482,
                                    "src": "2988:3:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 4519,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "_length",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4470,
                                  "src": "2988:11:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 4522,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 4520,
                                    "name": "previousLength",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4502,
                                    "src": "3002:14:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "+",
                                  "rightExpression": {
                                    "hexValue": "31",
                                    "id": 4521,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "3019:1:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "3002:18:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2988:32:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4524,
                              "nodeType": "ExpressionStatement",
                              "src": "2988:32:18"
                            },
                            {
                              "expression": {
                                "id": 4533,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4525,
                                      "name": "map",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4482,
                                      "src": "3162:3:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                        "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                      }
                                    },
                                    "id": 4528,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_indexes",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4478,
                                    "src": "3162:12:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                                      "typeString": "mapping(contract IERC20 => uint256)"
                                    }
                                  },
                                  "id": 4529,
                                  "indexExpression": {
                                    "id": 4527,
                                    "name": "key",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4484,
                                    "src": "3175:3:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "3162:17:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 4532,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 4530,
                                    "name": "previousLength",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4502,
                                    "src": "3182:14:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "+",
                                  "rightExpression": {
                                    "hexValue": "31",
                                    "id": 4531,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "3199:1:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "3182:18:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3162:38:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4534,
                              "nodeType": "ExpressionStatement",
                              "src": "3162:38:18"
                            },
                            {
                              "expression": {
                                "hexValue": "74727565",
                                "id": 4535,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3221:4:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "true"
                              },
                              "functionReturnParameters": 4490,
                              "id": 4536,
                              "nodeType": "Return",
                              "src": "3214:11:18"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4480,
                    "nodeType": "StructuredDocumentation",
                    "src": "2260:216:18",
                    "text": " @dev Adds a key-value pair to a map, or updates the value for an existing\n key. O(1).\n Returns true if the key was added to the map, that is if it was not\n already present."
                  },
                  "id": 4554,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "set",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4487,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4482,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4554,
                        "src": "2503:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4481,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "2503:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4484,
                        "mutability": "mutable",
                        "name": "key",
                        "nodeType": "VariableDeclaration",
                        "scope": 4554,
                        "src": "2543:10:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 4483,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "2543:6:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4486,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 4554,
                        "src": "2563:13:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 4485,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2563:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2493:89:18"
                  },
                  "returnParameters": {
                    "id": 4490,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4489,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4554,
                        "src": "2601:4:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4488,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2601:4:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2600:6:18"
                  },
                  "scope": 4810,
                  "src": "2481:859:18",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4573,
                    "nodeType": "Block",
                    "src": "3855:51:18",
                    "statements": [
                      {
                        "expression": {
                          "id": 4571,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "baseExpression": {
                                "expression": {
                                  "id": 4564,
                                  "name": "map",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4557,
                                  "src": "3865:3:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                  }
                                },
                                "id": 4567,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "_entries",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 4474,
                                "src": "3865:12:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                                  "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry storage ref)"
                                }
                              },
                              "id": 4568,
                              "indexExpression": {
                                "id": 4566,
                                "name": "index",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4559,
                                "src": "3878:5:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "3865:19:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                              }
                            },
                            "id": 4569,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "_value",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4467,
                            "src": "3865:26:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 4570,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4561,
                            "src": "3894:5:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "3865:34:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 4572,
                        "nodeType": "ExpressionStatement",
                        "src": "3865:34:18"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4555,
                    "nodeType": "StructuredDocumentation",
                    "src": "3346:378:18",
                    "text": " @dev Updates the value for an entry, given its key's index. The key index can be retrieved via\n {unchecked_indexOf}, and it should be noted that key indices may change when calling {set} or {remove}. O(1).\n This function performs one less storage read than {set}, but it should only be used when `index` is known to be\n within bounds."
                  },
                  "id": 4574,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "unchecked_setAt",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4562,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4557,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4574,
                        "src": "3763:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4556,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "3763:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4559,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 4574,
                        "src": "3803:13:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4558,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3803:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4561,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 4574,
                        "src": "3826:13:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 4560,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3826:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3753:92:18"
                  },
                  "returnParameters": {
                    "id": 4563,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3855:0:18"
                  },
                  "scope": 4810,
                  "src": "3729:177:18",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4658,
                    "nodeType": "Block",
                    "src": "4158:1529:18",
                    "statements": [
                      {
                        "assignments": [
                          4585
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4585,
                            "mutability": "mutable",
                            "name": "keyIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 4658,
                            "src": "4266:16:18",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 4584,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4266:7:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 4590,
                        "initialValue": {
                          "baseExpression": {
                            "expression": {
                              "id": 4586,
                              "name": "map",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4577,
                              "src": "4285:3:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 4587,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_indexes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4478,
                            "src": "4285:12:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                              "typeString": "mapping(contract IERC20 => uint256)"
                            }
                          },
                          "id": 4589,
                          "indexExpression": {
                            "id": 4588,
                            "name": "key",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4579,
                            "src": "4298:3:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4285:17:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4266:36:18"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4593,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 4591,
                            "name": "keyIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4585,
                            "src": "4361:8:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 4592,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4373:1:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4361:13:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 4656,
                          "nodeType": "Block",
                          "src": "5644:37:18",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "66616c7365",
                                "id": 4654,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5665:5:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "false"
                              },
                              "functionReturnParameters": 4583,
                              "id": 4655,
                              "nodeType": "Return",
                              "src": "5658:12:18"
                            }
                          ]
                        },
                        "id": 4657,
                        "nodeType": "IfStatement",
                        "src": "4357:1324:18",
                        "trueBody": {
                          "id": 4653,
                          "nodeType": "Block",
                          "src": "4376:1262:18",
                          "statements": [
                            {
                              "assignments": [
                                4595
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 4595,
                                  "mutability": "mutable",
                                  "name": "toDeleteIndex",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 4653,
                                  "src": "4699:21:18",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 4594,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4699:7:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 4599,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 4598,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 4596,
                                  "name": "keyIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4585,
                                  "src": "4723:8:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "hexValue": "31",
                                  "id": 4597,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4734:1:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "4723:12:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "4699:36:18"
                            },
                            {
                              "assignments": [
                                4601
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 4601,
                                  "mutability": "mutable",
                                  "name": "lastIndex",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 4653,
                                  "src": "4749:17:18",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 4600,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4749:7:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 4606,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 4605,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 4602,
                                    "name": "map",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4577,
                                    "src": "4769:3:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 4603,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "_length",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4470,
                                  "src": "4769:11:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "hexValue": "31",
                                  "id": 4604,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4783:1:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "4769:15:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "4749:35:18"
                            },
                            {
                              "assignments": [
                                4608
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 4608,
                                  "mutability": "mutable",
                                  "name": "lastEntry",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 4653,
                                  "src": "5024:41:18",
                                  "stateVariable": false,
                                  "storageLocation": "storage",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry"
                                  },
                                  "typeName": {
                                    "id": 4607,
                                    "name": "IERC20ToBytes32MapEntry",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 4468,
                                    "src": "5024:23:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 4613,
                              "initialValue": {
                                "baseExpression": {
                                  "expression": {
                                    "id": 4609,
                                    "name": "map",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4577,
                                    "src": "5068:3:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 4610,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "_entries",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4474,
                                  "src": "5068:12:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                                    "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry storage ref)"
                                  }
                                },
                                "id": 4612,
                                "indexExpression": {
                                  "id": 4611,
                                  "name": "lastIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4601,
                                  "src": "5081:9:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "5068:23:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                                  "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "5024:67:18"
                            },
                            {
                              "expression": {
                                "id": 4620,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4614,
                                      "name": "map",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4577,
                                      "src": "5183:3:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                        "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                      }
                                    },
                                    "id": 4617,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_entries",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4474,
                                    "src": "5183:12:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                                      "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry storage ref)"
                                    }
                                  },
                                  "id": 4618,
                                  "indexExpression": {
                                    "id": 4616,
                                    "name": "toDeleteIndex",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4595,
                                    "src": "5196:13:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "5183:27:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 4619,
                                  "name": "lastEntry",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4608,
                                  "src": "5213:9:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage pointer"
                                  }
                                },
                                "src": "5183:39:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                                  "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                                }
                              },
                              "id": 4621,
                              "nodeType": "ExpressionStatement",
                              "src": "5183:39:18"
                            },
                            {
                              "expression": {
                                "id": 4631,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4622,
                                      "name": "map",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4577,
                                      "src": "5288:3:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                        "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                      }
                                    },
                                    "id": 4626,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_indexes",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4478,
                                    "src": "5288:12:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                                      "typeString": "mapping(contract IERC20 => uint256)"
                                    }
                                  },
                                  "id": 4627,
                                  "indexExpression": {
                                    "expression": {
                                      "id": 4624,
                                      "name": "lastEntry",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4608,
                                      "src": "5301:9:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                                        "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage pointer"
                                      }
                                    },
                                    "id": 4625,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_key",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4465,
                                    "src": "5301:14:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "5288:28:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 4630,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 4628,
                                    "name": "toDeleteIndex",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4595,
                                    "src": "5319:13:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "+",
                                  "rightExpression": {
                                    "hexValue": "31",
                                    "id": 4629,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "5335:1:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "5319:17:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5288:48:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4632,
                              "nodeType": "ExpressionStatement",
                              "src": "5288:48:18"
                            },
                            {
                              "expression": {
                                "id": 4637,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "delete",
                                "prefix": true,
                                "src": "5442:30:18",
                                "subExpression": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4633,
                                      "name": "map",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4577,
                                      "src": "5449:3:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                        "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                      }
                                    },
                                    "id": 4634,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_entries",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4474,
                                    "src": "5449:12:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                                      "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry storage ref)"
                                    }
                                  },
                                  "id": 4636,
                                  "indexExpression": {
                                    "id": 4635,
                                    "name": "lastIndex",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4601,
                                    "src": "5462:9:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "5449:23:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 4638,
                              "nodeType": "ExpressionStatement",
                              "src": "5442:30:18"
                            },
                            {
                              "expression": {
                                "id": 4643,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 4639,
                                    "name": "map",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4577,
                                    "src": "5486:3:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 4641,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "_length",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4470,
                                  "src": "5486:11:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 4642,
                                  "name": "lastIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4601,
                                  "src": "5500:9:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5486:23:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4644,
                              "nodeType": "ExpressionStatement",
                              "src": "5486:23:18"
                            },
                            {
                              "expression": {
                                "id": 4649,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "delete",
                                "prefix": true,
                                "src": "5577:24:18",
                                "subExpression": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4645,
                                      "name": "map",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4577,
                                      "src": "5584:3:18",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                        "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                      }
                                    },
                                    "id": 4646,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_indexes",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4478,
                                    "src": "5584:12:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                                      "typeString": "mapping(contract IERC20 => uint256)"
                                    }
                                  },
                                  "id": 4648,
                                  "indexExpression": {
                                    "id": 4647,
                                    "name": "key",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4579,
                                    "src": "5597:3:18",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "5584:17:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 4650,
                              "nodeType": "ExpressionStatement",
                              "src": "5577:24:18"
                            },
                            {
                              "expression": {
                                "hexValue": "74727565",
                                "id": 4651,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5623:4:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "true"
                              },
                              "functionReturnParameters": 4583,
                              "id": 4652,
                              "nodeType": "Return",
                              "src": "5616:11:18"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4575,
                    "nodeType": "StructuredDocumentation",
                    "src": "3912:157:18",
                    "text": " @dev Removes a key-value pair from a map. O(1).\n Returns true if the key was removed from the map, that is if it was present."
                  },
                  "id": 4659,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "remove",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4580,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4577,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4659,
                        "src": "4090:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4576,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "4090:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4579,
                        "mutability": "mutable",
                        "name": "key",
                        "nodeType": "VariableDeclaration",
                        "scope": 4659,
                        "src": "4122:10:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 4578,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "4122:6:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4089:44:18"
                  },
                  "returnParameters": {
                    "id": 4583,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4582,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4659,
                        "src": "4152:4:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4581,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4152:4:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4151:6:18"
                  },
                  "scope": 4810,
                  "src": "4074:1613:18",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4676,
                    "nodeType": "Block",
                    "src": "5857:46:18",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4674,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "baseExpression": {
                              "expression": {
                                "id": 4669,
                                "name": "map",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4662,
                                "src": "5874:3:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                  "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                }
                              },
                              "id": 4670,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_indexes",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 4478,
                              "src": "5874:12:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                                "typeString": "mapping(contract IERC20 => uint256)"
                              }
                            },
                            "id": 4672,
                            "indexExpression": {
                              "id": 4671,
                              "name": "key",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4664,
                              "src": "5887:3:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "5874:17:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 4673,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5895:1:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5874:22:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 4668,
                        "id": 4675,
                        "nodeType": "Return",
                        "src": "5867:29:18"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4660,
                    "nodeType": "StructuredDocumentation",
                    "src": "5693:68:18",
                    "text": " @dev Returns true if the key is in the map. O(1)."
                  },
                  "id": 4677,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "contains",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4665,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4662,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4677,
                        "src": "5784:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4661,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "5784:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4664,
                        "mutability": "mutable",
                        "name": "key",
                        "nodeType": "VariableDeclaration",
                        "scope": 4677,
                        "src": "5816:10:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 4663,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5816:6:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5783:44:18"
                  },
                  "returnParameters": {
                    "id": 4668,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4667,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4677,
                        "src": "5851:4:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4666,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "5851:4:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5850:6:18"
                  },
                  "scope": 4810,
                  "src": "5766:137:18",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4688,
                    "nodeType": "Block",
                    "src": "6073:35:18",
                    "statements": [
                      {
                        "expression": {
                          "expression": {
                            "id": 4685,
                            "name": "map",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4680,
                            "src": "6090:3:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                            }
                          },
                          "id": 4686,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "_length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4470,
                          "src": "6090:11:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 4684,
                        "id": 4687,
                        "nodeType": "Return",
                        "src": "6083:18:18"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4678,
                    "nodeType": "StructuredDocumentation",
                    "src": "5909:79:18",
                    "text": " @dev Returns the number of key-value pairs in the map. O(1)."
                  },
                  "id": 4689,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "length",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4681,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4680,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4689,
                        "src": "6009:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4679,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "6009:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6008:32:18"
                  },
                  "returnParameters": {
                    "id": 4684,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4683,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4689,
                        "src": "6064:7:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4682,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6064:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6063:9:18"
                  },
                  "scope": 4810,
                  "src": "5993:115:18",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4715,
                    "nodeType": "Block",
                    "src": "6560:109:18",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4705,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 4702,
                                  "name": "map",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4692,
                                  "src": "6579:3:18",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                    "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                  }
                                },
                                "id": 4703,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "_length",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 4470,
                                "src": "6579:11:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "id": 4704,
                                "name": "index",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4694,
                                "src": "6593:5:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "6579:19:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 4706,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6600:6:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4707,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 402,
                              "src": "6600:20:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4701,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6570:8:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4708,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6570:51:18",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4709,
                        "nodeType": "ExpressionStatement",
                        "src": "6570:51:18"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4711,
                              "name": "map",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4692,
                              "src": "6651:3:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            {
                              "id": 4712,
                              "name": "index",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4694,
                              "src": "6656:5:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4710,
                            "name": "unchecked_at",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4742,
                            "src": "6638:12:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_uint256_$returns$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256) view returns (contract IERC20,bytes32)"
                            }
                          },
                          "id": 4713,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6638:24:18",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                            "typeString": "tuple(contract IERC20,bytes32)"
                          }
                        },
                        "functionReturnParameters": 4700,
                        "id": 4714,
                        "nodeType": "Return",
                        "src": "6631:31:18"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4690,
                    "nodeType": "StructuredDocumentation",
                    "src": "6114:342:18",
                    "text": " @dev Returns the key-value pair stored at position `index` in the map. O(1).\n Note that there are no guarantees on the ordering of entries inside the\n array, and it may change when more entries are added or removed.\n Requirements:\n - `index` must be strictly less than {length}."
                  },
                  "id": 4716,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "at",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4695,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4692,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4716,
                        "src": "6473:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4691,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "6473:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4694,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 4716,
                        "src": "6505:13:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4693,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6505:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6472:47:18"
                  },
                  "returnParameters": {
                    "id": 4700,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4697,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4716,
                        "src": "6543:6:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 4696,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6543:6:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4699,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4716,
                        "src": "6551:7:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 4698,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6551:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6542:17:18"
                  },
                  "scope": 4810,
                  "src": "6461:208:18",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4741,
                    "nodeType": "Block",
                    "src": "7090:119:18",
                    "statements": [
                      {
                        "assignments": [
                          4729
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4729,
                            "mutability": "mutable",
                            "name": "entry",
                            "nodeType": "VariableDeclaration",
                            "scope": 4741,
                            "src": "7100:37:18",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry"
                            },
                            "typeName": {
                              "id": 4728,
                              "name": "IERC20ToBytes32MapEntry",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4468,
                              "src": "7100:23:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 4734,
                        "initialValue": {
                          "baseExpression": {
                            "expression": {
                              "id": 4730,
                              "name": "map",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4719,
                              "src": "7140:3:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 4731,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_entries",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4474,
                            "src": "7140:12:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                              "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry storage ref)"
                            }
                          },
                          "id": 4733,
                          "indexExpression": {
                            "id": 4732,
                            "name": "index",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4721,
                            "src": "7153:5:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "7140:19:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7100:59:18"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "expression": {
                                "id": 4735,
                                "name": "entry",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4729,
                                "src": "7177:5:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                                  "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage pointer"
                                }
                              },
                              "id": 4736,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_key",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 4465,
                              "src": "7177:10:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 4737,
                                "name": "entry",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4729,
                                "src": "7189:5:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage_ptr",
                                  "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage pointer"
                                }
                              },
                              "id": 4738,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_value",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 4467,
                              "src": "7189:12:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "id": 4739,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "7176:26:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                            "typeString": "tuple(contract IERC20,bytes32)"
                          }
                        },
                        "functionReturnParameters": 4727,
                        "id": 4740,
                        "nodeType": "Return",
                        "src": "7169:33:18"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4717,
                    "nodeType": "StructuredDocumentation",
                    "src": "6675:301:18",
                    "text": " @dev Same as {at}, except this doesn't revert if `index` it outside of the map (i.e. if it is equal or larger\n than {length}). O(1).\n This function performs one less storage read than {at}, but should only be used when `index` is known to be\n within bounds."
                  },
                  "id": 4742,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "unchecked_at",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4722,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4719,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4742,
                        "src": "7003:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4718,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "7003:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4721,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 4742,
                        "src": "7035:13:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4720,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7035:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7002:47:18"
                  },
                  "returnParameters": {
                    "id": 4727,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4724,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4742,
                        "src": "7073:6:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 4723,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7073:6:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4726,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4742,
                        "src": "7081:7:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 4725,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7081:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7072:17:18"
                  },
                  "scope": 4810,
                  "src": "6981:228:18",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4758,
                    "nodeType": "Block",
                    "src": "7471:50:18",
                    "statements": [
                      {
                        "expression": {
                          "expression": {
                            "baseExpression": {
                              "expression": {
                                "id": 4752,
                                "name": "map",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4745,
                                "src": "7488:3:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                  "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                }
                              },
                              "id": 4753,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_entries",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 4474,
                              "src": "7488:12:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_IERC20ToBytes32MapEntry_$4468_storage_$",
                                "typeString": "mapping(uint256 => struct EnumerableMap.IERC20ToBytes32MapEntry storage ref)"
                              }
                            },
                            "id": 4755,
                            "indexExpression": {
                              "id": 4754,
                              "name": "index",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4747,
                              "src": "7501:5:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "7488:19:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32MapEntry_$4468_storage",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32MapEntry storage ref"
                            }
                          },
                          "id": 4756,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "_value",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4467,
                          "src": "7488:26:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 4751,
                        "id": 4757,
                        "nodeType": "Return",
                        "src": "7481:33:18"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4743,
                    "nodeType": "StructuredDocumentation",
                    "src": "7215:145:18",
                    "text": " @dev Same as {unchecked_At}, except it only returns the value and not the key (performing one less storage\n read). O(1)."
                  },
                  "id": 4759,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "unchecked_valueAt",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4748,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4745,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4759,
                        "src": "7392:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4744,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "7392:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4747,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 4759,
                        "src": "7424:13:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4746,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7424:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7391:47:18"
                  },
                  "returnParameters": {
                    "id": 4751,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4750,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4759,
                        "src": "7462:7:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 4749,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7462:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7461:9:18"
                  },
                  "scope": 4810,
                  "src": "7365:156:18",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4792,
                    "nodeType": "Block",
                    "src": "7846:140:18",
                    "statements": [
                      {
                        "assignments": [
                          4772
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4772,
                            "mutability": "mutable",
                            "name": "index",
                            "nodeType": "VariableDeclaration",
                            "scope": 4792,
                            "src": "7856:13:18",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 4771,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7856:7:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 4777,
                        "initialValue": {
                          "baseExpression": {
                            "expression": {
                              "id": 4773,
                              "name": "map",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4762,
                              "src": "7872:3:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 4774,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_indexes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4478,
                            "src": "7872:12:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                              "typeString": "mapping(contract IERC20 => uint256)"
                            }
                          },
                          "id": 4776,
                          "indexExpression": {
                            "id": 4775,
                            "name": "key",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4764,
                            "src": "7885:3:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "7872:17:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7856:33:18"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4781,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 4779,
                                "name": "index",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4772,
                                "src": "7908:5:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 4780,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7916:1:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "7908:9:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "id": 4782,
                              "name": "errorCode",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4766,
                              "src": "7919:9:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4778,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "7899:8:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4783,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7899:30:18",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4784,
                        "nodeType": "ExpressionStatement",
                        "src": "7899:30:18"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4786,
                              "name": "map",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4762,
                              "src": "7964:3:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4789,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 4787,
                                "name": "index",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4772,
                                "src": "7969:5:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "hexValue": "31",
                                "id": 4788,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7977:1:18",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "7969:9:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4785,
                            "name": "unchecked_valueAt",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4759,
                            "src": "7946:17:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256) view returns (bytes32)"
                            }
                          },
                          "id": 4790,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7946:33:18",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 4770,
                        "id": 4791,
                        "nodeType": "Return",
                        "src": "7939:40:18"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4760,
                    "nodeType": "StructuredDocumentation",
                    "src": "7527:176:18",
                    "text": " @dev Returns the value associated with `key`. O(1).\n Requirements:\n - `key` must be in the map. Reverts with `errorCode` otherwise."
                  },
                  "id": 4793,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "get",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4767,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4762,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4793,
                        "src": "7730:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4761,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "7730:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4764,
                        "mutability": "mutable",
                        "name": "key",
                        "nodeType": "VariableDeclaration",
                        "scope": 4793,
                        "src": "7770:10:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 4763,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7770:6:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4766,
                        "mutability": "mutable",
                        "name": "errorCode",
                        "nodeType": "VariableDeclaration",
                        "scope": 4793,
                        "src": "7790:17:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4765,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7790:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7720:93:18"
                  },
                  "returnParameters": {
                    "id": 4770,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4769,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4793,
                        "src": "7837:7:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 4768,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7837:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7836:9:18"
                  },
                  "scope": 4810,
                  "src": "7708:278:18",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4808,
                    "nodeType": "Block",
                    "src": "8241:41:18",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "expression": {
                              "id": 4803,
                              "name": "map",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4796,
                              "src": "8258:3:18",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 4804,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_indexes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4478,
                            "src": "8258:12:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                              "typeString": "mapping(contract IERC20 => uint256)"
                            }
                          },
                          "id": 4806,
                          "indexExpression": {
                            "id": 4805,
                            "name": "key",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4798,
                            "src": "8271:3:18",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "8258:17:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 4802,
                        "id": 4807,
                        "nodeType": "Return",
                        "src": "8251:24:18"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4794,
                    "nodeType": "StructuredDocumentation",
                    "src": "7992:141:18",
                    "text": " @dev Returns the index for `key` **plus one**. Does not revert if the key is not in the map, and returns 0\n instead."
                  },
                  "id": 4809,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "unchecked_indexOf",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4799,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4796,
                        "mutability": "mutable",
                        "name": "map",
                        "nodeType": "VariableDeclaration",
                        "scope": 4809,
                        "src": "8165:30:18",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 4795,
                          "name": "IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "8165:18:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4798,
                        "mutability": "mutable",
                        "name": "key",
                        "nodeType": "VariableDeclaration",
                        "scope": 4809,
                        "src": "8197:10:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 4797,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8197:6:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8164:44:18"
                  },
                  "returnParameters": {
                    "id": 4802,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4801,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4809,
                        "src": "8232:7:18",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4800,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8232:7:18",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8231:9:18"
                  },
                  "scope": 4810,
                  "src": "8138:144:18",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 4811,
              "src": "1542:6742:18"
            }
          ],
          "src": "33:8252:18"
        },
        "id": 18
      },
      "src.sol/amm/lib/openzeppelin/EnumerableSet.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/EnumerableSet.sol",
          "exportedSymbols": {
            "EnumerableSet": [
              5017
            ]
          },
          "id": 5018,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 4812,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:19"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 4813,
              "nodeType": "ImportDirective",
              "scope": 5018,
              "sourceUnit": 656,
              "src": "58:39:19",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 4814,
                "nodeType": "StructuredDocumentation",
                "src": "460:686:19",
                "text": " @dev Library for managing\n https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n types.\n Sets have the following properties:\n - Elements are added, removed, and checked for existence in constant time\n (O(1)).\n - Elements are enumerated in O(n). No guarantees are made on the ordering.\n ```\n contract Example {\n     // Add the library methods\n     using EnumerableSet for EnumerableSet.AddressSet;\n     // Declare a set state variable\n     EnumerableSet.AddressSet private mySet;\n }\n ```\n As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n and `uint256` (`UintSet`) are supported."
              },
              "fullyImplemented": true,
              "id": 5017,
              "linearizedBaseContracts": [
                5017
              ],
              "name": "EnumerableSet",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "canonicalName": "EnumerableSet.AddressSet",
                  "id": 4822,
                  "members": [
                    {
                      "constant": false,
                      "id": 4817,
                      "mutability": "mutable",
                      "name": "_values",
                      "nodeType": "VariableDeclaration",
                      "scope": 4822,
                      "src": "1440:17:19",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                        "typeString": "address[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 4815,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1440:7:19",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 4816,
                        "nodeType": "ArrayTypeName",
                        "src": "1440:9:19",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                          "typeString": "address[]"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 4821,
                      "mutability": "mutable",
                      "name": "_indexes",
                      "nodeType": "VariableDeclaration",
                      "scope": 4822,
                      "src": "1590:36:19",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                        "typeString": "mapping(address => uint256)"
                      },
                      "typeName": {
                        "id": 4820,
                        "keyType": {
                          "id": 4818,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1598:7:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "Mapping",
                        "src": "1590:27:19",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        },
                        "valueType": {
                          "id": 4819,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1609:7:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "AddressSet",
                  "nodeType": "StructDefinition",
                  "scope": 5017,
                  "src": "1379:254:19",
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 4862,
                    "nodeType": "Block",
                    "src": "1879:334:19",
                    "statements": [
                      {
                        "condition": {
                          "id": 4836,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "1893:21:19",
                          "subExpression": {
                            "arguments": [
                              {
                                "id": 4833,
                                "name": "set",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4825,
                                "src": "1903:3:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                  "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                }
                              },
                              {
                                "id": 4834,
                                "name": "value",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4827,
                                "src": "1908:5:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                  "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 4832,
                              "name": "contains",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4961,
                              "src": "1894:8:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$_t_address_$returns$_t_bool_$",
                                "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) view returns (bool)"
                              }
                            },
                            "id": 4835,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1894:20:19",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 4860,
                          "nodeType": "Block",
                          "src": "2170:37:19",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "66616c7365",
                                "id": 4858,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2191:5:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "false"
                              },
                              "functionReturnParameters": 4831,
                              "id": 4859,
                              "nodeType": "Return",
                              "src": "2184:12:19"
                            }
                          ]
                        },
                        "id": 4861,
                        "nodeType": "IfStatement",
                        "src": "1889:318:19",
                        "trueBody": {
                          "id": 4857,
                          "nodeType": "Block",
                          "src": "1916:248:19",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 4842,
                                    "name": "value",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4827,
                                    "src": "1947:5:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "expression": {
                                      "id": 4837,
                                      "name": "set",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4825,
                                      "src": "1930:3:19",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                        "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                      }
                                    },
                                    "id": 4840,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_values",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4817,
                                    "src": "1930:11:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                                      "typeString": "address[] storage ref"
                                    }
                                  },
                                  "id": 4841,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "push",
                                  "nodeType": "MemberAccess",
                                  "src": "1930:16:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$",
                                    "typeString": "function (address)"
                                  }
                                },
                                "id": 4843,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1930:23:19",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 4844,
                              "nodeType": "ExpressionStatement",
                              "src": "1930:23:19"
                            },
                            {
                              "expression": {
                                "id": 4853,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4845,
                                      "name": "set",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4825,
                                      "src": "2088:3:19",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                        "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                      }
                                    },
                                    "id": 4848,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_indexes",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4821,
                                    "src": "2088:12:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                      "typeString": "mapping(address => uint256)"
                                    }
                                  },
                                  "id": 4849,
                                  "indexExpression": {
                                    "id": 4847,
                                    "name": "value",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4827,
                                    "src": "2101:5:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "2088:19:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "expression": {
                                    "expression": {
                                      "id": 4850,
                                      "name": "set",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4825,
                                      "src": "2110:3:19",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                        "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                      }
                                    },
                                    "id": 4851,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_values",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4817,
                                    "src": "2110:11:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                                      "typeString": "address[] storage ref"
                                    }
                                  },
                                  "id": 4852,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "src": "2110:18:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2088:40:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4854,
                              "nodeType": "ExpressionStatement",
                              "src": "2088:40:19"
                            },
                            {
                              "expression": {
                                "hexValue": "74727565",
                                "id": 4855,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2149:4:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "true"
                              },
                              "functionReturnParameters": 4831,
                              "id": 4856,
                              "nodeType": "Return",
                              "src": "2142:11:19"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4823,
                    "nodeType": "StructuredDocumentation",
                    "src": "1639:159:19",
                    "text": " @dev Add a value to a set. O(1).\n Returns true if the value was added to the set, that is if it was not\n already present."
                  },
                  "id": 4863,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "add",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4828,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4825,
                        "mutability": "mutable",
                        "name": "set",
                        "nodeType": "VariableDeclaration",
                        "scope": 4863,
                        "src": "1816:22:19",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                          "typeString": "struct EnumerableSet.AddressSet"
                        },
                        "typeName": {
                          "id": 4824,
                          "name": "AddressSet",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4822,
                          "src": "1816:10:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                            "typeString": "struct EnumerableSet.AddressSet"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4827,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 4863,
                        "src": "1840:13:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4826,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1840:7:19",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1815:39:19"
                  },
                  "returnParameters": {
                    "id": 4831,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4830,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4863,
                        "src": "1873:4:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4829,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "1873:4:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1872:6:19"
                  },
                  "scope": 5017,
                  "src": "1803:410:19",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4942,
                    "nodeType": "Block",
                    "src": "2460:1452:19",
                    "statements": [
                      {
                        "assignments": [
                          4874
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 4874,
                            "mutability": "mutable",
                            "name": "valueIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 4942,
                            "src": "2570:18:19",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 4873,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2570:7:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 4879,
                        "initialValue": {
                          "baseExpression": {
                            "expression": {
                              "id": 4875,
                              "name": "set",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4866,
                              "src": "2591:3:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet storage pointer"
                              }
                            },
                            "id": 4876,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_indexes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4821,
                            "src": "2591:12:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 4878,
                          "indexExpression": {
                            "id": 4877,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4868,
                            "src": "2604:5:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2591:19:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2570:40:19"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4882,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 4880,
                            "name": "valueIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4874,
                            "src": "2625:10:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 4881,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2639:1:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2625:15:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 4940,
                          "nodeType": "Block",
                          "src": "3869:37:19",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "66616c7365",
                                "id": 4938,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3890:5:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "false"
                              },
                              "functionReturnParameters": 4872,
                              "id": 4939,
                              "nodeType": "Return",
                              "src": "3883:12:19"
                            }
                          ]
                        },
                        "id": 4941,
                        "nodeType": "IfStatement",
                        "src": "2621:1285:19",
                        "trueBody": {
                          "id": 4937,
                          "nodeType": "Block",
                          "src": "2642:1221:19",
                          "statements": [
                            {
                              "assignments": [
                                4884
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 4884,
                                  "mutability": "mutable",
                                  "name": "toDeleteIndex",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 4937,
                                  "src": "2994:21:19",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 4883,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2994:7:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 4888,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 4887,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 4885,
                                  "name": "valueIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4874,
                                  "src": "3018:10:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "hexValue": "31",
                                  "id": 4886,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3031:1:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "3018:14:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2994:38:19"
                            },
                            {
                              "assignments": [
                                4890
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 4890,
                                  "mutability": "mutable",
                                  "name": "lastIndex",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 4937,
                                  "src": "3046:17:19",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 4889,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3046:7:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 4896,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 4895,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "expression": {
                                      "id": 4891,
                                      "name": "set",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4866,
                                      "src": "3066:3:19",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                        "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                      }
                                    },
                                    "id": 4892,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_values",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4817,
                                    "src": "3066:11:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                                      "typeString": "address[] storage ref"
                                    }
                                  },
                                  "id": 4893,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "src": "3066:18:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "hexValue": "31",
                                  "id": 4894,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3087:1:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "3066:22:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3046:42:19"
                            },
                            {
                              "assignments": [
                                4898
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 4898,
                                  "mutability": "mutable",
                                  "name": "lastValue",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 4937,
                                  "src": "3328:17:19",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  "typeName": {
                                    "id": 4897,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3328:7:19",
                                    "stateMutability": "nonpayable",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 4903,
                              "initialValue": {
                                "baseExpression": {
                                  "expression": {
                                    "id": 4899,
                                    "name": "set",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4866,
                                    "src": "3348:3:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                      "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                    }
                                  },
                                  "id": 4900,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "_values",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4817,
                                  "src": "3348:11:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_address_$dyn_storage",
                                    "typeString": "address[] storage ref"
                                  }
                                },
                                "id": 4902,
                                "indexExpression": {
                                  "id": 4901,
                                  "name": "lastIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4890,
                                  "src": "3360:9:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3348:22:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3328:42:19"
                            },
                            {
                              "expression": {
                                "id": 4910,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4904,
                                      "name": "set",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4866,
                                      "src": "3462:3:19",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                        "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                      }
                                    },
                                    "id": 4907,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_values",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4817,
                                    "src": "3462:11:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                                      "typeString": "address[] storage ref"
                                    }
                                  },
                                  "id": 4908,
                                  "indexExpression": {
                                    "id": 4906,
                                    "name": "toDeleteIndex",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4884,
                                    "src": "3474:13:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "3462:26:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 4909,
                                  "name": "lastValue",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4898,
                                  "src": "3491:9:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "src": "3462:38:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "id": 4911,
                              "nodeType": "ExpressionStatement",
                              "src": "3462:38:19"
                            },
                            {
                              "expression": {
                                "id": 4920,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4912,
                                      "name": "set",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4866,
                                      "src": "3566:3:19",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                        "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                      }
                                    },
                                    "id": 4915,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_indexes",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4821,
                                    "src": "3566:12:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                      "typeString": "mapping(address => uint256)"
                                    }
                                  },
                                  "id": 4916,
                                  "indexExpression": {
                                    "id": 4914,
                                    "name": "lastValue",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4898,
                                    "src": "3579:9:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "3566:23:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 4919,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 4917,
                                    "name": "toDeleteIndex",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4884,
                                    "src": "3592:13:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "+",
                                  "rightExpression": {
                                    "hexValue": "31",
                                    "id": 4918,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "3608:1:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "3592:17:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3566:43:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 4921,
                              "nodeType": "ExpressionStatement",
                              "src": "3566:43:19"
                            },
                            {
                              "expression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "expression": {
                                      "id": 4922,
                                      "name": "set",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4866,
                                      "src": "3715:3:19",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                        "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                      }
                                    },
                                    "id": 4925,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_values",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4817,
                                    "src": "3715:11:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                                      "typeString": "address[] storage ref"
                                    }
                                  },
                                  "id": 4926,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "pop",
                                  "nodeType": "MemberAccess",
                                  "src": "3715:15:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$",
                                    "typeString": "function ()"
                                  }
                                },
                                "id": 4927,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3715:17:19",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 4928,
                              "nodeType": "ExpressionStatement",
                              "src": "3715:17:19"
                            },
                            {
                              "expression": {
                                "id": 4933,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "delete",
                                "prefix": true,
                                "src": "3800:26:19",
                                "subExpression": {
                                  "baseExpression": {
                                    "expression": {
                                      "id": 4929,
                                      "name": "set",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4866,
                                      "src": "3807:3:19",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                        "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                      }
                                    },
                                    "id": 4930,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "_indexes",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4821,
                                    "src": "3807:12:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                      "typeString": "mapping(address => uint256)"
                                    }
                                  },
                                  "id": 4932,
                                  "indexExpression": {
                                    "id": 4931,
                                    "name": "value",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4868,
                                    "src": "3820:5:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "3807:19:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 4934,
                              "nodeType": "ExpressionStatement",
                              "src": "3800:26:19"
                            },
                            {
                              "expression": {
                                "hexValue": "74727565",
                                "id": 4935,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3848:4:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "true"
                              },
                              "functionReturnParameters": 4872,
                              "id": 4936,
                              "nodeType": "Return",
                              "src": "3841:11:19"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4864,
                    "nodeType": "StructuredDocumentation",
                    "src": "2219:157:19",
                    "text": " @dev Removes a value from a set. O(1).\n Returns true if the value was removed from the set, that is if it was\n present."
                  },
                  "id": 4943,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "remove",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4869,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4866,
                        "mutability": "mutable",
                        "name": "set",
                        "nodeType": "VariableDeclaration",
                        "scope": 4943,
                        "src": "2397:22:19",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                          "typeString": "struct EnumerableSet.AddressSet"
                        },
                        "typeName": {
                          "id": 4865,
                          "name": "AddressSet",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4822,
                          "src": "2397:10:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                            "typeString": "struct EnumerableSet.AddressSet"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4868,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 4943,
                        "src": "2421:13:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4867,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2421:7:19",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2396:39:19"
                  },
                  "returnParameters": {
                    "id": 4872,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4871,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4943,
                        "src": "2454:4:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4870,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2454:4:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2453:6:19"
                  },
                  "scope": 5017,
                  "src": "2381:1531:19",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4960,
                    "nodeType": "Block",
                    "src": "4079:48:19",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 4958,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "baseExpression": {
                              "expression": {
                                "id": 4953,
                                "name": "set",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4946,
                                "src": "4096:3:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                  "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                }
                              },
                              "id": 4954,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_indexes",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 4821,
                              "src": "4096:12:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 4956,
                            "indexExpression": {
                              "id": 4955,
                              "name": "value",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4948,
                              "src": "4109:5:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "4096:19:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 4957,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4119:1:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4096:24:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 4952,
                        "id": 4959,
                        "nodeType": "Return",
                        "src": "4089:31:19"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4944,
                    "nodeType": "StructuredDocumentation",
                    "src": "3918:70:19",
                    "text": " @dev Returns true if the value is in the set. O(1)."
                  },
                  "id": 4961,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "contains",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4949,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4946,
                        "mutability": "mutable",
                        "name": "set",
                        "nodeType": "VariableDeclaration",
                        "scope": 4961,
                        "src": "4011:22:19",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                          "typeString": "struct EnumerableSet.AddressSet"
                        },
                        "typeName": {
                          "id": 4945,
                          "name": "AddressSet",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4822,
                          "src": "4011:10:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                            "typeString": "struct EnumerableSet.AddressSet"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4948,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 4961,
                        "src": "4035:13:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4947,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4035:7:19",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4010:39:19"
                  },
                  "returnParameters": {
                    "id": 4952,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4951,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4961,
                        "src": "4073:4:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 4950,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4073:4:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4072:6:19"
                  },
                  "scope": 5017,
                  "src": "3993:134:19",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4973,
                    "nodeType": "Block",
                    "src": "4280:42:19",
                    "statements": [
                      {
                        "expression": {
                          "expression": {
                            "expression": {
                              "id": 4969,
                              "name": "set",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4964,
                              "src": "4297:3:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet storage pointer"
                              }
                            },
                            "id": 4970,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_values",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4817,
                            "src": "4297:11:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_address_$dyn_storage",
                              "typeString": "address[] storage ref"
                            }
                          },
                          "id": 4971,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "4297:18:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 4968,
                        "id": 4972,
                        "nodeType": "Return",
                        "src": "4290:25:19"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4962,
                    "nodeType": "StructuredDocumentation",
                    "src": "4133:70:19",
                    "text": " @dev Returns the number of values on the set. O(1)."
                  },
                  "id": 4974,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "length",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4965,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4964,
                        "mutability": "mutable",
                        "name": "set",
                        "nodeType": "VariableDeclaration",
                        "scope": 4974,
                        "src": "4224:22:19",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                          "typeString": "struct EnumerableSet.AddressSet"
                        },
                        "typeName": {
                          "id": 4963,
                          "name": "AddressSet",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4822,
                          "src": "4224:10:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                            "typeString": "struct EnumerableSet.AddressSet"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4223:24:19"
                  },
                  "returnParameters": {
                    "id": 4968,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4967,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 4974,
                        "src": "4271:7:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4966,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4271:7:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4270:9:19"
                  },
                  "scope": 5017,
                  "src": "4208:114:19",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 4999,
                    "nodeType": "Block",
                    "src": "4747:116:19",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4989,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "expression": {
                                    "id": 4985,
                                    "name": "set",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4977,
                                    "src": "4766:3:19",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                      "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                    }
                                  },
                                  "id": 4986,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "_values",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4817,
                                  "src": "4766:11:19",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_address_$dyn_storage",
                                    "typeString": "address[] storage ref"
                                  }
                                },
                                "id": 4987,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "4766:18:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "id": 4988,
                                "name": "index",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4979,
                                "src": "4787:5:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "4766:26:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 4990,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4794:6:19",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 4991,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 402,
                              "src": "4794:20:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4984,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4757:8:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 4992,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4757:58:19",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4993,
                        "nodeType": "ExpressionStatement",
                        "src": "4757:58:19"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 4995,
                              "name": "set",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4977,
                              "src": "4845:3:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet storage pointer"
                              }
                            },
                            {
                              "id": 4996,
                              "name": "index",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4979,
                              "src": "4850:5:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet storage pointer"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4994,
                            "name": "unchecked_at",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5016,
                            "src": "4832:12:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$_t_uint256_$returns$_t_address_$",
                              "typeString": "function (struct EnumerableSet.AddressSet storage pointer,uint256) view returns (address)"
                            }
                          },
                          "id": 4997,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4832:24:19",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 4983,
                        "id": 4998,
                        "nodeType": "Return",
                        "src": "4825:31:19"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 4975,
                    "nodeType": "StructuredDocumentation",
                    "src": "4328:331:19",
                    "text": " @dev Returns the value stored at position `index` in the set. O(1).\n Note that there are no guarantees on the ordering of values inside the\n array, and it may change when more values are added or removed.\n Requirements:\n - `index` must be strictly less than {length}."
                  },
                  "id": 5000,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "at",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 4980,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4977,
                        "mutability": "mutable",
                        "name": "set",
                        "nodeType": "VariableDeclaration",
                        "scope": 5000,
                        "src": "4676:22:19",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                          "typeString": "struct EnumerableSet.AddressSet"
                        },
                        "typeName": {
                          "id": 4976,
                          "name": "AddressSet",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4822,
                          "src": "4676:10:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                            "typeString": "struct EnumerableSet.AddressSet"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 4979,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 5000,
                        "src": "4700:13:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 4978,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4700:7:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4675:39:19"
                  },
                  "returnParameters": {
                    "id": 4983,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 4982,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5000,
                        "src": "4738:7:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 4981,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4738:7:19",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4737:9:19"
                  },
                  "scope": 5017,
                  "src": "4664:199:19",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5015,
                    "nodeType": "Block",
                    "src": "5268:42:19",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "expression": {
                              "id": 5010,
                              "name": "set",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5003,
                              "src": "5285:3:19",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet storage pointer"
                              }
                            },
                            "id": 5011,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_values",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4817,
                            "src": "5285:11:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_address_$dyn_storage",
                              "typeString": "address[] storage ref"
                            }
                          },
                          "id": 5013,
                          "indexExpression": {
                            "id": 5012,
                            "name": "index",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5005,
                            "src": "5297:5:19",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5285:18:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 5009,
                        "id": 5014,
                        "nodeType": "Return",
                        "src": "5278:25:19"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 5001,
                    "nodeType": "StructuredDocumentation",
                    "src": "4869:301:19",
                    "text": " @dev Same as {at}, except this doesn't revert if `index` it outside of the set (i.e. if it is equal or larger\n than {length}). O(1).\n This function performs one less storage read than {at}, but should only be used when `index` is known to be\n within bounds."
                  },
                  "id": 5016,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "unchecked_at",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5006,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5003,
                        "mutability": "mutable",
                        "name": "set",
                        "nodeType": "VariableDeclaration",
                        "scope": 5016,
                        "src": "5197:22:19",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                          "typeString": "struct EnumerableSet.AddressSet"
                        },
                        "typeName": {
                          "id": 5002,
                          "name": "AddressSet",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4822,
                          "src": "5197:10:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                            "typeString": "struct EnumerableSet.AddressSet"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5005,
                        "mutability": "mutable",
                        "name": "index",
                        "nodeType": "VariableDeclaration",
                        "scope": 5016,
                        "src": "5221:13:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5004,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5221:7:19",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5196:39:19"
                  },
                  "returnParameters": {
                    "id": 5009,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5008,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5016,
                        "src": "5259:7:19",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5007,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5259:7:19",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5258:9:19"
                  },
                  "scope": 5017,
                  "src": "5175:135:19",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 5018,
              "src": "1147:4165:19"
            }
          ],
          "src": "33:5280:19"
        },
        "id": 19
      },
      "src.sol/amm/lib/openzeppelin/IERC20.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
          "exportedSymbols": {
            "IERC20": [
              5095
            ]
          },
          "id": 5096,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 5019,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:20"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "documentation": {
                "id": 5020,
                "nodeType": "StructuredDocumentation",
                "src": "58:70:20",
                "text": " @dev Interface of the ERC20 standard as defined in the EIP."
              },
              "fullyImplemented": false,
              "id": 5095,
              "linearizedBaseContracts": [
                5095
              ],
              "name": "IERC20",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "documentation": {
                    "id": 5021,
                    "nodeType": "StructuredDocumentation",
                    "src": "152:66:20",
                    "text": " @dev Returns the amount of tokens in existence."
                  },
                  "functionSelector": "18160ddd",
                  "id": 5026,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "totalSupply",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5022,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "243:2:20"
                  },
                  "returnParameters": {
                    "id": 5025,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5024,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5026,
                        "src": "269:7:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5023,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "269:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "268:9:20"
                  },
                  "scope": 5095,
                  "src": "223:55:20",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 5027,
                    "nodeType": "StructuredDocumentation",
                    "src": "284:72:20",
                    "text": " @dev Returns the amount of tokens owned by `account`."
                  },
                  "functionSelector": "70a08231",
                  "id": 5034,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "balanceOf",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5030,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5029,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 5034,
                        "src": "380:15:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5028,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "380:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "379:17:20"
                  },
                  "returnParameters": {
                    "id": 5033,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5032,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5034,
                        "src": "420:7:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5031,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "420:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "419:9:20"
                  },
                  "scope": 5095,
                  "src": "361:68:20",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 5035,
                    "nodeType": "StructuredDocumentation",
                    "src": "435:209:20",
                    "text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."
                  },
                  "functionSelector": "a9059cbb",
                  "id": 5044,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "transfer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5040,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5037,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 5044,
                        "src": "667:17:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5036,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "667:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5039,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5044,
                        "src": "686:14:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5038,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "686:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "666:35:20"
                  },
                  "returnParameters": {
                    "id": 5043,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5042,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5044,
                        "src": "720:4:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 5041,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "720:4:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "719:6:20"
                  },
                  "scope": 5095,
                  "src": "649:77:20",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 5045,
                    "nodeType": "StructuredDocumentation",
                    "src": "732:264:20",
                    "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called."
                  },
                  "functionSelector": "dd62ed3e",
                  "id": 5054,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "allowance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5050,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5047,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 5054,
                        "src": "1020:13:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5046,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1020:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5049,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5054,
                        "src": "1035:15:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5048,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1035:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1019:32:20"
                  },
                  "returnParameters": {
                    "id": 5053,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5052,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5054,
                        "src": "1075:7:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5051,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1075:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1074:9:20"
                  },
                  "scope": 5095,
                  "src": "1001:83:20",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 5055,
                    "nodeType": "StructuredDocumentation",
                    "src": "1090:642:20",
                    "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event."
                  },
                  "functionSelector": "095ea7b3",
                  "id": 5064,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "approve",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5060,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5057,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5064,
                        "src": "1754:15:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5056,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1754:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5059,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5064,
                        "src": "1771:14:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5058,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1771:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1753:33:20"
                  },
                  "returnParameters": {
                    "id": 5063,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5062,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5064,
                        "src": "1805:4:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 5061,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "1805:4:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1804:6:20"
                  },
                  "scope": 5095,
                  "src": "1737:74:20",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 5065,
                    "nodeType": "StructuredDocumentation",
                    "src": "1817:296:20",
                    "text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."
                  },
                  "functionSelector": "23b872dd",
                  "id": 5076,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "transferFrom",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5072,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5067,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5076,
                        "src": "2149:14:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5066,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2149:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5069,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 5076,
                        "src": "2173:17:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5068,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2173:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5071,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5076,
                        "src": "2200:14:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5070,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2200:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2139:81:20"
                  },
                  "returnParameters": {
                    "id": 5075,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5074,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5076,
                        "src": "2239:4:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 5073,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2239:4:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2238:6:20"
                  },
                  "scope": 5095,
                  "src": "2118:127:20",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 5077,
                    "nodeType": "StructuredDocumentation",
                    "src": "2251:158:20",
                    "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."
                  },
                  "id": 5085,
                  "name": "Transfer",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 5084,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5079,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "from",
                        "nodeType": "VariableDeclaration",
                        "scope": 5085,
                        "src": "2429:20:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5078,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2429:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5081,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "to",
                        "nodeType": "VariableDeclaration",
                        "scope": 5085,
                        "src": "2451:18:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5080,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2451:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5083,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 5085,
                        "src": "2471:13:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5082,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2471:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2428:57:20"
                  },
                  "src": "2414:72:20"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 5086,
                    "nodeType": "StructuredDocumentation",
                    "src": "2492:148:20",
                    "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance."
                  },
                  "id": 5094,
                  "name": "Approval",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 5093,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5088,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 5094,
                        "src": "2660:21:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5087,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2660:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5090,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5094,
                        "src": "2683:23:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5089,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2683:7:20",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5092,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 5094,
                        "src": "2708:13:20",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5091,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2708:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2659:63:20"
                  },
                  "src": "2645:78:20"
                }
              ],
              "scope": 5096,
              "src": "129:2596:20"
            }
          ],
          "src": "33:2693:20"
        },
        "id": 20
      },
      "src.sol/amm/lib/openzeppelin/IERC20Permit.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20Permit.sol",
          "exportedSymbols": {
            "IERC20Permit": [
              5131
            ]
          },
          "id": 5132,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 5097,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:21"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "documentation": {
                "id": 5098,
                "nodeType": "StructuredDocumentation",
                "src": "58:482:21",
                "text": " @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n need to send a transaction, and thus is not required to hold Ether at all."
              },
              "fullyImplemented": false,
              "id": 5131,
              "linearizedBaseContracts": [
                5131
              ],
              "name": "IERC20Permit",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "documentation": {
                    "id": 5099,
                    "nodeType": "StructuredDocumentation",
                    "src": "570:788:21",
                    "text": " @dev Sets `value` as the allowance of `spender` over `owner`'s tokens,\n given `owner`'s signed approval.\n IMPORTANT: The same issues {IERC20-approve} has related to transaction\n ordering also apply here.\n Emits an {Approval} event.\n Requirements:\n - `spender` cannot be the zero address.\n - `deadline` must be a timestamp in the future.\n - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n over the EIP712-formatted function arguments.\n - the signature must use ``owner``'s current nonce (see {nonces}).\n For more information on the signature format, see the\n https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n section]."
                  },
                  "functionSelector": "d505accf",
                  "id": 5116,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "permit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5114,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5101,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 5116,
                        "src": "1388:13:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5100,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1388:7:21",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5103,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5116,
                        "src": "1411:15:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5102,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1411:7:21",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5105,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 5116,
                        "src": "1436:13:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5104,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1436:7:21",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5107,
                        "mutability": "mutable",
                        "name": "deadline",
                        "nodeType": "VariableDeclaration",
                        "scope": 5116,
                        "src": "1459:16:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5106,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1459:7:21",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5109,
                        "mutability": "mutable",
                        "name": "v",
                        "nodeType": "VariableDeclaration",
                        "scope": 5116,
                        "src": "1485:7:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 5108,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "1485:5:21",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5111,
                        "mutability": "mutable",
                        "name": "r",
                        "nodeType": "VariableDeclaration",
                        "scope": 5116,
                        "src": "1502:9:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 5110,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1502:7:21",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5113,
                        "mutability": "mutable",
                        "name": "s",
                        "nodeType": "VariableDeclaration",
                        "scope": 5116,
                        "src": "1521:9:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 5112,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1521:7:21",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1378:158:21"
                  },
                  "returnParameters": {
                    "id": 5115,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1545:0:21"
                  },
                  "scope": 5131,
                  "src": "1363:183:21",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 5117,
                    "nodeType": "StructuredDocumentation",
                    "src": "1552:294:21",
                    "text": " @dev Returns the current nonce for `owner`. This value must be\n included whenever a signature is generated for {permit}.\n Every successful call to {permit} increases ``owner``'s nonce by one. This\n prevents a signature from being used multiple times."
                  },
                  "functionSelector": "7ecebe00",
                  "id": 5124,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "nonces",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5120,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5119,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 5124,
                        "src": "1867:13:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5118,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1867:7:21",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1866:15:21"
                  },
                  "returnParameters": {
                    "id": 5123,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5122,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5124,
                        "src": "1905:7:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5121,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1905:7:21",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1904:9:21"
                  },
                  "scope": 5131,
                  "src": "1851:63:21",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 5125,
                    "nodeType": "StructuredDocumentation",
                    "src": "1920:128:21",
                    "text": " @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}."
                  },
                  "functionSelector": "3644e515",
                  "id": 5130,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "DOMAIN_SEPARATOR",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5126,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2131:2:21"
                  },
                  "returnParameters": {
                    "id": 5129,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5128,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5130,
                        "src": "2157:7:21",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 5127,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2157:7:21",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2156:9:21"
                  },
                  "scope": 5131,
                  "src": "2106:60:21",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 5132,
              "src": "541:1627:21"
            }
          ],
          "src": "33:2136:21"
        },
        "id": 21
      },
      "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
          "exportedSymbols": {
            "ReentrancyGuard": [
              5187
            ]
          },
          "id": 5188,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 5133,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:22"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 5134,
              "nodeType": "ImportDirective",
              "scope": 5188,
              "sourceUnit": 656,
              "src": "58:39:22",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "documentation": {
                "id": 5135,
                "nodeType": "StructuredDocumentation",
                "src": "439:750:22",
                "text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]."
              },
              "fullyImplemented": true,
              "id": 5187,
              "linearizedBaseContracts": [
                5187
              ],
              "name": "ReentrancyGuard",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": true,
                  "id": 5138,
                  "mutability": "constant",
                  "name": "_NOT_ENTERED",
                  "nodeType": "VariableDeclaration",
                  "scope": 5187,
                  "src": "1978:41:22",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5136,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1978:7:22",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "31",
                    "id": 5137,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2018:1:22",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1_by_1",
                      "typeString": "int_const 1"
                    },
                    "value": "1"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 5141,
                  "mutability": "constant",
                  "name": "_ENTERED",
                  "nodeType": "VariableDeclaration",
                  "scope": 5187,
                  "src": "2025:37:22",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5139,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2025:7:22",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "32",
                    "id": 5140,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2061:1:22",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_2_by_1",
                      "typeString": "int_const 2"
                    },
                    "value": "2"
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 5143,
                  "mutability": "mutable",
                  "name": "_status",
                  "nodeType": "VariableDeclaration",
                  "scope": 5187,
                  "src": "2069:23:22",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5142,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2069:7:22",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 5150,
                    "nodeType": "Block",
                    "src": "2113:39:22",
                    "statements": [
                      {
                        "expression": {
                          "id": 5148,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5146,
                            "name": "_status",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5143,
                            "src": "2123:7:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 5147,
                            "name": "_NOT_ENTERED",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5138,
                            "src": "2133:12:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2123:22:22",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5149,
                        "nodeType": "ExpressionStatement",
                        "src": "2123:22:22"
                      }
                    ]
                  },
                  "id": 5151,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5144,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2110:2:22"
                  },
                  "returnParameters": {
                    "id": 5145,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2113:0:22"
                  },
                  "scope": 5187,
                  "src": "2099:53:22",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5161,
                    "nodeType": "Block",
                    "src": "2551:77:22",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 5154,
                            "name": "_enterNonReentrant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5178,
                            "src": "2561:18:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                              "typeString": "function ()"
                            }
                          },
                          "id": 5155,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2561:20:22",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5156,
                        "nodeType": "ExpressionStatement",
                        "src": "2561:20:22"
                      },
                      {
                        "id": 5157,
                        "nodeType": "PlaceholderStatement",
                        "src": "2591:1:22"
                      },
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 5158,
                            "name": "_exitNonReentrant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5186,
                            "src": "2602:17:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                              "typeString": "function ()"
                            }
                          },
                          "id": 5159,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2602:19:22",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5160,
                        "nodeType": "ExpressionStatement",
                        "src": "2602:19:22"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 5152,
                    "nodeType": "StructuredDocumentation",
                    "src": "2158:364:22",
                    "text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and make it call a\n `private` function that does the actual work."
                  },
                  "id": 5162,
                  "name": "nonReentrant",
                  "nodeType": "ModifierDefinition",
                  "parameters": {
                    "id": 5153,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2548:2:22"
                  },
                  "src": "2527:101:22",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5177,
                    "nodeType": "Block",
                    "src": "2672:233:22",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5168,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 5166,
                                "name": "_status",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5143,
                                "src": "2766:7:22",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "id": 5167,
                                "name": "_ENTERED",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5141,
                                "src": "2777:8:22",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "2766:19:22",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5169,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2787:6:22",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5170,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "REENTRANCY",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 483,
                              "src": "2787:17:22",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5165,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2757:8:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5171,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2757:48:22",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5172,
                        "nodeType": "ExpressionStatement",
                        "src": "2757:48:22"
                      },
                      {
                        "expression": {
                          "id": 5175,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5173,
                            "name": "_status",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5143,
                            "src": "2880:7:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 5174,
                            "name": "_ENTERED",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5141,
                            "src": "2890:8:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2880:18:22",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5176,
                        "nodeType": "ExpressionStatement",
                        "src": "2880:18:22"
                      }
                    ]
                  },
                  "id": 5178,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_enterNonReentrant",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5163,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2661:2:22"
                  },
                  "returnParameters": {
                    "id": 5164,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2672:0:22"
                  },
                  "scope": 5187,
                  "src": "2634:271:22",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 5185,
                    "nodeType": "Block",
                    "src": "2948:171:22",
                    "statements": [
                      {
                        "expression": {
                          "id": 5183,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5181,
                            "name": "_status",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5143,
                            "src": "3090:7:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 5182,
                            "name": "_NOT_ENTERED",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5138,
                            "src": "3100:12:22",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3090:22:22",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5184,
                        "nodeType": "ExpressionStatement",
                        "src": "3090:22:22"
                      }
                    ]
                  },
                  "id": 5186,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_exitNonReentrant",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5179,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2937:2:22"
                  },
                  "returnParameters": {
                    "id": 5180,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2948:0:22"
                  },
                  "scope": 5187,
                  "src": "2911:208:22",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 5188,
              "src": "1190:1931:22"
            }
          ],
          "src": "33:3089:22"
        },
        "id": 22
      },
      "src.sol/amm/lib/openzeppelin/SafeCast.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/SafeCast.sol",
          "exportedSymbols": {
            "SafeCast": [
              5216
            ]
          },
          "id": 5217,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 5189,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:23"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 5190,
              "nodeType": "ImportDirective",
              "scope": 5217,
              "sourceUnit": 656,
              "src": "58:39:23",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 5191,
                "nodeType": "StructuredDocumentation",
                "src": "99:709:23",
                "text": " @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n checks.\n Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n easily result in undesired exploitation or bugs, since developers usually\n assume that overflows raise errors. `SafeCast` restores this intuition by\n reverting the transaction when such an operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always.\n Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n all math on `uint256` and `int256` and then downcasting."
              },
              "fullyImplemented": true,
              "id": 5216,
              "linearizedBaseContracts": [
                5216
              ],
              "name": "SafeCast",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 5214,
                    "nodeType": "Block",
                    "src": "1066:111:23",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5204,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 5200,
                                "name": "value",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5194,
                                "src": "1085:5:23",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1",
                                  "typeString": "int_const 5789...(69 digits omitted)...9968"
                                },
                                "id": 5203,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "hexValue": "32",
                                  "id": 5201,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1093:1:23",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_2_by_1",
                                    "typeString": "int_const 2"
                                  },
                                  "value": "2"
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "**",
                                "rightExpression": {
                                  "hexValue": "323535",
                                  "id": 5202,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1096:3:23",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_255_by_1",
                                    "typeString": "int_const 255"
                                  },
                                  "value": "255"
                                },
                                "src": "1093:6:23",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1",
                                  "typeString": "int_const 5789...(69 digits omitted)...9968"
                                }
                              },
                              "src": "1085:14:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5205,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1101:6:23",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5206,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SAFE_CAST_VALUE_CANT_FIT_INT256",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 546,
                              "src": "1101:38:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5199,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1076:8:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5207,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1076:64:23",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5208,
                        "nodeType": "ExpressionStatement",
                        "src": "1076:64:23"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 5211,
                              "name": "value",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5194,
                              "src": "1164:5:23",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5210,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1157:6:23",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": {
                              "id": 5209,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1157:6:23",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 5212,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1157:13:23",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 5198,
                        "id": 5213,
                        "nodeType": "Return",
                        "src": "1150:20:23"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 5192,
                    "nodeType": "StructuredDocumentation",
                    "src": "832:165:23",
                    "text": " @dev Converts an unsigned uint256 into a signed int256.\n Requirements:\n - input must be less than or equal to maxInt256."
                  },
                  "id": 5215,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "toInt256",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5195,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5194,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 5215,
                        "src": "1020:13:23",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5193,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1020:7:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1019:15:23"
                  },
                  "returnParameters": {
                    "id": 5198,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5197,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5215,
                        "src": "1058:6:23",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 5196,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1058:6:23",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1057:8:23"
                  },
                  "scope": 5216,
                  "src": "1002:175:23",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 5217,
              "src": "809:370:23"
            }
          ],
          "src": "33:1147:23"
        },
        "id": 23
      },
      "src.sol/amm/lib/openzeppelin/SafeERC20.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
          "exportedSymbols": {
            "SafeERC20": [
              5311
            ]
          },
          "id": 5312,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 5218,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:24"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 5219,
              "nodeType": "ImportDirective",
              "scope": 5312,
              "sourceUnit": 656,
              "src": "58:39:24",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "./IERC20.sol",
              "id": 5220,
              "nodeType": "ImportDirective",
              "scope": 5312,
              "sourceUnit": 5096,
              "src": "99:22:24",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 5221,
                "nodeType": "StructuredDocumentation",
                "src": "123:457:24",
                "text": " @title SafeERC20\n @dev Wrappers around ERC20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc."
              },
              "fullyImplemented": true,
              "id": 5311,
              "linearizedBaseContracts": [
                5311
              ],
              "name": "SafeERC20",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 5245,
                    "nodeType": "Block",
                    "src": "707:112:24",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 5233,
                                  "name": "token",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5223,
                                  "src": "745:5:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 5232,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "737:7:24",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 5231,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "737:7:24",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 5234,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "737:14:24",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "expression": {
                                      "id": 5237,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5223,
                                      "src": "776:5:24",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "id": 5238,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "transfer",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5044,
                                    "src": "776:14:24",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                      "typeString": "function (address,uint256) external returns (bool)"
                                    }
                                  },
                                  "id": 5239,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "selector",
                                  "nodeType": "MemberAccess",
                                  "src": "776:23:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes4",
                                    "typeString": "bytes4"
                                  }
                                },
                                {
                                  "id": 5240,
                                  "name": "to",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5225,
                                  "src": "801:2:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 5241,
                                  "name": "value",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5227,
                                  "src": "805:5:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes4",
                                    "typeString": "bytes4"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 5235,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "753:3:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 5236,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encodeWithSelector",
                                "nodeType": "MemberAccess",
                                "src": "753:22:24",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes4) pure returns (bytes memory)"
                                }
                              },
                              "id": 5242,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "753:58:24",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 5230,
                            "name": "_callOptionalReturn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5310,
                            "src": "717:19:24",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$__$",
                              "typeString": "function (address,bytes memory)"
                            }
                          },
                          "id": 5243,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "717:95:24",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5244,
                        "nodeType": "ExpressionStatement",
                        "src": "717:95:24"
                      }
                    ]
                  },
                  "id": 5246,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "safeTransfer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5228,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5223,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 5246,
                        "src": "636:12:24",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 5222,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "636:6:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5225,
                        "mutability": "mutable",
                        "name": "to",
                        "nodeType": "VariableDeclaration",
                        "scope": 5246,
                        "src": "658:10:24",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5224,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "658:7:24",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5227,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 5246,
                        "src": "678:13:24",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5226,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "678:7:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "626:71:24"
                  },
                  "returnParameters": {
                    "id": 5229,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "707:0:24"
                  },
                  "scope": 5311,
                  "src": "605:214:24",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5273,
                    "nodeType": "Block",
                    "src": "953:122:24",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 5260,
                                  "name": "token",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5248,
                                  "src": "991:5:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 5259,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "983:7:24",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 5258,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "983:7:24",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 5261,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "983:14:24",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "expression": {
                                      "id": 5264,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5248,
                                      "src": "1022:5:24",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "id": 5265,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "transferFrom",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5076,
                                    "src": "1022:18:24",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                                      "typeString": "function (address,address,uint256) external returns (bool)"
                                    }
                                  },
                                  "id": 5266,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "selector",
                                  "nodeType": "MemberAccess",
                                  "src": "1022:27:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes4",
                                    "typeString": "bytes4"
                                  }
                                },
                                {
                                  "id": 5267,
                                  "name": "from",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5250,
                                  "src": "1051:4:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 5268,
                                  "name": "to",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5252,
                                  "src": "1057:2:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 5269,
                                  "name": "value",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5254,
                                  "src": "1061:5:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes4",
                                    "typeString": "bytes4"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 5262,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "999:3:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 5263,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encodeWithSelector",
                                "nodeType": "MemberAccess",
                                "src": "999:22:24",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function (bytes4) pure returns (bytes memory)"
                                }
                              },
                              "id": 5270,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "999:68:24",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 5257,
                            "name": "_callOptionalReturn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5310,
                            "src": "963:19:24",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$__$",
                              "typeString": "function (address,bytes memory)"
                            }
                          },
                          "id": 5271,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "963:105:24",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5272,
                        "nodeType": "ExpressionStatement",
                        "src": "963:105:24"
                      }
                    ]
                  },
                  "id": 5274,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "safeTransferFrom",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5255,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5248,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 5274,
                        "src": "860:12:24",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 5247,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "860:6:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5250,
                        "mutability": "mutable",
                        "name": "from",
                        "nodeType": "VariableDeclaration",
                        "scope": 5274,
                        "src": "882:12:24",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5249,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "882:7:24",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5252,
                        "mutability": "mutable",
                        "name": "to",
                        "nodeType": "VariableDeclaration",
                        "scope": 5274,
                        "src": "904:10:24",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5251,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "904:7:24",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5254,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 5274,
                        "src": "924:13:24",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5253,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "924:7:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "850:93:24"
                  },
                  "returnParameters": {
                    "id": 5256,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "953:0:24"
                  },
                  "scope": 5311,
                  "src": "825:250:24",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5309,
                    "nodeType": "Block",
                    "src": "1486:728:24",
                    "statements": [
                      {
                        "assignments": [
                          5283,
                          5285
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5283,
                            "mutability": "mutable",
                            "name": "success",
                            "nodeType": "VariableDeclaration",
                            "scope": 5309,
                            "src": "1658:12:24",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 5282,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "1658:4:24",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 5285,
                            "mutability": "mutable",
                            "name": "returndata",
                            "nodeType": "VariableDeclaration",
                            "scope": 5309,
                            "src": "1672:23:24",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes"
                            },
                            "typeName": {
                              "id": 5284,
                              "name": "bytes",
                              "nodeType": "ElementaryTypeName",
                              "src": "1672:5:24",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_storage_ptr",
                                "typeString": "bytes"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5290,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 5288,
                              "name": "data",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5279,
                              "src": "1710:4:24",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "expression": {
                              "id": 5286,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5277,
                              "src": "1699:5:24",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "id": 5287,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "call",
                            "nodeType": "MemberAccess",
                            "src": "1699:10:24",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) payable returns (bool,bytes memory)"
                            }
                          },
                          "id": 5289,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1699:16:24",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                            "typeString": "tuple(bool,bytes memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1657:58:24"
                      },
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "1824:156:24",
                          "statements": [
                            {
                              "body": {
                                "nodeType": "YulBlock",
                                "src": "1856:114:24",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "1889:1:24",
                                          "type": "",
                                          "value": "0"
                                        },
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "1892:1:24",
                                          "type": "",
                                          "value": "0"
                                        },
                                        {
                                          "arguments": [],
                                          "functionName": {
                                            "name": "returndatasize",
                                            "nodeType": "YulIdentifier",
                                            "src": "1895:14:24"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "1895:16:24"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "returndatacopy",
                                        "nodeType": "YulIdentifier",
                                        "src": "1874:14:24"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "1874:38:24"
                                    },
                                    "nodeType": "YulExpressionStatement",
                                    "src": "1874:38:24"
                                  },
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "1936:1:24",
                                          "type": "",
                                          "value": "0"
                                        },
                                        {
                                          "arguments": [],
                                          "functionName": {
                                            "name": "returndatasize",
                                            "nodeType": "YulIdentifier",
                                            "src": "1939:14:24"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "1939:16:24"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "revert",
                                        "nodeType": "YulIdentifier",
                                        "src": "1929:6:24"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "1929:27:24"
                                    },
                                    "nodeType": "YulExpressionStatement",
                                    "src": "1929:27:24"
                                  }
                                ]
                              },
                              "condition": {
                                "arguments": [
                                  {
                                    "name": "success",
                                    "nodeType": "YulIdentifier",
                                    "src": "1844:7:24"
                                  },
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "1853:1:24",
                                    "type": "",
                                    "value": "0"
                                  }
                                ],
                                "functionName": {
                                  "name": "eq",
                                  "nodeType": "YulIdentifier",
                                  "src": "1841:2:24"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "1841:14:24"
                              },
                              "nodeType": "YulIf",
                              "src": "1838:2:24"
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 5283,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "1844:7:24",
                            "valueSize": 1
                          }
                        ],
                        "id": 5291,
                        "nodeType": "InlineAssembly",
                        "src": "1815:165:24"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 5304,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 5296,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 5293,
                                    "name": "returndata",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5285,
                                    "src": "2119:10:24",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  "id": 5294,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "src": "2119:17:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "hexValue": "30",
                                  "id": 5295,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2140:1:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "2119:22:24",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "id": 5299,
                                    "name": "returndata",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5285,
                                    "src": "2156:10:24",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  },
                                  {
                                    "components": [
                                      {
                                        "id": 5301,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "2169:4:24",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_bool_$",
                                          "typeString": "type(bool)"
                                        },
                                        "typeName": {
                                          "id": 5300,
                                          "name": "bool",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "2169:4:24",
                                          "typeDescriptions": {}
                                        }
                                      }
                                    ],
                                    "id": 5302,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "2168:6:24",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_bool_$",
                                      "typeString": "type(bool)"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    },
                                    {
                                      "typeIdentifier": "t_type$_t_bool_$",
                                      "typeString": "type(bool)"
                                    }
                                  ],
                                  "expression": {
                                    "id": 5297,
                                    "name": "abi",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -1,
                                    "src": "2145:3:24",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_abi",
                                      "typeString": "abi"
                                    }
                                  },
                                  "id": 5298,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "decode",
                                  "nodeType": "MemberAccess",
                                  "src": "2145:10:24",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                    "typeString": "function () pure"
                                  }
                                },
                                "id": 5303,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2145:30:24",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "2119:56:24",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5305,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2177:6:24",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5306,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SAFE_ERC20_CALL_FAILED",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 537,
                              "src": "2177:29:24",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5292,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2110:8:24",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5307,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2110:97:24",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5308,
                        "nodeType": "ExpressionStatement",
                        "src": "2110:97:24"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 5275,
                    "nodeType": "StructuredDocumentation",
                    "src": "1081:329:24",
                    "text": " @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n on the return value: the return value is optional (but if data is returned, it must not be false).\n WARNING: `token` is assumed to be a contract: calls to EOAs will *not* revert."
                  },
                  "id": 5310,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_callOptionalReturn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5280,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5277,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 5310,
                        "src": "1444:13:24",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5276,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1444:7:24",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5279,
                        "mutability": "mutable",
                        "name": "data",
                        "nodeType": "VariableDeclaration",
                        "scope": 5310,
                        "src": "1459:17:24",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 5278,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1459:5:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1443:34:24"
                  },
                  "returnParameters": {
                    "id": 5281,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1486:0:24"
                  },
                  "scope": 5311,
                  "src": "1415:799:24",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 5312,
              "src": "581:1635:24"
            }
          ],
          "src": "33:2184:24"
        },
        "id": 24
      },
      "src.sol/amm/lib/openzeppelin/SafeMath.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/lib/openzeppelin/SafeMath.sol",
          "exportedSymbols": {
            "SafeMath": [
              5389
            ]
          },
          "id": 5390,
          "license": "MIT",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 5313,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "33:23:25"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../helpers/BalancerErrors.sol",
              "id": 5314,
              "nodeType": "ImportDirective",
              "scope": 5390,
              "sourceUnit": 656,
              "src": "58:39:25",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "documentation": {
                "id": 5315,
                "nodeType": "StructuredDocumentation",
                "src": "99:563:25",
                "text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always."
              },
              "fullyImplemented": true,
              "id": 5389,
              "linearizedBaseContracts": [
                5389
              ],
              "name": "SafeMath",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 5341,
                    "nodeType": "Block",
                    "src": "982:100:25",
                    "statements": [
                      {
                        "assignments": [
                          5326
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5326,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 5341,
                            "src": "992:9:25",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 5325,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "992:7:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5330,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 5329,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 5327,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5318,
                            "src": "1004:1:25",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 5328,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5320,
                            "src": "1008:1:25",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1004:5:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "992:17:25"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5334,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 5332,
                                "name": "c",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5326,
                                "src": "1028:1:25",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 5333,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5318,
                                "src": "1033:1:25",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1028:6:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5335,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1036:6:25",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5336,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ADD_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 372,
                              "src": "1036:19:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5331,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1019:8:25",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5337,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1019:37:25",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5338,
                        "nodeType": "ExpressionStatement",
                        "src": "1019:37:25"
                      },
                      {
                        "expression": {
                          "id": 5339,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5326,
                          "src": "1074:1:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 5324,
                        "id": 5340,
                        "nodeType": "Return",
                        "src": "1067:8:25"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 5316,
                    "nodeType": "StructuredDocumentation",
                    "src": "686:224:25",
                    "text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow."
                  },
                  "id": 5342,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "add",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5321,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5318,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 5342,
                        "src": "928:9:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5317,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "928:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5320,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 5342,
                        "src": "939:9:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5319,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "939:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "927:22:25"
                  },
                  "returnParameters": {
                    "id": 5324,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5323,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5342,
                        "src": "973:7:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5322,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "973:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "972:9:25"
                  },
                  "scope": 5389,
                  "src": "915:167:25",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5359,
                    "nodeType": "Block",
                    "src": "1420:54:25",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 5353,
                              "name": "a",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5345,
                              "src": "1441:1:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 5354,
                              "name": "b",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5347,
                              "src": "1444:1:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 5355,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1447:6:25",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5356,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SUB_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 375,
                              "src": "1447:19:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5352,
                            "name": "sub",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              5360,
                              5388
                            ],
                            "referencedDeclaration": 5388,
                            "src": "1437:3:25",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 5357,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1437:30:25",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 5351,
                        "id": 5358,
                        "nodeType": "Return",
                        "src": "1430:37:25"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 5343,
                    "nodeType": "StructuredDocumentation",
                    "src": "1088:260:25",
                    "text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
                  },
                  "id": 5360,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "sub",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5348,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5345,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 5360,
                        "src": "1366:9:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5344,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1366:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5347,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 5360,
                        "src": "1377:9:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5346,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1377:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1365:22:25"
                  },
                  "returnParameters": {
                    "id": 5351,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5350,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5360,
                        "src": "1411:7:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5349,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1411:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1410:9:25"
                  },
                  "scope": 5389,
                  "src": "1353:121:25",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5387,
                    "nodeType": "Block",
                    "src": "1851:90:25",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5375,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 5373,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5365,
                                "src": "1870:1:25",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 5374,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5363,
                                "src": "1875:1:25",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1870:6:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "id": 5376,
                              "name": "errorCode",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5367,
                              "src": "1878:9:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5372,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1861:8:25",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5377,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1861:27:25",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5378,
                        "nodeType": "ExpressionStatement",
                        "src": "1861:27:25"
                      },
                      {
                        "assignments": [
                          5380
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5380,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 5387,
                            "src": "1898:9:25",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 5379,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1898:7:25",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5384,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 5383,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 5381,
                            "name": "a",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5363,
                            "src": "1910:1:25",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "id": 5382,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5365,
                            "src": "1914:1:25",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1910:5:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1898:17:25"
                      },
                      {
                        "expression": {
                          "id": 5385,
                          "name": "c",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5380,
                          "src": "1933:1:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 5371,
                        "id": 5386,
                        "nodeType": "Return",
                        "src": "1926:8:25"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 5361,
                    "nodeType": "StructuredDocumentation",
                    "src": "1480:280:25",
                    "text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow."
                  },
                  "id": 5388,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "sub",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5368,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5363,
                        "mutability": "mutable",
                        "name": "a",
                        "nodeType": "VariableDeclaration",
                        "scope": 5388,
                        "src": "1778:9:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5362,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1778:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5365,
                        "mutability": "mutable",
                        "name": "b",
                        "nodeType": "VariableDeclaration",
                        "scope": 5388,
                        "src": "1789:9:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5364,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1789:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5367,
                        "mutability": "mutable",
                        "name": "errorCode",
                        "nodeType": "VariableDeclaration",
                        "scope": 5388,
                        "src": "1800:17:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5366,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1800:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1777:41:25"
                  },
                  "returnParameters": {
                    "id": 5371,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5370,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5388,
                        "src": "1842:7:25",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5369,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1842:7:25",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1841:9:25"
                  },
                  "scope": 5389,
                  "src": "1765:176:25",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 5390,
              "src": "663:1280:25"
            }
          ],
          "src": "33:1911:25"
        },
        "id": 25
      },
      "src.sol/amm/pools/BalancerPoolToken.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/BalancerPoolToken.sol",
          "exportedSymbols": {
            "BalancerPoolToken": [
              5976
            ]
          },
          "id": 5977,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 5391,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:26"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../lib/math/Math.sol",
              "id": 5392,
              "nodeType": "ImportDirective",
              "scope": 5977,
              "sourceUnit": 3351,
              "src": "713:30:26",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 5393,
              "nodeType": "ImportDirective",
              "scope": 5977,
              "sourceUnit": 5096,
              "src": "744:40:26",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20Permit.sol",
              "file": "../lib/openzeppelin/IERC20Permit.sol",
              "id": 5394,
              "nodeType": "ImportDirective",
              "scope": 5977,
              "sourceUnit": 5132,
              "src": "785:46:26",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/EIP712.sol",
              "file": "../lib/openzeppelin/EIP712.sol",
              "id": 5395,
              "nodeType": "ImportDirective",
              "scope": 5977,
              "sourceUnit": 3891,
              "src": "832:40:26",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 5397,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "1487:6:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "id": 5398,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1487:6:26"
                },
                {
                  "baseName": {
                    "id": 5399,
                    "name": "IERC20Permit",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5131,
                    "src": "1495:12:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20Permit_$5131",
                      "typeString": "contract IERC20Permit"
                    }
                  },
                  "id": 5400,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1495:12:26"
                },
                {
                  "baseName": {
                    "id": 5401,
                    "name": "EIP712",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3890,
                    "src": "1509:6:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_EIP712_$3890",
                      "typeString": "contract EIP712"
                    }
                  },
                  "id": 5402,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1509:6:26"
                }
              ],
              "contractDependencies": [
                3890,
                5095,
                5131
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 5396,
                "nodeType": "StructuredDocumentation",
                "src": "874:582:26",
                "text": " @title Highly opinionated token implementation\n @author Balancer Labs\n @dev\n - Includes functions to increase and decrease allowance as a workaround\n   for the well-known issue with `approve`:\n   https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n - Allows for 'infinite allowance', where an allowance of 0xff..ff is not\n   decreased by calls to transferFrom\n - Lets a token holder use `transferFrom` to send their own tokens,\n   without first setting allowance\n - Emits 'Approval' events whenever allowance is changed by `transferFrom`"
              },
              "fullyImplemented": true,
              "id": 5976,
              "linearizedBaseContracts": [
                5976,
                3890,
                5131,
                5095
              ],
              "name": "BalancerPoolToken",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 5405,
                  "libraryName": {
                    "id": 5403,
                    "name": "Math",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3350,
                    "src": "1528:4:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Math_$3350",
                      "typeString": "library Math"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1522:23:26",
                  "typeName": {
                    "id": 5404,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1537:7:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "constant": true,
                  "id": 5408,
                  "mutability": "constant",
                  "name": "_DECIMALS",
                  "nodeType": "VariableDeclaration",
                  "scope": 5976,
                  "src": "1575:37:26",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 5406,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "1575:5:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": {
                    "hexValue": "3138",
                    "id": 5407,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1610:2:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_18_by_1",
                      "typeString": "int_const 18"
                    },
                    "value": "18"
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 5412,
                  "mutability": "mutable",
                  "name": "_balance",
                  "nodeType": "VariableDeclaration",
                  "scope": 5976,
                  "src": "1619:44:26",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                    "typeString": "mapping(address => uint256)"
                  },
                  "typeName": {
                    "id": 5411,
                    "keyType": {
                      "id": 5409,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "1627:7:26",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1619:27:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                      "typeString": "mapping(address => uint256)"
                    },
                    "valueType": {
                      "id": 5410,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "1638:7:26",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 5418,
                  "mutability": "mutable",
                  "name": "_allowance",
                  "nodeType": "VariableDeclaration",
                  "scope": 5976,
                  "src": "1669:66:26",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                    "typeString": "mapping(address => mapping(address => uint256))"
                  },
                  "typeName": {
                    "id": 5417,
                    "keyType": {
                      "id": 5413,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "1677:7:26",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1669:47:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                      "typeString": "mapping(address => mapping(address => uint256))"
                    },
                    "valueType": {
                      "id": 5416,
                      "keyType": {
                        "id": 5414,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "1696:7:26",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "nodeType": "Mapping",
                      "src": "1688:27:26",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                        "typeString": "mapping(address => uint256)"
                      },
                      "valueType": {
                        "id": 5415,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1707:7:26",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 5420,
                  "mutability": "mutable",
                  "name": "_totalSupply",
                  "nodeType": "VariableDeclaration",
                  "scope": 5976,
                  "src": "1741:28:26",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5419,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1741:7:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 5422,
                  "mutability": "mutable",
                  "name": "_name",
                  "nodeType": "VariableDeclaration",
                  "scope": 5976,
                  "src": "1776:20:26",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_storage",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 5421,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1776:6:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 5424,
                  "mutability": "mutable",
                  "name": "_symbol",
                  "nodeType": "VariableDeclaration",
                  "scope": 5976,
                  "src": "1802:22:26",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_storage",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 5423,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1802:6:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 5428,
                  "mutability": "mutable",
                  "name": "_nonces",
                  "nodeType": "VariableDeclaration",
                  "scope": 5976,
                  "src": "1831:43:26",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                    "typeString": "mapping(address => uint256)"
                  },
                  "typeName": {
                    "id": 5427,
                    "keyType": {
                      "id": 5425,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "1839:7:26",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1831:27:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                      "typeString": "mapping(address => uint256)"
                    },
                    "valueType": {
                      "id": 5426,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "1850:7:26",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 5433,
                  "mutability": "immutable",
                  "name": "_PERMIT_TYPE_HASH",
                  "nodeType": "VariableDeclaration",
                  "scope": 5976,
                  "src": "1933:155:26",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 5429,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1933:7:26",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": {
                    "arguments": [
                      {
                        "hexValue": "5065726d69742861646472657373206f776e65722c61646472657373207370656e6465722c75696e743235362076616c75652c75696e74323536206e6f6e63652c75696e7432353620646561646c696e6529",
                        "id": 5431,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1998:84:26",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9",
                          "typeString": "literal_string \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\""
                        },
                        "value": "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_stringliteral_6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9",
                          "typeString": "literal_string \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\""
                        }
                      ],
                      "id": 5430,
                      "name": "keccak256",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": -8,
                      "src": "1979:9:26",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 5432,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1979:109:26",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 5452,
                    "nodeType": "Block",
                    "src": "2212:65:26",
                    "statements": [
                      {
                        "expression": {
                          "id": 5446,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5444,
                            "name": "_name",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5422,
                            "src": "2222:5:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_string_storage",
                              "typeString": "string storage ref"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 5445,
                            "name": "tokenName",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5435,
                            "src": "2230:9:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_string_memory_ptr",
                              "typeString": "string memory"
                            }
                          },
                          "src": "2222:17:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage",
                            "typeString": "string storage ref"
                          }
                        },
                        "id": 5447,
                        "nodeType": "ExpressionStatement",
                        "src": "2222:17:26"
                      },
                      {
                        "expression": {
                          "id": 5450,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5448,
                            "name": "_symbol",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5424,
                            "src": "2249:7:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_string_storage",
                              "typeString": "string storage ref"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 5449,
                            "name": "tokenSymbol",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5437,
                            "src": "2259:11:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_string_memory_ptr",
                              "typeString": "string memory"
                            }
                          },
                          "src": "2249:21:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage",
                            "typeString": "string storage ref"
                          }
                        },
                        "id": 5451,
                        "nodeType": "ExpressionStatement",
                        "src": "2249:21:26"
                      }
                    ]
                  },
                  "id": 5453,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 5440,
                          "name": "tokenName",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5435,
                          "src": "2196:9:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "hexValue": "31",
                          "id": 5441,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2207:3:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6",
                            "typeString": "literal_string \"1\""
                          },
                          "value": "1"
                        }
                      ],
                      "id": 5442,
                      "modifierName": {
                        "id": 5439,
                        "name": "EIP712",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3890,
                        "src": "2189:6:26",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_EIP712_$3890_$",
                          "typeString": "type(contract EIP712)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2189:22:26"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5438,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5435,
                        "mutability": "mutable",
                        "name": "tokenName",
                        "nodeType": "VariableDeclaration",
                        "scope": 5453,
                        "src": "2137:23:26",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 5434,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "2137:6:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5437,
                        "mutability": "mutable",
                        "name": "tokenSymbol",
                        "nodeType": "VariableDeclaration",
                        "scope": 5453,
                        "src": "2162:25:26",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 5436,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "2162:6:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2136:52:26"
                  },
                  "returnParameters": {
                    "id": 5443,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2212:0:26"
                  },
                  "scope": 5976,
                  "src": "2125:152:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5054
                  ],
                  "body": {
                    "id": 5469,
                    "nodeType": "Block",
                    "src": "2402:50:26",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "baseExpression": {
                              "id": 5463,
                              "name": "_allowance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5418,
                              "src": "2419:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(address => uint256))"
                              }
                            },
                            "id": 5465,
                            "indexExpression": {
                              "id": 5464,
                              "name": "owner",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5455,
                              "src": "2430:5:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "2419:17:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 5467,
                          "indexExpression": {
                            "id": 5466,
                            "name": "spender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5457,
                            "src": "2437:7:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2419:26:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 5462,
                        "id": 5468,
                        "nodeType": "Return",
                        "src": "2412:33:26"
                      }
                    ]
                  },
                  "functionSelector": "dd62ed3e",
                  "id": 5470,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "allowance",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5459,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2375:8:26"
                  },
                  "parameters": {
                    "id": 5458,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5455,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 5470,
                        "src": "2329:13:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5454,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2329:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5457,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5470,
                        "src": "2344:15:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5456,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2344:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2328:32:26"
                  },
                  "returnParameters": {
                    "id": 5462,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5461,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5470,
                        "src": "2393:7:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5460,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2393:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2392:9:26"
                  },
                  "scope": 5976,
                  "src": "2310:142:26",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    5034
                  ],
                  "body": {
                    "id": 5482,
                    "nodeType": "Block",
                    "src": "2535:41:26",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "id": 5478,
                            "name": "_balance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5412,
                            "src": "2552:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 5480,
                          "indexExpression": {
                            "id": 5479,
                            "name": "account",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5472,
                            "src": "2561:7:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2552:17:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 5477,
                        "id": 5481,
                        "nodeType": "Return",
                        "src": "2545:24:26"
                      }
                    ]
                  },
                  "functionSelector": "70a08231",
                  "id": 5483,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "balanceOf",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5474,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2508:8:26"
                  },
                  "parameters": {
                    "id": 5473,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5472,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 5483,
                        "src": "2477:15:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5471,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2477:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2476:17:26"
                  },
                  "returnParameters": {
                    "id": 5477,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5476,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5483,
                        "src": "2526:7:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5475,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2526:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2525:9:26"
                  },
                  "scope": 5976,
                  "src": "2458:118:26",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    5064
                  ],
                  "body": {
                    "id": 5502,
                    "nodeType": "Block",
                    "src": "2665:81:26",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 5494,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "2689:3:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 5495,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "2689:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 5496,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5485,
                              "src": "2701:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5497,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5487,
                              "src": "2710:6:26",
                              "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": 5493,
                            "name": "_setAllowance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5975,
                            "src": "2675:13:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5498,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2675:42:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5499,
                        "nodeType": "ExpressionStatement",
                        "src": "2675:42:26"
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 5500,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2735:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 5492,
                        "id": 5501,
                        "nodeType": "Return",
                        "src": "2728:11:26"
                      }
                    ]
                  },
                  "functionSelector": "095ea7b3",
                  "id": 5503,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "approve",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5489,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2641:8:26"
                  },
                  "parameters": {
                    "id": 5488,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5485,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5503,
                        "src": "2599:15:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5484,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2599:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5487,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5503,
                        "src": "2616:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5486,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2616:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2598:33:26"
                  },
                  "returnParameters": {
                    "id": 5492,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5491,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5503,
                        "src": "2659:4:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 5490,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2659:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2658:6:26"
                  },
                  "scope": 5976,
                  "src": "2582:164:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 5529,
                    "nodeType": "Block",
                    "src": "2835:118:26",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 5513,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "2859:3:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 5514,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "2859:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 5515,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5505,
                              "src": "2871:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 5523,
                                  "name": "amount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5507,
                                  "src": "2916:6:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 5516,
                                      "name": "_allowance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5418,
                                      "src": "2880:10:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                        "typeString": "mapping(address => mapping(address => uint256))"
                                      }
                                    },
                                    "id": 5519,
                                    "indexExpression": {
                                      "expression": {
                                        "id": 5517,
                                        "name": "msg",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -15,
                                        "src": "2891:3:26",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_message",
                                          "typeString": "msg"
                                        }
                                      },
                                      "id": 5518,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sender",
                                      "nodeType": "MemberAccess",
                                      "src": "2891:10:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address_payable",
                                        "typeString": "address payable"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2880:22:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                      "typeString": "mapping(address => uint256)"
                                    }
                                  },
                                  "id": 5521,
                                  "indexExpression": {
                                    "id": 5520,
                                    "name": "spender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5505,
                                    "src": "2903:7:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "2880:31:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 5522,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "add",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3115,
                                "src": "2880:35:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 5524,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2880:43:26",
                              "tryCall": false,
                              "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": 5512,
                            "name": "_setAllowance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5975,
                            "src": "2845:13:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5525,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2845:79:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5526,
                        "nodeType": "ExpressionStatement",
                        "src": "2845:79:26"
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 5527,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2942:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 5511,
                        "id": 5528,
                        "nodeType": "Return",
                        "src": "2935:11:26"
                      }
                    ]
                  },
                  "functionSelector": "d73dd623",
                  "id": 5530,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "increaseApproval",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5508,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5505,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5530,
                        "src": "2778:15:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5504,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2778:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5507,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5530,
                        "src": "2795:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5506,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2795:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2777:33:26"
                  },
                  "returnParameters": {
                    "id": 5511,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5510,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5530,
                        "src": "2829:4:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 5509,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2829:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2828:6:26"
                  },
                  "scope": 5976,
                  "src": "2752:201:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 5573,
                    "nodeType": "Block",
                    "src": "3042:296:26",
                    "statements": [
                      {
                        "assignments": [
                          5540
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5540,
                            "mutability": "mutable",
                            "name": "currentAllowance",
                            "nodeType": "VariableDeclaration",
                            "scope": 5573,
                            "src": "3052:24:26",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 5539,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3052:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5547,
                        "initialValue": {
                          "baseExpression": {
                            "baseExpression": {
                              "id": 5541,
                              "name": "_allowance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5418,
                              "src": "3079:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(address => uint256))"
                              }
                            },
                            "id": 5544,
                            "indexExpression": {
                              "expression": {
                                "id": 5542,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "3090:3:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 5543,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "3090:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "3079:22:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 5546,
                          "indexExpression": {
                            "id": 5545,
                            "name": "spender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5532,
                            "src": "3102:7:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3079:31:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3052:58:26"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 5550,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 5548,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5534,
                            "src": "3125:6:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "id": 5549,
                            "name": "currentAllowance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5540,
                            "src": "3135:16:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3125:26:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 5569,
                          "nodeType": "Block",
                          "src": "3221:89:26",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 5560,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "3249:3:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 5561,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "3249:10:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "id": 5562,
                                    "name": "spender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5532,
                                    "src": "3261:7:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "id": 5565,
                                        "name": "amount",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 5534,
                                        "src": "3291:6:26",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "id": 5563,
                                        "name": "currentAllowance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 5540,
                                        "src": "3270:16:26",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 5564,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sub",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 3183,
                                      "src": "3270:20:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                                      }
                                    },
                                    "id": 5566,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "3270:28:26",
                                    "tryCall": false,
                                    "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": 5559,
                                  "name": "_setAllowance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5975,
                                  "src": "3235:13:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                                    "typeString": "function (address,address,uint256)"
                                  }
                                },
                                "id": 5567,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3235:64:26",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 5568,
                              "nodeType": "ExpressionStatement",
                              "src": "3235:64:26"
                            }
                          ]
                        },
                        "id": 5570,
                        "nodeType": "IfStatement",
                        "src": "3121:189:26",
                        "trueBody": {
                          "id": 5558,
                          "nodeType": "Block",
                          "src": "3153:62:26",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 5552,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "3181:3:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 5553,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "3181:10:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "id": 5554,
                                    "name": "spender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5532,
                                    "src": "3193:7:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "hexValue": "30",
                                    "id": 5555,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "3202:1:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    },
                                    "value": "0"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    }
                                  ],
                                  "id": 5551,
                                  "name": "_setAllowance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5975,
                                  "src": "3167:13:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                                    "typeString": "function (address,address,uint256)"
                                  }
                                },
                                "id": 5556,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3167:37:26",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 5557,
                              "nodeType": "ExpressionStatement",
                              "src": "3167:37:26"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 5571,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3327:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 5538,
                        "id": 5572,
                        "nodeType": "Return",
                        "src": "3320:11:26"
                      }
                    ]
                  },
                  "functionSelector": "66188463",
                  "id": 5574,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "decreaseApproval",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5535,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5532,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5574,
                        "src": "2985:15:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5531,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2985:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5534,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5574,
                        "src": "3002:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5533,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3002:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2984:33:26"
                  },
                  "returnParameters": {
                    "id": 5538,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5537,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5574,
                        "src": "3036:4:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 5536,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3036:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3035:6:26"
                  },
                  "scope": 5976,
                  "src": "2959:379:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    5044
                  ],
                  "body": {
                    "id": 5593,
                    "nodeType": "Block",
                    "src": "3430:75:26",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 5585,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "3446:3:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 5586,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "3446:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 5587,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5576,
                              "src": "3458:9:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5588,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5578,
                              "src": "3469:6:26",
                              "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": 5584,
                            "name": "_move",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5951,
                            "src": "3440:5:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5589,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3440:36:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5590,
                        "nodeType": "ExpressionStatement",
                        "src": "3440:36:26"
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 5591,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3494:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 5583,
                        "id": 5592,
                        "nodeType": "Return",
                        "src": "3487:11:26"
                      }
                    ]
                  },
                  "functionSelector": "a9059cbb",
                  "id": 5594,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "transfer",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5580,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3406:8:26"
                  },
                  "parameters": {
                    "id": 5579,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5576,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 5594,
                        "src": "3362:17:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5575,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3362:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5578,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5594,
                        "src": "3381:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5577,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3381:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3361:35:26"
                  },
                  "returnParameters": {
                    "id": 5583,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5582,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5594,
                        "src": "3424:4:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 5581,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3424:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3423:6:26"
                  },
                  "scope": 5976,
                  "src": "3344:161:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    5076
                  ],
                  "body": {
                    "id": 5659,
                    "nodeType": "Block",
                    "src": "3647:513:26",
                    "statements": [
                      {
                        "assignments": [
                          5607
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5607,
                            "mutability": "mutable",
                            "name": "currentAllowance",
                            "nodeType": "VariableDeclaration",
                            "scope": 5659,
                            "src": "3657:24:26",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 5606,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3657:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5614,
                        "initialValue": {
                          "baseExpression": {
                            "baseExpression": {
                              "id": 5608,
                              "name": "_allowance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5418,
                              "src": "3684:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(address => uint256))"
                              }
                            },
                            "id": 5610,
                            "indexExpression": {
                              "id": 5609,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5596,
                              "src": "3695:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "3684:18:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 5613,
                          "indexExpression": {
                            "expression": {
                              "id": 5611,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "3703:3:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 5612,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "src": "3703:10:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3684:30:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3657:57:26"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 5623,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                "id": 5619,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 5616,
                                    "name": "msg",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -15,
                                    "src": "3733:3:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_message",
                                      "typeString": "msg"
                                    }
                                  },
                                  "id": 5617,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "src": "3733:10:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 5618,
                                  "name": "sender",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5596,
                                  "src": "3747:6:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "src": "3733:20:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 5622,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 5620,
                                  "name": "currentAllowance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5607,
                                  "src": "3757:16:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">=",
                                "rightExpression": {
                                  "id": 5621,
                                  "name": "amount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5600,
                                  "src": "3777:6:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3757:26:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "3733:50:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5624,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3785:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5625,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INSUFFICIENT_ALLOWANCE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 504,
                              "src": "3785:29:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5615,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "3724:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5626,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3724:91:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5627,
                        "nodeType": "ExpressionStatement",
                        "src": "3724:91:26"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 5629,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5596,
                              "src": "3832:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5630,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5598,
                              "src": "3840:9:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5631,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5600,
                              "src": "3851:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5628,
                            "name": "_move",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5951,
                            "src": "3826:5:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5632,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3826:32:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5633,
                        "nodeType": "ExpressionStatement",
                        "src": "3826:32:26"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 5645,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 5637,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "expression": {
                                "id": 5634,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "3873:3:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 5635,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "3873:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "id": 5636,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5596,
                              "src": "3887:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "src": "3873:20:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 5644,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 5638,
                              "name": "currentAllowance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5607,
                              "src": "3897:16:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "arguments": [
                                {
                                  "id": 5642,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "UnaryOperation",
                                  "operator": "-",
                                  "prefix": true,
                                  "src": "3925:2:26",
                                  "subExpression": {
                                    "hexValue": "31",
                                    "id": 5641,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "3926:1:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_minus_1_by_1",
                                    "typeString": "int_const -1"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_minus_1_by_1",
                                    "typeString": "int_const -1"
                                  }
                                ],
                                "id": 5640,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3917:7:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": {
                                  "id": 5639,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3917:7:26",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 5643,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3917:11:26",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3897:31:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "3873:55:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 5656,
                        "nodeType": "IfStatement",
                        "src": "3869:263:26",
                        "trueBody": {
                          "id": 5655,
                          "nodeType": "Block",
                          "src": "3930:202:26",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 5647,
                                    "name": "sender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5596,
                                    "src": "4075:6:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 5648,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "4083:3:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 5649,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "4083:10:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 5652,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 5650,
                                      "name": "currentAllowance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5607,
                                      "src": "4095:16:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "-",
                                    "rightExpression": {
                                      "id": 5651,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5600,
                                      "src": "4114:6:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "4095:25:26",
                                    "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": 5646,
                                  "name": "_setAllowance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5975,
                                  "src": "4061:13:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                                    "typeString": "function (address,address,uint256)"
                                  }
                                },
                                "id": 5653,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4061:60:26",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 5654,
                              "nodeType": "ExpressionStatement",
                              "src": "4061:60:26"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "hexValue": "74727565",
                          "id": 5657,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4149:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 5605,
                        "id": 5658,
                        "nodeType": "Return",
                        "src": "4142:11:26"
                      }
                    ]
                  },
                  "functionSelector": "23b872dd",
                  "id": 5660,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "transferFrom",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5602,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3623:8:26"
                  },
                  "parameters": {
                    "id": 5601,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5596,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5660,
                        "src": "3542:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5595,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3542:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5598,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 5660,
                        "src": "3566:17:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5597,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3566:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5600,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5660,
                        "src": "3593:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5599,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3593:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3532:81:26"
                  },
                  "returnParameters": {
                    "id": 5605,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5604,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5660,
                        "src": "3641:4:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 5603,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3641:4:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3640:6:26"
                  },
                  "scope": 5976,
                  "src": "3511:649:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    5116
                  ],
                  "body": {
                    "id": 5753,
                    "nodeType": "Block",
                    "src": "4364:562:26",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5682,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 5679,
                                  "name": "block",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -4,
                                  "src": "4437:5:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_block",
                                    "typeString": "block"
                                  }
                                },
                                "id": 5680,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "timestamp",
                                "nodeType": "MemberAccess",
                                "src": "4437:15:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 5681,
                                "name": "deadline",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5668,
                                "src": "4456:8:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "4437:27:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5683,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4466:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5684,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "EXPIRED_PERMIT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 444,
                              "src": "4466:21:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5678,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4428:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5685,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4428:60:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5686,
                        "nodeType": "ExpressionStatement",
                        "src": "4428:60:26"
                      },
                      {
                        "assignments": [
                          5688
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5688,
                            "mutability": "mutable",
                            "name": "nonce",
                            "nodeType": "VariableDeclaration",
                            "scope": 5753,
                            "src": "4499:13:26",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 5687,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4499:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5692,
                        "initialValue": {
                          "baseExpression": {
                            "id": 5689,
                            "name": "_nonces",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5428,
                            "src": "4515:7:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 5691,
                          "indexExpression": {
                            "id": 5690,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5662,
                            "src": "4523:5:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4515:14:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4499:30:26"
                      },
                      {
                        "assignments": [
                          5694
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5694,
                            "mutability": "mutable",
                            "name": "structHash",
                            "nodeType": "VariableDeclaration",
                            "scope": 5753,
                            "src": "4540:18:26",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 5693,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "4540:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5706,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 5698,
                                  "name": "_PERMIT_TYPE_HASH",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5433,
                                  "src": "4582:17:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 5699,
                                  "name": "owner",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5662,
                                  "src": "4601:5:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 5700,
                                  "name": "spender",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5664,
                                  "src": "4608:7:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 5701,
                                  "name": "value",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5666,
                                  "src": "4617:5:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 5702,
                                  "name": "nonce",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5688,
                                  "src": "4624:5:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 5703,
                                  "name": "deadline",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5668,
                                  "src": "4631:8:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 5696,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "4571:3:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 5697,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encode",
                                "nodeType": "MemberAccess",
                                "src": "4571:10:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 5704,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4571:69:26",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 5695,
                            "name": "keccak256",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -8,
                            "src": "4561:9:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 5705,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4561:80:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4540:101:26"
                      },
                      {
                        "assignments": [
                          5708
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5708,
                            "mutability": "mutable",
                            "name": "hash",
                            "nodeType": "VariableDeclaration",
                            "scope": 5753,
                            "src": "4652:12:26",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 5707,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "4652:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5712,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 5710,
                              "name": "structHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5694,
                              "src": "4684:10:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 5709,
                            "name": "_hashTypedDataV4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3880,
                            "src": "4667:16:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$",
                              "typeString": "function (bytes32) view returns (bytes32)"
                            }
                          },
                          "id": 5711,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4667:28:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4652:43:26"
                      },
                      {
                        "assignments": [
                          5714
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5714,
                            "mutability": "mutable",
                            "name": "signer",
                            "nodeType": "VariableDeclaration",
                            "scope": 5753,
                            "src": "4706:14:26",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 5713,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "4706:7:26",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5721,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 5716,
                              "name": "hash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5708,
                              "src": "4733:4:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 5717,
                              "name": "v",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5670,
                              "src": "4739:1:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            },
                            {
                              "id": 5718,
                              "name": "r",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5672,
                              "src": "4742:1:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 5719,
                              "name": "s",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5674,
                              "src": "4745:1:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 5715,
                            "name": "ecrecover",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -6,
                            "src": "4723:9:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
                              "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
                            }
                          },
                          "id": 5720,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4723:24:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4706:41:26"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 5734,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    "id": 5728,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 5723,
                                      "name": "signer",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5714,
                                      "src": "4767:6:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "!=",
                                    "rightExpression": {
                                      "arguments": [
                                        {
                                          "hexValue": "30",
                                          "id": 5726,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "4785:1:26",
                                          "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": 5725,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "4777:7:26",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_address_$",
                                          "typeString": "type(address)"
                                        },
                                        "typeName": {
                                          "id": 5724,
                                          "name": "address",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "4777:7:26",
                                          "typeDescriptions": {}
                                        }
                                      },
                                      "id": 5727,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "4777:10:26",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address_payable",
                                        "typeString": "address payable"
                                      }
                                    },
                                    "src": "4767:20:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "id": 5729,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "4766:22:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    "id": 5732,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 5730,
                                      "name": "signer",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5714,
                                      "src": "4793:6:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "id": 5731,
                                      "name": "owner",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5662,
                                      "src": "4803:5:26",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    "src": "4793:15:26",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "id": 5733,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "4792:17:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "4766:43:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5735,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4811:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5736,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INVALID_SIGNATURE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 573,
                              "src": "4811:24:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5722,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4757:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5737,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4757:79:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5738,
                        "nodeType": "ExpressionStatement",
                        "src": "4757:79:26"
                      },
                      {
                        "expression": {
                          "id": 5745,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 5739,
                              "name": "_nonces",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5428,
                              "src": "4847:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 5741,
                            "indexExpression": {
                              "id": 5740,
                              "name": "owner",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5662,
                              "src": "4855:5:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "4847:14:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 5744,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 5742,
                              "name": "nonce",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5688,
                              "src": "4864:5:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "+",
                            "rightExpression": {
                              "hexValue": "31",
                              "id": 5743,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4872:1:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            },
                            "src": "4864:9:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4847:26:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5746,
                        "nodeType": "ExpressionStatement",
                        "src": "4847:26:26"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 5748,
                              "name": "owner",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5662,
                              "src": "4897:5:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5749,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5664,
                              "src": "4904:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5750,
                              "name": "value",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5666,
                              "src": "4913:5:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5747,
                            "name": "_setAllowance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5975,
                            "src": "4883:13:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5751,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4883:36:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5752,
                        "nodeType": "ExpressionStatement",
                        "src": "4883:36:26"
                      }
                    ]
                  },
                  "functionSelector": "d505accf",
                  "id": 5754,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "permit",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5676,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4355:8:26"
                  },
                  "parameters": {
                    "id": 5675,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5662,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 5754,
                        "src": "4191:13:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5661,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4191:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5664,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5754,
                        "src": "4214:15:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5663,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4214:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5666,
                        "mutability": "mutable",
                        "name": "value",
                        "nodeType": "VariableDeclaration",
                        "scope": 5754,
                        "src": "4239:13:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5665,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4239:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5668,
                        "mutability": "mutable",
                        "name": "deadline",
                        "nodeType": "VariableDeclaration",
                        "scope": 5754,
                        "src": "4262:16:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5667,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4262:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5670,
                        "mutability": "mutable",
                        "name": "v",
                        "nodeType": "VariableDeclaration",
                        "scope": 5754,
                        "src": "4288:7:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 5669,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "4288:5:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5672,
                        "mutability": "mutable",
                        "name": "r",
                        "nodeType": "VariableDeclaration",
                        "scope": 5754,
                        "src": "4305:9:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 5671,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4305:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5674,
                        "mutability": "mutable",
                        "name": "s",
                        "nodeType": "VariableDeclaration",
                        "scope": 5754,
                        "src": "4324:9:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 5673,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4324:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4181:158:26"
                  },
                  "returnParameters": {
                    "id": 5677,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4364:0:26"
                  },
                  "scope": 5976,
                  "src": "4166:760:26",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 5761,
                    "nodeType": "Block",
                    "src": "5009:29:26",
                    "statements": [
                      {
                        "expression": {
                          "id": 5759,
                          "name": "_name",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5422,
                          "src": "5026:5:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage",
                            "typeString": "string storage ref"
                          }
                        },
                        "functionReturnParameters": 5758,
                        "id": 5760,
                        "nodeType": "Return",
                        "src": "5019:12:26"
                      }
                    ]
                  },
                  "functionSelector": "06fdde03",
                  "id": 5762,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "name",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5755,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4970:2:26"
                  },
                  "returnParameters": {
                    "id": 5758,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5757,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5762,
                        "src": "4994:13:26",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 5756,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "4994:6:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4993:15:26"
                  },
                  "scope": 5976,
                  "src": "4957:81:26",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 5769,
                    "nodeType": "Block",
                    "src": "5098:31:26",
                    "statements": [
                      {
                        "expression": {
                          "id": 5767,
                          "name": "_symbol",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5424,
                          "src": "5115:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage",
                            "typeString": "string storage ref"
                          }
                        },
                        "functionReturnParameters": 5766,
                        "id": 5768,
                        "nodeType": "Return",
                        "src": "5108:14:26"
                      }
                    ]
                  },
                  "functionSelector": "95d89b41",
                  "id": 5770,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "symbol",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5763,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5059:2:26"
                  },
                  "returnParameters": {
                    "id": 5766,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5765,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5770,
                        "src": "5083:13:26",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 5764,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "5083:6:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5082:15:26"
                  },
                  "scope": 5976,
                  "src": "5044:85:26",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 5777,
                    "nodeType": "Block",
                    "src": "5183:33:26",
                    "statements": [
                      {
                        "expression": {
                          "id": 5775,
                          "name": "_DECIMALS",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5408,
                          "src": "5200:9:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "functionReturnParameters": 5774,
                        "id": 5776,
                        "nodeType": "Return",
                        "src": "5193:16:26"
                      }
                    ]
                  },
                  "functionSelector": "313ce567",
                  "id": 5778,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "decimals",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5771,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5152:2:26"
                  },
                  "returnParameters": {
                    "id": 5774,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5773,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5778,
                        "src": "5176:5:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 5772,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "5176:5:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5175:7:26"
                  },
                  "scope": 5976,
                  "src": "5135:81:26",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5026
                  ],
                  "body": {
                    "id": 5786,
                    "nodeType": "Block",
                    "src": "5284:36:26",
                    "statements": [
                      {
                        "expression": {
                          "id": 5784,
                          "name": "_totalSupply",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5420,
                          "src": "5301:12:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 5783,
                        "id": 5785,
                        "nodeType": "Return",
                        "src": "5294:19:26"
                      }
                    ]
                  },
                  "functionSelector": "18160ddd",
                  "id": 5787,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "totalSupply",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5780,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "5257:8:26"
                  },
                  "parameters": {
                    "id": 5779,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5242:2:26"
                  },
                  "returnParameters": {
                    "id": 5783,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5782,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5787,
                        "src": "5275:7:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5781,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5275:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5274:9:26"
                  },
                  "scope": 5976,
                  "src": "5222:98:26",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    5124
                  ],
                  "body": {
                    "id": 5799,
                    "nodeType": "Block",
                    "src": "5398:38:26",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "id": 5795,
                            "name": "_nonces",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5428,
                            "src": "5415:7:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 5797,
                          "indexExpression": {
                            "id": 5796,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5789,
                            "src": "5423:5:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5415:14:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 5794,
                        "id": 5798,
                        "nodeType": "Return",
                        "src": "5408:21:26"
                      }
                    ]
                  },
                  "functionSelector": "7ecebe00",
                  "id": 5800,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "nonces",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5791,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "5371:8:26"
                  },
                  "parameters": {
                    "id": 5790,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5789,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 5800,
                        "src": "5342:13:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5788,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5342:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5341:15:26"
                  },
                  "returnParameters": {
                    "id": 5794,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5793,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5800,
                        "src": "5389:7:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5792,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5389:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5388:9:26"
                  },
                  "scope": 5976,
                  "src": "5326:110:26",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    5130
                  ],
                  "body": {
                    "id": 5809,
                    "nodeType": "Block",
                    "src": "5564:44:26",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 5806,
                            "name": "_domainSeparatorV4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3861,
                            "src": "5581:18:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$",
                              "typeString": "function () view returns (bytes32)"
                            }
                          },
                          "id": 5807,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5581:20:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 5805,
                        "id": 5808,
                        "nodeType": "Return",
                        "src": "5574:27:26"
                      }
                    ]
                  },
                  "functionSelector": "3644e515",
                  "id": 5810,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "DOMAIN_SEPARATOR",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 5802,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "5537:8:26"
                  },
                  "parameters": {
                    "id": 5801,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5520:2:26"
                  },
                  "returnParameters": {
                    "id": 5805,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5804,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 5810,
                        "src": "5555:7:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 5803,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5555:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5554:9:26"
                  },
                  "scope": 5976,
                  "src": "5495:113:26",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 5844,
                    "nodeType": "Block",
                    "src": "5710:173:26",
                    "statements": [
                      {
                        "expression": {
                          "id": 5826,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 5817,
                              "name": "_balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5412,
                              "src": "5720:8:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 5819,
                            "indexExpression": {
                              "id": 5818,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5812,
                              "src": "5729:9:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "5720:19:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 5824,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5814,
                                "src": "5766:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 5820,
                                  "name": "_balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5412,
                                  "src": "5742:8:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                    "typeString": "mapping(address => uint256)"
                                  }
                                },
                                "id": 5822,
                                "indexExpression": {
                                  "id": 5821,
                                  "name": "recipient",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5812,
                                  "src": "5751:9:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "5742:19:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 5823,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3115,
                              "src": "5742:23:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 5825,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5742:31:26",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5720:53:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5827,
                        "nodeType": "ExpressionStatement",
                        "src": "5720:53:26"
                      },
                      {
                        "expression": {
                          "id": 5833,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5828,
                            "name": "_totalSupply",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5420,
                            "src": "5783:12:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 5831,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5814,
                                "src": "5815:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 5829,
                                "name": "_totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5420,
                                "src": "5798:12:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 5830,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3115,
                              "src": "5798:16:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 5832,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5798:24:26",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5783:39:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5834,
                        "nodeType": "ExpressionStatement",
                        "src": "5783:39:26"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 5838,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "5854:1:26",
                                  "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": 5837,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "5846:7:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 5836,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "5846:7:26",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 5839,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5846:10:26",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 5840,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5812,
                              "src": "5858:9:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5841,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5814,
                              "src": "5869:6:26",
                              "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": 5835,
                            "name": "Transfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5085,
                            "src": "5837:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5842,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5837:39:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5843,
                        "nodeType": "EmitStatement",
                        "src": "5832:44:26"
                      }
                    ]
                  },
                  "id": 5845,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_mintPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5815,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5812,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 5845,
                        "src": "5666:17:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5811,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5666:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5814,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5845,
                        "src": "5685:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5813,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5685:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5665:35:26"
                  },
                  "returnParameters": {
                    "id": 5816,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5710:0:26"
                  },
                  "scope": 5976,
                  "src": "5641:242:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5890,
                    "nodeType": "Block",
                    "src": "5955:284:26",
                    "statements": [
                      {
                        "assignments": [
                          5853
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5853,
                            "mutability": "mutable",
                            "name": "currentBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 5890,
                            "src": "5965:22:26",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 5852,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5965:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5857,
                        "initialValue": {
                          "baseExpression": {
                            "id": 5854,
                            "name": "_balance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5412,
                            "src": "5990:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 5856,
                          "indexExpression": {
                            "id": 5855,
                            "name": "sender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5847,
                            "src": "5999:6:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5990:16:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5965:41:26"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5861,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 5859,
                                "name": "currentBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5853,
                                "src": "6025:14:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 5860,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5849,
                                "src": "6043:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "6025:24:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5862,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6051:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5863,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INSUFFICIENT_BALANCE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 501,
                              "src": "6051:27:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5858,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6016:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5864,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6016:63:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5865,
                        "nodeType": "ExpressionStatement",
                        "src": "6016:63:26"
                      },
                      {
                        "expression": {
                          "id": 5872,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 5866,
                              "name": "_balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5412,
                              "src": "6090:8:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 5868,
                            "indexExpression": {
                              "id": 5867,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5847,
                              "src": "6099:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "6090:16:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 5871,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 5869,
                              "name": "currentBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5853,
                              "src": "6109:14:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "id": 5870,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5849,
                              "src": "6126:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "6109:23:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6090:42:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5873,
                        "nodeType": "ExpressionStatement",
                        "src": "6090:42:26"
                      },
                      {
                        "expression": {
                          "id": 5879,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5874,
                            "name": "_totalSupply",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5420,
                            "src": "6142:12:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 5877,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5849,
                                "src": "6174:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 5875,
                                "name": "_totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5420,
                                "src": "6157:12:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 5876,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3183,
                              "src": "6157:16:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 5878,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6157:24:26",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6142:39:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5880,
                        "nodeType": "ExpressionStatement",
                        "src": "6142:39:26"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 5882,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5847,
                              "src": "6205:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 5885,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "6221:1:26",
                                  "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": 5884,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "6213:7:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 5883,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "6213:7:26",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 5886,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6213:10:26",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 5887,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5849,
                              "src": "6225:6:26",
                              "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": 5881,
                            "name": "Transfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5085,
                            "src": "6196:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5888,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6196:36:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5889,
                        "nodeType": "EmitStatement",
                        "src": "6191:41:26"
                      }
                    ]
                  },
                  "id": 5891,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_burnPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5850,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5847,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5891,
                        "src": "5914:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5846,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5914:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5849,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5891,
                        "src": "5930:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5848,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5930:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5913:32:26"
                  },
                  "returnParameters": {
                    "id": 5851,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5955:0:26"
                  },
                  "scope": 5976,
                  "src": "5889:350:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5950,
                    "nodeType": "Block",
                    "src": "6350:513:26",
                    "statements": [
                      {
                        "assignments": [
                          5901
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 5901,
                            "mutability": "mutable",
                            "name": "currentBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 5950,
                            "src": "6360:22:26",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 5900,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "6360:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 5905,
                        "initialValue": {
                          "baseExpression": {
                            "id": 5902,
                            "name": "_balance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5412,
                            "src": "6385:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 5904,
                          "indexExpression": {
                            "id": 5903,
                            "name": "sender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5893,
                            "src": "6394:6:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "6385:16:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6360:41:26"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5909,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 5907,
                                "name": "currentBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5901,
                                "src": "6420:14:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 5908,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5897,
                                "src": "6438:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "6420:24:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5910,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6446:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5911,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INSUFFICIENT_BALANCE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 501,
                              "src": "6446:27:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5906,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6411:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5912,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6411:63:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5913,
                        "nodeType": "ExpressionStatement",
                        "src": "6411:63:26"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 5920,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 5915,
                                "name": "recipient",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5895,
                                "src": "6626:9:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "hexValue": "30",
                                    "id": 5918,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "6647:1:26",
                                    "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": 5917,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6639:7:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 5916,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6639:7:26",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 5919,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "6639:10:26",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "src": "6626:23:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 5921,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6651:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 5922,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ERC20_TRANSFER_TO_ZERO_ADDRESS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 510,
                              "src": "6651:37:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5914,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6617:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 5923,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6617:72:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5924,
                        "nodeType": "ExpressionStatement",
                        "src": "6617:72:26"
                      },
                      {
                        "expression": {
                          "id": 5931,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 5925,
                              "name": "_balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5412,
                              "src": "6700:8:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 5927,
                            "indexExpression": {
                              "id": 5926,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5893,
                              "src": "6709:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "6700:16:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 5930,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 5928,
                              "name": "currentBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5901,
                              "src": "6719:14:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "id": 5929,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5897,
                              "src": "6736:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "6719:23:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6700:42:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5932,
                        "nodeType": "ExpressionStatement",
                        "src": "6700:42:26"
                      },
                      {
                        "expression": {
                          "id": 5942,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 5933,
                              "name": "_balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5412,
                              "src": "6752:8:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 5935,
                            "indexExpression": {
                              "id": 5934,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5895,
                              "src": "6761:9:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "6752:19:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 5940,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5897,
                                "src": "6798:6:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 5936,
                                  "name": "_balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5412,
                                  "src": "6774:8:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                    "typeString": "mapping(address => uint256)"
                                  }
                                },
                                "id": 5938,
                                "indexExpression": {
                                  "id": 5937,
                                  "name": "recipient",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5895,
                                  "src": "6783:9:26",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "6774:19:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 5939,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3115,
                              "src": "6774:23:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 5941,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6774:31:26",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6752:53:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5943,
                        "nodeType": "ExpressionStatement",
                        "src": "6752:53:26"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 5945,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5893,
                              "src": "6830:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5946,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5895,
                              "src": "6838:9:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5947,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5897,
                              "src": "6849:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5944,
                            "name": "Transfer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5085,
                            "src": "6821:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5948,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6821:35:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5949,
                        "nodeType": "EmitStatement",
                        "src": "6816:40:26"
                      }
                    ]
                  },
                  "id": 5951,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_move",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5898,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5893,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5951,
                        "src": "6269:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5892,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6269:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5895,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 5951,
                        "src": "6293:17:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5894,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6293:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5897,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5951,
                        "src": "6320:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5896,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6320:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6259:81:26"
                  },
                  "returnParameters": {
                    "id": 5899,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6350:0:26"
                  },
                  "scope": 5976,
                  "src": "6245:618:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 5974,
                    "nodeType": "Block",
                    "src": "7004:99:26",
                    "statements": [
                      {
                        "expression": {
                          "id": 5966,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "baseExpression": {
                                "id": 5960,
                                "name": "_allowance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5418,
                                "src": "7014:10:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                  "typeString": "mapping(address => mapping(address => uint256))"
                                }
                              },
                              "id": 5963,
                              "indexExpression": {
                                "id": 5961,
                                "name": "owner",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5953,
                                "src": "7025:5:26",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "7014:17:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                                "typeString": "mapping(address => uint256)"
                              }
                            },
                            "id": 5964,
                            "indexExpression": {
                              "id": 5962,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5955,
                              "src": "7032:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "7014:26:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 5965,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5957,
                            "src": "7043:6:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7014:35:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5967,
                        "nodeType": "ExpressionStatement",
                        "src": "7014:35:26"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 5969,
                              "name": "owner",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5953,
                              "src": "7073:5:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5970,
                              "name": "spender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5955,
                              "src": "7080:7:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 5971,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5957,
                              "src": "7089:6:26",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5968,
                            "name": "Approval",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5094,
                            "src": "7064:8:26",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,address,uint256)"
                            }
                          },
                          "id": 5972,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7064:32:26",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5973,
                        "nodeType": "EmitStatement",
                        "src": "7059:37:26"
                      }
                    ]
                  },
                  "id": 5975,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setAllowance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 5958,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5953,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 5975,
                        "src": "6927:13:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5952,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6927:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5955,
                        "mutability": "mutable",
                        "name": "spender",
                        "nodeType": "VariableDeclaration",
                        "scope": 5975,
                        "src": "6950:15:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 5954,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6950:7:26",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5957,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 5975,
                        "src": "6975:14:26",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5956,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6975:7:26",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6917:78:26"
                  },
                  "returnParameters": {
                    "id": 5959,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7004:0:26"
                  },
                  "scope": 5976,
                  "src": "6895:208:26",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 5977,
              "src": "1457:5648:26"
            }
          ],
          "src": "688:6418:26"
        },
        "id": 26
      },
      "src.sol/amm/pools/BaseGeneralPool.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/BaseGeneralPool.sol",
          "exportedSymbols": {
            "BaseGeneralPool": [
              6241
            ]
          },
          "id": 6242,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 5978,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:27"
            },
            {
              "id": 5979,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:27"
            },
            {
              "absolutePath": "src.sol/amm/pools/BasePool.sol",
              "file": "./BasePool.sol",
              "id": 5980,
              "nodeType": "ImportDirective",
              "scope": 6242,
              "sourceUnit": 7929,
              "src": "747:24:27",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IGeneralPool.sol",
              "file": "../vault/interfaces/IGeneralPool.sol",
              "id": 5981,
              "nodeType": "ImportDirective",
              "scope": 6242,
              "sourceUnit": 20761,
              "src": "772:46:27",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 5983,
                    "name": "IGeneralPool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20760,
                    "src": "1063:12:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IGeneralPool_$20760",
                      "typeString": "contract IGeneralPool"
                    }
                  },
                  "id": 5984,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1063:12:27"
                },
                {
                  "baseName": {
                    "id": 5985,
                    "name": "BasePool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7928,
                    "src": "1077:8:27",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BasePool_$7928",
                      "typeString": "contract BasePool"
                    }
                  },
                  "id": 5986,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1077:8:27"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1473,
                3890,
                5095,
                5131,
                5976,
                7928,
                8030,
                20719,
                20760,
                20804
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 5982,
                "nodeType": "StructuredDocumentation",
                "src": "820:205:27",
                "text": " @dev Extension of `BasePool`, adding a handler for `IGeneralPool.onSwap`.\n Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions."
              },
              "fullyImplemented": false,
              "id": 6241,
              "linearizedBaseContracts": [
                6241,
                7928,
                1473,
                5976,
                3890,
                5131,
                5095,
                8030,
                343,
                911,
                20760,
                20719,
                20804
              ],
              "name": "BaseGeneralPool",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 6019,
                    "nodeType": "Block",
                    "src": "1627:64:27",
                    "statements": []
                  },
                  "id": 6020,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 6006,
                          "name": "vault",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5988,
                          "src": "1385:5:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        {
                          "expression": {
                            "expression": {
                              "id": 6007,
                              "name": "IVault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21266,
                              "src": "1404:6:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_IVault_$21266_$",
                                "typeString": "type(contract IVault)"
                              }
                            },
                            "id": 6008,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "PoolSpecialization",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20940,
                            "src": "1404:25:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "type(enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 6009,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "GENERAL",
                          "nodeType": "MemberAccess",
                          "src": "1404:33:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        {
                          "id": 6010,
                          "name": "name",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5990,
                          "src": "1451:4:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 6011,
                          "name": "symbol",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5992,
                          "src": "1469:6:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 6012,
                          "name": "tokens",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5995,
                          "src": "1489:6:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        {
                          "id": 6013,
                          "name": "swapFeePercentage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5997,
                          "src": "1509:17:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 6014,
                          "name": "pauseWindowDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5999,
                          "src": "1540:19:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 6015,
                          "name": "bufferPeriodDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6001,
                          "src": "1573:20:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 6016,
                          "name": "owner",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6003,
                          "src": "1607:5:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 6017,
                      "modifierName": {
                        "id": 6005,
                        "name": "BasePool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7928,
                        "src": "1363:8:27",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BasePool_$7928_$",
                          "typeString": "type(contract BasePool)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1363:259:27"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6004,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 5988,
                        "mutability": "mutable",
                        "name": "vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 6020,
                        "src": "1113:12:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 5987,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "1113:6:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5990,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 6020,
                        "src": "1135:18:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 5989,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1135:6:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5992,
                        "mutability": "mutable",
                        "name": "symbol",
                        "nodeType": "VariableDeclaration",
                        "scope": 6020,
                        "src": "1163:20:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 5991,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1163:6:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5995,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 6020,
                        "src": "1193:22:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 5993,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1193:6:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 5994,
                          "nodeType": "ArrayTypeName",
                          "src": "1193:8:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5997,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 6020,
                        "src": "1225:25:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5996,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1225:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 5999,
                        "mutability": "mutable",
                        "name": "pauseWindowDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 6020,
                        "src": "1260:27:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 5998,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1260:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6001,
                        "mutability": "mutable",
                        "name": "bufferPeriodDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 6020,
                        "src": "1297:28:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6000,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1297:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6003,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 6020,
                        "src": "1335:13:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 6002,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1335:7:27",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1103:251:27"
                  },
                  "returnParameters": {
                    "id": 6018,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1627:0:27"
                  },
                  "scope": 6241,
                  "src": "1092:599:27",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    20759
                  ],
                  "body": {
                    "id": 6072,
                    "nodeType": "Block",
                    "src": "1913:385:27",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6036,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6027,
                              "src": "1940:7:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 6037,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6029,
                              "src": "1949:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 6038,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "1959:15:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 6039,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1959:17:27",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6035,
                            "name": "_validateIndexes",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6240,
                            "src": "1923:16:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256,uint256) pure"
                            }
                          },
                          "id": 6040,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1923:54:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6041,
                        "nodeType": "ExpressionStatement",
                        "src": "1923:54:27"
                      },
                      {
                        "assignments": [
                          6046
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 6046,
                            "mutability": "mutable",
                            "name": "scalingFactors",
                            "nodeType": "VariableDeclaration",
                            "scope": 6072,
                            "src": "1987:31:27",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 6044,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1987:7:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6045,
                              "nodeType": "ArrayTypeName",
                              "src": "1987:9:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 6049,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 6047,
                            "name": "_scalingFactors",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7638,
                            "src": "2021:15:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function () view returns (uint256[] memory)"
                            }
                          },
                          "id": 6048,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2021:17:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1987:51:27"
                      },
                      {
                        "expression": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            },
                            "id": 6055,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "expression": {
                                "id": 6050,
                                "name": "swapRequest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6022,
                                "src": "2068:11:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 6051,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "kind",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20786,
                              "src": "2068:16:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "expression": {
                                  "id": 6052,
                                  "name": "IVault",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 21266,
                                  "src": "2088:6:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_IVault_$21266_$",
                                    "typeString": "type(contract IVault)"
                                  }
                                },
                                "id": 6053,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "SwapKind",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 21101,
                                "src": "2088:15:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_SwapKind_$21101_$",
                                  "typeString": "type(enum IVault.SwapKind)"
                                }
                              },
                              "id": 6054,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "GIVEN_IN",
                              "nodeType": "MemberAccess",
                              "src": "2088:24:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              }
                            },
                            "src": "2068:44:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "arguments": [
                              {
                                "id": 6064,
                                "name": "swapRequest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6022,
                                "src": "2234:11:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              {
                                "id": 6065,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6025,
                                "src": "2247:8:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 6066,
                                "name": "indexIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6027,
                                "src": "2257:7:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 6067,
                                "name": "indexOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6029,
                                "src": "2266:8:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 6068,
                                "name": "scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6046,
                                "src": "2276:14:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              ],
                              "id": 6063,
                              "name": "_swapGivenOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6190,
                              "src": "2220:13:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                                "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,uint256[] memory,uint256,uint256,uint256[] memory) view returns (uint256)"
                              }
                            },
                            "id": 6069,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2220:71:27",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6070,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "2068:223:27",
                          "trueExpression": {
                            "arguments": [
                              {
                                "id": 6057,
                                "name": "swapRequest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6022,
                                "src": "2144:11:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              {
                                "id": 6058,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6025,
                                "src": "2157:8:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 6059,
                                "name": "indexIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6027,
                                "src": "2167:7:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 6060,
                                "name": "indexOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6029,
                                "src": "2176:8:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 6061,
                                "name": "scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6046,
                                "src": "2186:14:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              ],
                              "id": 6056,
                              "name": "_swapGivenIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6133,
                              "src": "2131:12:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                                "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,uint256[] memory,uint256,uint256,uint256[] memory) view returns (uint256)"
                              }
                            },
                            "id": 6062,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2131:70:27",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6034,
                        "id": 6071,
                        "nodeType": "Return",
                        "src": "2049:242:27"
                      }
                    ]
                  },
                  "functionSelector": "01ec954a",
                  "id": 6073,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "onSwap",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 6031,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1886:8:27"
                  },
                  "parameters": {
                    "id": 6030,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6022,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 6073,
                        "src": "1741:30:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 6021,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "1741:11:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6025,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 6073,
                        "src": "1781:25:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6023,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1781:7:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6024,
                          "nodeType": "ArrayTypeName",
                          "src": "1781:9:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6027,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6073,
                        "src": "1816:15:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6026,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1816:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6029,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6073,
                        "src": "1841:16:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6028,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1841:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1731:132:27"
                  },
                  "returnParameters": {
                    "id": 6034,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6033,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6073,
                        "src": "1904:7:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6032,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1904:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1903:9:27"
                  },
                  "scope": 6241,
                  "src": "1716:582:27",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 6132,
                    "nodeType": "Block",
                    "src": "2531:546:27",
                    "statements": [
                      {
                        "expression": {
                          "id": 6097,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 6090,
                              "name": "swapRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6075,
                              "src": "2649:11:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 6092,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "amount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20792,
                            "src": "2649:18:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 6094,
                                  "name": "swapRequest",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6075,
                                  "src": "2693:11:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 6095,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "amount",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20792,
                                "src": "2693:18:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 6093,
                              "name": "_subtractSwapFeeAmount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7396,
                              "src": "2670:22:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256) view returns (uint256)"
                              }
                            },
                            "id": 6096,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2670:42:27",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2649:63:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6098,
                        "nodeType": "ExpressionStatement",
                        "src": "2649:63:27"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6100,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6078,
                              "src": "2737:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 6101,
                              "name": "scalingFactors",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6085,
                              "src": "2747:14:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 6099,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "2723:13:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 6102,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2723:39:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6103,
                        "nodeType": "ExpressionStatement",
                        "src": "2723:39:27"
                      },
                      {
                        "expression": {
                          "id": 6114,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 6104,
                              "name": "swapRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6075,
                              "src": "2772:11:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 6106,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "amount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20792,
                            "src": "2772:18:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 6108,
                                  "name": "swapRequest",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6075,
                                  "src": "2802:11:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 6109,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "amount",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20792,
                                "src": "2802:18:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "baseExpression": {
                                  "id": 6110,
                                  "name": "scalingFactors",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6085,
                                  "src": "2822:14:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 6112,
                                "indexExpression": {
                                  "id": 6111,
                                  "name": "indexIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6080,
                                  "src": "2837:7:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "2822:23:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 6107,
                              "name": "_upscale",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7655,
                              "src": "2793:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 6113,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2793:53:27",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2772:74:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6115,
                        "nodeType": "ExpressionStatement",
                        "src": "2772:74:27"
                      },
                      {
                        "assignments": [
                          6117
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 6117,
                            "mutability": "mutable",
                            "name": "amountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 6132,
                            "src": "2857:17:27",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 6116,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2857:7:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 6124,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 6119,
                              "name": "swapRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6075,
                              "src": "2892:11:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            {
                              "id": 6120,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6078,
                              "src": "2905:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 6121,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6080,
                              "src": "2915:7:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 6122,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6082,
                              "src": "2924:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6118,
                            "name": "_onSwapGivenIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6204,
                            "src": "2877:14:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,uint256[] memory,uint256,uint256) view returns (uint256)"
                            }
                          },
                          "id": 6123,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2877:56:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2857:76:27"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6126,
                              "name": "amountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6117,
                              "src": "3034:9:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "baseExpression": {
                                "id": 6127,
                                "name": "scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6085,
                                "src": "3045:14:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 6129,
                              "indexExpression": {
                                "id": 6128,
                                "name": "indexOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6082,
                                "src": "3060:8:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "3045:24:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6125,
                            "name": "_downscaleDown",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7710,
                            "src": "3019:14:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 6130,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3019:51:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6089,
                        "id": 6131,
                        "nodeType": "Return",
                        "src": "3012:58:27"
                      }
                    ]
                  },
                  "id": 6133,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_swapGivenIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6086,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6075,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 6133,
                        "src": "2335:30:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 6074,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "2335:11:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6078,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 6133,
                        "src": "2375:25:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6076,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2375:7:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6077,
                          "nodeType": "ArrayTypeName",
                          "src": "2375:9:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6080,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6133,
                        "src": "2410:15:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6079,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2410:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6082,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6133,
                        "src": "2435:16:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6081,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2435:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6085,
                        "mutability": "mutable",
                        "name": "scalingFactors",
                        "nodeType": "VariableDeclaration",
                        "scope": 6133,
                        "src": "2461:31:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6083,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2461:7:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6084,
                          "nodeType": "ArrayTypeName",
                          "src": "2461:9:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2325:173:27"
                  },
                  "returnParameters": {
                    "id": 6089,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6088,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6133,
                        "src": "2522:7:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6087,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2522:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2521:9:27"
                  },
                  "scope": 6241,
                  "src": "2304:773:27",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 6189,
                    "nodeType": "Block",
                    "src": "3311:518:27",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6151,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6138,
                              "src": "3335:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 6152,
                              "name": "scalingFactors",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6145,
                              "src": "3345:14:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 6150,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "3321:13:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 6153,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3321:39:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6154,
                        "nodeType": "ExpressionStatement",
                        "src": "3321:39:27"
                      },
                      {
                        "expression": {
                          "id": 6165,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 6155,
                              "name": "swapRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6135,
                              "src": "3370:11:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 6157,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "amount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20792,
                            "src": "3370:18:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 6159,
                                  "name": "swapRequest",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6135,
                                  "src": "3400:11:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 6160,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "amount",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20792,
                                "src": "3400:18:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "baseExpression": {
                                  "id": 6161,
                                  "name": "scalingFactors",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6145,
                                  "src": "3420:14:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 6163,
                                "indexExpression": {
                                  "id": 6162,
                                  "name": "indexOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6142,
                                  "src": "3435:8:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3420:24:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 6158,
                              "name": "_upscale",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7655,
                              "src": "3391:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 6164,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3391:54:27",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3370:75:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6166,
                        "nodeType": "ExpressionStatement",
                        "src": "3370:75:27"
                      },
                      {
                        "assignments": [
                          6168
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 6168,
                            "mutability": "mutable",
                            "name": "amountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 6189,
                            "src": "3456:16:27",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 6167,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3456:7:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 6175,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 6170,
                              "name": "swapRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6135,
                              "src": "3491:11:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            {
                              "id": 6171,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6138,
                              "src": "3504:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 6172,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6140,
                              "src": "3514:7:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 6173,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6142,
                              "src": "3523:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6169,
                            "name": "_onSwapGivenOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6218,
                            "src": "3475:15:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,uint256[] memory,uint256,uint256) view returns (uint256)"
                            }
                          },
                          "id": 6174,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3475:57:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3456:76:27"
                      },
                      {
                        "expression": {
                          "id": 6183,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6176,
                            "name": "amountIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6168,
                            "src": "3609:8:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 6178,
                                "name": "amountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6168,
                                "src": "3633:8:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "baseExpression": {
                                  "id": 6179,
                                  "name": "scalingFactors",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6145,
                                  "src": "3643:14:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 6181,
                                "indexExpression": {
                                  "id": 6180,
                                  "name": "indexIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6140,
                                  "src": "3658:7:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3643:23:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 6177,
                              "name": "_downscaleUp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7765,
                              "src": "3620:12:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 6182,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3620:47:27",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3609:58:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6184,
                        "nodeType": "ExpressionStatement",
                        "src": "3609:58:27"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6186,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6168,
                              "src": "3813:8:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6185,
                            "name": "_addSwapFeeAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7375,
                            "src": "3795:17:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256) view returns (uint256)"
                            }
                          },
                          "id": 6187,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3795:27:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6149,
                        "id": 6188,
                        "nodeType": "Return",
                        "src": "3788:34:27"
                      }
                    ]
                  },
                  "id": 6190,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_swapGivenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6146,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6135,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 6190,
                        "src": "3115:30:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 6134,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "3115:11:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6138,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 6190,
                        "src": "3155:25:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6136,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "3155:7:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6137,
                          "nodeType": "ArrayTypeName",
                          "src": "3155:9:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6140,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6190,
                        "src": "3190:15:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6139,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3190:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6142,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6190,
                        "src": "3215:16:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6141,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3215:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6145,
                        "mutability": "mutable",
                        "name": "scalingFactors",
                        "nodeType": "VariableDeclaration",
                        "scope": 6190,
                        "src": "3241:31:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6143,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "3241:7:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6144,
                          "nodeType": "ArrayTypeName",
                          "src": "3241:9:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3105:173:27"
                  },
                  "returnParameters": {
                    "id": 6149,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6148,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6190,
                        "src": "3302:7:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6147,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3302:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3301:9:27"
                  },
                  "scope": 6241,
                  "src": "3083:746:27",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "id": 6204,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onSwapGivenIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6200,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6192,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 6204,
                        "src": "4367:30:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 6191,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "4367:11:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6195,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 6204,
                        "src": "4407:25:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6193,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4407:7:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6194,
                          "nodeType": "ArrayTypeName",
                          "src": "4407:9:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6197,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6204,
                        "src": "4442:15:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6196,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4442:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6199,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6204,
                        "src": "4467:16:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6198,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4467:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4357:132:27"
                  },
                  "returnParameters": {
                    "id": 6203,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6202,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6204,
                        "src": "4521:7:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6201,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4521:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4520:9:27"
                  },
                  "scope": 6241,
                  "src": "4334:196:27",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "id": 6218,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onSwapGivenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6214,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6206,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 6218,
                        "src": "5019:30:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 6205,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "5019:11:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6209,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 6218,
                        "src": "5059:25:27",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6207,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "5059:7:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6208,
                          "nodeType": "ArrayTypeName",
                          "src": "5059:9:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6211,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6218,
                        "src": "5094:15:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6210,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5094:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6213,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6218,
                        "src": "5119:16:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6212,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5119:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5009:132:27"
                  },
                  "returnParameters": {
                    "id": 6217,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6216,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6218,
                        "src": "5173:7:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6215,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5173:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5172:9:27"
                  },
                  "scope": 6241,
                  "src": "4985:197:27",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 6239,
                    "nodeType": "Block",
                    "src": "5307:84:27",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 6234,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 6230,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 6228,
                                  "name": "indexIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6220,
                                  "src": "5326:7:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "id": 6229,
                                  "name": "limit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6224,
                                  "src": "5336:5:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5326:15:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 6233,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 6231,
                                  "name": "indexOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6222,
                                  "src": "5345:8:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "id": 6232,
                                  "name": "limit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6224,
                                  "src": "5356:5:27",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5345:16:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "5326:35:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6235,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5363:6:27",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6236,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 402,
                              "src": "5363:20:27",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6227,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5317:8:27",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6237,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5317:67:27",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6238,
                        "nodeType": "ExpressionStatement",
                        "src": "5317:67:27"
                      }
                    ]
                  },
                  "id": 6240,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_validateIndexes",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6225,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6220,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6240,
                        "src": "5223:15:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6219,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5223:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6222,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6240,
                        "src": "5248:16:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6221,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5248:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6224,
                        "mutability": "mutable",
                        "name": "limit",
                        "nodeType": "VariableDeclaration",
                        "scope": 6240,
                        "src": "5274:13:27",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6223,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5274:7:27",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5213:80:27"
                  },
                  "returnParameters": {
                    "id": 6226,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5307:0:27"
                  },
                  "scope": 6241,
                  "src": "5188:203:27",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 6242,
              "src": "1026:4367:27"
            }
          ],
          "src": "688:4706:27"
        },
        "id": 27
      },
      "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol",
          "exportedSymbols": {
            "BaseMinimalSwapInfoPool": [
              6441
            ]
          },
          "id": 6442,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 6243,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:28"
            },
            {
              "id": 6244,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:28"
            },
            {
              "absolutePath": "src.sol/amm/pools/BasePool.sol",
              "file": "./BasePool.sol",
              "id": 6245,
              "nodeType": "ImportDirective",
              "scope": 6442,
              "sourceUnit": 7929,
              "src": "747:24:28",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol",
              "file": "../vault/interfaces/IMinimalSwapInfoPool.sol",
              "id": 6246,
              "nodeType": "ImportDirective",
              "scope": 6442,
              "sourceUnit": 20780,
              "src": "772:54:28",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 6248,
                    "name": "IMinimalSwapInfoPool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20779,
                    "src": "1087:20:28",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                      "typeString": "contract IMinimalSwapInfoPool"
                    }
                  },
                  "id": 6249,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1087:20:28"
                },
                {
                  "baseName": {
                    "id": 6250,
                    "name": "BasePool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 7928,
                    "src": "1109:8:28",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BasePool_$7928",
                      "typeString": "contract BasePool"
                    }
                  },
                  "id": 6251,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1109:8:28"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1473,
                3890,
                5095,
                5131,
                5976,
                7928,
                8030,
                20719,
                20779,
                20804
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 6247,
                "nodeType": "StructuredDocumentation",
                "src": "828:213:28",
                "text": " @dev Extension of `BasePool`, adding a handler for `IMinimalSwapInfoPool.onSwap`.\n Derived contracts must implement `_onSwapGivenIn` and `_onSwapGivenOut` along with `BasePool`'s virtual functions."
              },
              "fullyImplemented": false,
              "id": 6441,
              "linearizedBaseContracts": [
                6441,
                7928,
                1473,
                5976,
                3890,
                5131,
                5095,
                8030,
                343,
                911,
                20779,
                20719,
                20804
              ],
              "name": "BaseMinimalSwapInfoPool",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 6292,
                    "nodeType": "Block",
                    "src": "1728:64:28",
                    "statements": []
                  },
                  "id": 6293,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 6271,
                          "name": "vault",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6253,
                          "src": "1417:5:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 6275,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "expression": {
                                "id": 6272,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6260,
                                "src": "1436:6:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6273,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "1436:13:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "hexValue": "32",
                              "id": 6274,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1453:1:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            },
                            "src": "1436:18:28",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "expression": {
                              "expression": {
                                "id": 6279,
                                "name": "IVault",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21266,
                                "src": "1495:6:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IVault_$21266_$",
                                  "typeString": "type(contract IVault)"
                                }
                              },
                              "id": 6280,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "PoolSpecialization",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20940,
                              "src": "1495:25:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 6281,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "MINIMAL_SWAP_INFO",
                            "nodeType": "MemberAccess",
                            "src": "1495:43:28",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "id": 6282,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "1436:102:28",
                          "trueExpression": {
                            "expression": {
                              "expression": {
                                "id": 6276,
                                "name": "IVault",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21266,
                                "src": "1457:6:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IVault_$21266_$",
                                  "typeString": "type(contract IVault)"
                                }
                              },
                              "id": 6277,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "PoolSpecialization",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20940,
                              "src": "1457:25:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 6278,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "1457:35:28",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        {
                          "id": 6283,
                          "name": "name",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6255,
                          "src": "1552:4:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 6284,
                          "name": "symbol",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6257,
                          "src": "1570:6:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 6285,
                          "name": "tokens",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6260,
                          "src": "1590:6:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        {
                          "id": 6286,
                          "name": "swapFeePercentage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6262,
                          "src": "1610:17:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 6287,
                          "name": "pauseWindowDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6264,
                          "src": "1641:19:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 6288,
                          "name": "bufferPeriodDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6266,
                          "src": "1674:20:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 6289,
                          "name": "owner",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6268,
                          "src": "1708:5:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 6290,
                      "modifierName": {
                        "id": 6270,
                        "name": "BasePool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7928,
                        "src": "1395:8:28",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BasePool_$7928_$",
                          "typeString": "type(contract BasePool)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1395:328:28"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6269,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6253,
                        "mutability": "mutable",
                        "name": "vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 6293,
                        "src": "1145:12:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 6252,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "1145:6:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6255,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 6293,
                        "src": "1167:18:28",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 6254,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1167:6:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6257,
                        "mutability": "mutable",
                        "name": "symbol",
                        "nodeType": "VariableDeclaration",
                        "scope": 6293,
                        "src": "1195:20:28",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 6256,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1195:6:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6260,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 6293,
                        "src": "1225:22:28",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6258,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1225:6:28",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 6259,
                          "nodeType": "ArrayTypeName",
                          "src": "1225:8:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6262,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 6293,
                        "src": "1257:25:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6261,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1257:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6264,
                        "mutability": "mutable",
                        "name": "pauseWindowDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 6293,
                        "src": "1292:27:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6263,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1292:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6266,
                        "mutability": "mutable",
                        "name": "bufferPeriodDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 6293,
                        "src": "1329:28:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6265,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1329:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6268,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 6293,
                        "src": "1367:13:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 6267,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1367:7:28",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1135:251:28"
                  },
                  "returnParameters": {
                    "id": 6291,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1728:0:28"
                  },
                  "scope": 6441,
                  "src": "1124:668:28",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    20778
                  ],
                  "body": {
                    "id": 6417,
                    "nodeType": "Block",
                    "src": "1989:1609:28",
                    "statements": [
                      {
                        "assignments": [
                          6306
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 6306,
                            "mutability": "mutable",
                            "name": "scalingFactorTokenIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 6417,
                            "src": "1999:28:28",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 6305,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1999:7:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 6311,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 6308,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6295,
                                "src": "2045:7:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 6309,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20788,
                              "src": "2045:15:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 6307,
                            "name": "_scalingFactor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7499,
                            "src": "2030:14:28",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                              "typeString": "function (contract IERC20) view returns (uint256)"
                            }
                          },
                          "id": 6310,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2030:31:28",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1999:62:28"
                      },
                      {
                        "assignments": [
                          6313
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 6313,
                            "mutability": "mutable",
                            "name": "scalingFactorTokenOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 6417,
                            "src": "2071:29:28",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 6312,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2071:7:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 6318,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 6315,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6295,
                                "src": "2118:7:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 6316,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20790,
                              "src": "2118:16:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 6314,
                            "name": "_scalingFactor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7499,
                            "src": "2103:14:28",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                              "typeString": "function (contract IERC20) view returns (uint256)"
                            }
                          },
                          "id": 6317,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2103:32:28",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2071:64:28"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          },
                          "id": 6324,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 6319,
                              "name": "request",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6295,
                              "src": "2150:7:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 6320,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "kind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20786,
                            "src": "2150:12:28",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "expression": {
                                "id": 6321,
                                "name": "IVault",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21266,
                                "src": "2166:6:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IVault_$21266_$",
                                  "typeString": "type(contract IVault)"
                                }
                              },
                              "id": 6322,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SwapKind",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21101,
                              "src": "2166:15:28",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_SwapKind_$21101_$",
                                "typeString": "type(enum IVault.SwapKind)"
                              }
                            },
                            "id": 6323,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "GIVEN_IN",
                            "nodeType": "MemberAccess",
                            "src": "2166:24:28",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            }
                          },
                          "src": "2150:40:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 6415,
                          "nodeType": "Block",
                          "src": "2905:687:28",
                          "statements": [
                            {
                              "expression": {
                                "id": 6377,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 6372,
                                  "name": "balanceTokenIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6297,
                                  "src": "2966:14:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 6374,
                                      "name": "balanceTokenIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6297,
                                      "src": "2992:14:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 6375,
                                      "name": "scalingFactorTokenIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6306,
                                      "src": "3008:20:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 6373,
                                    "name": "_upscale",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7655,
                                    "src": "2983:8:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 6376,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2983:46:28",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2966:63:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6378,
                              "nodeType": "ExpressionStatement",
                              "src": "2966:63:28"
                            },
                            {
                              "expression": {
                                "id": 6384,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 6379,
                                  "name": "balanceTokenOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6299,
                                  "src": "3043:15:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 6381,
                                      "name": "balanceTokenOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6299,
                                      "src": "3070:15:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 6382,
                                      "name": "scalingFactorTokenOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6313,
                                      "src": "3087:21:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 6380,
                                    "name": "_upscale",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7655,
                                    "src": "3061:8:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 6383,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3061:48:28",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3043:66:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6385,
                              "nodeType": "ExpressionStatement",
                              "src": "3043:66:28"
                            },
                            {
                              "expression": {
                                "id": 6394,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 6386,
                                    "name": "request",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6295,
                                    "src": "3123:7:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 6388,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "amount",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20792,
                                  "src": "3123:14:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "expression": {
                                        "id": 6390,
                                        "name": "request",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 6295,
                                        "src": "3149:7:28",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                          "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                        }
                                      },
                                      "id": 6391,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "amount",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 20792,
                                      "src": "3149:14:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 6392,
                                      "name": "scalingFactorTokenOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6313,
                                      "src": "3165:21:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 6389,
                                    "name": "_upscale",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7655,
                                    "src": "3140:8:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 6393,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3140:47:28",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3123:64:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6395,
                              "nodeType": "ExpressionStatement",
                              "src": "3123:64:28"
                            },
                            {
                              "assignments": [
                                6397
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 6397,
                                  "mutability": "mutable",
                                  "name": "amountIn",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 6415,
                                  "src": "3202:16:28",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 6396,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3202:7:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 6403,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 6399,
                                    "name": "request",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6295,
                                    "src": "3237:7:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  {
                                    "id": 6400,
                                    "name": "balanceTokenIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6297,
                                    "src": "3246:14:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 6401,
                                    "name": "balanceTokenOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6299,
                                    "src": "3262:15:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 6398,
                                  "name": "_onSwapGivenOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6440,
                                  "src": "3221:15:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,uint256,uint256) view returns (uint256)"
                                  }
                                },
                                "id": 6402,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3221:57:28",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3202:76:28"
                            },
                            {
                              "expression": {
                                "id": 6409,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 6404,
                                  "name": "amountIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6397,
                                  "src": "3363:8:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 6406,
                                      "name": "amountIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6397,
                                      "src": "3387:8:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 6407,
                                      "name": "scalingFactorTokenIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6306,
                                      "src": "3397:20:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 6405,
                                    "name": "_downscaleUp",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7765,
                                    "src": "3374:12:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 6408,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3374:44:28",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3363:55:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6410,
                              "nodeType": "ExpressionStatement",
                              "src": "3363:55:28"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 6412,
                                    "name": "amountIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6397,
                                    "src": "3572:8:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 6411,
                                  "name": "_addSwapFeeAmount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7375,
                                  "src": "3554:17:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256) view returns (uint256)"
                                  }
                                },
                                "id": 6413,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3554:27:28",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 6304,
                              "id": 6414,
                              "nodeType": "Return",
                              "src": "3547:34:28"
                            }
                          ]
                        },
                        "id": 6416,
                        "nodeType": "IfStatement",
                        "src": "2146:1446:28",
                        "trueBody": {
                          "id": 6371,
                          "nodeType": "Block",
                          "src": "2192:707:28",
                          "statements": [
                            {
                              "expression": {
                                "id": 6332,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 6325,
                                    "name": "request",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6295,
                                    "src": "2318:7:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 6327,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "amount",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20792,
                                  "src": "2318:14:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "expression": {
                                        "id": 6329,
                                        "name": "request",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 6295,
                                        "src": "2358:7:28",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                          "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                        }
                                      },
                                      "id": 6330,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "amount",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 20792,
                                      "src": "2358:14:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 6328,
                                    "name": "_subtractSwapFeeAmount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7396,
                                    "src": "2335:22:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256) view returns (uint256)"
                                    }
                                  },
                                  "id": 6331,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2335:38:28",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2318:55:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6333,
                              "nodeType": "ExpressionStatement",
                              "src": "2318:55:28"
                            },
                            {
                              "expression": {
                                "id": 6339,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 6334,
                                  "name": "balanceTokenIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6297,
                                  "src": "2435:14:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 6336,
                                      "name": "balanceTokenIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6297,
                                      "src": "2461:14:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 6337,
                                      "name": "scalingFactorTokenIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6306,
                                      "src": "2477:20:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 6335,
                                    "name": "_upscale",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7655,
                                    "src": "2452:8:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 6338,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2452:46:28",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2435:63:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6340,
                              "nodeType": "ExpressionStatement",
                              "src": "2435:63:28"
                            },
                            {
                              "expression": {
                                "id": 6346,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 6341,
                                  "name": "balanceTokenOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6299,
                                  "src": "2512:15:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 6343,
                                      "name": "balanceTokenOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6299,
                                      "src": "2539:15:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 6344,
                                      "name": "scalingFactorTokenOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6313,
                                      "src": "2556:21:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 6342,
                                    "name": "_upscale",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7655,
                                    "src": "2530:8:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 6345,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2530:48:28",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2512:66:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6347,
                              "nodeType": "ExpressionStatement",
                              "src": "2512:66:28"
                            },
                            {
                              "expression": {
                                "id": 6356,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 6348,
                                    "name": "request",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6295,
                                    "src": "2592:7:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 6350,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "amount",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20792,
                                  "src": "2592:14:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "expression": {
                                        "id": 6352,
                                        "name": "request",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 6295,
                                        "src": "2618:7:28",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                          "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                        }
                                      },
                                      "id": 6353,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "amount",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 20792,
                                      "src": "2618:14:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 6354,
                                      "name": "scalingFactorTokenIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6306,
                                      "src": "2634:20:28",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 6351,
                                    "name": "_upscale",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7655,
                                    "src": "2609:8:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 6355,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2609:46:28",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2592:63:28",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 6357,
                              "nodeType": "ExpressionStatement",
                              "src": "2592:63:28"
                            },
                            {
                              "assignments": [
                                6359
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 6359,
                                  "mutability": "mutable",
                                  "name": "amountOut",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 6371,
                                  "src": "2670:17:28",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 6358,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2670:7:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 6365,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 6361,
                                    "name": "request",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6295,
                                    "src": "2705:7:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  {
                                    "id": 6362,
                                    "name": "balanceTokenIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6297,
                                    "src": "2714:14:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 6363,
                                    "name": "balanceTokenOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6299,
                                    "src": "2730:15:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 6360,
                                  "name": "_onSwapGivenIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6429,
                                  "src": "2690:14:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,uint256,uint256) view returns (uint256)"
                                  }
                                },
                                "id": 6364,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2690:56:28",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2670:76:28"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 6367,
                                    "name": "amountOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6359,
                                    "src": "2855:9:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 6368,
                                    "name": "scalingFactorTokenOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6313,
                                    "src": "2866:21:28",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 6366,
                                  "name": "_downscaleDown",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7710,
                                  "src": "2840:14:28",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 6369,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2840:48:28",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 6304,
                              "id": 6370,
                              "nodeType": "Return",
                              "src": "2833:55:28"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "functionSelector": "9d2c110c",
                  "id": 6418,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "onSwap",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 6301,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1962:8:28"
                  },
                  "parameters": {
                    "id": 6300,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6295,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 6418,
                        "src": "1842:26:28",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 6294,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "1842:11:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6297,
                        "mutability": "mutable",
                        "name": "balanceTokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6418,
                        "src": "1878:22:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6296,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1878:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6299,
                        "mutability": "mutable",
                        "name": "balanceTokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6418,
                        "src": "1910:23:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6298,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1910:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1832:107:28"
                  },
                  "returnParameters": {
                    "id": 6304,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6303,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6418,
                        "src": "1980:7:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6302,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1980:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1979:9:28"
                  },
                  "scope": 6441,
                  "src": "1817:1781:28",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "external"
                },
                {
                  "id": 6429,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onSwapGivenIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6425,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6420,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 6429,
                        "src": "4161:30:28",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 6419,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "4161:11:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6422,
                        "mutability": "mutable",
                        "name": "balanceTokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6429,
                        "src": "4201:22:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6421,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4201:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6424,
                        "mutability": "mutable",
                        "name": "balanceTokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6429,
                        "src": "4233:23:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6423,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4233:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4151:111:28"
                  },
                  "returnParameters": {
                    "id": 6428,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6427,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6429,
                        "src": "4294:7:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6426,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4294:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4293:9:28"
                  },
                  "scope": 6441,
                  "src": "4128:175:28",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "id": 6440,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onSwapGivenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6436,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6431,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 6440,
                        "src": "4817:30:28",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 6430,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "4817:11:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6433,
                        "mutability": "mutable",
                        "name": "balanceTokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 6440,
                        "src": "4857:22:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6432,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4857:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6435,
                        "mutability": "mutable",
                        "name": "balanceTokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 6440,
                        "src": "4889:23:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6434,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4889:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4807:111:28"
                  },
                  "returnParameters": {
                    "id": 6439,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6438,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6440,
                        "src": "4950:7:28",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6437,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4950:7:28",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4949:9:28"
                  },
                  "scope": 6441,
                  "src": "4783:176:28",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                }
              ],
              "scope": 6442,
              "src": "1042:3919:28"
            }
          ],
          "src": "688:4274:28"
        },
        "id": 28
      },
      "src.sol/amm/pools/BasePool.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/BasePool.sol",
          "exportedSymbols": {
            "BasePool": [
              7928
            ]
          },
          "id": 7929,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 6443,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:29"
            },
            {
              "id": 6444,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:29"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
              "file": "../lib/math/FixedPoint.sol",
              "id": 6445,
              "nodeType": "ImportDirective",
              "scope": 7929,
              "sourceUnit": 1816,
              "src": "747:36:29",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../lib/helpers/InputHelpers.sol",
              "id": 6446,
              "nodeType": "ImportDirective",
              "scope": 7929,
              "sourceUnit": 1043,
              "src": "784:41:29",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/TemporarilyPausable.sol",
              "file": "../lib/helpers/TemporarilyPausable.sol",
              "id": 6447,
              "nodeType": "ImportDirective",
              "scope": 7929,
              "sourceUnit": 1474,
              "src": "826:48:29",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ERC20.sol",
              "file": "../lib/openzeppelin/ERC20.sol",
              "id": 6448,
              "nodeType": "ImportDirective",
              "scope": 7929,
              "sourceUnit": 4402,
              "src": "875:39:29",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/BalancerPoolToken.sol",
              "file": "./BalancerPoolToken.sol",
              "id": 6449,
              "nodeType": "ImportDirective",
              "scope": 7929,
              "sourceUnit": 5977,
              "src": "916:33:29",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/BasePoolAuthorization.sol",
              "file": "./BasePoolAuthorization.sol",
              "id": 6450,
              "nodeType": "ImportDirective",
              "scope": 7929,
              "sourceUnit": 8031,
              "src": "950:37:29",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "../vault/interfaces/IVault.sol",
              "id": 6451,
              "nodeType": "ImportDirective",
              "scope": 7929,
              "sourceUnit": 21267,
              "src": "988:40:29",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IBasePool.sol",
              "file": "../vault/interfaces/IBasePool.sol",
              "id": 6452,
              "nodeType": "ImportDirective",
              "scope": 7929,
              "sourceUnit": 20720,
              "src": "1029:43:29",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 6454,
                    "name": "IBasePool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20719,
                    "src": "2327:9:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBasePool_$20719",
                      "typeString": "contract IBasePool"
                    }
                  },
                  "id": 6455,
                  "nodeType": "InheritanceSpecifier",
                  "src": "2327:9:29"
                },
                {
                  "baseName": {
                    "id": 6456,
                    "name": "BasePoolAuthorization",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 8030,
                    "src": "2338:21:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BasePoolAuthorization_$8030",
                      "typeString": "contract BasePoolAuthorization"
                    }
                  },
                  "id": 6457,
                  "nodeType": "InheritanceSpecifier",
                  "src": "2338:21:29"
                },
                {
                  "baseName": {
                    "id": 6458,
                    "name": "BalancerPoolToken",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5976,
                    "src": "2361:17:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalancerPoolToken_$5976",
                      "typeString": "contract BalancerPoolToken"
                    }
                  },
                  "id": 6459,
                  "nodeType": "InheritanceSpecifier",
                  "src": "2361:17:29"
                },
                {
                  "baseName": {
                    "id": 6460,
                    "name": "TemporarilyPausable",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1473,
                    "src": "2380:19:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_TemporarilyPausable_$1473",
                      "typeString": "contract TemporarilyPausable"
                    }
                  },
                  "id": 6461,
                  "nodeType": "InheritanceSpecifier",
                  "src": "2380:19:29"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1473,
                3890,
                5095,
                5131,
                5976,
                8030,
                20719,
                20804
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 6453,
                "nodeType": "StructuredDocumentation",
                "src": "1406:890:29",
                "text": " @dev Reference implementation for the base layer of a Pool contract that manages a single Pool with an immutable set\n of registered tokens, no Asset Managers, an admin-controlled swap fee percentage, and an emergency pause mechanism.\n Note that neither swap fees nor the pause mechanism are used by this contract. They are passed through so that\n derived contracts can use them via the `_addSwapFeeAmount` and `_subtractSwapFeeAmount` functions, and the\n `whenNotPaused` modifier.\n No admin permissions are checked here: instead, this contract delegates that to the Vault's own Authorizer.\n Because this contract doesn't implement the swap hooks, derived contracts should generally inherit from\n BaseGeneralPool or BaseMinimalSwapInfoPool. Otherwise, subclasses must inherit from the corresponding interfaces\n and implement the swap callbacks themselves."
              },
              "fullyImplemented": false,
              "id": 7928,
              "linearizedBaseContracts": [
                7928,
                1473,
                5976,
                3890,
                5131,
                5095,
                8030,
                343,
                911,
                20719,
                20804
              ],
              "name": "BasePool",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 6464,
                  "libraryName": {
                    "id": 6462,
                    "name": "FixedPoint",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1815,
                    "src": "2412:10:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FixedPoint_$1815",
                      "typeString": "library FixedPoint"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2406:29:29",
                  "typeName": {
                    "id": 6463,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2427:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "constant": true,
                  "id": 6467,
                  "mutability": "constant",
                  "name": "_MIN_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2441:40:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6465,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2441:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "32",
                    "id": 6466,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2480:1:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_2_by_1",
                      "typeString": "int_const 2"
                    },
                    "value": "2"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 6470,
                  "mutability": "constant",
                  "name": "_MAX_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2487:40:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6468,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2487:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "38",
                    "id": 6469,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2526:1:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_8_by_1",
                      "typeString": "int_const 8"
                    },
                    "value": "8"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 6473,
                  "mutability": "constant",
                  "name": "_MIN_SWAP_FEE_PERCENTAGE",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2580:56:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6471,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2580:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "31653132",
                    "id": 6472,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2632:4:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1000000000000_by_1",
                      "typeString": "int_const 1000000000000"
                    },
                    "value": "1e12"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 6476,
                  "mutability": "constant",
                  "name": "_MAX_SWAP_FEE_PERCENTAGE",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2653:56:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6474,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2653:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "31653137",
                    "id": 6475,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2705:4:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_100000000000000000_by_1",
                      "typeString": "int_const 100000000000000000"
                    },
                    "value": "1e17"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 6479,
                  "mutability": "constant",
                  "name": "_MINIMUM_BPT",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2723:43:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6477,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2723:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "316536",
                    "id": 6478,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2763:3:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1000000_by_1",
                      "typeString": "int_const 1000000"
                    },
                    "value": "1e6"
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 6481,
                  "mutability": "mutable",
                  "name": "_swapFeePercentage",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2773:35:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6480,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2773:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6483,
                  "mutability": "immutable",
                  "name": "_vault",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2815:31:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IVault_$21266",
                    "typeString": "contract IVault"
                  },
                  "typeName": {
                    "id": 6482,
                    "name": "IVault",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21266,
                    "src": "2815:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IVault_$21266",
                      "typeString": "contract IVault"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 6485,
                  "mutability": "immutable",
                  "name": "_poolId",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2852:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6484,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2852:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 6487,
                  "mutability": "immutable",
                  "name": "_totalTokens",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2891:38:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6486,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2891:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 6489,
                  "mutability": "immutable",
                  "name": "_token0",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2936:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$5095",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 6488,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "2936:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6491,
                  "mutability": "immutable",
                  "name": "_token1",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "2975:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$5095",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 6490,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "2975:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6493,
                  "mutability": "immutable",
                  "name": "_token2",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3014:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$5095",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 6492,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "3014:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6495,
                  "mutability": "immutable",
                  "name": "_token3",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3053:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$5095",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 6494,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "3053:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6497,
                  "mutability": "immutable",
                  "name": "_token4",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3092:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$5095",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 6496,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "3092:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6499,
                  "mutability": "immutable",
                  "name": "_token5",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3131:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$5095",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 6498,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "3131:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6501,
                  "mutability": "immutable",
                  "name": "_token6",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3170:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$5095",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 6500,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "3170:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6503,
                  "mutability": "immutable",
                  "name": "_token7",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3209:33:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$5095",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "id": 6502,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "3209:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6505,
                  "mutability": "immutable",
                  "name": "_scalingFactor0",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3600:42:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6504,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3600:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6507,
                  "mutability": "immutable",
                  "name": "_scalingFactor1",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3648:42:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6506,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3648:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6509,
                  "mutability": "immutable",
                  "name": "_scalingFactor2",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3696:42:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6508,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3696:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6511,
                  "mutability": "immutable",
                  "name": "_scalingFactor3",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3744:42:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6510,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3744:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6513,
                  "mutability": "immutable",
                  "name": "_scalingFactor4",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3792:42:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6512,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3792:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6515,
                  "mutability": "immutable",
                  "name": "_scalingFactor5",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3840:42:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6514,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3840:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6517,
                  "mutability": "immutable",
                  "name": "_scalingFactor6",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3888:42:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6516,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3888:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6519,
                  "mutability": "immutable",
                  "name": "_scalingFactor7",
                  "nodeType": "VariableDeclaration",
                  "scope": 7928,
                  "src": "3936:42:29",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6518,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3936:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "anonymous": false,
                  "id": 6523,
                  "name": "SwapFeeChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 6522,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6521,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 6523,
                        "src": "4006:25:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6520,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4006:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4005:27:29"
                  },
                  "src": "3985:48:29"
                },
                {
                  "body": {
                    "id": 6867,
                    "nodeType": "Block",
                    "src": "5087:2621:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6570,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6567,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "5106:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6568,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "5106:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 6569,
                                "name": "_MIN_TOKENS",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6467,
                                "src": "5123:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5106:28:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6571,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5136:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6572,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MIN_TOKENS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 417,
                              "src": "5136:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6566,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5097:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6573,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5097:57:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6574,
                        "nodeType": "ExpressionStatement",
                        "src": "5097:57:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6579,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6576,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "5173:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6577,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "5173:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 6578,
                                "name": "_MAX_TOKENS",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6470,
                                "src": "5190:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5173:28:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6580,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5203:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6581,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_TOKENS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 420,
                              "src": "5203:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6575,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5164:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6582,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5164:57:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6583,
                        "nodeType": "ExpressionStatement",
                        "src": "5164:57:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6587,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6534,
                              "src": "5802:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            ],
                            "expression": {
                              "id": 6584,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "5769:12:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 6586,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureArrayIsSorted",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 990,
                            "src": "5769:32:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (contract IERC20[] memory) pure"
                            }
                          },
                          "id": 6588,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5769:40:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6589,
                        "nodeType": "ExpressionStatement",
                        "src": "5769:40:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6593,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 6591,
                                "name": "swapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6536,
                                "src": "5829:17:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 6592,
                                "name": "_MIN_SWAP_FEE_PERCENTAGE",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6473,
                                "src": "5850:24:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5829:45:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6594,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5876:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6595,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MIN_SWAP_FEE_PERCENTAGE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 426,
                              "src": "5876:30:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6590,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5820:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6596,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5820:87:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6597,
                        "nodeType": "ExpressionStatement",
                        "src": "5820:87:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6601,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 6599,
                                "name": "swapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6536,
                                "src": "5926:17:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 6600,
                                "name": "_MAX_SWAP_FEE_PERCENTAGE",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6476,
                                "src": "5947:24:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5926:45:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6602,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5973:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6603,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_SWAP_FEE_PERCENTAGE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 423,
                              "src": "5973:30:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6598,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5917:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6604,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5917:87:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6605,
                        "nodeType": "ExpressionStatement",
                        "src": "5917:87:29"
                      },
                      {
                        "assignments": [
                          6607
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 6607,
                            "mutability": "mutable",
                            "name": "poolId",
                            "nodeType": "VariableDeclaration",
                            "scope": 6867,
                            "src": "6015:14:29",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 6606,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "6015:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 6612,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 6610,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6527,
                              "src": "6051:14:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            ],
                            "expression": {
                              "id": 6608,
                              "name": "vault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6525,
                              "src": "6032:5:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 6609,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "registerPool",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20948,
                            "src": "6032:18:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_enum$_PoolSpecialization_$20940_$returns$_t_bytes32_$",
                              "typeString": "function (enum IVault.PoolSpecialization) external returns (bytes32)"
                            }
                          },
                          "id": 6611,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6032:34:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6015:51:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6616,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6607,
                              "src": "6151:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 6617,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6534,
                              "src": "6159:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "id": 6621,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "6181:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6622,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "src": "6181:13:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 6620,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "NewExpression",
                                "src": "6167:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$",
                                  "typeString": "function (uint256) pure returns (address[] memory)"
                                },
                                "typeName": {
                                  "baseType": {
                                    "id": 6618,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6171:7:29",
                                    "stateMutability": "nonpayable",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "id": 6619,
                                  "nodeType": "ArrayTypeName",
                                  "src": "6171:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                                    "typeString": "address[]"
                                  }
                                }
                              },
                              "id": 6623,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6167:28:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            ],
                            "expression": {
                              "id": 6613,
                              "name": "vault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6525,
                              "src": "6130:5:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 6615,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "registerTokens",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20975,
                            "src": "6130:20:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (bytes32,contract IERC20[] memory,address[] memory) external"
                            }
                          },
                          "id": 6624,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6130:66:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6625,
                        "nodeType": "ExpressionStatement",
                        "src": "6130:66:29"
                      },
                      {
                        "expression": {
                          "id": 6628,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6626,
                            "name": "_vault",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6483,
                            "src": "6297:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IVault_$21266",
                              "typeString": "contract IVault"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 6627,
                            "name": "vault",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6525,
                            "src": "6306:5:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IVault_$21266",
                              "typeString": "contract IVault"
                            }
                          },
                          "src": "6297:14:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "id": 6629,
                        "nodeType": "ExpressionStatement",
                        "src": "6297:14:29"
                      },
                      {
                        "expression": {
                          "id": 6632,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6630,
                            "name": "_poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6485,
                            "src": "6321:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 6631,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6607,
                            "src": "6331:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "6321:16:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 6633,
                        "nodeType": "ExpressionStatement",
                        "src": "6321:16:29"
                      },
                      {
                        "expression": {
                          "id": 6636,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6634,
                            "name": "_swapFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6481,
                            "src": "6347:18:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 6635,
                            "name": "swapFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6536,
                            "src": "6368:17:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6347:38:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6637,
                        "nodeType": "ExpressionStatement",
                        "src": "6347:38:29"
                      },
                      {
                        "expression": {
                          "id": 6641,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6638,
                            "name": "_totalTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6487,
                            "src": "6395:12:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 6639,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6534,
                              "src": "6410:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 6640,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "6410:13:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6395:28:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6642,
                        "nodeType": "ExpressionStatement",
                        "src": "6395:28:29"
                      },
                      {
                        "expression": {
                          "id": 6655,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6643,
                            "name": "_token0",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6489,
                            "src": "6550:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6647,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6644,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "6560:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6645,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "6560:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 6646,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6576:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "6560:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 6652,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "6599:1:29",
                                  "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": 6651,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "6592:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 6653,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6592:9:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 6654,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "6560:41:29",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 6648,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6534,
                                "src": "6580:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6650,
                              "indexExpression": {
                                "hexValue": "30",
                                "id": 6649,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6587:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6580:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "6550:51:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 6656,
                        "nodeType": "ExpressionStatement",
                        "src": "6550:51:29"
                      },
                      {
                        "expression": {
                          "id": 6669,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6657,
                            "name": "_token1",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6491,
                            "src": "6611:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6661,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6658,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "6621:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6659,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "6621:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "31",
                                "id": 6660,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6637:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "6621:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 6666,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "6660:1:29",
                                  "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": 6665,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "6653:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 6667,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6653:9:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 6668,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "6621:41:29",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 6662,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6534,
                                "src": "6641:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6664,
                              "indexExpression": {
                                "hexValue": "31",
                                "id": 6663,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6648:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6641:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "6611:51:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 6670,
                        "nodeType": "ExpressionStatement",
                        "src": "6611:51:29"
                      },
                      {
                        "expression": {
                          "id": 6683,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6671,
                            "name": "_token2",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6493,
                            "src": "6672:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6675,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6672,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "6682:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6673,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "6682:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6674,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6698:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "6682:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 6680,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "6721:1:29",
                                  "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": 6679,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "6714:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 6681,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6714:9:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 6682,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "6682:41:29",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 6676,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6534,
                                "src": "6702:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6678,
                              "indexExpression": {
                                "hexValue": "32",
                                "id": 6677,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6709:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6702:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "6672:51:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 6684,
                        "nodeType": "ExpressionStatement",
                        "src": "6672:51:29"
                      },
                      {
                        "expression": {
                          "id": 6697,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6685,
                            "name": "_token3",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6495,
                            "src": "6733:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6689,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6686,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "6743:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6687,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "6743:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "33",
                                "id": 6688,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6759:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_3_by_1",
                                  "typeString": "int_const 3"
                                },
                                "value": "3"
                              },
                              "src": "6743:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 6694,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "6782:1:29",
                                  "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": 6693,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "6775:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 6695,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6775:9:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 6696,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "6743:41:29",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 6690,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6534,
                                "src": "6763:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6692,
                              "indexExpression": {
                                "hexValue": "33",
                                "id": 6691,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6770:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_3_by_1",
                                  "typeString": "int_const 3"
                                },
                                "value": "3"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6763:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "6733:51:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 6698,
                        "nodeType": "ExpressionStatement",
                        "src": "6733:51:29"
                      },
                      {
                        "expression": {
                          "id": 6711,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6699,
                            "name": "_token4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6497,
                            "src": "6794:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6703,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6700,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "6804:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6701,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "6804:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "34",
                                "id": 6702,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6820:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_4_by_1",
                                  "typeString": "int_const 4"
                                },
                                "value": "4"
                              },
                              "src": "6804:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 6708,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "6843:1:29",
                                  "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": 6707,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "6836:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 6709,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6836:9:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 6710,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "6804:41:29",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 6704,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6534,
                                "src": "6824:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6706,
                              "indexExpression": {
                                "hexValue": "34",
                                "id": 6705,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6831:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_4_by_1",
                                  "typeString": "int_const 4"
                                },
                                "value": "4"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6824:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "6794:51:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 6712,
                        "nodeType": "ExpressionStatement",
                        "src": "6794:51:29"
                      },
                      {
                        "expression": {
                          "id": 6725,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6713,
                            "name": "_token5",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6499,
                            "src": "6855:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6717,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6714,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "6865:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6715,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "6865:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "35",
                                "id": 6716,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6881:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_5_by_1",
                                  "typeString": "int_const 5"
                                },
                                "value": "5"
                              },
                              "src": "6865:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 6722,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "6904:1:29",
                                  "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": 6721,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "6897:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 6723,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6897:9:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 6724,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "6865:41:29",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 6718,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6534,
                                "src": "6885:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6720,
                              "indexExpression": {
                                "hexValue": "35",
                                "id": 6719,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6892:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_5_by_1",
                                  "typeString": "int_const 5"
                                },
                                "value": "5"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6885:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "6855:51:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 6726,
                        "nodeType": "ExpressionStatement",
                        "src": "6855:51:29"
                      },
                      {
                        "expression": {
                          "id": 6739,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6727,
                            "name": "_token6",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6501,
                            "src": "6916:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6731,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6728,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "6926:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6729,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "6926:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "36",
                                "id": 6730,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6942:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_6_by_1",
                                  "typeString": "int_const 6"
                                },
                                "value": "6"
                              },
                              "src": "6926:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 6736,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "6965:1:29",
                                  "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": 6735,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "6958:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 6737,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6958:9:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 6738,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "6926:41:29",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 6732,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6534,
                                "src": "6946:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6734,
                              "indexExpression": {
                                "hexValue": "36",
                                "id": 6733,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6953:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_6_by_1",
                                  "typeString": "int_const 6"
                                },
                                "value": "6"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6946:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "6916:51:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 6740,
                        "nodeType": "ExpressionStatement",
                        "src": "6916:51:29"
                      },
                      {
                        "expression": {
                          "id": 6753,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6741,
                            "name": "_token7",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6503,
                            "src": "6977:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6745,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6742,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "6987:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6743,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "6987:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "37",
                                "id": 6744,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7003:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_7_by_1",
                                  "typeString": "int_const 7"
                                },
                                "value": "7"
                              },
                              "src": "6987:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 6750,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "7026:1:29",
                                  "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": 6749,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "7019:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 6751,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7019:9:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 6752,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "6987:41:29",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 6746,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6534,
                                "src": "7007:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 6748,
                              "indexExpression": {
                                "hexValue": "37",
                                "id": 6747,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7014:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_7_by_1",
                                  "typeString": "int_const 7"
                                },
                                "value": "7"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "7007:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "6977:51:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 6754,
                        "nodeType": "ExpressionStatement",
                        "src": "6977:51:29"
                      },
                      {
                        "expression": {
                          "id": 6767,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6755,
                            "name": "_scalingFactor0",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6505,
                            "src": "7039:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6759,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6756,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "7057:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6757,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7057:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 6758,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7073:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "7057:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 6765,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7112:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 6766,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7057:56:29",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 6761,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "7099:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6763,
                                  "indexExpression": {
                                    "hexValue": "30",
                                    "id": 6762,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7106:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    },
                                    "value": "0"
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "7099:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 6760,
                                "name": "_computeScalingFactor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7428,
                                "src": "7077:21:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 6764,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7077:32:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7039:74:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6768,
                        "nodeType": "ExpressionStatement",
                        "src": "7039:74:29"
                      },
                      {
                        "expression": {
                          "id": 6781,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6769,
                            "name": "_scalingFactor1",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6507,
                            "src": "7123:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6773,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6770,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "7141:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6771,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7141:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "31",
                                "id": 6772,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7157:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "7141:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 6779,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7196:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 6780,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7141:56:29",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 6775,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "7183:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6777,
                                  "indexExpression": {
                                    "hexValue": "31",
                                    "id": 6776,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7190:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "7183:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 6774,
                                "name": "_computeScalingFactor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7428,
                                "src": "7161:21:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 6778,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7161:32:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7123:74:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6782,
                        "nodeType": "ExpressionStatement",
                        "src": "7123:74:29"
                      },
                      {
                        "expression": {
                          "id": 6795,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6783,
                            "name": "_scalingFactor2",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6509,
                            "src": "7207:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6787,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6784,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "7225:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6785,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7225:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6786,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7241:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7225:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 6793,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7280:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 6794,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7225:56:29",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 6789,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "7267:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6791,
                                  "indexExpression": {
                                    "hexValue": "32",
                                    "id": 6790,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7274:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_2_by_1",
                                      "typeString": "int_const 2"
                                    },
                                    "value": "2"
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "7267:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 6788,
                                "name": "_computeScalingFactor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7428,
                                "src": "7245:21:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 6792,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7245:32:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7207:74:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6796,
                        "nodeType": "ExpressionStatement",
                        "src": "7207:74:29"
                      },
                      {
                        "expression": {
                          "id": 6809,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6797,
                            "name": "_scalingFactor3",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6511,
                            "src": "7291:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6801,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6798,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "7309:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6799,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7309:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "33",
                                "id": 6800,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7325:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_3_by_1",
                                  "typeString": "int_const 3"
                                },
                                "value": "3"
                              },
                              "src": "7309:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 6807,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7364:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 6808,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7309:56:29",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 6803,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "7351:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6805,
                                  "indexExpression": {
                                    "hexValue": "33",
                                    "id": 6804,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7358:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_3_by_1",
                                      "typeString": "int_const 3"
                                    },
                                    "value": "3"
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "7351:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 6802,
                                "name": "_computeScalingFactor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7428,
                                "src": "7329:21:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 6806,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7329:32:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7291:74:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6810,
                        "nodeType": "ExpressionStatement",
                        "src": "7291:74:29"
                      },
                      {
                        "expression": {
                          "id": 6823,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6811,
                            "name": "_scalingFactor4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6513,
                            "src": "7375:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6815,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6812,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "7393:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6813,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7393:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "34",
                                "id": 6814,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7409:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_4_by_1",
                                  "typeString": "int_const 4"
                                },
                                "value": "4"
                              },
                              "src": "7393:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 6821,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7448:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 6822,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7393:56:29",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 6817,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "7435:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6819,
                                  "indexExpression": {
                                    "hexValue": "34",
                                    "id": 6818,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7442:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_4_by_1",
                                      "typeString": "int_const 4"
                                    },
                                    "value": "4"
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "7435:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 6816,
                                "name": "_computeScalingFactor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7428,
                                "src": "7413:21:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 6820,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7413:32:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7375:74:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6824,
                        "nodeType": "ExpressionStatement",
                        "src": "7375:74:29"
                      },
                      {
                        "expression": {
                          "id": 6837,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6825,
                            "name": "_scalingFactor5",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6515,
                            "src": "7459:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6829,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6826,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "7477:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6827,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7477:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "35",
                                "id": 6828,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7493:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_5_by_1",
                                  "typeString": "int_const 5"
                                },
                                "value": "5"
                              },
                              "src": "7477:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 6835,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7532:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 6836,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7477:56:29",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 6831,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "7519:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6833,
                                  "indexExpression": {
                                    "hexValue": "35",
                                    "id": 6832,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7526:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_5_by_1",
                                      "typeString": "int_const 5"
                                    },
                                    "value": "5"
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "7519:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 6830,
                                "name": "_computeScalingFactor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7428,
                                "src": "7497:21:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 6834,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7497:32:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7459:74:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6838,
                        "nodeType": "ExpressionStatement",
                        "src": "7459:74:29"
                      },
                      {
                        "expression": {
                          "id": 6851,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6839,
                            "name": "_scalingFactor6",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6517,
                            "src": "7543:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6843,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6840,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "7561:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6841,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7561:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "36",
                                "id": 6842,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7577:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_6_by_1",
                                  "typeString": "int_const 6"
                                },
                                "value": "6"
                              },
                              "src": "7561:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 6849,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7616:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 6850,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7561:56:29",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 6845,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "7603:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6847,
                                  "indexExpression": {
                                    "hexValue": "36",
                                    "id": 6846,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7610:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_6_by_1",
                                      "typeString": "int_const 6"
                                    },
                                    "value": "6"
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "7603:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 6844,
                                "name": "_computeScalingFactor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7428,
                                "src": "7581:21:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 6848,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7581:32:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7543:74:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6852,
                        "nodeType": "ExpressionStatement",
                        "src": "7543:74:29"
                      },
                      {
                        "expression": {
                          "id": 6865,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6853,
                            "name": "_scalingFactor7",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6519,
                            "src": "7627:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6857,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6854,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6534,
                                  "src": "7645:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 6855,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7645:13:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "37",
                                "id": 6856,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7661:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_7_by_1",
                                  "typeString": "int_const 7"
                                },
                                "value": "7"
                              },
                              "src": "7645:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 6863,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7700:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 6864,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7645:56:29",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 6859,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6534,
                                    "src": "7687:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 6861,
                                  "indexExpression": {
                                    "hexValue": "37",
                                    "id": 6860,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7694:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_7_by_1",
                                      "typeString": "int_const 7"
                                    },
                                    "value": "7"
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "7687:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 6858,
                                "name": "_computeScalingFactor",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7428,
                                "src": "7665:21:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 6862,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7665:32:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7627:74:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6866,
                        "nodeType": "ExpressionStatement",
                        "src": "7627:74:29"
                      }
                    ]
                  },
                  "id": 6868,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "id": 6549,
                                    "name": "msg",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -15,
                                    "src": "4921:3:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_message",
                                      "typeString": "msg"
                                    }
                                  },
                                  "id": 6550,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "src": "4921:10:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                ],
                                "id": 6548,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4913:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": {
                                  "id": 6547,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4913:7:29",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 6551,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4913:19:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6546,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "4905:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_bytes32_$",
                              "typeString": "type(bytes32)"
                            },
                            "typeName": {
                              "id": 6545,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "4905:7:29",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 6552,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4905:28:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 6553,
                      "modifierName": {
                        "id": 6544,
                        "name": "Authentication",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 343,
                        "src": "4890:14:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Authentication_$343_$",
                          "typeString": "type(contract Authentication)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4890:44:29"
                    },
                    {
                      "arguments": [
                        {
                          "id": 6555,
                          "name": "name",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6529,
                          "src": "4961:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 6556,
                          "name": "symbol",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6531,
                          "src": "4967:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        }
                      ],
                      "id": 6557,
                      "modifierName": {
                        "id": 6554,
                        "name": "BalancerPoolToken",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5976,
                        "src": "4943:17:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BalancerPoolToken_$5976_$",
                          "typeString": "type(contract BalancerPoolToken)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4943:31:29"
                    },
                    {
                      "arguments": [
                        {
                          "id": 6559,
                          "name": "owner",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6542,
                          "src": "5005:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 6560,
                      "modifierName": {
                        "id": 6558,
                        "name": "BasePoolAuthorization",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8030,
                        "src": "4983:21:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BasePoolAuthorization_$8030_$",
                          "typeString": "type(contract BasePoolAuthorization)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4983:28:29"
                    },
                    {
                      "arguments": [
                        {
                          "id": 6562,
                          "name": "pauseWindowDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6538,
                          "src": "5040:19:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 6563,
                          "name": "bufferPeriodDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6540,
                          "src": "5061:20:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 6564,
                      "modifierName": {
                        "id": 6561,
                        "name": "TemporarilyPausable",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1473,
                        "src": "5020:19:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_TemporarilyPausable_$1473_$",
                          "typeString": "type(contract TemporarilyPausable)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "5020:62:29"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6543,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6525,
                        "mutability": "mutable",
                        "name": "vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4060:12:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 6524,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "4060:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6527,
                        "mutability": "mutable",
                        "name": "specialization",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4082:40:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 6526,
                          "name": "IVault.PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "4082:25:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6529,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4132:18:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 6528,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "4132:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6531,
                        "mutability": "mutable",
                        "name": "symbol",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4160:20:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 6530,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "4160:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6534,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4190:22:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6532,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "4190:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 6533,
                          "nodeType": "ArrayTypeName",
                          "src": "4190:8:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6536,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4222:25:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6535,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4222:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6538,
                        "mutability": "mutable",
                        "name": "pauseWindowDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4257:27:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6537,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4257:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6540,
                        "mutability": "mutable",
                        "name": "bufferPeriodDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4294:28:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6539,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4294:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6542,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 6868,
                        "src": "4332:13:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 6541,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4332:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4050:301:29"
                  },
                  "returnParameters": {
                    "id": 6565,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5087:0:29"
                  },
                  "scope": 7928,
                  "src": "4039:3669:29",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 6875,
                    "nodeType": "Block",
                    "src": "7789:30:29",
                    "statements": [
                      {
                        "expression": {
                          "id": 6873,
                          "name": "_vault",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6483,
                          "src": "7806:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "functionReturnParameters": 6872,
                        "id": 6874,
                        "nodeType": "Return",
                        "src": "7799:13:29"
                      }
                    ]
                  },
                  "functionSelector": "8d928af8",
                  "id": 6876,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getVault",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6869,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7757:2:29"
                  },
                  "returnParameters": {
                    "id": 6872,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6871,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6876,
                        "src": "7781:6:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 6870,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "7781:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7780:8:29"
                  },
                  "scope": 7928,
                  "src": "7740:79:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 6883,
                    "nodeType": "Block",
                    "src": "7876:31:29",
                    "statements": [
                      {
                        "expression": {
                          "id": 6881,
                          "name": "_poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6485,
                          "src": "7893:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 6880,
                        "id": 6882,
                        "nodeType": "Return",
                        "src": "7886:14:29"
                      }
                    ]
                  },
                  "functionSelector": "38fff2d0",
                  "id": 6884,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getPoolId",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6877,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7843:2:29"
                  },
                  "returnParameters": {
                    "id": 6880,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6879,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6884,
                        "src": "7867:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 6878,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7867:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7866:9:29"
                  },
                  "scope": 7928,
                  "src": "7825:82:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 6891,
                    "nodeType": "Block",
                    "src": "7972:36:29",
                    "statements": [
                      {
                        "expression": {
                          "id": 6889,
                          "name": "_totalTokens",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6487,
                          "src": "7989:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6888,
                        "id": 6890,
                        "nodeType": "Return",
                        "src": "7982:19:29"
                      }
                    ]
                  },
                  "id": 6892,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getTotalTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6885,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7937:2:29"
                  },
                  "returnParameters": {
                    "id": 6888,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6887,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6892,
                        "src": "7963:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6886,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7963:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7962:9:29"
                  },
                  "scope": 7928,
                  "src": "7913:95:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 6899,
                    "nodeType": "Block",
                    "src": "8078:42:29",
                    "statements": [
                      {
                        "expression": {
                          "id": 6897,
                          "name": "_swapFeePercentage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6481,
                          "src": "8095:18:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6896,
                        "id": 6898,
                        "nodeType": "Return",
                        "src": "8088:25:29"
                      }
                    ]
                  },
                  "functionSelector": "55c67628",
                  "id": 6900,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getSwapFeePercentage",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6893,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "8043:2:29"
                  },
                  "returnParameters": {
                    "id": 6896,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6895,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 6900,
                        "src": "8069:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6894,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8069:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8068:9:29"
                  },
                  "scope": 7928,
                  "src": "8014:106:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 6933,
                    "nodeType": "Block",
                    "src": "8284:298:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6912,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 6910,
                                "name": "swapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6902,
                                "src": "8303:17:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 6911,
                                "name": "_MIN_SWAP_FEE_PERCENTAGE",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6473,
                                "src": "8324:24:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "8303:45:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6913,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "8350:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6914,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MIN_SWAP_FEE_PERCENTAGE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 426,
                              "src": "8350:30:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6909,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "8294:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6915,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8294:87:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6916,
                        "nodeType": "ExpressionStatement",
                        "src": "8294:87:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6920,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 6918,
                                "name": "swapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6902,
                                "src": "8400:17:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 6919,
                                "name": "_MAX_SWAP_FEE_PERCENTAGE",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6476,
                                "src": "8421:24:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "8400:45:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6921,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "8447:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6922,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_SWAP_FEE_PERCENTAGE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 423,
                              "src": "8447:30:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6917,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "8391:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6923,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8391:87:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6924,
                        "nodeType": "ExpressionStatement",
                        "src": "8391:87:29"
                      },
                      {
                        "expression": {
                          "id": 6927,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6925,
                            "name": "_swapFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6481,
                            "src": "8489:18:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 6926,
                            "name": "swapFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6902,
                            "src": "8510:17:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8489:38:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6928,
                        "nodeType": "ExpressionStatement",
                        "src": "8489:38:29"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 6930,
                              "name": "swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6902,
                              "src": "8557:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6929,
                            "name": "SwapFeeChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6523,
                            "src": "8542:14:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 6931,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8542:33:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6932,
                        "nodeType": "EmitStatement",
                        "src": "8537:38:29"
                      }
                    ]
                  },
                  "functionSelector": "38e9922e",
                  "id": 6934,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 6905,
                      "modifierName": {
                        "id": 6904,
                        "name": "authenticate",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 294,
                        "src": "8257:12:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "8257:12:29"
                    },
                    {
                      "id": 6907,
                      "modifierName": {
                        "id": 6906,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "8270:13:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "8270:13:29"
                    }
                  ],
                  "name": "setSwapFeePercentage",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6903,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6902,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 6934,
                        "src": "8213:25:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6901,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8213:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8212:27:29"
                  },
                  "returnParameters": {
                    "id": 6908,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "8284:0:29"
                  },
                  "scope": 7928,
                  "src": "8183:399:29",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 6945,
                    "nodeType": "Block",
                    "src": "8699:35:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6942,
                              "name": "paused",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6936,
                              "src": "8720:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 6941,
                            "name": "_setPaused",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1428,
                            "src": "8709:10:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$",
                              "typeString": "function (bool)"
                            }
                          },
                          "id": 6943,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8709:18:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6944,
                        "nodeType": "ExpressionStatement",
                        "src": "8709:18:29"
                      }
                    ]
                  },
                  "functionSelector": "16c38b3c",
                  "id": 6946,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 6939,
                      "modifierName": {
                        "id": 6938,
                        "name": "authenticate",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 294,
                        "src": "8686:12:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "8686:12:29"
                    }
                  ],
                  "name": "setPaused",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 6937,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6936,
                        "mutability": "mutable",
                        "name": "paused",
                        "nodeType": "VariableDeclaration",
                        "scope": 6946,
                        "src": "8664:11:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 6935,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "8664:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8663:13:29"
                  },
                  "returnParameters": {
                    "id": 6940,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "8699:0:29"
                  },
                  "scope": 7928,
                  "src": "8645:89:29",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 6973,
                    "nodeType": "Block",
                    "src": "8801:161:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 6958,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6951,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -15,
                                  "src": "8820:3:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 6952,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "8820:10:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "id": 6955,
                                      "name": "getVault",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6876,
                                      "src": "8842:8:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IVault_$21266_$",
                                        "typeString": "function () view returns (contract IVault)"
                                      }
                                    },
                                    "id": 6956,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "8842:10:29",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IVault_$21266",
                                      "typeString": "contract IVault"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IVault_$21266",
                                      "typeString": "contract IVault"
                                    }
                                  ],
                                  "id": 6954,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "8834:7:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 6953,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "8834:7:29",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 6957,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8834:19:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "8820:33:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6959,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "8855:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6960,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "CALLER_NOT_VAULT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 432,
                              "src": "8855:23:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6950,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "8811:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6961,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8811:68:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6962,
                        "nodeType": "ExpressionStatement",
                        "src": "8811:68:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "id": 6967,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 6964,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6948,
                                "src": "8898:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 6965,
                                  "name": "getPoolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6884,
                                  "src": "8908:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$",
                                    "typeString": "function () view returns (bytes32)"
                                  }
                                },
                                "id": 6966,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8908:11:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "src": "8898:21:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 6968,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "8921:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 6969,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INVALID_POOL_ID",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 561,
                              "src": "8921:22:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6963,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "8889:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 6970,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8889:55:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6971,
                        "nodeType": "ExpressionStatement",
                        "src": "8889:55:29"
                      },
                      {
                        "id": 6972,
                        "nodeType": "PlaceholderStatement",
                        "src": "8954:1:29"
                      }
                    ]
                  },
                  "id": 6974,
                  "name": "onlyVault",
                  "nodeType": "ModifierDefinition",
                  "parameters": {
                    "id": 6949,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6948,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 6974,
                        "src": "8785:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 6947,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8785:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8784:16:29"
                  },
                  "src": "8766:196:29",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    20693
                  ],
                  "body": {
                    "id": 7108,
                    "nodeType": "Block",
                    "src": "9300:1812:29",
                    "statements": [
                      {
                        "assignments": [
                          7006
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7006,
                            "mutability": "mutable",
                            "name": "scalingFactors",
                            "nodeType": "VariableDeclaration",
                            "scope": 7108,
                            "src": "9310:31:29",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 7004,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "9310:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7005,
                              "nodeType": "ArrayTypeName",
                              "src": "9310:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7009,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 7007,
                            "name": "_scalingFactors",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7638,
                            "src": "9344:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function () view returns (uint256[] memory)"
                            }
                          },
                          "id": 7008,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9344:17:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9310:51:29"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 7013,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 7010,
                              "name": "totalSupply",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5787,
                              "src": "9376:11:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 7011,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9376:13:29",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 7012,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "9393:1:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "9376:18:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 7106,
                          "nodeType": "Block",
                          "src": "10209:897:29",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7065,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6983,
                                    "src": "10237:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7066,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7006,
                                    "src": "10247:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  ],
                                  "id": 7064,
                                  "name": "_upscaleArray",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7693,
                                  "src": "10223:13:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                    "typeString": "function (uint256[] memory,uint256[] memory) view"
                                  }
                                },
                                "id": 7067,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10223:39:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7068,
                              "nodeType": "ExpressionStatement",
                              "src": "10223:39:29"
                            },
                            {
                              "assignments": [
                                7070,
                                7073,
                                7076
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 7070,
                                  "mutability": "mutable",
                                  "name": "bptAmountOut",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7106,
                                  "src": "10277:20:29",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 7069,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "10277:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                },
                                {
                                  "constant": false,
                                  "id": 7073,
                                  "mutability": "mutable",
                                  "name": "amountsIn",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7106,
                                  "src": "10299:26:29",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[]"
                                  },
                                  "typeName": {
                                    "baseType": {
                                      "id": 7071,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "10299:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 7072,
                                    "nodeType": "ArrayTypeName",
                                    "src": "10299:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                      "typeString": "uint256[]"
                                    }
                                  },
                                  "visibility": "internal"
                                },
                                {
                                  "constant": false,
                                  "id": 7076,
                                  "mutability": "mutable",
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7106,
                                  "src": "10327:38:29",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[]"
                                  },
                                  "typeName": {
                                    "baseType": {
                                      "id": 7074,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "10327:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 7075,
                                    "nodeType": "ArrayTypeName",
                                    "src": "10327:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                      "typeString": "uint256[]"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 7086,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 7078,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6976,
                                    "src": "10398:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 7079,
                                    "name": "sender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6978,
                                    "src": "10422:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 7080,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6980,
                                    "src": "10446:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 7081,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6983,
                                    "src": "10473:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7082,
                                    "name": "lastChangeBlock",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6985,
                                    "src": "10499:15:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 7083,
                                    "name": "protocolSwapFeePercentage",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6987,
                                    "src": "10532:25:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 7084,
                                    "name": "userData",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6989,
                                    "src": "10575:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  ],
                                  "id": 7077,
                                  "name": "_onJoinPool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7332,
                                  "src": "10369:11:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory)"
                                  }
                                },
                                "id": 7085,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10369:228:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256,uint256[] memory,uint256[] memory)"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "10276:321:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7088,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6980,
                                    "src": "10727:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 7089,
                                    "name": "bptAmountOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7070,
                                    "src": "10738:12:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 7087,
                                  "name": "_mintPoolTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5845,
                                  "src": "10711:15:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                                    "typeString": "function (address,uint256)"
                                  }
                                },
                                "id": 7090,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10711:40:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7091,
                              "nodeType": "ExpressionStatement",
                              "src": "10711:40:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7093,
                                    "name": "amountsIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7073,
                                    "src": "10856:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7094,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7006,
                                    "src": "10867:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  ],
                                  "id": 7092,
                                  "name": "_downscaleUpArray",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7803,
                                  "src": "10838:17:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                    "typeString": "function (uint256[] memory,uint256[] memory) view"
                                  }
                                },
                                "id": 7095,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10838:44:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7096,
                              "nodeType": "ExpressionStatement",
                              "src": "10838:44:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7098,
                                    "name": "dueProtocolFeeAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7076,
                                    "src": "11001:21:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7099,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7006,
                                    "src": "11024:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  ],
                                  "id": 7097,
                                  "name": "_downscaleDownArray",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7748,
                                  "src": "10981:19:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                    "typeString": "function (uint256[] memory,uint256[] memory) view"
                                  }
                                },
                                "id": 7100,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10981:58:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7101,
                              "nodeType": "ExpressionStatement",
                              "src": "10981:58:29"
                            },
                            {
                              "expression": {
                                "components": [
                                  {
                                    "id": 7102,
                                    "name": "amountsIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7073,
                                    "src": "11062:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7103,
                                    "name": "dueProtocolFeeAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7076,
                                    "src": "11073:21:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "id": 7104,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "11061:34:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256[] memory,uint256[] memory)"
                                }
                              },
                              "functionReturnParameters": 7001,
                              "id": 7105,
                              "nodeType": "Return",
                              "src": "11054:41:29"
                            }
                          ]
                        },
                        "id": 7107,
                        "nodeType": "IfStatement",
                        "src": "9372:1734:29",
                        "trueBody": {
                          "id": 7063,
                          "nodeType": "Block",
                          "src": "9396:807:29",
                          "statements": [
                            {
                              "assignments": [
                                7015,
                                7018
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 7015,
                                  "mutability": "mutable",
                                  "name": "bptAmountOut",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7063,
                                  "src": "9411:20:29",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 7014,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "9411:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                },
                                {
                                  "constant": false,
                                  "id": 7018,
                                  "mutability": "mutable",
                                  "name": "amountsIn",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7063,
                                  "src": "9433:26:29",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[]"
                                  },
                                  "typeName": {
                                    "baseType": {
                                      "id": 7016,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "9433:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 7017,
                                    "nodeType": "ArrayTypeName",
                                    "src": "9433:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                      "typeString": "uint256[]"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 7025,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 7020,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6976,
                                    "src": "9481:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 7021,
                                    "name": "sender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6978,
                                    "src": "9489:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 7022,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6980,
                                    "src": "9497:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 7023,
                                    "name": "userData",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6989,
                                    "src": "9508:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  ],
                                  "id": 7019,
                                  "name": "_onInitializePool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7305,
                                  "src": "9463:17:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "function (bytes32,address,address,bytes memory) returns (uint256,uint256[] memory)"
                                  }
                                },
                                "id": 7024,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9463:54:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256,uint256[] memory)"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "9410:107:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 7029,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 7027,
                                      "name": "bptAmountOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 7015,
                                      "src": "9821:12:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">=",
                                    "rightExpression": {
                                      "id": 7028,
                                      "name": "_MINIMUM_BPT",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6479,
                                      "src": "9837:12:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9821:28:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 7030,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "9851:6:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 7031,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "MINIMUM_BPT",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 429,
                                    "src": "9851:18:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 7026,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "9812:8:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 7032,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9812:58:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7033,
                              "nodeType": "ExpressionStatement",
                              "src": "9812:58:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "hexValue": "30",
                                        "id": 7037,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "9908:1:29",
                                        "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": 7036,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9900:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 7035,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "9900:7:29",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 7038,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9900:10:29",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "id": 7039,
                                    "name": "_MINIMUM_BPT",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6479,
                                    "src": "9912:12:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 7034,
                                  "name": "_mintPoolTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5845,
                                  "src": "9884:15:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                                    "typeString": "function (address,uint256)"
                                  }
                                },
                                "id": 7040,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9884:41:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7041,
                              "nodeType": "ExpressionStatement",
                              "src": "9884:41:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7043,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6980,
                                    "src": "9955:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 7046,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 7044,
                                      "name": "bptAmountOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 7015,
                                      "src": "9966:12:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "-",
                                    "rightExpression": {
                                      "id": 7045,
                                      "name": "_MINIMUM_BPT",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6479,
                                      "src": "9981:12:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9966:27:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 7042,
                                  "name": "_mintPoolTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5845,
                                  "src": "9939:15:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                                    "typeString": "function (address,uint256)"
                                  }
                                },
                                "id": 7047,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9939:55:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7048,
                              "nodeType": "ExpressionStatement",
                              "src": "9939:55:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7050,
                                    "name": "amountsIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7018,
                                    "src": "10099:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7051,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7006,
                                    "src": "10110:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  ],
                                  "id": 7049,
                                  "name": "_downscaleUpArray",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7803,
                                  "src": "10081:17:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                    "typeString": "function (uint256[] memory,uint256[] memory) view"
                                  }
                                },
                                "id": 7052,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10081:44:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7053,
                              "nodeType": "ExpressionStatement",
                              "src": "10081:44:29"
                            },
                            {
                              "expression": {
                                "components": [
                                  {
                                    "id": 7054,
                                    "name": "amountsIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7018,
                                    "src": "10148:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "arguments": [],
                                        "expression": {
                                          "argumentTypes": [],
                                          "id": 7058,
                                          "name": "_getTotalTokens",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 6892,
                                          "src": "10173:15:29",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                            "typeString": "function () view returns (uint256)"
                                          }
                                        },
                                        "id": 7059,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "10173:17:29",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "id": 7057,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "NewExpression",
                                      "src": "10159:13:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                        "typeString": "function (uint256) pure returns (uint256[] memory)"
                                      },
                                      "typeName": {
                                        "baseType": {
                                          "id": 7055,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "10163:7:29",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 7056,
                                        "nodeType": "ArrayTypeName",
                                        "src": "10163:9:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                          "typeString": "uint256[]"
                                        }
                                      }
                                    },
                                    "id": 7060,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "10159:32:29",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "id": 7061,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "10147:45:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256[] memory,uint256[] memory)"
                                }
                              },
                              "functionReturnParameters": 7001,
                              "id": 7062,
                              "nodeType": "Return",
                              "src": "10140:52:29"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "functionSelector": "d5c096c4",
                  "id": 7109,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 6993,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6976,
                          "src": "9247:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 6994,
                      "modifierName": {
                        "id": 6992,
                        "name": "onlyVault",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6974,
                        "src": "9237:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_bytes32_$",
                          "typeString": "modifier (bytes32)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "9237:17:29"
                    }
                  ],
                  "name": "onJoinPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 6991,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "9228:8:29"
                  },
                  "parameters": {
                    "id": 6990,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6976,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "8997:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 6975,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8997:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6978,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "9021:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 6977,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "9021:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6980,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "9045:17:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 6979,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "9045:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6983,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "9072:25:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6981,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "9072:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6982,
                          "nodeType": "ArrayTypeName",
                          "src": "9072:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6985,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "9107:23:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6984,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9107:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6987,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "9140:33:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 6986,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9140:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 6989,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "9183:21:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 6988,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "9183:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8987:223:29"
                  },
                  "returnParameters": {
                    "id": 7001,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 6997,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "9264:16:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6995,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "9264:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6996,
                          "nodeType": "ArrayTypeName",
                          "src": "9264:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7000,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7109,
                        "src": "9282:16:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 6998,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "9282:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 6999,
                          "nodeType": "ArrayTypeName",
                          "src": "9282:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9263:36:29"
                  },
                  "scope": 7928,
                  "src": "8968:2144:29",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    20718
                  ],
                  "body": {
                    "id": 7187,
                    "nodeType": "Block",
                    "src": "11450:839:29",
                    "statements": [
                      {
                        "assignments": [
                          7141
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7141,
                            "mutability": "mutable",
                            "name": "scalingFactors",
                            "nodeType": "VariableDeclaration",
                            "scope": 7187,
                            "src": "11460:31:29",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 7139,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11460:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7140,
                              "nodeType": "ArrayTypeName",
                              "src": "11460:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7144,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 7142,
                            "name": "_scalingFactors",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7638,
                            "src": "11494:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function () view returns (uint256[] memory)"
                            }
                          },
                          "id": 7143,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11494:17:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11460:51:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7146,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7118,
                              "src": "11535:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 7147,
                              "name": "scalingFactors",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7141,
                              "src": "11545:14:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 7145,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "11521:13:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 7148,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11521:39:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7149,
                        "nodeType": "ExpressionStatement",
                        "src": "11521:39:29"
                      },
                      {
                        "assignments": [
                          7151,
                          7154,
                          7157
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7151,
                            "mutability": "mutable",
                            "name": "bptAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 7187,
                            "src": "11572:19:29",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 7150,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11572:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 7154,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 7187,
                            "src": "11593:27:29",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 7152,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11593:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7153,
                              "nodeType": "ArrayTypeName",
                              "src": "11593:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 7157,
                            "mutability": "mutable",
                            "name": "dueProtocolFeeAmounts",
                            "nodeType": "VariableDeclaration",
                            "scope": 7187,
                            "src": "11622:38:29",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 7155,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11622:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7156,
                              "nodeType": "ArrayTypeName",
                              "src": "11622:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7167,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 7159,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7111,
                              "src": "11689:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 7160,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7113,
                              "src": "11709:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 7161,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7115,
                              "src": "11729:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 7162,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7118,
                              "src": "11752:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 7163,
                              "name": "lastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7120,
                              "src": "11774:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7164,
                              "name": "protocolSwapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7122,
                              "src": "11803:25:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7165,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7124,
                              "src": "11842:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 7158,
                            "name": "_onExitPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7359,
                            "src": "11664:11:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory)"
                            }
                          },
                          "id": 7166,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11664:196:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory,uint256[] memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11571:289:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7169,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7113,
                              "src": "11982:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 7170,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7151,
                              "src": "11990:11:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 7168,
                            "name": "_burnPoolTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5891,
                            "src": "11966:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                              "typeString": "function (address,uint256)"
                            }
                          },
                          "id": 7171,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11966:36:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7172,
                        "nodeType": "ExpressionStatement",
                        "src": "11966:36:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7174,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7154,
                              "src": "12134:10:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 7175,
                              "name": "scalingFactors",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7141,
                              "src": "12146:14:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 7173,
                            "name": "_downscaleDownArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7748,
                            "src": "12114:19:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 7176,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12114:47:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7177,
                        "nodeType": "ExpressionStatement",
                        "src": "12114:47:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7179,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7157,
                              "src": "12191:21:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 7180,
                              "name": "scalingFactors",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7141,
                              "src": "12214:14:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 7178,
                            "name": "_downscaleDownArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7748,
                            "src": "12171:19:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 7181,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12171:58:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7182,
                        "nodeType": "ExpressionStatement",
                        "src": "12171:58:29"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 7183,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7154,
                              "src": "12248:10:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 7184,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7157,
                              "src": "12260:21:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 7185,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "12247:35:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256[] memory,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 7136,
                        "id": 7186,
                        "nodeType": "Return",
                        "src": "12240:42:29"
                      }
                    ]
                  },
                  "functionSelector": "74f3b009",
                  "id": 7188,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 7128,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7111,
                          "src": "11397:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 7129,
                      "modifierName": {
                        "id": 7127,
                        "name": "onlyVault",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6974,
                        "src": "11387:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_bytes32_$",
                          "typeString": "modifier (bytes32)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "11387:17:29"
                    }
                  ],
                  "name": "onExitPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 7126,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "11378:8:29"
                  },
                  "parameters": {
                    "id": 7125,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7111,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11147:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 7110,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11147:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7113,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11171:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7112,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "11171:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7115,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11195:17:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7114,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "11195:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7118,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11222:25:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7116,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11222:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7117,
                          "nodeType": "ArrayTypeName",
                          "src": "11222:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7120,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11257:23:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7119,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11257:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7122,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11290:33:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7121,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11290:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7124,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11333:21:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 7123,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "11333:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11137:223:29"
                  },
                  "returnParameters": {
                    "id": 7136,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7132,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11414:16:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7130,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11414:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7131,
                          "nodeType": "ArrayTypeName",
                          "src": "11414:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7135,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7188,
                        "src": "11432:16:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7133,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11432:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7134,
                          "nodeType": "ArrayTypeName",
                          "src": "11432:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11413:36:29"
                  },
                  "scope": 7928,
                  "src": "11118:1171:29",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 7237,
                    "nodeType": "Block",
                    "src": "13246:598:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 7215,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7198,
                                "src": "13292:8:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 7216,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "13292:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 7217,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "13309:15:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 7218,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13309:17:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7212,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "13256:12:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 7214,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "13256:35:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 7219,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13256:71:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7220,
                        "nodeType": "ExpressionStatement",
                        "src": "13256:71:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7222,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7191,
                              "src": "13364:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 7223,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7193,
                              "src": "13384:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 7224,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7195,
                              "src": "13404:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 7225,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7198,
                              "src": "13427:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 7226,
                              "name": "lastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7200,
                              "src": "13449:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7227,
                              "name": "protocolSwapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7202,
                              "src": "13478:25:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7228,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7204,
                              "src": "13517:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            {
                              "id": 7229,
                              "name": "_onJoinPool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7332,
                              "src": "13539:11:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory)"
                              }
                            },
                            {
                              "id": 7230,
                              "name": "_downscaleUpArray",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7803,
                              "src": "13564:17:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                "typeString": "function (uint256[] memory,uint256[] memory) view"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              },
                              {
                                "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory)"
                              },
                              {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                "typeString": "function (uint256[] memory,uint256[] memory) view"
                              }
                            ],
                            "id": 7221,
                            "name": "_queryAction",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7927,
                            "src": "13338:12:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$_$returns$__$",
                              "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory,function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory),function (uint256[] memory,uint256[] memory) view)"
                            }
                          },
                          "id": 7231,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13338:253:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7232,
                        "nodeType": "ExpressionStatement",
                        "src": "13338:253:29"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 7233,
                              "name": "bptOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7207,
                              "src": "13819:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7234,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7210,
                              "src": "13827:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 7235,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "13818:19:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 7211,
                        "id": 7236,
                        "nodeType": "Return",
                        "src": "13811:26:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7189,
                    "nodeType": "StructuredDocumentation",
                    "src": "12319:618:29",
                    "text": " @dev Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the\n Vault with the same arguments, along with the number of tokens `sender` would have to supply.\n This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\n data, such as the protocol swap fee percentage and Pool balances.\n Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\n explicitly use eth_call instead of eth_sendTransaction."
                  },
                  "functionSelector": "87ec6817",
                  "id": 7238,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "queryJoin",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7205,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7191,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "12970:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 7190,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12970:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7193,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "12994:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7192,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "12994:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7195,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "13018:17:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7194,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "13018:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7198,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "13045:25:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7196,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "13045:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7197,
                          "nodeType": "ArrayTypeName",
                          "src": "13045:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7200,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "13080:23:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7199,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13080:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7202,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "13113:33:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7201,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13113:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7204,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "13156:21:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 7203,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "13156:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12960:223:29"
                  },
                  "returnParameters": {
                    "id": 7211,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7207,
                        "mutability": "mutable",
                        "name": "bptOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "13202:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7206,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13202:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7210,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 7238,
                        "src": "13218:26:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7208,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "13218:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7209,
                          "nodeType": "ArrayTypeName",
                          "src": "13218:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13201:44:29"
                  },
                  "scope": 7928,
                  "src": "12942:902:29",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 7287,
                    "nodeType": "Block",
                    "src": "14771:600:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 7265,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7248,
                                "src": "14817:8:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 7266,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "14817:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 7267,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "14834:15:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 7268,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "14834:17:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7262,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "14781:12:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 7264,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "14781:35:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 7269,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14781:71:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7270,
                        "nodeType": "ExpressionStatement",
                        "src": "14781:71:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7272,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7241,
                              "src": "14889:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 7273,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7243,
                              "src": "14909:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 7274,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7245,
                              "src": "14929:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 7275,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7248,
                              "src": "14952:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 7276,
                              "name": "lastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7250,
                              "src": "14974:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7277,
                              "name": "protocolSwapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7252,
                              "src": "15003:25:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7278,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7254,
                              "src": "15042:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            {
                              "id": 7279,
                              "name": "_onExitPool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7359,
                              "src": "15064:11:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory)"
                              }
                            },
                            {
                              "id": 7280,
                              "name": "_downscaleDownArray",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7748,
                              "src": "15089:19:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                "typeString": "function (uint256[] memory,uint256[] memory) view"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              },
                              {
                                "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory)"
                              },
                              {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                "typeString": "function (uint256[] memory,uint256[] memory) view"
                              }
                            ],
                            "id": 7271,
                            "name": "_queryAction",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7927,
                            "src": "14863:12:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$_t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$_$returns$__$",
                              "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory,function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory),function (uint256[] memory,uint256[] memory) view)"
                            }
                          },
                          "id": 7281,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14863:255:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 7282,
                        "nodeType": "ExpressionStatement",
                        "src": "14863:255:29"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 7283,
                              "name": "bptIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7257,
                              "src": "15346:5:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7284,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7260,
                              "src": "15353:10:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 7285,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "15345:19:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 7261,
                        "id": 7286,
                        "nodeType": "Return",
                        "src": "15338:26:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7239,
                    "nodeType": "StructuredDocumentation",
                    "src": "13850:612:29",
                    "text": " @dev Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the\n Vault with the same arguments, along with the number of tokens `recipient` would receive.\n This function is not meant to be called directly, but rather from a helper contract that fetches current Vault\n data, such as the protocol swap fee percentage and Pool balances.\n Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must\n explicitly use eth_call instead of eth_sendTransaction."
                  },
                  "functionSelector": "6028bfd4",
                  "id": 7288,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "queryExit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7255,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7241,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14495:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 7240,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "14495:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7243,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14519:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7242,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "14519:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7245,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14543:17:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7244,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "14543:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7248,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14570:25:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7246,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "14570:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7247,
                          "nodeType": "ArrayTypeName",
                          "src": "14570:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7250,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14605:23:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7249,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14605:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7252,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14638:33:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7251,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14638:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7254,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14681:21:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 7253,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "14681:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14485:223:29"
                  },
                  "returnParameters": {
                    "id": 7261,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7257,
                        "mutability": "mutable",
                        "name": "bptIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14727:13:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7256,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14727:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7260,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 7288,
                        "src": "14742:27:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7258,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "14742:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7259,
                          "nodeType": "ArrayTypeName",
                          "src": "14742:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14726:44:29"
                  },
                  "scope": 7928,
                  "src": "14467:904:29",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 7289,
                    "nodeType": "StructuredDocumentation",
                    "src": "15512:801:29",
                    "text": " @dev Called when the Pool is joined for the first time; that is, when the BPT total supply is zero.\n Returns the amount of BPT to mint, and the token amounts the Pool will receive in return.\n Minted BPT will be sent to `recipient`, except for _MINIMUM_BPT, which will be deducted from this amount and sent\n to the zero address instead. This will cause that BPT to remain forever locked there, preventing total BTP from\n ever dropping below that value, and ensuring `_onInitializePool` can only be called once in the entire Pool's\n lifetime.\n The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\n be downscaled (rounding up) before being returned to the Vault."
                  },
                  "id": 7305,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onInitializePool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7298,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7291,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 7305,
                        "src": "16354:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 7290,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "16354:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7293,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 7305,
                        "src": "16378:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7292,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "16378:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7295,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 7305,
                        "src": "16402:17:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7294,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "16402:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7297,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 7305,
                        "src": "16429:21:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 7296,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "16429:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16344:112:29"
                  },
                  "returnParameters": {
                    "id": 7304,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7300,
                        "mutability": "mutable",
                        "name": "bptAmountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 7305,
                        "src": "16483:20:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7299,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16483:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7303,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 7305,
                        "src": "16505:26:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7301,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "16505:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7302,
                          "nodeType": "ArrayTypeName",
                          "src": "16505:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16482:50:29"
                  },
                  "scope": 7928,
                  "src": "16318:215:29",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "documentation": {
                    "id": 7306,
                    "nodeType": "StructuredDocumentation",
                    "src": "16539:1005:29",
                    "text": " @dev Called whenever the Pool is joined after the first initialization join (see `_onInitializePool`).\n Returns the amount of BPT to mint, the token amounts that the Pool will receive in return, and the number of\n tokens to pay in protocol swap fees.\n Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\n performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\n Minted BPT will be sent to `recipient`.\n The tokens granted to the Pool will be transferred from `sender`. These amounts are considered upscaled and will\n be downscaled (rounding up) before being returned to the Vault.\n Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onJoinPool`). These\n amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault."
                  },
                  "id": 7332,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onJoinPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7322,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7308,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17579:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 7307,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "17579:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7310,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17603:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7309,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "17603:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7312,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17627:17:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7311,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "17627:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7315,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17654:25:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7313,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "17654:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7314,
                          "nodeType": "ArrayTypeName",
                          "src": "17654:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7317,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17689:23:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7316,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17689:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7319,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17722:33:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7318,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17722:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7321,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17765:21:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 7320,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "17765:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "17569:223:29"
                  },
                  "returnParameters": {
                    "id": 7331,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7324,
                        "mutability": "mutable",
                        "name": "bptAmountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17856:20:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7323,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17856:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7327,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17890:26:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7325,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "17890:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7326,
                          "nodeType": "ArrayTypeName",
                          "src": "17890:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7330,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 7332,
                        "src": "17930:38:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7328,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "17930:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7329,
                          "nodeType": "ArrayTypeName",
                          "src": "17930:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "17842:136:29"
                  },
                  "scope": 7928,
                  "src": "17549:430:29",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "documentation": {
                    "id": 7333,
                    "nodeType": "StructuredDocumentation",
                    "src": "17985:933:29",
                    "text": " @dev Called whenever the Pool is exited.\n Returns the amount of BPT to burn, the token amounts for each Pool token that the Pool will grant in return, and\n the number of tokens to pay in protocol swap fees.\n Implementations of this function might choose to mutate the `balances` array to save gas (e.g. when\n performing intermediate calculations, such as subtraction of due protocol fees). This can be done safely.\n BPT will be burnt from `sender`.\n The Pool will grant tokens to `recipient`. These amounts are considered upscaled and will be downscaled\n (rounding down) before being returned to the Vault.\n Due protocol swap fees will be taken from the Pool's balance in the Vault (see `IBasePool.onExitPool`). These\n amounts are considered upscaled and will be downscaled (rounding down) before being returned to the Vault."
                  },
                  "id": 7359,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onExitPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7349,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7335,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "18953:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 7334,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "18953:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7337,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "18977:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7336,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "18977:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7339,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "19001:17:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7338,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "19001:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7342,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "19028:25:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7340,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "19028:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7341,
                          "nodeType": "ArrayTypeName",
                          "src": "19028:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7344,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "19063:23:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7343,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19063:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7346,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "19096:33:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7345,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19096:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7348,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "19139:21:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 7347,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "19139:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "18943:223:29"
                  },
                  "returnParameters": {
                    "id": 7358,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7351,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "19230:19:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7350,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19230:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7354,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "19263:27:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7352,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "19263:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7353,
                          "nodeType": "ArrayTypeName",
                          "src": "19263:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7357,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 7359,
                        "src": "19304:38:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7355,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "19304:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7356,
                          "nodeType": "ArrayTypeName",
                          "src": "19304:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19216:136:29"
                  },
                  "scope": 7928,
                  "src": "18923:430:29",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7374,
                    "nodeType": "Block",
                    "src": "19549:161:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 7369,
                                  "name": "_swapFeePercentage",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6481,
                                  "src": "19671:18:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 7370,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "complement",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1814,
                                "src": "19671:29:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 7371,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "19671:31:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7367,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7362,
                              "src": "19658:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 7368,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "19658:12:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 7372,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19658:45:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 7366,
                        "id": 7373,
                        "nodeType": "Return",
                        "src": "19651:52:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7360,
                    "nodeType": "StructuredDocumentation",
                    "src": "19386:83:29",
                    "text": " @dev Adds swap fee amount to `amount`, returning a higher value."
                  },
                  "id": 7375,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_addSwapFeeAmount",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7363,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7362,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 7375,
                        "src": "19501:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7361,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19501:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19500:16:29"
                  },
                  "returnParameters": {
                    "id": 7366,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7365,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7375,
                        "src": "19540:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7364,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19540:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19539:9:29"
                  },
                  "scope": 7928,
                  "src": "19474:236:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7395,
                    "nodeType": "Block",
                    "src": "19890:199:29",
                    "statements": [
                      {
                        "assignments": [
                          7384
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7384,
                            "mutability": "mutable",
                            "name": "feeAmount",
                            "nodeType": "VariableDeclaration",
                            "scope": 7395,
                            "src": "19992:17:29",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 7383,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "19992:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7389,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 7387,
                              "name": "_swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6481,
                              "src": "20025:18:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7385,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7378,
                              "src": "20012:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 7386,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "20012:12:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 7388,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "20012:32:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19992:52:29"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7392,
                              "name": "feeAmount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7384,
                              "src": "20072:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7390,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7378,
                              "src": "20061:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 7391,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1538,
                            "src": "20061:10:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 7393,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "20061:21:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 7382,
                        "id": 7394,
                        "nodeType": "Return",
                        "src": "20054:28:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7376,
                    "nodeType": "StructuredDocumentation",
                    "src": "19716:89:29",
                    "text": " @dev Subtracts swap fee amount from `amount`, returning a lower value."
                  },
                  "id": 7396,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_subtractSwapFeeAmount",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7379,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7378,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 7396,
                        "src": "19842:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7377,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19842:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19841:16:29"
                  },
                  "returnParameters": {
                    "id": 7382,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7381,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7396,
                        "src": "19881:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7380,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19881:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19880:9:29"
                  },
                  "scope": 7928,
                  "src": "19810:279:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7427,
                    "nodeType": "Block",
                    "src": "20349:323:29",
                    "statements": [
                      {
                        "assignments": [
                          7405
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7405,
                            "mutability": "mutable",
                            "name": "tokenDecimals",
                            "nodeType": "VariableDeclaration",
                            "scope": 7427,
                            "src": "20439:21:29",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 7404,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "20439:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7414,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "id": 7409,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 7399,
                                      "src": "20477:5:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    ],
                                    "id": 7408,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "20469:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": {
                                      "id": 7407,
                                      "name": "address",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "20469:7:29",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 7410,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "20469:14:29",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 7406,
                                "name": "ERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4401,
                                "src": "20463:5:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_ERC20_$4401_$",
                                  "typeString": "type(contract ERC20)"
                                }
                              },
                              "id": 7411,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "20463:21:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$4401",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 7412,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "decimals",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3967,
                            "src": "20463:30:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                              "typeString": "function () view external returns (uint8)"
                            }
                          },
                          "id": 7413,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "20463:32:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "20439:56:29"
                      },
                      {
                        "assignments": [
                          7416
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7416,
                            "mutability": "mutable",
                            "name": "decimalsDifference",
                            "nodeType": "VariableDeclaration",
                            "scope": 7427,
                            "src": "20570:26:29",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 7415,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "20570:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7422,
                        "initialValue": {
                          "arguments": [
                            {
                              "hexValue": "3138",
                              "id": 7419,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "20608:2:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_18_by_1",
                                "typeString": "int_const 18"
                              },
                              "value": "18"
                            },
                            {
                              "id": 7420,
                              "name": "tokenDecimals",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7405,
                              "src": "20612:13:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_18_by_1",
                                "typeString": "int_const 18"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7417,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "20599:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 7418,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3183,
                            "src": "20599:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 7421,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "20599:27:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "20570:56:29"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 7425,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "hexValue": "3130",
                            "id": 7423,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "20643:2:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_10_by_1",
                              "typeString": "int_const 10"
                            },
                            "value": "10"
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "**",
                          "rightExpression": {
                            "id": 7424,
                            "name": "decimalsDifference",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7416,
                            "src": "20647:18:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "20643:22:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 7403,
                        "id": 7426,
                        "nodeType": "Return",
                        "src": "20636:29:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7397,
                    "nodeType": "StructuredDocumentation",
                    "src": "20111:157:29",
                    "text": " @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\n it had 18 decimals."
                  },
                  "id": 7428,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_computeScalingFactor",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7400,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7399,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 7428,
                        "src": "20304:12:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 7398,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "20304:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "20303:14:29"
                  },
                  "returnParameters": {
                    "id": 7403,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7402,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7428,
                        "src": "20340:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7401,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "20340:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "20339:9:29"
                  },
                  "scope": 7928,
                  "src": "20273:399:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 7498,
                    "nodeType": "Block",
                    "src": "20898:601:29",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          },
                          "id": 7438,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 7436,
                            "name": "token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7431,
                            "src": "20939:5:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "id": 7437,
                            "name": "_token0",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6489,
                            "src": "20948:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "20939:16:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "id": 7444,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 7442,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7431,
                              "src": "21002:5:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "id": 7443,
                              "name": "_token1",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6491,
                              "src": "21011:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "src": "21002:16:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              "id": 7450,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7448,
                                "name": "token",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7431,
                                "src": "21065:5:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "id": 7449,
                                "name": "_token2",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6493,
                                "src": "21074:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "src": "21065:16:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                },
                                "id": 7456,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 7454,
                                  "name": "token",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7431,
                                  "src": "21128:5:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 7455,
                                  "name": "_token3",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6495,
                                  "src": "21137:7:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "21128:16:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "condition": {
                                  "commonType": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "id": 7462,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 7460,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7431,
                                    "src": "21191:5:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "==",
                                  "rightExpression": {
                                    "id": 7461,
                                    "name": "_token4",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6497,
                                    "src": "21200:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "src": "21191:16:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "falseBody": {
                                  "condition": {
                                    "commonType": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    "id": 7468,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 7466,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 7431,
                                      "src": "21254:5:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "id": 7467,
                                      "name": "_token5",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6499,
                                      "src": "21263:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "src": "21254:16:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "falseBody": {
                                    "condition": {
                                      "commonType": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      "id": 7474,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 7472,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7431,
                                        "src": "21317:5:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "==",
                                      "rightExpression": {
                                        "id": 7473,
                                        "name": "_token6",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 6501,
                                        "src": "21326:7:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "src": "21317:16:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "falseBody": {
                                      "condition": {
                                        "commonType": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        },
                                        "id": 7480,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 7478,
                                          "name": "token",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 7431,
                                          "src": "21380:5:29",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "==",
                                        "rightExpression": {
                                          "id": 7479,
                                          "name": "_token7",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 6503,
                                          "src": "21389:7:29",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        "src": "21380:16:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        }
                                      },
                                      "falseBody": {
                                        "id": 7489,
                                        "nodeType": "Block",
                                        "src": "21439:54:29",
                                        "statements": [
                                          {
                                            "expression": {
                                              "arguments": [
                                                {
                                                  "expression": {
                                                    "id": 7485,
                                                    "name": "Errors",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 655,
                                                    "src": "21461:6:29",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                                      "typeString": "type(library Errors)"
                                                    }
                                                  },
                                                  "id": 7486,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "INVALID_TOKEN",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 474,
                                                  "src": "21461:20:29",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                ],
                                                "id": 7484,
                                                "name": "_revert",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 369,
                                                "src": "21453:7:29",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                                                  "typeString": "function (uint256) pure"
                                                }
                                              },
                                              "id": 7487,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "21453:29:29",
                                              "tryCall": false,
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_tuple$__$",
                                                "typeString": "tuple()"
                                              }
                                            },
                                            "id": 7488,
                                            "nodeType": "ExpressionStatement",
                                            "src": "21453:29:29"
                                          }
                                        ]
                                      },
                                      "id": 7490,
                                      "nodeType": "IfStatement",
                                      "src": "21376:117:29",
                                      "trueBody": {
                                        "id": 7483,
                                        "nodeType": "Block",
                                        "src": "21398:27:29",
                                        "statements": [
                                          {
                                            "expression": {
                                              "id": 7481,
                                              "name": "_scalingFactor7",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 6519,
                                              "src": "21407:15:29",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "functionReturnParameters": 7435,
                                            "id": 7482,
                                            "nodeType": "Return",
                                            "src": "21400:22:29"
                                          }
                                        ]
                                      }
                                    },
                                    "id": 7491,
                                    "nodeType": "IfStatement",
                                    "src": "21313:180:29",
                                    "trueBody": {
                                      "id": 7477,
                                      "nodeType": "Block",
                                      "src": "21335:27:29",
                                      "statements": [
                                        {
                                          "expression": {
                                            "id": 7475,
                                            "name": "_scalingFactor6",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 6517,
                                            "src": "21344:15:29",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "functionReturnParameters": 7435,
                                          "id": 7476,
                                          "nodeType": "Return",
                                          "src": "21337:22:29"
                                        }
                                      ]
                                    }
                                  },
                                  "id": 7492,
                                  "nodeType": "IfStatement",
                                  "src": "21250:243:29",
                                  "trueBody": {
                                    "id": 7471,
                                    "nodeType": "Block",
                                    "src": "21272:27:29",
                                    "statements": [
                                      {
                                        "expression": {
                                          "id": 7469,
                                          "name": "_scalingFactor5",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 6515,
                                          "src": "21281:15:29",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "functionReturnParameters": 7435,
                                        "id": 7470,
                                        "nodeType": "Return",
                                        "src": "21274:22:29"
                                      }
                                    ]
                                  }
                                },
                                "id": 7493,
                                "nodeType": "IfStatement",
                                "src": "21187:306:29",
                                "trueBody": {
                                  "id": 7465,
                                  "nodeType": "Block",
                                  "src": "21209:27:29",
                                  "statements": [
                                    {
                                      "expression": {
                                        "id": 7463,
                                        "name": "_scalingFactor4",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 6513,
                                        "src": "21218:15:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "functionReturnParameters": 7435,
                                      "id": 7464,
                                      "nodeType": "Return",
                                      "src": "21211:22:29"
                                    }
                                  ]
                                }
                              },
                              "id": 7494,
                              "nodeType": "IfStatement",
                              "src": "21124:369:29",
                              "trueBody": {
                                "id": 7459,
                                "nodeType": "Block",
                                "src": "21146:27:29",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 7457,
                                      "name": "_scalingFactor3",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6511,
                                      "src": "21155:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "functionReturnParameters": 7435,
                                    "id": 7458,
                                    "nodeType": "Return",
                                    "src": "21148:22:29"
                                  }
                                ]
                              }
                            },
                            "id": 7495,
                            "nodeType": "IfStatement",
                            "src": "21061:432:29",
                            "trueBody": {
                              "id": 7453,
                              "nodeType": "Block",
                              "src": "21083:27:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7451,
                                    "name": "_scalingFactor2",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6509,
                                    "src": "21092:15:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "functionReturnParameters": 7435,
                                  "id": 7452,
                                  "nodeType": "Return",
                                  "src": "21085:22:29"
                                }
                              ]
                            }
                          },
                          "id": 7496,
                          "nodeType": "IfStatement",
                          "src": "20998:495:29",
                          "trueBody": {
                            "id": 7447,
                            "nodeType": "Block",
                            "src": "21020:27:29",
                            "statements": [
                              {
                                "expression": {
                                  "id": 7445,
                                  "name": "_scalingFactor1",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6507,
                                  "src": "21029:15:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "functionReturnParameters": 7435,
                                "id": 7446,
                                "nodeType": "Return",
                                "src": "21022:22:29"
                              }
                            ]
                          }
                        },
                        "id": 7497,
                        "nodeType": "IfStatement",
                        "src": "20935:558:29",
                        "trueBody": {
                          "id": 7441,
                          "nodeType": "Block",
                          "src": "20957:27:29",
                          "statements": [
                            {
                              "expression": {
                                "id": 7439,
                                "name": "_scalingFactor0",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6505,
                                "src": "20966:15:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 7435,
                              "id": 7440,
                              "nodeType": "Return",
                              "src": "20959:22:29"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7429,
                    "nodeType": "StructuredDocumentation",
                    "src": "20678:145:29",
                    "text": " @dev Returns the scaling factor for one of the Pool's tokens. Reverts if `token` is not a token registered by the\n Pool."
                  },
                  "id": 7499,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_scalingFactor",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7432,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7431,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 7499,
                        "src": "20852:12:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 7430,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "20852:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "20851:14:29"
                  },
                  "returnParameters": {
                    "id": 7435,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7434,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7499,
                        "src": "20889:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7433,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "20889:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "20888:9:29"
                  },
                  "scope": 7928,
                  "src": "20828:671:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7637,
                    "nodeType": "Block",
                    "src": "21769:1054:29",
                    "statements": [
                      {
                        "assignments": [
                          7507
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7507,
                            "mutability": "mutable",
                            "name": "totalTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 7637,
                            "src": "21779:19:29",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 7506,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "21779:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7510,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 7508,
                            "name": "_getTotalTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6892,
                            "src": "21801:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                              "typeString": "function () view returns (uint256)"
                            }
                          },
                          "id": 7509,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "21801:17:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "21779:39:29"
                      },
                      {
                        "assignments": [
                          7515
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 7515,
                            "mutability": "mutable",
                            "name": "scalingFactors",
                            "nodeType": "VariableDeclaration",
                            "scope": 7637,
                            "src": "21828:31:29",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 7513,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "21828:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7514,
                              "nodeType": "ArrayTypeName",
                              "src": "21828:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 7521,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 7519,
                              "name": "totalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7507,
                              "src": "21876:11:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 7518,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "21862:13:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 7516,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "21866:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7517,
                              "nodeType": "ArrayTypeName",
                              "src": "21866:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 7520,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "21862:26:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "21828:60:29"
                      },
                      {
                        "id": 7634,
                        "nodeType": "Block",
                        "src": "21926:859:29",
                        "statements": [
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 7524,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7522,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7507,
                                "src": "21944:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 7523,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "21958:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "21944:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 7534,
                              "nodeType": "Block",
                              "src": "22007:26:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7532,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7515,
                                    "src": "22016:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 7505,
                                  "id": 7533,
                                  "nodeType": "Return",
                                  "src": "22009:21:29"
                                }
                              ]
                            },
                            "id": 7535,
                            "nodeType": "IfStatement",
                            "src": "21940:93:29",
                            "trueBody": {
                              "id": 7531,
                              "nodeType": "Block",
                              "src": "21961:40:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7529,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 7525,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7515,
                                        "src": "21963:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7527,
                                      "indexExpression": {
                                        "hexValue": "30",
                                        "id": 7526,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "21978:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        "value": "0"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "21963:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 7528,
                                      "name": "_scalingFactor0",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6505,
                                      "src": "21983:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "21963:35:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7530,
                                  "nodeType": "ExpressionStatement",
                                  "src": "21963:35:29"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 7538,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7536,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7507,
                                "src": "22050:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "31",
                                "id": 7537,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "22064:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "22050:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 7548,
                              "nodeType": "Block",
                              "src": "22113:26:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7546,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7515,
                                    "src": "22122:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 7505,
                                  "id": 7547,
                                  "nodeType": "Return",
                                  "src": "22115:21:29"
                                }
                              ]
                            },
                            "id": 7549,
                            "nodeType": "IfStatement",
                            "src": "22046:93:29",
                            "trueBody": {
                              "id": 7545,
                              "nodeType": "Block",
                              "src": "22067:40:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7543,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 7539,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7515,
                                        "src": "22069:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7541,
                                      "indexExpression": {
                                        "hexValue": "31",
                                        "id": 7540,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "22084:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        },
                                        "value": "1"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "22069:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 7542,
                                      "name": "_scalingFactor1",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6507,
                                      "src": "22089:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "22069:35:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7544,
                                  "nodeType": "ExpressionStatement",
                                  "src": "22069:35:29"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 7552,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7550,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7507,
                                "src": "22156:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 7551,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "22170:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "22156:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 7562,
                              "nodeType": "Block",
                              "src": "22219:26:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7560,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7515,
                                    "src": "22228:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 7505,
                                  "id": 7561,
                                  "nodeType": "Return",
                                  "src": "22221:21:29"
                                }
                              ]
                            },
                            "id": 7563,
                            "nodeType": "IfStatement",
                            "src": "22152:93:29",
                            "trueBody": {
                              "id": 7559,
                              "nodeType": "Block",
                              "src": "22173:40:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7557,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 7553,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7515,
                                        "src": "22175:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7555,
                                      "indexExpression": {
                                        "hexValue": "32",
                                        "id": 7554,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "22190:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_2_by_1",
                                          "typeString": "int_const 2"
                                        },
                                        "value": "2"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "22175:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 7556,
                                      "name": "_scalingFactor2",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6509,
                                      "src": "22195:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "22175:35:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7558,
                                  "nodeType": "ExpressionStatement",
                                  "src": "22175:35:29"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 7566,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7564,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7507,
                                "src": "22262:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "33",
                                "id": 7565,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "22276:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_3_by_1",
                                  "typeString": "int_const 3"
                                },
                                "value": "3"
                              },
                              "src": "22262:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 7576,
                              "nodeType": "Block",
                              "src": "22325:26:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7574,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7515,
                                    "src": "22334:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 7505,
                                  "id": 7575,
                                  "nodeType": "Return",
                                  "src": "22327:21:29"
                                }
                              ]
                            },
                            "id": 7577,
                            "nodeType": "IfStatement",
                            "src": "22258:93:29",
                            "trueBody": {
                              "id": 7573,
                              "nodeType": "Block",
                              "src": "22279:40:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7571,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 7567,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7515,
                                        "src": "22281:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7569,
                                      "indexExpression": {
                                        "hexValue": "33",
                                        "id": 7568,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "22296:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_3_by_1",
                                          "typeString": "int_const 3"
                                        },
                                        "value": "3"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "22281:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 7570,
                                      "name": "_scalingFactor3",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6511,
                                      "src": "22301:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "22281:35:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7572,
                                  "nodeType": "ExpressionStatement",
                                  "src": "22281:35:29"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 7580,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7578,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7507,
                                "src": "22368:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "34",
                                "id": 7579,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "22382:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_4_by_1",
                                  "typeString": "int_const 4"
                                },
                                "value": "4"
                              },
                              "src": "22368:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 7590,
                              "nodeType": "Block",
                              "src": "22431:26:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7588,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7515,
                                    "src": "22440:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 7505,
                                  "id": 7589,
                                  "nodeType": "Return",
                                  "src": "22433:21:29"
                                }
                              ]
                            },
                            "id": 7591,
                            "nodeType": "IfStatement",
                            "src": "22364:93:29",
                            "trueBody": {
                              "id": 7587,
                              "nodeType": "Block",
                              "src": "22385:40:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7585,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 7581,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7515,
                                        "src": "22387:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7583,
                                      "indexExpression": {
                                        "hexValue": "34",
                                        "id": 7582,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "22402:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_4_by_1",
                                          "typeString": "int_const 4"
                                        },
                                        "value": "4"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "22387:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 7584,
                                      "name": "_scalingFactor4",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6513,
                                      "src": "22407:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "22387:35:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7586,
                                  "nodeType": "ExpressionStatement",
                                  "src": "22387:35:29"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 7594,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7592,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7507,
                                "src": "22474:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "35",
                                "id": 7593,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "22488:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_5_by_1",
                                  "typeString": "int_const 5"
                                },
                                "value": "5"
                              },
                              "src": "22474:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 7604,
                              "nodeType": "Block",
                              "src": "22537:26:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7602,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7515,
                                    "src": "22546:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 7505,
                                  "id": 7603,
                                  "nodeType": "Return",
                                  "src": "22539:21:29"
                                }
                              ]
                            },
                            "id": 7605,
                            "nodeType": "IfStatement",
                            "src": "22470:93:29",
                            "trueBody": {
                              "id": 7601,
                              "nodeType": "Block",
                              "src": "22491:40:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7599,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 7595,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7515,
                                        "src": "22493:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7597,
                                      "indexExpression": {
                                        "hexValue": "35",
                                        "id": 7596,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "22508:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_5_by_1",
                                          "typeString": "int_const 5"
                                        },
                                        "value": "5"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "22493:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 7598,
                                      "name": "_scalingFactor5",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6515,
                                      "src": "22513:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "22493:35:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7600,
                                  "nodeType": "ExpressionStatement",
                                  "src": "22493:35:29"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 7608,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7606,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7507,
                                "src": "22580:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "36",
                                "id": 7607,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "22594:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_6_by_1",
                                  "typeString": "int_const 6"
                                },
                                "value": "6"
                              },
                              "src": "22580:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 7618,
                              "nodeType": "Block",
                              "src": "22643:26:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7616,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7515,
                                    "src": "22652:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 7505,
                                  "id": 7617,
                                  "nodeType": "Return",
                                  "src": "22645:21:29"
                                }
                              ]
                            },
                            "id": 7619,
                            "nodeType": "IfStatement",
                            "src": "22576:93:29",
                            "trueBody": {
                              "id": 7615,
                              "nodeType": "Block",
                              "src": "22597:40:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7613,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 7609,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7515,
                                        "src": "22599:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7611,
                                      "indexExpression": {
                                        "hexValue": "36",
                                        "id": 7610,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "22614:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_6_by_1",
                                          "typeString": "int_const 6"
                                        },
                                        "value": "6"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "22599:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 7612,
                                      "name": "_scalingFactor6",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6517,
                                      "src": "22619:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "22599:35:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7614,
                                  "nodeType": "ExpressionStatement",
                                  "src": "22599:35:29"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 7622,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 7620,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7507,
                                "src": "22686:11:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "37",
                                "id": 7621,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "22700:1:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_7_by_1",
                                  "typeString": "int_const 7"
                                },
                                "value": "7"
                              },
                              "src": "22686:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 7632,
                              "nodeType": "Block",
                              "src": "22749:26:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7630,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7515,
                                    "src": "22758:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 7505,
                                  "id": 7631,
                                  "nodeType": "Return",
                                  "src": "22751:21:29"
                                }
                              ]
                            },
                            "id": 7633,
                            "nodeType": "IfStatement",
                            "src": "22682:93:29",
                            "trueBody": {
                              "id": 7629,
                              "nodeType": "Block",
                              "src": "22703:40:29",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 7627,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 7623,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7515,
                                        "src": "22705:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7625,
                                      "indexExpression": {
                                        "hexValue": "37",
                                        "id": 7624,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "22720:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_7_by_1",
                                          "typeString": "int_const 7"
                                        },
                                        "value": "7"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "22705:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 7626,
                                      "name": "_scalingFactor7",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6519,
                                      "src": "22725:15:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "22705:35:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7628,
                                  "nodeType": "ExpressionStatement",
                                  "src": "22705:35:29"
                                }
                              ]
                            }
                          }
                        ]
                      },
                      {
                        "expression": {
                          "id": 7635,
                          "name": "scalingFactors",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7515,
                          "src": "22802:14:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "functionReturnParameters": 7505,
                        "id": 7636,
                        "nodeType": "Return",
                        "src": "22795:21:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7500,
                    "nodeType": "StructuredDocumentation",
                    "src": "21505:191:29",
                    "text": " @dev Returns all the scaling factors in the same order as the registered tokens. The Vault will always\n pass balances in this order when calling any of the Pool hooks"
                  },
                  "id": 7638,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_scalingFactors",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7501,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "21725:2:29"
                  },
                  "returnParameters": {
                    "id": 7505,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7504,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7638,
                        "src": "21751:16:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7502,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "21751:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7503,
                          "nodeType": "ArrayTypeName",
                          "src": "21751:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "21750:18:29"
                  },
                  "scope": 7928,
                  "src": "21701:1122:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7654,
                    "nodeType": "Block",
                    "src": "23074:55:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7650,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7641,
                              "src": "23100:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7651,
                              "name": "scalingFactor",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7643,
                              "src": "23108:13:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7648,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "23091:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 7649,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mul",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3292,
                            "src": "23091:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 7652,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "23091:31:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 7647,
                        "id": 7653,
                        "nodeType": "Return",
                        "src": "23084:38:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7639,
                    "nodeType": "StructuredDocumentation",
                    "src": "22829:151:29",
                    "text": " @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\n scaling or not."
                  },
                  "id": 7655,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_upscale",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7644,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7641,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 7655,
                        "src": "23003:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7640,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "23003:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7643,
                        "mutability": "mutable",
                        "name": "scalingFactor",
                        "nodeType": "VariableDeclaration",
                        "scope": 7655,
                        "src": "23019:21:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7642,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "23019:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "23002:39:29"
                  },
                  "returnParameters": {
                    "id": 7647,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7646,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7655,
                        "src": "23065:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7645,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "23065:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "23064:9:29"
                  },
                  "scope": 7928,
                  "src": "22985:144:29",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7692,
                    "nodeType": "Block",
                    "src": "23394:141:29",
                    "statements": [
                      {
                        "body": {
                          "id": 7690,
                          "nodeType": "Block",
                          "src": "23452:77:29",
                          "statements": [
                            {
                              "expression": {
                                "id": 7688,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 7676,
                                    "name": "amounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7659,
                                    "src": "23466:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 7678,
                                  "indexExpression": {
                                    "id": 7677,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7666,
                                    "src": "23474:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "23466:10:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 7681,
                                        "name": "amounts",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7659,
                                        "src": "23488:7:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7683,
                                      "indexExpression": {
                                        "id": 7682,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7666,
                                        "src": "23496:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "23488:10:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "baseExpression": {
                                        "id": 7684,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7662,
                                        "src": "23500:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7686,
                                      "indexExpression": {
                                        "id": 7685,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7666,
                                        "src": "23515:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "23500:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 7679,
                                      "name": "Math",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3350,
                                      "src": "23479:4:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                        "typeString": "type(library Math)"
                                      }
                                    },
                                    "id": 7680,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "mul",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3292,
                                    "src": "23479:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 7687,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "23479:39:29",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "23466:52:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7689,
                              "nodeType": "ExpressionStatement",
                              "src": "23466:52:29"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 7672,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 7669,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7666,
                            "src": "23424:1:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 7670,
                              "name": "_getTotalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6892,
                              "src": "23428:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 7671,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "23428:17:29",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "23424:21:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 7691,
                        "initializationExpression": {
                          "assignments": [
                            7666
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 7666,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 7691,
                              "src": "23409:9:29",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 7665,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "23409:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 7668,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 7667,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "23421:1:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "23409:13:29"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 7674,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "23447:3:29",
                            "subExpression": {
                              "id": 7673,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7666,
                              "src": "23449:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7675,
                          "nodeType": "ExpressionStatement",
                          "src": "23447:3:29"
                        },
                        "nodeType": "ForStatement",
                        "src": "23404:125:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7656,
                    "nodeType": "StructuredDocumentation",
                    "src": "23135:158:29",
                    "text": " @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\n the `amounts` array."
                  },
                  "id": 7693,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_upscaleArray",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7663,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7659,
                        "mutability": "mutable",
                        "name": "amounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 7693,
                        "src": "23321:24:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7657,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "23321:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7658,
                          "nodeType": "ArrayTypeName",
                          "src": "23321:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7662,
                        "mutability": "mutable",
                        "name": "scalingFactors",
                        "nodeType": "VariableDeclaration",
                        "scope": 7693,
                        "src": "23347:31:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7660,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "23347:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7661,
                          "nodeType": "ArrayTypeName",
                          "src": "23347:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "23320:59:29"
                  },
                  "returnParameters": {
                    "id": 7664,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "23394:0:29"
                  },
                  "scope": 7928,
                  "src": "23298:237:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7709,
                    "nodeType": "Block",
                    "src": "23834:59:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7705,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7696,
                              "src": "23864:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7706,
                              "name": "scalingFactor",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7698,
                              "src": "23872:13:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7703,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "23851:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 7704,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3314,
                            "src": "23851:12:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 7707,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "23851:35:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 7702,
                        "id": 7708,
                        "nodeType": "Return",
                        "src": "23844:42:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7694,
                    "nodeType": "StructuredDocumentation",
                    "src": "23541:193:29",
                    "text": " @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n whether it needed scaling or not. The result is rounded down."
                  },
                  "id": 7710,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_downscaleDown",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7699,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7696,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 7710,
                        "src": "23763:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7695,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "23763:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7698,
                        "mutability": "mutable",
                        "name": "scalingFactor",
                        "nodeType": "VariableDeclaration",
                        "scope": 7710,
                        "src": "23779:21:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7697,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "23779:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "23762:39:29"
                  },
                  "returnParameters": {
                    "id": 7702,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7701,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7710,
                        "src": "23825:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7700,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "23825:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "23824:9:29"
                  },
                  "scope": 7928,
                  "src": "23739:154:29",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7747,
                    "nodeType": "Block",
                    "src": "24170:145:29",
                    "statements": [
                      {
                        "body": {
                          "id": 7745,
                          "nodeType": "Block",
                          "src": "24228:81:29",
                          "statements": [
                            {
                              "expression": {
                                "id": 7743,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 7731,
                                    "name": "amounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7714,
                                    "src": "24242:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 7733,
                                  "indexExpression": {
                                    "id": 7732,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7721,
                                    "src": "24250:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "24242:10:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 7736,
                                        "name": "amounts",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7714,
                                        "src": "24268:7:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7738,
                                      "indexExpression": {
                                        "id": 7737,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7721,
                                        "src": "24276:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "24268:10:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "baseExpression": {
                                        "id": 7739,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7717,
                                        "src": "24280:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7741,
                                      "indexExpression": {
                                        "id": 7740,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7721,
                                        "src": "24295:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "24280:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 7734,
                                      "name": "Math",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3350,
                                      "src": "24255:4:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                        "typeString": "type(library Math)"
                                      }
                                    },
                                    "id": 7735,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3314,
                                    "src": "24255:12:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 7742,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "24255:43:29",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "24242:56:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7744,
                              "nodeType": "ExpressionStatement",
                              "src": "24242:56:29"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 7727,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 7724,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7721,
                            "src": "24200:1:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 7725,
                              "name": "_getTotalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6892,
                              "src": "24204:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 7726,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "24204:17:29",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "24200:21:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 7746,
                        "initializationExpression": {
                          "assignments": [
                            7721
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 7721,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 7746,
                              "src": "24185:9:29",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 7720,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "24185:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 7723,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 7722,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "24197:1:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "24185:13:29"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 7729,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "24223:3:29",
                            "subExpression": {
                              "id": 7728,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7721,
                              "src": "24225:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7730,
                          "nodeType": "ExpressionStatement",
                          "src": "24223:3:29"
                        },
                        "nodeType": "ForStatement",
                        "src": "24180:129:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7711,
                    "nodeType": "StructuredDocumentation",
                    "src": "23899:164:29",
                    "text": " @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\n *mutates* the `amounts` array."
                  },
                  "id": 7748,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_downscaleDownArray",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7718,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7714,
                        "mutability": "mutable",
                        "name": "amounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 7748,
                        "src": "24097:24:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7712,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "24097:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7713,
                          "nodeType": "ArrayTypeName",
                          "src": "24097:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7717,
                        "mutability": "mutable",
                        "name": "scalingFactors",
                        "nodeType": "VariableDeclaration",
                        "scope": 7748,
                        "src": "24123:31:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7715,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "24123:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7716,
                          "nodeType": "ArrayTypeName",
                          "src": "24123:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "24096:59:29"
                  },
                  "returnParameters": {
                    "id": 7719,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "24170:0:29"
                  },
                  "scope": 7928,
                  "src": "24068:247:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7764,
                    "nodeType": "Block",
                    "src": "24610:57:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 7760,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7751,
                              "src": "24638:6:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 7761,
                              "name": "scalingFactor",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7753,
                              "src": "24646:13:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 7758,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "24627:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 7759,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3349,
                            "src": "24627:10:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 7762,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "24627:33:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 7757,
                        "id": 7763,
                        "nodeType": "Return",
                        "src": "24620:40:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7749,
                    "nodeType": "StructuredDocumentation",
                    "src": "24321:191:29",
                    "text": " @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n whether it needed scaling or not. The result is rounded up."
                  },
                  "id": 7765,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_downscaleUp",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7754,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7751,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 7765,
                        "src": "24539:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7750,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "24539:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7753,
                        "mutability": "mutable",
                        "name": "scalingFactor",
                        "nodeType": "VariableDeclaration",
                        "scope": 7765,
                        "src": "24555:21:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7752,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "24555:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "24538:39:29"
                  },
                  "returnParameters": {
                    "id": 7757,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7756,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7765,
                        "src": "24601:7:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7755,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "24601:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "24600:9:29"
                  },
                  "scope": 7928,
                  "src": "24517:150:29",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7802,
                    "nodeType": "Block",
                    "src": "24940:143:29",
                    "statements": [
                      {
                        "body": {
                          "id": 7800,
                          "nodeType": "Block",
                          "src": "24998:79:29",
                          "statements": [
                            {
                              "expression": {
                                "id": 7798,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 7786,
                                    "name": "amounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7769,
                                    "src": "25012:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 7788,
                                  "indexExpression": {
                                    "id": 7787,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7776,
                                    "src": "25020:1:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "25012:10:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 7791,
                                        "name": "amounts",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7769,
                                        "src": "25036:7:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7793,
                                      "indexExpression": {
                                        "id": 7792,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7776,
                                        "src": "25044:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "25036:10:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "baseExpression": {
                                        "id": 7794,
                                        "name": "scalingFactors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7772,
                                        "src": "25048:14:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 7796,
                                      "indexExpression": {
                                        "id": 7795,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7776,
                                        "src": "25063:1:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "25048:17:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 7789,
                                      "name": "Math",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3350,
                                      "src": "25025:4:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                        "typeString": "type(library Math)"
                                      }
                                    },
                                    "id": 7790,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divUp",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3349,
                                    "src": "25025:10:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 7797,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "25025:41:29",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "25012:54:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 7799,
                              "nodeType": "ExpressionStatement",
                              "src": "25012:54:29"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 7782,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 7779,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7776,
                            "src": "24970:1:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 7780,
                              "name": "_getTotalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6892,
                              "src": "24974:15:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 7781,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "24974:17:29",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "24970:21:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 7801,
                        "initializationExpression": {
                          "assignments": [
                            7776
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 7776,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 7801,
                              "src": "24955:9:29",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 7775,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "24955:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 7778,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 7777,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "24967:1:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "24955:13:29"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 7784,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "24993:3:29",
                            "subExpression": {
                              "id": 7783,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7776,
                              "src": "24995:1:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7785,
                          "nodeType": "ExpressionStatement",
                          "src": "24993:3:29"
                        },
                        "nodeType": "ForStatement",
                        "src": "24950:127:29"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 7766,
                    "nodeType": "StructuredDocumentation",
                    "src": "24673:162:29",
                    "text": " @dev Same as `_downscaleUp`, but for an entire array. This function does not return anything, but instead\n *mutates* the `amounts` array."
                  },
                  "id": 7803,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_downscaleUpArray",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7773,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7769,
                        "mutability": "mutable",
                        "name": "amounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 7803,
                        "src": "24867:24:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7767,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "24867:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7768,
                          "nodeType": "ArrayTypeName",
                          "src": "24867:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7772,
                        "mutability": "mutable",
                        "name": "scalingFactors",
                        "nodeType": "VariableDeclaration",
                        "scope": 7803,
                        "src": "24893:31:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7770,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "24893:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7771,
                          "nodeType": "ArrayTypeName",
                          "src": "24893:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "24866:59:29"
                  },
                  "returnParameters": {
                    "id": 7774,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "24940:0:29"
                  },
                  "scope": 7928,
                  "src": "24840:243:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    8029
                  ],
                  "body": {
                    "id": 7814,
                    "nodeType": "Block",
                    "src": "25160:417:29",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 7809,
                                "name": "getVault",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6876,
                                "src": "25544:8:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IVault_$21266_$",
                                  "typeString": "function () view returns (contract IVault)"
                                }
                              },
                              "id": 7810,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "25544:10:29",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 7811,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getAuthorizer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20841,
                            "src": "25544:24:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IAuthorizer_$20660_$",
                              "typeString": "function () view external returns (contract IAuthorizer)"
                            }
                          },
                          "id": 7812,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "25544:26:29",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "functionReturnParameters": 7808,
                        "id": 7813,
                        "nodeType": "Return",
                        "src": "25537:33:29"
                      }
                    ]
                  },
                  "id": 7815,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 7805,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "25129:8:29"
                  },
                  "parameters": {
                    "id": 7804,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "25112:2:29"
                  },
                  "returnParameters": {
                    "id": 7808,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7807,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7815,
                        "src": "25147:11:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 7806,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "25147:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "25146:13:29"
                  },
                  "scope": 7928,
                  "src": "25089:488:29",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7926,
                    "nodeType": "Block",
                    "src": "26110:6308:29",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "id": 7876,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 7870,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "26264:3:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 7871,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "src": "26264:10:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "arguments": [
                              {
                                "id": 7874,
                                "name": "this",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -28,
                                "src": "26286:4:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_BasePool_$7928",
                                  "typeString": "contract BasePool"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_BasePool_$7928",
                                  "typeString": "contract BasePool"
                                }
                              ],
                              "id": 7873,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "26278:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 7872,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "26278:7:29",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 7875,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "26278:13:29",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "26264:27:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 7924,
                          "nodeType": "Block",
                          "src": "30409:2003:29",
                          "statements": [
                            {
                              "assignments": [
                                7894
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 7894,
                                  "mutability": "mutable",
                                  "name": "scalingFactors",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7924,
                                  "src": "30423:31:29",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[]"
                                  },
                                  "typeName": {
                                    "baseType": {
                                      "id": 7892,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "30423:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 7893,
                                    "nodeType": "ArrayTypeName",
                                    "src": "30423:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                      "typeString": "uint256[]"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 7897,
                              "initialValue": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 7895,
                                  "name": "_scalingFactors",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7638,
                                  "src": "30457:15:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "function () view returns (uint256[] memory)"
                                  }
                                },
                                "id": 7896,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "30457:17:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "30423:51:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7899,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7824,
                                    "src": "30502:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7900,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7894,
                                    "src": "30512:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  ],
                                  "id": 7898,
                                  "name": "_upscaleArray",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7693,
                                  "src": "30488:13:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                    "typeString": "function (uint256[] memory,uint256[] memory) view"
                                  }
                                },
                                "id": 7901,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "30488:39:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7902,
                              "nodeType": "ExpressionStatement",
                              "src": "30488:39:29"
                            },
                            {
                              "assignments": [
                                7904,
                                7907,
                                null
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 7904,
                                  "mutability": "mutable",
                                  "name": "bptAmount",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7924,
                                  "src": "30543:17:29",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 7903,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "30543:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                },
                                {
                                  "constant": false,
                                  "id": 7907,
                                  "mutability": "mutable",
                                  "name": "tokenAmounts",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7924,
                                  "src": "30562:29:29",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[]"
                                  },
                                  "typeName": {
                                    "baseType": {
                                      "id": 7905,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "30562:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 7906,
                                    "nodeType": "ArrayTypeName",
                                    "src": "30562:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                      "typeString": "uint256[]"
                                    }
                                  },
                                  "visibility": "internal"
                                },
                                null
                              ],
                              "id": 7917,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 7909,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7817,
                                    "src": "30622:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 7910,
                                    "name": "sender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7819,
                                    "src": "30646:6:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 7911,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7821,
                                    "src": "30670:9:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 7912,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7824,
                                    "src": "30697:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7913,
                                    "name": "lastChangeBlock",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7826,
                                    "src": "30723:15:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 7914,
                                    "name": "protocolSwapFeePercentage",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7828,
                                    "src": "30756:25:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 7915,
                                    "name": "userData",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7830,
                                    "src": "30799:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  ],
                                  "id": 7908,
                                  "name": "_action",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7857,
                                  "src": "30597:7:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) returns (uint256,uint256[] memory,uint256[] memory)"
                                  }
                                },
                                "id": 7916,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "30597:224:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256,uint256[] memory,uint256[] memory)"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "30542:279:29"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7919,
                                    "name": "tokenAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7907,
                                    "src": "30852:12:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 7920,
                                    "name": "scalingFactors",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7894,
                                    "src": "30866:14:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  ],
                                  "id": 7918,
                                  "name": "_downscaleArray",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7867,
                                  "src": "30836:15:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                                    "typeString": "function (uint256[] memory,uint256[] memory) view"
                                  }
                                },
                                "id": 7921,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "30836:45:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 7922,
                              "nodeType": "ExpressionStatement",
                              "src": "30836:45:29"
                            },
                            {
                              "AST": {
                                "nodeType": "YulBlock",
                                "src": "30965:1437:29",
                                "statements": [
                                  {
                                    "nodeType": "YulVariableDeclaration",
                                    "src": "31346:40:29",
                                    "value": {
                                      "arguments": [
                                        {
                                          "arguments": [
                                            {
                                              "name": "tokenAmounts",
                                              "nodeType": "YulIdentifier",
                                              "src": "31368:12:29"
                                            }
                                          ],
                                          "functionName": {
                                            "name": "mload",
                                            "nodeType": "YulIdentifier",
                                            "src": "31362:5:29"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "31362:19:29"
                                        },
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "31383:2:29",
                                          "type": "",
                                          "value": "32"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mul",
                                        "nodeType": "YulIdentifier",
                                        "src": "31358:3:29"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "31358:28:29"
                                    },
                                    "variables": [
                                      {
                                        "name": "size",
                                        "nodeType": "YulTypedName",
                                        "src": "31350:4:29",
                                        "type": ""
                                      }
                                    ]
                                  },
                                  {
                                    "nodeType": "YulVariableDeclaration",
                                    "src": "31736:36:29",
                                    "value": {
                                      "arguments": [
                                        {
                                          "name": "tokenAmounts",
                                          "nodeType": "YulIdentifier",
                                          "src": "31753:12:29"
                                        },
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "31767:4:29",
                                          "type": "",
                                          "value": "0x20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "sub",
                                        "nodeType": "YulIdentifier",
                                        "src": "31749:3:29"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "31749:23:29"
                                    },
                                    "variables": [
                                      {
                                        "name": "start",
                                        "nodeType": "YulTypedName",
                                        "src": "31740:5:29",
                                        "type": ""
                                      }
                                    ]
                                  },
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "name": "start",
                                          "nodeType": "YulIdentifier",
                                          "src": "31796:5:29"
                                        },
                                        {
                                          "name": "bptAmount",
                                          "nodeType": "YulIdentifier",
                                          "src": "31803:9:29"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mstore",
                                        "nodeType": "YulIdentifier",
                                        "src": "31789:6:29"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "31789:24:29"
                                    },
                                    "nodeType": "YulExpressionStatement",
                                    "src": "31789:24:29"
                                  },
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "arguments": [
                                            {
                                              "name": "start",
                                              "nodeType": "YulIdentifier",
                                              "src": "32021:5:29"
                                            },
                                            {
                                              "kind": "number",
                                              "nodeType": "YulLiteral",
                                              "src": "32028:4:29",
                                              "type": "",
                                              "value": "0x20"
                                            }
                                          ],
                                          "functionName": {
                                            "name": "sub",
                                            "nodeType": "YulIdentifier",
                                            "src": "32017:3:29"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "32017:16:29"
                                        },
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "32035:66:29",
                                          "type": "",
                                          "value": "0x0000000000000000000000000000000000000000000000000000000043adbafb"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mstore",
                                        "nodeType": "YulIdentifier",
                                        "src": "32010:6:29"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "32010:92:29"
                                    },
                                    "nodeType": "YulExpressionStatement",
                                    "src": "32010:92:29"
                                  },
                                  {
                                    "nodeType": "YulAssignment",
                                    "src": "32119:25:29",
                                    "value": {
                                      "arguments": [
                                        {
                                          "name": "start",
                                          "nodeType": "YulIdentifier",
                                          "src": "32132:5:29"
                                        },
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "32139:4:29",
                                          "type": "",
                                          "value": "0x04"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "sub",
                                        "nodeType": "YulIdentifier",
                                        "src": "32128:3:29"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "32128:16:29"
                                    },
                                    "variableNames": [
                                      {
                                        "name": "start",
                                        "nodeType": "YulIdentifier",
                                        "src": "32119:5:29"
                                      }
                                    ]
                                  },
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "name": "start",
                                          "nodeType": "YulIdentifier",
                                          "src": "32367:5:29"
                                        },
                                        {
                                          "arguments": [
                                            {
                                              "name": "size",
                                              "nodeType": "YulIdentifier",
                                              "src": "32378:4:29"
                                            },
                                            {
                                              "kind": "number",
                                              "nodeType": "YulLiteral",
                                              "src": "32384:2:29",
                                              "type": "",
                                              "value": "68"
                                            }
                                          ],
                                          "functionName": {
                                            "name": "add",
                                            "nodeType": "YulIdentifier",
                                            "src": "32374:3:29"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "32374:13:29"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "revert",
                                        "nodeType": "YulIdentifier",
                                        "src": "32360:6:29"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "32360:28:29"
                                    },
                                    "nodeType": "YulExpressionStatement",
                                    "src": "32360:28:29"
                                  }
                                ]
                              },
                              "evmVersion": "istanbul",
                              "externalReferences": [
                                {
                                  "declaration": 7904,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "31803:9:29",
                                  "valueSize": 1
                                },
                                {
                                  "declaration": 7907,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "31368:12:29",
                                  "valueSize": 1
                                },
                                {
                                  "declaration": 7907,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "31753:12:29",
                                  "valueSize": 1
                                }
                              ],
                              "id": 7923,
                              "nodeType": "InlineAssembly",
                              "src": "30956:1446:29"
                            }
                          ]
                        },
                        "id": 7925,
                        "nodeType": "IfStatement",
                        "src": "26260:6152:29",
                        "trueBody": {
                          "id": 7889,
                          "nodeType": "Block",
                          "src": "26293:4110:29",
                          "statements": [
                            {
                              "assignments": [
                                7878,
                                null
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 7878,
                                  "mutability": "mutable",
                                  "name": "success",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 7889,
                                  "src": "26560:12:29",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "typeName": {
                                    "id": 7877,
                                    "name": "bool",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "26560:4:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "visibility": "internal"
                                },
                                null
                              ],
                              "id": 7887,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 7884,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "26597:3:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 7885,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "data",
                                    "nodeType": "MemberAccess",
                                    "src": "26597:8:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_calldata_ptr",
                                      "typeString": "bytes calldata"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes_calldata_ptr",
                                      "typeString": "bytes calldata"
                                    }
                                  ],
                                  "expression": {
                                    "arguments": [
                                      {
                                        "id": 7881,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -28,
                                        "src": "26586:4:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_BasePool_$7928",
                                          "typeString": "contract BasePool"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_BasePool_$7928",
                                          "typeString": "contract BasePool"
                                        }
                                      ],
                                      "id": 7880,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "26578:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 7879,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "26578:7:29",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 7882,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "26578:13:29",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "id": 7883,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "call",
                                  "nodeType": "MemberAccess",
                                  "src": "26578:18:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                                    "typeString": "function (bytes memory) payable returns (bool,bytes memory)"
                                  }
                                },
                                "id": 7886,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "26578:28:29",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                                  "typeString": "tuple(bool,bytes memory)"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "26559:47:29"
                            },
                            {
                              "AST": {
                                "nodeType": "YulBlock",
                                "src": "26690:3703:29",
                                "statements": [
                                  {
                                    "cases": [
                                      {
                                        "body": {
                                          "nodeType": "YulBlock",
                                          "src": "26859:3329:29",
                                          "statements": [
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "27322:1:29",
                                                    "type": "",
                                                    "value": "0"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "27325:1:29",
                                                    "type": "",
                                                    "value": "0"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "27328:4:29",
                                                    "type": "",
                                                    "value": "0x04"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "returndatacopy",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "27307:14:29"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "27307:26:29"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "27307:26:29"
                                            },
                                            {
                                              "nodeType": "YulVariableDeclaration",
                                              "src": "27358:94:29",
                                              "value": {
                                                "arguments": [
                                                  {
                                                    "arguments": [
                                                      {
                                                        "kind": "number",
                                                        "nodeType": "YulLiteral",
                                                        "src": "27381:1:29",
                                                        "type": "",
                                                        "value": "0"
                                                      }
                                                    ],
                                                    "functionName": {
                                                      "name": "mload",
                                                      "nodeType": "YulIdentifier",
                                                      "src": "27375:5:29"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "27375:8:29"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "27385:66:29",
                                                    "type": "",
                                                    "value": "0xffffffff00000000000000000000000000000000000000000000000000000000"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "and",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "27371:3:29"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "27371:81:29"
                                              },
                                              "variables": [
                                                {
                                                  "name": "error",
                                                  "nodeType": "YulTypedName",
                                                  "src": "27362:5:29",
                                                  "type": ""
                                                }
                                              ]
                                            },
                                            {
                                              "body": {
                                                "nodeType": "YulBlock",
                                                "src": "27685:150:29",
                                                "statements": [
                                                  {
                                                    "expression": {
                                                      "arguments": [
                                                        {
                                                          "kind": "number",
                                                          "nodeType": "YulLiteral",
                                                          "src": "27730:1:29",
                                                          "type": "",
                                                          "value": "0"
                                                        },
                                                        {
                                                          "kind": "number",
                                                          "nodeType": "YulLiteral",
                                                          "src": "27733:1:29",
                                                          "type": "",
                                                          "value": "0"
                                                        },
                                                        {
                                                          "arguments": [],
                                                          "functionName": {
                                                            "name": "returndatasize",
                                                            "nodeType": "YulIdentifier",
                                                            "src": "27736:14:29"
                                                          },
                                                          "nodeType": "YulFunctionCall",
                                                          "src": "27736:16:29"
                                                        }
                                                      ],
                                                      "functionName": {
                                                        "name": "returndatacopy",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "27715:14:29"
                                                      },
                                                      "nodeType": "YulFunctionCall",
                                                      "src": "27715:38:29"
                                                    },
                                                    "nodeType": "YulExpressionStatement",
                                                    "src": "27715:38:29"
                                                  },
                                                  {
                                                    "expression": {
                                                      "arguments": [
                                                        {
                                                          "kind": "number",
                                                          "nodeType": "YulLiteral",
                                                          "src": "27789:1:29",
                                                          "type": "",
                                                          "value": "0"
                                                        },
                                                        {
                                                          "arguments": [],
                                                          "functionName": {
                                                            "name": "returndatasize",
                                                            "nodeType": "YulIdentifier",
                                                            "src": "27792:14:29"
                                                          },
                                                          "nodeType": "YulFunctionCall",
                                                          "src": "27792:16:29"
                                                        }
                                                      ],
                                                      "functionName": {
                                                        "name": "revert",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "27782:6:29"
                                                      },
                                                      "nodeType": "YulFunctionCall",
                                                      "src": "27782:27:29"
                                                    },
                                                    "nodeType": "YulExpressionStatement",
                                                    "src": "27782:27:29"
                                                  }
                                                ]
                                              },
                                              "condition": {
                                                "arguments": [
                                                  {
                                                    "arguments": [
                                                      {
                                                        "name": "error",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "27606:5:29"
                                                      },
                                                      {
                                                        "kind": "number",
                                                        "nodeType": "YulLiteral",
                                                        "src": "27613:66:29",
                                                        "type": "",
                                                        "value": "0x43adbafb00000000000000000000000000000000000000000000000000000000"
                                                      }
                                                    ],
                                                    "functionName": {
                                                      "name": "eq",
                                                      "nodeType": "YulIdentifier",
                                                      "src": "27603:2:29"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "27603:77:29"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "27682:1:29",
                                                    "type": "",
                                                    "value": "0"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "eq",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "27600:2:29"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "27600:84:29"
                                              },
                                              "nodeType": "YulIf",
                                              "src": "27597:2:29"
                                            },
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "29194:1:29",
                                                    "type": "",
                                                    "value": "0"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "29197:4:29",
                                                    "type": "",
                                                    "value": "0x04"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "29203:2:29",
                                                    "type": "",
                                                    "value": "32"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "returndatacopy",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "29179:14:29"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "29179:27:29"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "29179:27:29"
                                            },
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "29394:4:29",
                                                    "type": "",
                                                    "value": "0x20"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "29400:2:29",
                                                    "type": "",
                                                    "value": "64"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "mstore",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "29387:6:29"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "29387:16:29"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "29387:16:29"
                                            },
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "29790:4:29",
                                                    "type": "",
                                                    "value": "0x40"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "29796:4:29",
                                                    "type": "",
                                                    "value": "0x24"
                                                  },
                                                  {
                                                    "arguments": [
                                                      {
                                                        "arguments": [],
                                                        "functionName": {
                                                          "name": "returndatasize",
                                                          "nodeType": "YulIdentifier",
                                                          "src": "29806:14:29"
                                                        },
                                                        "nodeType": "YulFunctionCall",
                                                        "src": "29806:16:29"
                                                      },
                                                      {
                                                        "kind": "number",
                                                        "nodeType": "YulLiteral",
                                                        "src": "29824:2:29",
                                                        "type": "",
                                                        "value": "36"
                                                      }
                                                    ],
                                                    "functionName": {
                                                      "name": "sub",
                                                      "nodeType": "YulIdentifier",
                                                      "src": "29802:3:29"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "29802:25:29"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "returndatacopy",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "29775:14:29"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "29775:53:29"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "29775:53:29"
                                            },
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "30137:1:29",
                                                    "type": "",
                                                    "value": "0"
                                                  },
                                                  {
                                                    "arguments": [
                                                      {
                                                        "arguments": [],
                                                        "functionName": {
                                                          "name": "returndatasize",
                                                          "nodeType": "YulIdentifier",
                                                          "src": "30144:14:29"
                                                        },
                                                        "nodeType": "YulFunctionCall",
                                                        "src": "30144:16:29"
                                                      },
                                                      {
                                                        "kind": "number",
                                                        "nodeType": "YulLiteral",
                                                        "src": "30162:2:29",
                                                        "type": "",
                                                        "value": "28"
                                                      }
                                                    ],
                                                    "functionName": {
                                                      "name": "add",
                                                      "nodeType": "YulIdentifier",
                                                      "src": "30140:3:29"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "30140:25:29"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "return",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "30130:6:29"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "30130:36:29"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "30130:36:29"
                                            }
                                          ]
                                        },
                                        "nodeType": "YulCase",
                                        "src": "26852:3336:29",
                                        "value": {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "26857:1:29",
                                          "type": "",
                                          "value": "0"
                                        }
                                      },
                                      {
                                        "body": {
                                          "nodeType": "YulBlock",
                                          "src": "30217:162:29",
                                          "statements": [
                                            {
                                              "expression": {
                                                "arguments": [],
                                                "functionName": {
                                                  "name": "invalid",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "30348:7:29"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "30348:9:29"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "30348:9:29"
                                            }
                                          ]
                                        },
                                        "nodeType": "YulCase",
                                        "src": "30209:170:29",
                                        "value": "default"
                                      }
                                    ],
                                    "expression": {
                                      "name": "success",
                                      "nodeType": "YulIdentifier",
                                      "src": "26824:7:29"
                                    },
                                    "nodeType": "YulSwitch",
                                    "src": "26817:3562:29"
                                  }
                                ]
                              },
                              "evmVersion": "istanbul",
                              "externalReferences": [
                                {
                                  "declaration": 7878,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "26824:7:29",
                                  "valueSize": 1
                                }
                              ],
                              "id": 7888,
                              "nodeType": "InlineAssembly",
                              "src": "26681:3712:29"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 7927,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_queryAction",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7868,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7817,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "25614:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 7816,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "25614:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7819,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "25638:14:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7818,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "25638:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7821,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "25662:17:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7820,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "25662:7:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7824,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "25689:25:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 7822,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "25689:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 7823,
                          "nodeType": "ArrayTypeName",
                          "src": "25689:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7826,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "25724:23:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7825,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "25724:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7828,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "25757:33:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 7827,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "25757:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7830,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "25800:21:29",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 7829,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "25800:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7857,
                        "mutability": "mutable",
                        "name": "_action",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "25831:180:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                          "typeString": "function (bytes32,address,address,uint256[],uint256,uint256,bytes) returns (uint256,uint256[],uint256[])"
                        },
                        "typeName": {
                          "id": 7856,
                          "nodeType": "FunctionTypeName",
                          "parameterTypes": {
                            "id": 7846,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 7832,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25840:7:29",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "typeName": {
                                  "id": 7831,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "25840:7:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7834,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25849:7:29",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                "typeName": {
                                  "id": 7833,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "25849:7:29",
                                  "stateMutability": "nonpayable",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7836,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25858:7:29",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                "typeName": {
                                  "id": 7835,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "25858:7:29",
                                  "stateMutability": "nonpayable",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7839,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25867:16:29",
                                "stateVariable": false,
                                "storageLocation": "memory",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[]"
                                },
                                "typeName": {
                                  "baseType": {
                                    "id": 7837,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "25867:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7838,
                                  "nodeType": "ArrayTypeName",
                                  "src": "25867:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                    "typeString": "uint256[]"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7841,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25885:7:29",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 7840,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "25885:7:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7843,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25894:7:29",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 7842,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "25894:7:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7845,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25903:12:29",
                                "stateVariable": false,
                                "storageLocation": "memory",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes"
                                },
                                "typeName": {
                                  "id": 7844,
                                  "name": "bytes",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "25903:5:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_storage_ptr",
                                    "typeString": "bytes"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "25839:77:29"
                          },
                          "returnParameterTypes": {
                            "id": 7855,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 7848,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25959:7:29",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 7847,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "25959:7:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7851,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25968:16:29",
                                "stateVariable": false,
                                "storageLocation": "memory",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[]"
                                },
                                "typeName": {
                                  "baseType": {
                                    "id": 7849,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "25968:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7850,
                                  "nodeType": "ArrayTypeName",
                                  "src": "25968:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                    "typeString": "uint256[]"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7854,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7856,
                                "src": "25986:16:29",
                                "stateVariable": false,
                                "storageLocation": "memory",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[]"
                                },
                                "typeName": {
                                  "baseType": {
                                    "id": 7852,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "25986:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7853,
                                  "nodeType": "ArrayTypeName",
                                  "src": "25986:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                    "typeString": "uint256[]"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "25958:45:29"
                          },
                          "src": "25831:180:29",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "function (bytes32,address,address,uint256[],uint256,uint256,bytes) returns (uint256,uint256[],uint256[])"
                          },
                          "visibility": "internal"
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7867,
                        "mutability": "mutable",
                        "name": "_downscaleArray",
                        "nodeType": "VariableDeclaration",
                        "scope": 7927,
                        "src": "26021:74:29",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                          "typeString": "function (uint256[],uint256[]) view"
                        },
                        "typeName": {
                          "id": 7866,
                          "nodeType": "FunctionTypeName",
                          "parameterTypes": {
                            "id": 7864,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 7860,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7866,
                                "src": "26030:16:29",
                                "stateVariable": false,
                                "storageLocation": "memory",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[]"
                                },
                                "typeName": {
                                  "baseType": {
                                    "id": 7858,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "26030:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7859,
                                  "nodeType": "ArrayTypeName",
                                  "src": "26030:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                    "typeString": "uint256[]"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 7863,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 7866,
                                "src": "26048:16:29",
                                "stateVariable": false,
                                "storageLocation": "memory",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[]"
                                },
                                "typeName": {
                                  "baseType": {
                                    "id": 7861,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "26048:7:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 7862,
                                  "nodeType": "ArrayTypeName",
                                  "src": "26048:9:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                    "typeString": "uint256[]"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "26029:36:29"
                          },
                          "returnParameterTypes": {
                            "id": 7865,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "26080:0:29"
                          },
                          "src": "26021:74:29",
                          "stateMutability": "view",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                            "typeString": "function (uint256[],uint256[]) view"
                          },
                          "visibility": "internal"
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "25604:497:29"
                  },
                  "returnParameters": {
                    "id": 7869,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "26110:0:29"
                  },
                  "scope": 7928,
                  "src": "25583:6835:29",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 7929,
              "src": "2297:30123:29"
            }
          ],
          "src": "688:31733:29"
        },
        "id": 29
      },
      "src.sol/amm/pools/BasePoolAuthorization.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/BasePoolAuthorization.sol",
          "exportedSymbols": {
            "BasePoolAuthorization": [
              8030
            ]
          },
          "id": 8031,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 7930,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:30"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/Authentication.sol",
              "file": "../lib/helpers/Authentication.sol",
              "id": 7931,
              "nodeType": "ImportDirective",
              "scope": 8031,
              "sourceUnit": 344,
              "src": "713:43:30",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAuthorizer.sol",
              "file": "../vault/interfaces/IAuthorizer.sol",
              "id": 7932,
              "nodeType": "ImportDirective",
              "scope": 8031,
              "sourceUnit": 20661,
              "src": "757:45:30",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/BasePool.sol",
              "file": "./BasePool.sol",
              "id": 7933,
              "nodeType": "ImportDirective",
              "scope": 8031,
              "sourceUnit": 7929,
              "src": "804:24:30",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 7935,
                    "name": "Authentication",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 343,
                    "src": "1499:14:30",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Authentication_$343",
                      "typeString": "contract Authentication"
                    }
                  },
                  "id": 7936,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1499:14:30"
                }
              ],
              "contractDependencies": [
                343,
                911
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 7934,
                "nodeType": "StructuredDocumentation",
                "src": "830:625:30",
                "text": " @dev Base authorization layer implementation for Pools.\n The owner account can call some of the permissioned functions - access control of the rest is delegated to the\n Authorizer. Note that this owner is immutable: more sophisticated permission schemes, such as multiple ownership,\n granular roles, etc., could be built on top of this by making the owner a smart contract.\n Access control of all other permissioned functions is delegated to an Authorizer. It is also possible to delegate\n control of *all* permissioned functions to the Authorizer by setting the owner address to `_DELEGATE_OWNER`."
              },
              "fullyImplemented": false,
              "id": 8030,
              "linearizedBaseContracts": [
                8030,
                343,
                911
              ],
              "name": "BasePoolAuthorization",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": false,
                  "id": 7938,
                  "mutability": "immutable",
                  "name": "_owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 8030,
                  "src": "1520:32:30",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7937,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1520:7:30",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 7941,
                  "mutability": "constant",
                  "name": "_DELEGATE_OWNER",
                  "nodeType": "VariableDeclaration",
                  "scope": 8030,
                  "src": "1559:85:30",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 7939,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1559:7:30",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": {
                    "hexValue": "307842413142413162613142413162413162413142613142413162613142413162413162613162613142",
                    "id": 7940,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1602:42:30",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address_payable",
                      "typeString": "address payable"
                    },
                    "value": "0xBA1BA1ba1BA1bA1bA1Ba1BA1ba1BA1bA1ba1ba1B"
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 7950,
                    "nodeType": "Block",
                    "src": "1678:31:30",
                    "statements": [
                      {
                        "expression": {
                          "id": 7948,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 7946,
                            "name": "_owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7938,
                            "src": "1688:6:30",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 7947,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7943,
                            "src": "1697:5:30",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "1688:14:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 7949,
                        "nodeType": "ExpressionStatement",
                        "src": "1688:14:30"
                      }
                    ]
                  },
                  "id": 7951,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7944,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7943,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 7951,
                        "src": "1663:13:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7942,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1663:7:30",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1662:15:30"
                  },
                  "returnParameters": {
                    "id": 7945,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1678:0:30"
                  },
                  "scope": 8030,
                  "src": "1651:58:30",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 7958,
                    "nodeType": "Block",
                    "src": "1765:30:30",
                    "statements": [
                      {
                        "expression": {
                          "id": 7956,
                          "name": "_owner",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7938,
                          "src": "1782:6:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 7955,
                        "id": 7957,
                        "nodeType": "Return",
                        "src": "1775:13:30"
                      }
                    ]
                  },
                  "functionSelector": "893d20e8",
                  "id": 7959,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getOwner",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7952,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1732:2:30"
                  },
                  "returnParameters": {
                    "id": 7955,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7954,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7959,
                        "src": "1756:7:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7953,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1756:7:30",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1755:9:30"
                  },
                  "scope": 8030,
                  "src": "1715:80:30",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 7967,
                    "nodeType": "Block",
                    "src": "1862:40:30",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 7964,
                            "name": "_getAuthorizer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8029,
                            "src": "1879:14:30",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IAuthorizer_$20660_$",
                              "typeString": "function () view returns (contract IAuthorizer)"
                            }
                          },
                          "id": 7965,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1879:16:30",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "functionReturnParameters": 7963,
                        "id": 7966,
                        "nodeType": "Return",
                        "src": "1872:23:30"
                      }
                    ]
                  },
                  "functionSelector": "aaabadc5",
                  "id": 7968,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 7960,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1823:2:30"
                  },
                  "returnParameters": {
                    "id": 7963,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7962,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 7968,
                        "src": "1849:11:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 7961,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "1849:11:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1848:13:30"
                  },
                  "scope": 8030,
                  "src": "1801:101:30",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    342
                  ],
                  "body": {
                    "id": 8007,
                    "nodeType": "Block",
                    "src": "2002:450:30",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 7986,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                "id": 7981,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 7978,
                                    "name": "getOwner",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7959,
                                    "src": "2017:8:30",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                      "typeString": "function () view returns (address)"
                                    }
                                  },
                                  "id": 7979,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2017:10:30",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "!=",
                                "rightExpression": {
                                  "id": 7980,
                                  "name": "_DELEGATE_OWNER",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7941,
                                  "src": "2031:15:30",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "src": "2017:29:30",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              }
                            ],
                            "id": 7982,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "2016:31:30",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "arguments": [
                              {
                                "id": 7984,
                                "name": "actionId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7970,
                                "src": "2070:8:30",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 7983,
                              "name": "_isOwnerOnlyAction",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8024,
                              "src": "2051:18:30",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
                                "typeString": "function (bytes32) view returns (bool)"
                              }
                            },
                            "id": 7985,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2051:28:30",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "2016:63:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 8005,
                          "nodeType": "Block",
                          "src": "2238:208:30",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 7997,
                                    "name": "actionId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7970,
                                    "src": "2402:8:30",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 7998,
                                    "name": "account",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7972,
                                    "src": "2412:7:30",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "id": 8001,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -28,
                                        "src": "2429:4:30",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_BasePoolAuthorization_$8030",
                                          "typeString": "contract BasePoolAuthorization"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_BasePoolAuthorization_$8030",
                                          "typeString": "contract BasePoolAuthorization"
                                        }
                                      ],
                                      "id": 8000,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "2421:7:30",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 7999,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "2421:7:30",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 8002,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2421:13:30",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "id": 7994,
                                      "name": "_getAuthorizer",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8029,
                                      "src": "2374:14:30",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IAuthorizer_$20660_$",
                                        "typeString": "function () view returns (contract IAuthorizer)"
                                      }
                                    },
                                    "id": 7995,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2374:16:30",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                                      "typeString": "contract IAuthorizer"
                                    }
                                  },
                                  "id": 7996,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "canPerform",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20659,
                                  "src": "2374:27:30",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_address_$_t_address_$returns$_t_bool_$",
                                    "typeString": "function (bytes32,address,address) view external returns (bool)"
                                  }
                                },
                                "id": 8003,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2374:61:30",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "functionReturnParameters": 7977,
                              "id": 8004,
                              "nodeType": "Return",
                              "src": "2367:68:30"
                            }
                          ]
                        },
                        "id": 8006,
                        "nodeType": "IfStatement",
                        "src": "2012:434:30",
                        "trueBody": {
                          "id": 7993,
                          "nodeType": "Block",
                          "src": "2081:151:30",
                          "statements": [
                            {
                              "expression": {
                                "commonType": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                "id": 7991,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 7987,
                                    "name": "msg",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -15,
                                    "src": "2197:3:30",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_message",
                                      "typeString": "msg"
                                    }
                                  },
                                  "id": 7988,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "src": "2197:10:30",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 7989,
                                    "name": "getOwner",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7959,
                                    "src": "2211:8:30",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                      "typeString": "function () view returns (address)"
                                    }
                                  },
                                  "id": 7990,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2211:10:30",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "src": "2197:24:30",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "functionReturnParameters": 7977,
                              "id": 7992,
                              "nodeType": "Return",
                              "src": "2190:31:30"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 8008,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_canPerform",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 7974,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1978:8:30"
                  },
                  "parameters": {
                    "id": 7973,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7970,
                        "mutability": "mutable",
                        "name": "actionId",
                        "nodeType": "VariableDeclaration",
                        "scope": 8008,
                        "src": "1929:16:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 7969,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1929:7:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 7972,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 8008,
                        "src": "1947:15:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 7971,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1947:7:30",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1928:35:30"
                  },
                  "returnParameters": {
                    "id": 7977,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 7976,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8008,
                        "src": "1996:4:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 7975,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "1996:4:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1995:6:30"
                  },
                  "scope": 8030,
                  "src": "1908:544:30",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 8023,
                    "nodeType": "Block",
                    "src": "2532:172:30",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          },
                          "id": 8021,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8015,
                            "name": "actionId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8010,
                            "src": "2634:8:30",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "arguments": [
                              {
                                "expression": {
                                  "expression": {
                                    "id": 8017,
                                    "name": "BasePool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 7928,
                                    "src": "2658:8:30",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_BasePool_$7928_$",
                                      "typeString": "type(contract BasePool)"
                                    }
                                  },
                                  "id": 8018,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "setSwapFeePercentage",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 6934,
                                  "src": "2658:29:30",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_declaration_nonpayable$_t_uint256_$returns$__$",
                                    "typeString": "function BasePool.setSwapFeePercentage(uint256)"
                                  }
                                },
                                "id": 8019,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "selector",
                                "nodeType": "MemberAccess",
                                "src": "2658:38:30",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes4",
                                  "typeString": "bytes4"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes4",
                                  "typeString": "bytes4"
                                }
                              ],
                              "id": 8016,
                              "name": "getActionId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 333,
                              "src": "2646:11:30",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes4_$returns$_t_bytes32_$",
                                "typeString": "function (bytes4) view returns (bytes32)"
                              }
                            },
                            "id": 8020,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2646:51:30",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "2634:63:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 8014,
                        "id": 8022,
                        "nodeType": "Return",
                        "src": "2627:70:30"
                      }
                    ]
                  },
                  "id": 8024,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_isOwnerOnlyAction",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8011,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8010,
                        "mutability": "mutable",
                        "name": "actionId",
                        "nodeType": "VariableDeclaration",
                        "scope": 8024,
                        "src": "2486:16:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 8009,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2486:7:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2485:18:30"
                  },
                  "returnParameters": {
                    "id": 8014,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8013,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8024,
                        "src": "2526:4:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 8012,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "2526:4:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2525:6:30"
                  },
                  "scope": 8030,
                  "src": "2458:246:30",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "id": 8029,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8025,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2733:2:30"
                  },
                  "returnParameters": {
                    "id": 8028,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8027,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8029,
                        "src": "2767:11:30",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 8026,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "2767:11:30",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2766:13:30"
                  },
                  "scope": 8030,
                  "src": "2710:70:30",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                }
              ],
              "scope": 8031,
              "src": "1456:1326:30"
            }
          ],
          "src": "688:2095:30"
        },
        "id": 30
      },
      "src.sol/amm/pools/factories/BasePoolFactory.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/factories/BasePoolFactory.sol",
          "exportedSymbols": {
            "BasePoolFactory": [
              8096
            ]
          },
          "id": 8097,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 8032,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:31"
            },
            {
              "id": 8033,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:31"
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "../../vault/interfaces/IVault.sol",
              "id": 8034,
              "nodeType": "ImportDirective",
              "scope": 8097,
              "sourceUnit": 21267,
              "src": "747:43:31",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IBasePool.sol",
              "file": "../../vault/interfaces/IBasePool.sol",
              "id": 8035,
              "nodeType": "ImportDirective",
              "scope": 8097,
              "sourceUnit": 20720,
              "src": "791:46:31",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "documentation": {
                "id": 8036,
                "nodeType": "StructuredDocumentation",
                "src": "839:320:31",
                "text": " @dev Base contract for Pool factories.\n Pools are deployed from factories to allow third parties to reason about them. Unknown Pools may have arbitrary\n logic: being able to assert that a Pool's behavior follows certain rules (those imposed by the contracts created by\n the factory) is very powerful."
              },
              "fullyImplemented": true,
              "id": 8096,
              "linearizedBaseContracts": [
                8096
              ],
              "name": "BasePoolFactory",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": false,
                  "id": 8038,
                  "mutability": "immutable",
                  "name": "_vault",
                  "nodeType": "VariableDeclaration",
                  "scope": 8096,
                  "src": "1200:31:31",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IVault_$21266",
                    "typeString": "contract IVault"
                  },
                  "typeName": {
                    "id": 8037,
                    "name": "IVault",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21266,
                    "src": "1200:6:31",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IVault_$21266",
                      "typeString": "contract IVault"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 8042,
                  "mutability": "mutable",
                  "name": "_isPoolFromFactory",
                  "nodeType": "VariableDeclaration",
                  "scope": 8096,
                  "src": "1237:51:31",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                    "typeString": "mapping(address => bool)"
                  },
                  "typeName": {
                    "id": 8041,
                    "keyType": {
                      "id": 8039,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "1245:7:31",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1237:24:31",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                      "typeString": "mapping(address => bool)"
                    },
                    "valueType": {
                      "id": 8040,
                      "name": "bool",
                      "nodeType": "ElementaryTypeName",
                      "src": "1256:4:31",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "anonymous": false,
                  "id": 8046,
                  "name": "PoolCreated",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 8045,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8044,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "pool",
                        "nodeType": "VariableDeclaration",
                        "scope": 8046,
                        "src": "1313:20:31",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 8043,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1313:7:31",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1312:22:31"
                  },
                  "src": "1295:40:31"
                },
                {
                  "body": {
                    "id": 8055,
                    "nodeType": "Block",
                    "src": "1367:31:31",
                    "statements": [
                      {
                        "expression": {
                          "id": 8053,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 8051,
                            "name": "_vault",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8038,
                            "src": "1377:6:31",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IVault_$21266",
                              "typeString": "contract IVault"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 8052,
                            "name": "vault",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8048,
                            "src": "1386:5:31",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IVault_$21266",
                              "typeString": "contract IVault"
                            }
                          },
                          "src": "1377:14:31",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "id": 8054,
                        "nodeType": "ExpressionStatement",
                        "src": "1377:14:31"
                      }
                    ]
                  },
                  "id": 8056,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8049,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8048,
                        "mutability": "mutable",
                        "name": "vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 8056,
                        "src": "1353:12:31",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 8047,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "1353:6:31",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1352:14:31"
                  },
                  "returnParameters": {
                    "id": 8050,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1367:0:31"
                  },
                  "scope": 8096,
                  "src": "1341:57:31",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 8064,
                    "nodeType": "Block",
                    "src": "1510:30:31",
                    "statements": [
                      {
                        "expression": {
                          "id": 8062,
                          "name": "_vault",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8038,
                          "src": "1527:6:31",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "functionReturnParameters": 8061,
                        "id": 8063,
                        "nodeType": "Return",
                        "src": "1520:13:31"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 8057,
                    "nodeType": "StructuredDocumentation",
                    "src": "1404:52:31",
                    "text": " @dev Returns the Vault's address."
                  },
                  "functionSelector": "8d928af8",
                  "id": 8065,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getVault",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8058,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1478:2:31"
                  },
                  "returnParameters": {
                    "id": 8061,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8060,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8065,
                        "src": "1502:6:31",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 8059,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "1502:6:31",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1501:8:31"
                  },
                  "scope": 8096,
                  "src": "1461:79:31",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 8077,
                    "nodeType": "Block",
                    "src": "1696:48:31",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "id": 8073,
                            "name": "_isPoolFromFactory",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8042,
                            "src": "1713:18:31",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                              "typeString": "mapping(address => bool)"
                            }
                          },
                          "id": 8075,
                          "indexExpression": {
                            "id": 8074,
                            "name": "pool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8068,
                            "src": "1732:4:31",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "1713:24:31",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 8072,
                        "id": 8076,
                        "nodeType": "Return",
                        "src": "1706:31:31"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 8066,
                    "nodeType": "StructuredDocumentation",
                    "src": "1546:75:31",
                    "text": " @dev Returns true if `pool` was created by this factory."
                  },
                  "functionSelector": "6634b753",
                  "id": 8078,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "isPoolFromFactory",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8069,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8068,
                        "mutability": "mutable",
                        "name": "pool",
                        "nodeType": "VariableDeclaration",
                        "scope": 8078,
                        "src": "1653:12:31",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 8067,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1653:7:31",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1652:14:31"
                  },
                  "returnParameters": {
                    "id": 8072,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8071,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8078,
                        "src": "1690:4:31",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 8070,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "1690:4:31",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1689:6:31"
                  },
                  "scope": 8096,
                  "src": "1626:118:31",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 8094,
                    "nodeType": "Block",
                    "src": "1893:80:31",
                    "statements": [
                      {
                        "expression": {
                          "id": 8088,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 8084,
                              "name": "_isPoolFromFactory",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8042,
                              "src": "1903:18:31",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                                "typeString": "mapping(address => bool)"
                              }
                            },
                            "id": 8086,
                            "indexExpression": {
                              "id": 8085,
                              "name": "pool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8081,
                              "src": "1922:4:31",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "1903:24:31",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "hexValue": "74727565",
                            "id": 8087,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1930:4:31",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "true"
                          },
                          "src": "1903:31:31",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8089,
                        "nodeType": "ExpressionStatement",
                        "src": "1903:31:31"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 8091,
                              "name": "pool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8081,
                              "src": "1961:4:31",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 8090,
                            "name": "PoolCreated",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8046,
                            "src": "1949:11:31",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
                              "typeString": "function (address)"
                            }
                          },
                          "id": 8092,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1949:17:31",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 8093,
                        "nodeType": "EmitStatement",
                        "src": "1944:22:31"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 8079,
                    "nodeType": "StructuredDocumentation",
                    "src": "1750:96:31",
                    "text": " @dev Registers a new created pool.\n Emits a `PoolCreated` event."
                  },
                  "id": 8095,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_register",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8082,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8081,
                        "mutability": "mutable",
                        "name": "pool",
                        "nodeType": "VariableDeclaration",
                        "scope": 8095,
                        "src": "1870:12:31",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 8080,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1870:7:31",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1869:14:31"
                  },
                  "returnParameters": {
                    "id": 8083,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1893:0:31"
                  },
                  "scope": 8096,
                  "src": "1851:122:31",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 8097,
              "src": "1160:815:31"
            }
          ],
          "src": "688:1288:31"
        },
        "id": 31
      },
      "src.sol/amm/pools/factories/FactoryWidePauseWindow.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/factories/FactoryWidePauseWindow.sol",
          "exportedSymbols": {
            "FactoryWidePauseWindow": [
              8158
            ]
          },
          "id": 8159,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 8098,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:32"
            },
            {
              "id": 8099,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:32"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "documentation": {
                "id": 8100,
                "nodeType": "StructuredDocumentation",
                "src": "747:337:32",
                "text": " @dev Utility to create Pool factories for Pools that use the `TemporarilyPausable` contract.\n By calling `TemporarilyPausable`'s constructor with the result of `getPauseConfiguration`, all Pools created by this\n factory will share the same Pause Window end time, after which both old and new Pools will not be pausable."
              },
              "fullyImplemented": true,
              "id": 8158,
              "linearizedBaseContracts": [
                8158
              ],
              "name": "FactoryWidePauseWindow",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": true,
                  "id": 8103,
                  "mutability": "constant",
                  "name": "_INITIAL_PAUSE_WINDOW_DURATION",
                  "nodeType": "VariableDeclaration",
                  "scope": 8158,
                  "src": "1279:65:32",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8101,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1279:7:32",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "3930",
                    "id": 8102,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1337:7:32",
                    "subdenomination": "days",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_7776000_by_1",
                      "typeString": "int_const 7776000"
                    },
                    "value": "90"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 8106,
                  "mutability": "constant",
                  "name": "_BUFFER_PERIOD_DURATION",
                  "nodeType": "VariableDeclaration",
                  "scope": 8158,
                  "src": "1350:58:32",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8104,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1350:7:32",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "3330",
                    "id": 8105,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1401:7:32",
                    "subdenomination": "days",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_2592000_by_1",
                      "typeString": "int_const 2592000"
                    },
                    "value": "30"
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 8108,
                  "mutability": "immutable",
                  "name": "_poolsPauseWindowEndTime",
                  "nodeType": "VariableDeclaration",
                  "scope": 8158,
                  "src": "1544:50:32",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8107,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1544:7:32",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 8118,
                    "nodeType": "Block",
                    "src": "1615:92:32",
                    "statements": [
                      {
                        "expression": {
                          "id": 8116,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 8111,
                            "name": "_poolsPauseWindowEndTime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8108,
                            "src": "1625:24:32",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 8115,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "expression": {
                                "id": 8112,
                                "name": "block",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -4,
                                "src": "1652:5:32",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_block",
                                  "typeString": "block"
                                }
                              },
                              "id": 8113,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "timestamp",
                              "nodeType": "MemberAccess",
                              "src": "1652:15:32",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "+",
                            "rightExpression": {
                              "id": 8114,
                              "name": "_INITIAL_PAUSE_WINDOW_DURATION",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8103,
                              "src": "1670:30:32",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1652:48:32",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1625:75:32",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 8117,
                        "nodeType": "ExpressionStatement",
                        "src": "1625:75:32"
                      }
                    ]
                  },
                  "id": 8119,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8109,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1612:2:32"
                  },
                  "returnParameters": {
                    "id": 8110,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1615:0:32"
                  },
                  "scope": 8158,
                  "src": "1601:106:32",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 8156,
                    "nodeType": "Block",
                    "src": "2179:774:32",
                    "statements": [
                      {
                        "assignments": [
                          8128
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8128,
                            "mutability": "mutable",
                            "name": "currentTime",
                            "nodeType": "VariableDeclaration",
                            "scope": 8156,
                            "src": "2189:19:32",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8127,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2189:7:32",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8131,
                        "initialValue": {
                          "expression": {
                            "id": 8129,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -4,
                            "src": "2211:5:32",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 8130,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "timestamp",
                          "nodeType": "MemberAccess",
                          "src": "2211:15:32",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2189:37:32"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8134,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8132,
                            "name": "currentTime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8128,
                            "src": "2240:11:32",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "id": 8133,
                            "name": "_poolsPauseWindowEndTime",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8108,
                            "src": "2254:24:32",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2240:38:32",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 8154,
                          "nodeType": "Block",
                          "src": "2700:247:32",
                          "statements": [
                            {
                              "expression": {
                                "id": 8148,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8146,
                                  "name": "pauseWindowDuration",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8123,
                                  "src": "2875:19:32",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "hexValue": "30",
                                  "id": 8147,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2897:1:32",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "2875:23:32",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8149,
                              "nodeType": "ExpressionStatement",
                              "src": "2875:23:32"
                            },
                            {
                              "expression": {
                                "id": 8152,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8150,
                                  "name": "bufferPeriodDuration",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8125,
                                  "src": "2912:20:32",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "hexValue": "30",
                                  "id": 8151,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2935:1:32",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "2912:24:32",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8153,
                              "nodeType": "ExpressionStatement",
                              "src": "2912:24:32"
                            }
                          ]
                        },
                        "id": 8155,
                        "nodeType": "IfStatement",
                        "src": "2236:711:32",
                        "trueBody": {
                          "id": 8145,
                          "nodeType": "Block",
                          "src": "2280:414:32",
                          "statements": [
                            {
                              "expression": {
                                "id": 8139,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8135,
                                  "name": "pauseWindowDuration",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8123,
                                  "src": "2528:19:32",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 8138,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 8136,
                                    "name": "_poolsPauseWindowEndTime",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8108,
                                    "src": "2550:24:32",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "id": 8137,
                                    "name": "currentTime",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8128,
                                    "src": "2577:11:32",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "2550:38:32",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2528:60:32",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8140,
                              "nodeType": "ExpressionStatement",
                              "src": "2528:60:32"
                            },
                            {
                              "expression": {
                                "id": 8143,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8141,
                                  "name": "bufferPeriodDuration",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8125,
                                  "src": "2637:20:32",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 8142,
                                  "name": "_BUFFER_PERIOD_DURATION",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8106,
                                  "src": "2660:23:32",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2637:46:32",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8144,
                              "nodeType": "ExpressionStatement",
                              "src": "2637:46:32"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 8120,
                    "nodeType": "StructuredDocumentation",
                    "src": "1713:348:32",
                    "text": " @dev Returns the current `TemporarilyPausable` configuration that will be applied to Pools created by this\n factory.\n `pauseWindowDuration` will decrease over time until it reaches zero, at which point both it and\n `bufferPeriodDuration` will be zero forever, meaning deployed Pools will not be pausable."
                  },
                  "functionSelector": "2da47c40",
                  "id": 8157,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getPauseConfiguration",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8121,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2096:2:32"
                  },
                  "returnParameters": {
                    "id": 8126,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8123,
                        "mutability": "mutable",
                        "name": "pauseWindowDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 8157,
                        "src": "2120:27:32",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8122,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2120:7:32",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8125,
                        "mutability": "mutable",
                        "name": "bufferPeriodDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 8157,
                        "src": "2149:28:32",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8124,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2149:7:32",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2119:59:32"
                  },
                  "scope": 8158,
                  "src": "2066:887:32",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                }
              ],
              "scope": 8159,
              "src": "1085:1870:32"
            }
          ],
          "src": "688:2268:32"
        },
        "id": 32
      },
      "src.sol/amm/pools/stable/StableMath.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/stable/StableMath.sol",
          "exportedSymbols": {
            "StableMath": [
              9486
            ]
          },
          "id": 9487,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 8160,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:33"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../../lib/math/Math.sol",
              "id": 8161,
              "nodeType": "ImportDirective",
              "scope": 9487,
              "sourceUnit": 3351,
              "src": "713:33:33",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
              "file": "../../lib/math/FixedPoint.sol",
              "id": 8162,
              "nodeType": "ImportDirective",
              "scope": 9487,
              "sourceUnit": 1816,
              "src": "747:39:33",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 9486,
              "linearizedBaseContracts": [
                9486
              ],
              "name": "StableMath",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 8165,
                  "libraryName": {
                    "id": 8163,
                    "name": "FixedPoint",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1815,
                    "src": "1026:10:33",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FixedPoint_$1815",
                      "typeString": "library FixedPoint"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1020:29:33",
                  "typeName": {
                    "id": 8164,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1041:7:33",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "constant": true,
                  "id": 8168,
                  "mutability": "constant",
                  "name": "_MIN_AMP",
                  "nodeType": "VariableDeclaration",
                  "scope": 9486,
                  "src": "1055:41:33",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8166,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1055:7:33",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "31653138",
                    "id": 8167,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1092:4:33",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1000000000000000000_by_1",
                      "typeString": "int_const 1000000000000000000"
                    },
                    "value": "1e18"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 8174,
                  "mutability": "constant",
                  "name": "_MAX_AMP",
                  "nodeType": "VariableDeclaration",
                  "scope": 9486,
                  "src": "1102:50:33",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8169,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1102:7:33",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "commonType": {
                      "typeIdentifier": "t_rational_5000000000000000000000_by_1",
                      "typeString": "int_const 5000000000000000000000"
                    },
                    "id": 8173,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "leftExpression": {
                      "hexValue": "35303030",
                      "id": 8170,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1139:4:33",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_5000_by_1",
                        "typeString": "int_const 5000"
                      },
                      "value": "5000"
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "*",
                    "rightExpression": {
                      "components": [
                        {
                          "hexValue": "31653138",
                          "id": 8171,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1147:4:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1000000000000000000_by_1",
                            "typeString": "int_const 1000000000000000000"
                          },
                          "value": "1e18"
                        }
                      ],
                      "id": 8172,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "1146:6:33",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1000000000000000000_by_1",
                        "typeString": "int_const 1000000000000000000"
                      }
                    },
                    "src": "1139:13:33",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_5000000000000000000000_by_1",
                      "typeString": "int_const 5000000000000000000000"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 8177,
                  "mutability": "constant",
                  "name": "_MAX_STABLE_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 9486,
                  "src": "1159:48:33",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8175,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1159:7:33",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "35",
                    "id": 8176,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1206:1:33",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_5_by_1",
                      "typeString": "int_const 5"
                    },
                    "value": "5"
                  },
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 8365,
                    "nodeType": "Block",
                    "src": "1513:2101:33",
                    "statements": [
                      {
                        "assignments": [
                          8188
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8188,
                            "mutability": "mutable",
                            "name": "sum",
                            "nodeType": "VariableDeclaration",
                            "scope": 8365,
                            "src": "2395:11:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8187,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2395:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8190,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 8189,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2409:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2395:15:33"
                      },
                      {
                        "assignments": [
                          8192
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8192,
                            "mutability": "mutable",
                            "name": "numTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 8365,
                            "src": "2420:17:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8191,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2420:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8195,
                        "initialValue": {
                          "expression": {
                            "id": 8193,
                            "name": "balances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8182,
                            "src": "2440:8:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "id": 8194,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "2440:15:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2420:35:33"
                      },
                      {
                        "body": {
                          "id": 8215,
                          "nodeType": "Block",
                          "src": "2505:51:33",
                          "statements": [
                            {
                              "expression": {
                                "id": 8213,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8206,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8188,
                                  "src": "2519:3:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 8209,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8182,
                                        "src": "2533:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 8211,
                                      "indexExpression": {
                                        "id": 8210,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8197,
                                        "src": "2542:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "2533:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8207,
                                      "name": "sum",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8188,
                                      "src": "2525:3:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8208,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "2525:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8212,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2525:20:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2519:26:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8214,
                              "nodeType": "ExpressionStatement",
                              "src": "2519:26:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8202,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8200,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8197,
                            "src": "2485:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "id": 8201,
                            "name": "numTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8192,
                            "src": "2489:9:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2485:13:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8216,
                        "initializationExpression": {
                          "assignments": [
                            8197
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8197,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 8216,
                              "src": "2470:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8196,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2470:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8199,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8198,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2482:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2470:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8204,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2500:3:33",
                            "subExpression": {
                              "id": 8203,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8197,
                              "src": "2500:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8205,
                          "nodeType": "ExpressionStatement",
                          "src": "2500:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "2465:91:33"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8219,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8217,
                            "name": "sum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8188,
                            "src": "2569:3:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 8218,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2576:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2569:8:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8223,
                        "nodeType": "IfStatement",
                        "src": "2565:47:33",
                        "trueBody": {
                          "id": 8222,
                          "nodeType": "Block",
                          "src": "2579:33:33",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 8220,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2600:1:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 8186,
                              "id": 8221,
                              "nodeType": "Return",
                              "src": "2593:8:33"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          8225
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8225,
                            "mutability": "mutable",
                            "name": "prevInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 8365,
                            "src": "2621:21:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8224,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2621:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8227,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 8226,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2645:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2621:25:33"
                      },
                      {
                        "assignments": [
                          8229
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8229,
                            "mutability": "mutable",
                            "name": "invariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 8365,
                            "src": "2656:17:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8228,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2656:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8231,
                        "initialValue": {
                          "id": 8230,
                          "name": "sum",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8188,
                          "src": "2676:3:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2656:23:33"
                      },
                      {
                        "assignments": [
                          8233
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8233,
                            "mutability": "mutable",
                            "name": "ampTimesTotal",
                            "nodeType": "VariableDeclaration",
                            "scope": 8365,
                            "src": "2689:21:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8232,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2689:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8239,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8236,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8179,
                              "src": "2722:22:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8237,
                              "name": "numTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8192,
                              "src": "2746:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 8234,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "2713:4:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 8235,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mul",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3292,
                            "src": "2713:8:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8238,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2713:43:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2689:67:33"
                      },
                      {
                        "body": {
                          "id": 8361,
                          "nodeType": "Block",
                          "src": "2801:781:33",
                          "statements": [
                            {
                              "assignments": [
                                8251
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 8251,
                                  "mutability": "mutable",
                                  "name": "P_D",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 8361,
                                  "src": "2815:11:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 8250,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2815:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 8259,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 8254,
                                    "name": "numTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8192,
                                    "src": "2838:9:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 8255,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8182,
                                      "src": "2849:8:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    "id": 8257,
                                    "indexExpression": {
                                      "hexValue": "30",
                                      "id": 8256,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "2858:1:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      "value": "0"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2849:11:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 8252,
                                    "name": "Math",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3350,
                                    "src": "2829:4:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                      "typeString": "type(library Math)"
                                    }
                                  },
                                  "id": 8253,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mul",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3292,
                                  "src": "2829:8:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 8258,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2829:32:33",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2815:46:33"
                            },
                            {
                              "body": {
                                "id": 8288,
                                "nodeType": "Block",
                                "src": "2915:109:33",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 8286,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 8270,
                                        "name": "P_D",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8251,
                                        "src": "2933:3:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "arguments": [
                                          {
                                            "arguments": [
                                              {
                                                "arguments": [
                                                  {
                                                    "id": 8277,
                                                    "name": "P_D",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 8251,
                                                    "src": "2968:3:33",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  },
                                                  {
                                                    "baseExpression": {
                                                      "id": 8278,
                                                      "name": "balances",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 8182,
                                                      "src": "2973:8:33",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                                        "typeString": "uint256[] memory"
                                                      }
                                                    },
                                                    "id": 8280,
                                                    "indexExpression": {
                                                      "id": 8279,
                                                      "name": "j",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 8261,
                                                      "src": "2982:1:33",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      }
                                                    },
                                                    "isConstant": false,
                                                    "isLValue": true,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "nodeType": "IndexAccess",
                                                    "src": "2973:11:33",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  }
                                                ],
                                                "expression": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    },
                                                    {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  ],
                                                  "expression": {
                                                    "id": 8275,
                                                    "name": "Math",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 3350,
                                                    "src": "2959:4:33",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                      "typeString": "type(library Math)"
                                                    }
                                                  },
                                                  "id": 8276,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "mul",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 3292,
                                                  "src": "2959:8:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                  }
                                                },
                                                "id": 8281,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "2959:26:33",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              {
                                                "id": 8282,
                                                "name": "numTokens",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 8192,
                                                "src": "2987:9:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "expression": {
                                                "id": 8273,
                                                "name": "Math",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 3350,
                                                "src": "2950:4:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                  "typeString": "type(library Math)"
                                                }
                                              },
                                              "id": 8274,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "mul",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 3292,
                                              "src": "2950:8:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                                              }
                                            },
                                            "id": 8283,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "2950:47:33",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          {
                                            "id": 8284,
                                            "name": "invariant",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8229,
                                            "src": "2999:9:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "id": 8271,
                                            "name": "Math",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 3350,
                                            "src": "2939:4:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                              "typeString": "type(library Math)"
                                            }
                                          },
                                          "id": 8272,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "divUp",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 3349,
                                          "src": "2939:10:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 8285,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "2939:70:33",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "2933:76:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8287,
                                    "nodeType": "ExpressionStatement",
                                    "src": "2933:76:33"
                                  }
                                ]
                              },
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 8266,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 8264,
                                  "name": "j",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8261,
                                  "src": "2895:1:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "id": 8265,
                                  "name": "numTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8192,
                                  "src": "2899:9:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2895:13:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 8289,
                              "initializationExpression": {
                                "assignments": [
                                  8261
                                ],
                                "declarations": [
                                  {
                                    "constant": false,
                                    "id": 8261,
                                    "mutability": "mutable",
                                    "name": "j",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 8289,
                                    "src": "2880:9:33",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "typeName": {
                                      "id": 8260,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2880:7:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "visibility": "internal"
                                  }
                                ],
                                "id": 8263,
                                "initialValue": {
                                  "hexValue": "31",
                                  "id": 8262,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2892:1:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "nodeType": "VariableDeclarationStatement",
                                "src": "2880:13:33"
                              },
                              "loopExpression": {
                                "expression": {
                                  "id": 8268,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "UnaryOperation",
                                  "operator": "++",
                                  "prefix": false,
                                  "src": "2910:3:33",
                                  "subExpression": {
                                    "id": 8267,
                                    "name": "j",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8261,
                                    "src": "2910:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 8269,
                                "nodeType": "ExpressionStatement",
                                "src": "2910:3:33"
                              },
                              "nodeType": "ForStatement",
                              "src": "2875:149:33"
                            },
                            {
                              "expression": {
                                "id": 8292,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8290,
                                  "name": "prevInvariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8225,
                                  "src": "3037:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 8291,
                                  "name": "invariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8229,
                                  "src": "3053:9:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3037:25:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8293,
                              "nodeType": "ExpressionStatement",
                              "src": "3037:25:33"
                            },
                            {
                              "expression": {
                                "id": 8336,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8294,
                                  "name": "invariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8229,
                                  "src": "3076:9:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "arguments": [
                                            {
                                              "arguments": [
                                                {
                                                  "id": 8311,
                                                  "name": "ampTimesTotal",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8233,
                                                  "src": "3190:13:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                {
                                                  "id": 8312,
                                                  "name": "sum",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8188,
                                                  "src": "3205:3:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  },
                                                  {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                ],
                                                "expression": {
                                                  "id": 8309,
                                                  "name": "Math",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 3350,
                                                  "src": "3181:4:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                    "typeString": "type(library Math)"
                                                  }
                                                },
                                                "id": 8310,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "mul",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 3292,
                                                "src": "3181:8:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                }
                                              },
                                              "id": 8313,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "3181:28:33",
                                              "tryCall": false,
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            {
                                              "id": 8314,
                                              "name": "P_D",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 8251,
                                              "src": "3211:3:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "id": 8307,
                                              "name": "Math",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3350,
                                              "src": "3172:4:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                "typeString": "type(library Math)"
                                              }
                                            },
                                            "id": 8308,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "mul",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 3292,
                                            "src": "3172:8:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 8315,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "3172:43:33",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "arguments": [
                                            {
                                              "arguments": [
                                                {
                                                  "id": 8301,
                                                  "name": "numTokens",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8192,
                                                  "src": "3134:9:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                {
                                                  "id": 8302,
                                                  "name": "invariant",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8229,
                                                  "src": "3145:9:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  },
                                                  {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                ],
                                                "expression": {
                                                  "id": 8299,
                                                  "name": "Math",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 3350,
                                                  "src": "3125:4:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                    "typeString": "type(library Math)"
                                                  }
                                                },
                                                "id": 8300,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "mul",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 3292,
                                                "src": "3125:8:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                }
                                              },
                                              "id": 8303,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "3125:30:33",
                                              "tryCall": false,
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            {
                                              "id": 8304,
                                              "name": "invariant",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 8229,
                                              "src": "3157:9:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "id": 8297,
                                              "name": "Math",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3350,
                                              "src": "3116:4:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                "typeString": "type(library Math)"
                                              }
                                            },
                                            "id": 8298,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "mul",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 3292,
                                            "src": "3116:8:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 8305,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "3116:51:33",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 8306,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "add",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1512,
                                        "src": "3116:55:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 8316,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3116:100:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "arguments": [
                                            {
                                              "arguments": [
                                                {
                                                  "hexValue": "31",
                                                  "id": 8330,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": true,
                                                  "kind": "number",
                                                  "lValueRequested": false,
                                                  "nodeType": "Literal",
                                                  "src": "3303:1:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_rational_1_by_1",
                                                    "typeString": "int_const 1"
                                                  },
                                                  "value": "1"
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_rational_1_by_1",
                                                    "typeString": "int_const 1"
                                                  }
                                                ],
                                                "expression": {
                                                  "id": 8328,
                                                  "name": "ampTimesTotal",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8233,
                                                  "src": "3285:13:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "id": 8329,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "sub",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 1538,
                                                "src": "3285:17:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                }
                                              },
                                              "id": 8331,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "3285:20:33",
                                              "tryCall": false,
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            {
                                              "id": 8332,
                                              "name": "P_D",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 8251,
                                              "src": "3307:3:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "id": 8326,
                                              "name": "Math",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3350,
                                              "src": "3276:4:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                "typeString": "type(library Math)"
                                              }
                                            },
                                            "id": 8327,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "mul",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 3292,
                                            "src": "3276:8:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 8333,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "3276:35:33",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "arguments": [
                                            {
                                              "arguments": [
                                                {
                                                  "hexValue": "31",
                                                  "id": 8321,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": true,
                                                  "kind": "number",
                                                  "lValueRequested": false,
                                                  "nodeType": "Literal",
                                                  "src": "3257:1:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_rational_1_by_1",
                                                    "typeString": "int_const 1"
                                                  },
                                                  "value": "1"
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_rational_1_by_1",
                                                    "typeString": "int_const 1"
                                                  }
                                                ],
                                                "expression": {
                                                  "id": 8319,
                                                  "name": "numTokens",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8192,
                                                  "src": "3243:9:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "id": 8320,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "add",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 1512,
                                                "src": "3243:13:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                }
                                              },
                                              "id": 8322,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "3243:16:33",
                                              "tryCall": false,
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            {
                                              "id": 8323,
                                              "name": "invariant",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 8229,
                                              "src": "3261:9:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "id": 8317,
                                              "name": "Math",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3350,
                                              "src": "3234:4:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                "typeString": "type(library Math)"
                                              }
                                            },
                                            "id": 8318,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "mul",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 3292,
                                            "src": "3234:8:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 8324,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "3234:37:33",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 8325,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "add",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1512,
                                        "src": "3234:41:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 8334,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3234:78:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8295,
                                      "name": "Math",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3350,
                                      "src": "3088:4:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                        "typeString": "type(library Math)"
                                      }
                                    },
                                    "id": 8296,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divUp",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3349,
                                    "src": "3088:10:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8335,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3088:238:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3076:250:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8337,
                              "nodeType": "ExpressionStatement",
                              "src": "3076:250:33"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 8340,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 8338,
                                  "name": "invariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8229,
                                  "src": "3345:9:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">",
                                "rightExpression": {
                                  "id": 8339,
                                  "name": "prevInvariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8225,
                                  "src": "3357:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3345:25:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "condition": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 8356,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "arguments": [
                                      {
                                        "id": 8353,
                                        "name": "invariant",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8229,
                                        "src": "3517:9:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "id": 8351,
                                        "name": "prevInvariant",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8225,
                                        "src": "3499:13:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 8352,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sub",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 1538,
                                      "src": "3499:17:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                                      }
                                    },
                                    "id": 8354,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "3499:28:33",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "<=",
                                  "rightExpression": {
                                    "hexValue": "31",
                                    "id": 8355,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "3531:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "3499:33:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "id": 8359,
                                "nodeType": "IfStatement",
                                "src": "3495:77:33",
                                "trueBody": {
                                  "id": 8358,
                                  "nodeType": "Block",
                                  "src": "3534:38:33",
                                  "statements": [
                                    {
                                      "id": 8357,
                                      "nodeType": "Break",
                                      "src": "3552:5:33"
                                    }
                                  ]
                                }
                              },
                              "id": 8360,
                              "nodeType": "IfStatement",
                              "src": "3341:231:33",
                              "trueBody": {
                                "id": 8350,
                                "nodeType": "Block",
                                "src": "3372:117:33",
                                "statements": [
                                  {
                                    "condition": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 8346,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "arguments": [
                                          {
                                            "id": 8343,
                                            "name": "prevInvariant",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8225,
                                            "src": "3408:13:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "id": 8341,
                                            "name": "invariant",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8229,
                                            "src": "3394:9:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 8342,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "sub",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 1538,
                                          "src": "3394:13:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 8344,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "3394:28:33",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "<=",
                                      "rightExpression": {
                                        "hexValue": "31",
                                        "id": 8345,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "3426:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        },
                                        "value": "1"
                                      },
                                      "src": "3394:33:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "id": 8349,
                                    "nodeType": "IfStatement",
                                    "src": "3390:85:33",
                                    "trueBody": {
                                      "id": 8348,
                                      "nodeType": "Block",
                                      "src": "3429:46:33",
                                      "statements": [
                                        {
                                          "id": 8347,
                                          "nodeType": "Break",
                                          "src": "3451:5:33"
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8246,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8244,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8241,
                            "src": "2787:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "hexValue": "323535",
                            "id": 8245,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2791:3:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_255_by_1",
                              "typeString": "int_const 255"
                            },
                            "value": "255"
                          },
                          "src": "2787:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8362,
                        "initializationExpression": {
                          "assignments": [
                            8241
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8241,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 8362,
                              "src": "2772:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8240,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2772:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8243,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8242,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2784:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2772:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8248,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2796:3:33",
                            "subExpression": {
                              "id": 8247,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8241,
                              "src": "2796:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8249,
                          "nodeType": "ExpressionStatement",
                          "src": "2796:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "2767:815:33"
                      },
                      {
                        "expression": {
                          "id": 8363,
                          "name": "invariant",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8229,
                          "src": "3598:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 8186,
                        "id": 8364,
                        "nodeType": "Return",
                        "src": "3591:16:33"
                      }
                    ]
                  },
                  "id": 8366,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calculateInvariant",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8183,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8179,
                        "mutability": "mutable",
                        "name": "amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 8366,
                        "src": "1394:30:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8178,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1394:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8182,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 8366,
                        "src": "1426:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 8180,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1426:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8181,
                          "nodeType": "ArrayTypeName",
                          "src": "1426:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1393:59:33"
                  },
                  "returnParameters": {
                    "id": 8186,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8185,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8366,
                        "src": "1500:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8184,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1500:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1499:9:33"
                  },
                  "scope": 9486,
                  "src": "1365:2249:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 8430,
                    "nodeType": "Block",
                    "src": "4019:1888:33",
                    "statements": [
                      {
                        "assignments": [
                          8383
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8383,
                            "mutability": "mutable",
                            "name": "invariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 8430,
                            "src": "5400:17:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8382,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5400:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8388,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8385,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8368,
                              "src": "5440:22:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8386,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8371,
                              "src": "5464:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 8384,
                            "name": "_calculateInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8366,
                            "src": "5420:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 8387,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5420:53:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5400:73:33"
                      },
                      {
                        "expression": {
                          "id": 8398,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 8389,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8371,
                              "src": "5484:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8391,
                            "indexExpression": {
                              "id": 8390,
                              "name": "tokenIndexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8373,
                              "src": "5493:12:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "5484:22:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 8396,
                                "name": "tokenAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8377,
                                "src": "5536:13:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 8392,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8371,
                                  "src": "5509:8:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 8394,
                                "indexExpression": {
                                  "id": 8393,
                                  "name": "tokenIndexIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8373,
                                  "src": "5518:12:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "5509:22:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8395,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1512,
                              "src": "5509:26:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 8397,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5509:41:33",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5484:66:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 8399,
                        "nodeType": "ExpressionStatement",
                        "src": "5484:66:33"
                      },
                      {
                        "assignments": [
                          8401
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8401,
                            "mutability": "mutable",
                            "name": "finalBalanceOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 8430,
                            "src": "5561:23:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8400,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5561:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8408,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8403,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8368,
                              "src": "5650:22:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8404,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8371,
                              "src": "5686:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 8405,
                              "name": "invariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8383,
                              "src": "5708:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8406,
                              "name": "tokenIndexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8375,
                              "src": "5731:13:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 8402,
                            "name": "_getTokenBalanceGivenInvariantAndAllOtherBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9485,
                            "src": "5587:49:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8407,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5587:167:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5561:193:33"
                      },
                      {
                        "expression": {
                          "id": 8418,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 8409,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8371,
                              "src": "5765:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8411,
                            "indexExpression": {
                              "id": 8410,
                              "name": "tokenIndexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8373,
                              "src": "5774:12:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "5765:22:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 8416,
                                "name": "tokenAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8377,
                                "src": "5817:13:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 8412,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8371,
                                  "src": "5790:8:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 8414,
                                "indexExpression": {
                                  "id": 8413,
                                  "name": "tokenIndexIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8373,
                                  "src": "5799:12:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "5790:22:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8415,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1538,
                              "src": "5790:26:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 8417,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5790:41:33",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5765:66:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 8419,
                        "nodeType": "ExpressionStatement",
                        "src": "5765:66:33"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "hexValue": "31",
                              "id": 8427,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5898:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 8424,
                                  "name": "finalBalanceOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8401,
                                  "src": "5877:15:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "baseExpression": {
                                    "id": 8420,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8371,
                                    "src": "5849:8:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 8422,
                                  "indexExpression": {
                                    "id": 8421,
                                    "name": "tokenIndexOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8375,
                                    "src": "5858:13:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "5849:23:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 8423,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sub",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1538,
                                "src": "5849:27:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 8425,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5849:44:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8426,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1538,
                            "src": "5849:48:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8428,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5849:51:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 8381,
                        "id": 8429,
                        "nodeType": "Return",
                        "src": "5842:58:33"
                      }
                    ]
                  },
                  "id": 8431,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcOutGivenIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8378,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8368,
                        "mutability": "mutable",
                        "name": "amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 8431,
                        "src": "3823:30:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8367,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3823:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8371,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 8431,
                        "src": "3863:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 8369,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "3863:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8370,
                          "nodeType": "ArrayTypeName",
                          "src": "3863:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8373,
                        "mutability": "mutable",
                        "name": "tokenIndexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 8431,
                        "src": "3898:20:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8372,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3898:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8375,
                        "mutability": "mutable",
                        "name": "tokenIndexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 8431,
                        "src": "3928:21:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8374,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3928:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8377,
                        "mutability": "mutable",
                        "name": "tokenAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 8431,
                        "src": "3959:21:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8376,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3959:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3813:173:33"
                  },
                  "returnParameters": {
                    "id": 8381,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8380,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8431,
                        "src": "4010:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8379,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4010:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4009:9:33"
                  },
                  "scope": 9486,
                  "src": "3789:2118:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 8495,
                    "nodeType": "Block",
                    "src": "6356:1887:33",
                    "statements": [
                      {
                        "assignments": [
                          8448
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8448,
                            "mutability": "mutable",
                            "name": "invariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 8495,
                            "src": "7734:17:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8447,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7734:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8453,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8450,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8433,
                              "src": "7774:22:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8451,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8436,
                              "src": "7798:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 8449,
                            "name": "_calculateInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8366,
                            "src": "7754:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 8452,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7754:53:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7734:73:33"
                      },
                      {
                        "expression": {
                          "id": 8463,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 8454,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8436,
                              "src": "7818:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8456,
                            "indexExpression": {
                              "id": 8455,
                              "name": "tokenIndexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8440,
                              "src": "7827:13:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "7818:23:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 8461,
                                "name": "tokenAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8442,
                                "src": "7872:14:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 8457,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8436,
                                  "src": "7844:8:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 8459,
                                "indexExpression": {
                                  "id": 8458,
                                  "name": "tokenIndexOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8440,
                                  "src": "7853:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "7844:23:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8460,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1538,
                              "src": "7844:27:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 8462,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7844:43:33",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7818:69:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 8464,
                        "nodeType": "ExpressionStatement",
                        "src": "7818:69:33"
                      },
                      {
                        "assignments": [
                          8466
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8466,
                            "mutability": "mutable",
                            "name": "finalBalanceIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 8495,
                            "src": "7898:22:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8465,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7898:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8473,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8468,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8433,
                              "src": "7986:22:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8469,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8436,
                              "src": "8022:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 8470,
                              "name": "invariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8448,
                              "src": "8044:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8471,
                              "name": "tokenIndexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8438,
                              "src": "8067:12:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 8467,
                            "name": "_getTokenBalanceGivenInvariantAndAllOtherBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9485,
                            "src": "7923:49:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8472,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7923:166:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7898:191:33"
                      },
                      {
                        "expression": {
                          "id": 8483,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 8474,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8436,
                              "src": "8100:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8476,
                            "indexExpression": {
                              "id": 8475,
                              "name": "tokenIndexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8440,
                              "src": "8109:13:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "8100:23:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 8481,
                                "name": "tokenAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8442,
                                "src": "8154:14:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 8477,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8436,
                                  "src": "8126:8:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 8479,
                                "indexExpression": {
                                  "id": 8478,
                                  "name": "tokenIndexOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8440,
                                  "src": "8135:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "8126:23:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8480,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1512,
                              "src": "8126:27:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 8482,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8126:43:33",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8100:69:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 8484,
                        "nodeType": "ExpressionStatement",
                        "src": "8100:69:33"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "hexValue": "31",
                              "id": 8492,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "8234:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "baseExpression": {
                                    "id": 8487,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8436,
                                    "src": "8206:8:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 8489,
                                  "indexExpression": {
                                    "id": 8488,
                                    "name": "tokenIndexIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8438,
                                    "src": "8215:12:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "8206:22:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 8485,
                                  "name": "finalBalanceIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8466,
                                  "src": "8187:14:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 8486,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sub",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1538,
                                "src": "8187:18:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 8490,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8187:42:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8491,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1512,
                            "src": "8187:46:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8493,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8187:49:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 8446,
                        "id": 8494,
                        "nodeType": "Return",
                        "src": "8180:56:33"
                      }
                    ]
                  },
                  "id": 8496,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcInGivenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8443,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8433,
                        "mutability": "mutable",
                        "name": "amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 8496,
                        "src": "6159:30:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8432,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6159:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8436,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 8496,
                        "src": "6199:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 8434,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "6199:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8435,
                          "nodeType": "ArrayTypeName",
                          "src": "6199:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8438,
                        "mutability": "mutable",
                        "name": "tokenIndexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 8496,
                        "src": "6234:20:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8437,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6234:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8440,
                        "mutability": "mutable",
                        "name": "tokenIndexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 8496,
                        "src": "6264:21:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8439,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6264:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8442,
                        "mutability": "mutable",
                        "name": "tokenAmountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 8496,
                        "src": "6295:22:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8441,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6295:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6149:174:33"
                  },
                  "returnParameters": {
                    "id": 8446,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8445,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8496,
                        "src": "6347:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8444,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6347:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6346:9:33"
                  },
                  "scope": 9486,
                  "src": "6125:2118:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 8720,
                    "nodeType": "Block",
                    "src": "9328:2641:33",
                    "statements": [
                      {
                        "assignments": [
                          8514
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8514,
                            "mutability": "mutable",
                            "name": "currentInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 8720,
                            "src": "9418:24:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8513,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9418:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8519,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8516,
                              "name": "amp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8498,
                              "src": "9465:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8517,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8501,
                              "src": "9470:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 8515,
                            "name": "_calculateInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8366,
                            "src": "9445:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 8518,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9445:34:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9418:61:33"
                      },
                      {
                        "assignments": [
                          8521
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8521,
                            "mutability": "mutable",
                            "name": "sumBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 8720,
                            "src": "9653:19:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8520,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9653:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8523,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 8522,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "9675:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9653:23:33"
                      },
                      {
                        "body": {
                          "id": 8544,
                          "nodeType": "Block",
                          "src": "9732:67:33",
                          "statements": [
                            {
                              "expression": {
                                "id": 8542,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8535,
                                  "name": "sumBalances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8521,
                                  "src": "9746:11:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 8538,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8501,
                                        "src": "9776:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 8540,
                                      "indexExpression": {
                                        "id": 8539,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8525,
                                        "src": "9785:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "9776:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8536,
                                      "name": "sumBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8521,
                                      "src": "9760:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8537,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "9760:15:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8541,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "9760:28:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "9746:42:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8543,
                              "nodeType": "ExpressionStatement",
                              "src": "9746:42:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8531,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8528,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8525,
                            "src": "9706:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 8529,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8501,
                              "src": "9710:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8530,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "9710:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "9706:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8545,
                        "initializationExpression": {
                          "assignments": [
                            8525
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8525,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 8545,
                              "src": "9691:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8524,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "9691:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8527,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8526,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "9703:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "9691:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8533,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "9727:3:33",
                            "subExpression": {
                              "id": 8532,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8525,
                              "src": "9727:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8534,
                          "nodeType": "ExpressionStatement",
                          "src": "9727:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "9686:113:33"
                      },
                      {
                        "assignments": [
                          8550
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8550,
                            "mutability": "mutable",
                            "name": "tokenBalanceRatiosWithoutFee",
                            "nodeType": "VariableDeclaration",
                            "scope": 8720,
                            "src": "9882:45:33",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 8548,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "9882:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8549,
                              "nodeType": "ArrayTypeName",
                              "src": "9882:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8557,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 8554,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8504,
                                "src": "9944:9:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 8555,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "9944:16:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 8553,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "9930:13:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 8551,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "9934:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8552,
                              "nodeType": "ArrayTypeName",
                              "src": "9934:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 8556,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9930:31:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9882:79:33"
                      },
                      {
                        "assignments": [
                          8559
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8559,
                            "mutability": "mutable",
                            "name": "weightedBalanceRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 8720,
                            "src": "10035:28:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8558,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10035:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8561,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 8560,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "10066:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10035:32:33"
                      },
                      {
                        "body": {
                          "id": 8612,
                          "nodeType": "Block",
                          "src": "10123:296:33",
                          "statements": [
                            {
                              "assignments": [
                                8574
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 8574,
                                  "mutability": "mutable",
                                  "name": "currentWeight",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 8612,
                                  "src": "10137:21:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 8573,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "10137:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 8581,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 8579,
                                    "name": "sumBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8521,
                                    "src": "10181:11:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "baseExpression": {
                                      "id": 8575,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8501,
                                      "src": "10161:8:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    "id": 8577,
                                    "indexExpression": {
                                      "id": 8576,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8563,
                                      "src": "10170:1:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "10161:11:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 8578,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "divDown",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1666,
                                  "src": "10161:19:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 8580,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10161:32:33",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "10137:56:33"
                            },
                            {
                              "expression": {
                                "id": 8598,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 8582,
                                    "name": "tokenBalanceRatiosWithoutFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8550,
                                    "src": "10207:28:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 8584,
                                  "indexExpression": {
                                    "id": 8583,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8563,
                                    "src": "10236:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "10207:31:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 8594,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8501,
                                        "src": "10279:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 8596,
                                      "indexExpression": {
                                        "id": 8595,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8563,
                                        "src": "10288:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "10279:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 8589,
                                            "name": "amountsIn",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8504,
                                            "src": "10257:9:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 8591,
                                          "indexExpression": {
                                            "id": 8590,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8563,
                                            "src": "10267:1:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "10257:12:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 8585,
                                            "name": "balances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8501,
                                            "src": "10241:8:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 8587,
                                          "indexExpression": {
                                            "id": 8586,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8563,
                                            "src": "10250:1:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "10241:11:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 8588,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "add",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1512,
                                        "src": "10241:15:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 8592,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "10241:29:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8593,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1666,
                                    "src": "10241:37:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8597,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "10241:50:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "10207:84:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8599,
                              "nodeType": "ExpressionStatement",
                              "src": "10207:84:33"
                            },
                            {
                              "expression": {
                                "id": 8610,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8600,
                                  "name": "weightedBalanceRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8559,
                                  "src": "10305:20:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "id": 8607,
                                          "name": "currentWeight",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 8574,
                                          "src": "10393:13:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 8603,
                                            "name": "tokenBalanceRatiosWithoutFee",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8550,
                                            "src": "10353:28:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 8605,
                                          "indexExpression": {
                                            "id": 8604,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8563,
                                            "src": "10382:1:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "10353:31:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 8606,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "mulDown",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1572,
                                        "src": "10353:39:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 8608,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "10353:54:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8601,
                                      "name": "weightedBalanceRatio",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8559,
                                      "src": "10328:20:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8602,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "10328:24:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8609,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "10328:80:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "10305:103:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8611,
                              "nodeType": "ExpressionStatement",
                              "src": "10305:103:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8569,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8566,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8563,
                            "src": "10097:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 8567,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8501,
                              "src": "10101:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8568,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "10101:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "10097:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8613,
                        "initializationExpression": {
                          "assignments": [
                            8563
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8563,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 8613,
                              "src": "10082:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8562,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10082:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8565,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8564,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "10094:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "10082:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8571,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "10118:3:33",
                            "subExpression": {
                              "id": 8570,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8563,
                              "src": "10118:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8572,
                          "nodeType": "ExpressionStatement",
                          "src": "10118:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "10077:342:33"
                      },
                      {
                        "assignments": [
                          8618
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8618,
                            "mutability": "mutable",
                            "name": "newBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 8720,
                            "src": "10532:28:33",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 8616,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10532:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8617,
                              "nodeType": "ArrayTypeName",
                              "src": "10532:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8625,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 8622,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8501,
                                "src": "10577:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 8623,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "10577:15:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 8621,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "10563:13:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 8619,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10567:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8620,
                              "nodeType": "ArrayTypeName",
                              "src": "10567:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 8624,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10563:30:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10532:61:33"
                      },
                      {
                        "body": {
                          "id": 8699,
                          "nodeType": "Block",
                          "src": "10649:1048:33",
                          "statements": [
                            {
                              "assignments": [
                                8638
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 8638,
                                  "mutability": "mutable",
                                  "name": "tokenBalancePercentageExcess",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 8699,
                                  "src": "10773:36:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 8637,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "10773:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 8639,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "10773:36:33"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 8644,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 8640,
                                  "name": "weightedBalanceRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8559,
                                  "src": "11094:20:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">=",
                                "rightExpression": {
                                  "baseExpression": {
                                    "id": 8641,
                                    "name": "tokenBalanceRatiosWithoutFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8550,
                                    "src": "11118:28:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 8643,
                                  "indexExpression": {
                                    "id": 8642,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8627,
                                    "src": "11147:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "11118:31:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "11094:55:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 8668,
                                "nodeType": "Block",
                                "src": "11222:218:33",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 8666,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 8650,
                                        "name": "tokenBalancePercentageExcess",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8638,
                                        "src": "11240:28:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "arguments": [
                                          {
                                            "arguments": [
                                              {
                                                "expression": {
                                                  "id": 8662,
                                                  "name": "FixedPoint",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 1815,
                                                  "src": "11392:10:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                                    "typeString": "type(library FixedPoint)"
                                                  }
                                                },
                                                "id": 8663,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "ONE",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 1480,
                                                "src": "11392:14:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "expression": {
                                                "baseExpression": {
                                                  "id": 8658,
                                                  "name": "tokenBalanceRatiosWithoutFee",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8550,
                                                  "src": "11356:28:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                                    "typeString": "uint256[] memory"
                                                  }
                                                },
                                                "id": 8660,
                                                "indexExpression": {
                                                  "id": 8659,
                                                  "name": "i",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8627,
                                                  "src": "11385:1:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "isConstant": false,
                                                "isLValue": true,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "nodeType": "IndexAccess",
                                                "src": "11356:31:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "id": 8661,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "sub",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 1538,
                                              "src": "11356:35:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                                              }
                                            },
                                            "id": 8664,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "11356:51:33",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "arguments": [
                                              {
                                                "id": 8655,
                                                "name": "weightedBalanceRatio",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 8559,
                                                "src": "11307:20:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "expression": {
                                                "baseExpression": {
                                                  "id": 8651,
                                                  "name": "tokenBalanceRatiosWithoutFee",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8550,
                                                  "src": "11271:28:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                                    "typeString": "uint256[] memory"
                                                  }
                                                },
                                                "id": 8653,
                                                "indexExpression": {
                                                  "id": 8652,
                                                  "name": "i",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8627,
                                                  "src": "11300:1:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "isConstant": false,
                                                "isLValue": true,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "nodeType": "IndexAccess",
                                                "src": "11271:31:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "id": 8654,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "sub",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 1538,
                                              "src": "11271:35:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                                              }
                                            },
                                            "id": 8656,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "11271:57:33",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 8657,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "divUp",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 1718,
                                          "src": "11271:63:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 8665,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "11271:154:33",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "11240:185:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8667,
                                    "nodeType": "ExpressionStatement",
                                    "src": "11240:185:33"
                                  }
                                ]
                              },
                              "id": 8669,
                              "nodeType": "IfStatement",
                              "src": "11090:350:33",
                              "trueBody": {
                                "id": 8649,
                                "nodeType": "Block",
                                "src": "11151:65:33",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 8647,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 8645,
                                        "name": "tokenBalancePercentageExcess",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8638,
                                        "src": "11169:28:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "hexValue": "30",
                                        "id": 8646,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "11200:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        "value": "0"
                                      },
                                      "src": "11169:32:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8648,
                                    "nodeType": "ExpressionStatement",
                                    "src": "11169:32:33"
                                  }
                                ]
                              }
                            },
                            {
                              "assignments": [
                                8671
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 8671,
                                  "mutability": "mutable",
                                  "name": "swapFeeExcess",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 8699,
                                  "src": "11454:21:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 8670,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "11454:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 8676,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 8674,
                                    "name": "tokenBalancePercentageExcess",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8638,
                                    "src": "11502:28:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 8672,
                                    "name": "swapFeePercentage",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8508,
                                    "src": "11478:17:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 8673,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mulUp",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1620,
                                  "src": "11478:23:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 8675,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11478:53:33",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "11454:77:33"
                            },
                            {
                              "assignments": [
                                8678
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 8678,
                                  "mutability": "mutable",
                                  "name": "amountInAfterFee",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 8699,
                                  "src": "11546:24:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 8677,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "11546:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 8687,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "expression": {
                                        "id": 8683,
                                        "name": "swapFeeExcess",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8671,
                                        "src": "11594:13:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 8684,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "complement",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 1814,
                                      "src": "11594:24:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256) pure returns (uint256)"
                                      }
                                    },
                                    "id": 8685,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "11594:26:33",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "baseExpression": {
                                      "id": 8679,
                                      "name": "amountsIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8504,
                                      "src": "11573:9:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    "id": 8681,
                                    "indexExpression": {
                                      "id": 8680,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8627,
                                      "src": "11583:1:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "11573:12:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 8682,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mulDown",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1572,
                                  "src": "11573:20:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 8686,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11573:48:33",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "11546:75:33"
                            },
                            {
                              "expression": {
                                "id": 8697,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 8688,
                                    "name": "newBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8618,
                                    "src": "11636:11:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 8690,
                                  "indexExpression": {
                                    "id": 8689,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8627,
                                    "src": "11648:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "11636:14:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 8695,
                                      "name": "amountInAfterFee",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8678,
                                      "src": "11669:16:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 8691,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8501,
                                        "src": "11653:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 8693,
                                      "indexExpression": {
                                        "id": 8692,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8627,
                                        "src": "11662:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "11653:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8694,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "11653:15:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8696,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11653:33:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "11636:50:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8698,
                              "nodeType": "ExpressionStatement",
                              "src": "11636:50:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8633,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8630,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8627,
                            "src": "10623:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 8631,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8501,
                              "src": "10627:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8632,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "10627:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "10623:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8700,
                        "initializationExpression": {
                          "assignments": [
                            8627
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8627,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 8700,
                              "src": "10608:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8626,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10608:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8629,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8628,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "10620:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "10608:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8635,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "10644:3:33",
                            "subExpression": {
                              "id": 8634,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8627,
                              "src": "10644:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8636,
                          "nodeType": "ExpressionStatement",
                          "src": "10644:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "10603:1094:33"
                      },
                      {
                        "assignments": [
                          8702
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8702,
                            "mutability": "mutable",
                            "name": "newInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 8720,
                            "src": "11771:20:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8701,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11771:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8707,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8704,
                              "name": "amp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8498,
                              "src": "11814:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8705,
                              "name": "newBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8618,
                              "src": "11819:11:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 8703,
                            "name": "_calculateInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8366,
                            "src": "11794:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 8706,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11794:37:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11771:60:33"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "id": 8715,
                                    "name": "FixedPoint",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1815,
                                    "src": "11946:10:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                      "typeString": "type(library FixedPoint)"
                                    }
                                  },
                                  "id": 8716,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "ONE",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1480,
                                  "src": "11946:14:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 8712,
                                      "name": "currentInvariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8514,
                                      "src": "11924:16:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8710,
                                      "name": "newInvariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8702,
                                      "src": "11903:12:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8711,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1666,
                                    "src": "11903:20:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8713,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11903:38:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 8714,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sub",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1538,
                                "src": "11903:42:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 8717,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "11903:58:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 8708,
                              "name": "bptTotalSupply",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8506,
                              "src": "11880:14:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8709,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1572,
                            "src": "11880:22:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8718,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11880:82:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 8512,
                        "id": 8719,
                        "nodeType": "Return",
                        "src": "11873:89:33"
                      }
                    ]
                  },
                  "id": 8721,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcBptOutGivenExactTokensIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8509,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8498,
                        "mutability": "mutable",
                        "name": "amp",
                        "nodeType": "VariableDeclaration",
                        "scope": 8721,
                        "src": "9140:11:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8497,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9140:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8501,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 8721,
                        "src": "9161:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 8499,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "9161:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8500,
                          "nodeType": "ArrayTypeName",
                          "src": "9161:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8504,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 8721,
                        "src": "9196:26:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 8502,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "9196:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8503,
                          "nodeType": "ArrayTypeName",
                          "src": "9196:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8506,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 8721,
                        "src": "9232:22:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8505,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9232:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8508,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 8721,
                        "src": "9264:25:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8507,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9264:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9130:165:33"
                  },
                  "returnParameters": {
                    "id": 8512,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8511,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8721,
                        "src": "9319:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8510,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9319:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9318:9:33"
                  },
                  "scope": 9486,
                  "src": "9092:2877:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 8832,
                    "nodeType": "Block",
                    "src": "12425:1254:33",
                    "statements": [
                      {
                        "assignments": [
                          8740
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8740,
                            "mutability": "mutable",
                            "name": "currentInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 8832,
                            "src": "12518:24:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8739,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "12518:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8745,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8742,
                              "name": "amp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8723,
                              "src": "12565:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8743,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8726,
                              "src": "12570:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 8741,
                            "name": "_calculateInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8366,
                            "src": "12545:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 8744,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12545:34:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12518:61:33"
                      },
                      {
                        "assignments": [
                          8747
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8747,
                            "mutability": "mutable",
                            "name": "newInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 8832,
                            "src": "12625:20:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8746,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "12625:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8758,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8756,
                              "name": "currentInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8740,
                              "src": "12709:16:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 8753,
                                  "name": "bptTotalSupply",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8732,
                                  "src": "12687:14:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 8750,
                                      "name": "bptAmountOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8730,
                                      "src": "12667:12:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8748,
                                      "name": "bptTotalSupply",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8732,
                                      "src": "12648:14:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8749,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "12648:18:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8751,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "12648:32:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 8752,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "divUp",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1718,
                                "src": "12648:38:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 8754,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12648:54:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8755,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "12648:60:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8757,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12648:78:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12625:101:33"
                      },
                      {
                        "assignments": [
                          8760
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8760,
                            "mutability": "mutable",
                            "name": "sumBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 8832,
                            "src": "12871:19:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8759,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "12871:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8762,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 8761,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "12893:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12871:23:33"
                      },
                      {
                        "body": {
                          "id": 8783,
                          "nodeType": "Block",
                          "src": "12950:67:33",
                          "statements": [
                            {
                              "expression": {
                                "id": 8781,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8774,
                                  "name": "sumBalances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8760,
                                  "src": "12964:11:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 8777,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8726,
                                        "src": "12994:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 8779,
                                      "indexExpression": {
                                        "id": 8778,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8764,
                                        "src": "13003:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "12994:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8775,
                                      "name": "sumBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8760,
                                      "src": "12978:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8776,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "12978:15:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8780,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "12978:28:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "12964:42:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8782,
                              "nodeType": "ExpressionStatement",
                              "src": "12964:42:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8770,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8767,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8764,
                            "src": "12924:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 8768,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8726,
                              "src": "12928:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8769,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "12928:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "12924:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8784,
                        "initializationExpression": {
                          "assignments": [
                            8764
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8764,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 8784,
                              "src": "12909:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8763,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "12909:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8766,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8765,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "12921:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "12909:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8772,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "12945:3:33",
                            "subExpression": {
                              "id": 8771,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8764,
                              "src": "12945:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8773,
                          "nodeType": "ExpressionStatement",
                          "src": "12945:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "12904:113:33"
                      },
                      {
                        "assignments": [
                          8786
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8786,
                            "mutability": "mutable",
                            "name": "newBalanceTokenIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 8832,
                            "src": "13059:28:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8785,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13059:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8793,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8788,
                              "name": "amp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8723,
                              "src": "13153:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8789,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8726,
                              "src": "13170:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 8790,
                              "name": "newInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8747,
                              "src": "13192:12:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8791,
                              "name": "tokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8728,
                              "src": "13218:10:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 8787,
                            "name": "_getTokenBalanceGivenInvariantAndAllOtherBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9485,
                            "src": "13090:49:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8792,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13090:148:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13059:179:33"
                      },
                      {
                        "assignments": [
                          8795
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8795,
                            "mutability": "mutable",
                            "name": "amountInAfterFee",
                            "nodeType": "VariableDeclaration",
                            "scope": 8832,
                            "src": "13248:24:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8794,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13248:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8802,
                        "initialValue": {
                          "arguments": [
                            {
                              "baseExpression": {
                                "id": 8798,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8726,
                                "src": "13300:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 8800,
                              "indexExpression": {
                                "id": 8799,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8728,
                                "src": "13309:10:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "13300:20:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 8796,
                              "name": "newBalanceTokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8786,
                              "src": "13275:20:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8797,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1538,
                            "src": "13275:24:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8801,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13275:46:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13248:73:33"
                      },
                      {
                        "assignments": [
                          8804
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8804,
                            "mutability": "mutable",
                            "name": "currentWeight",
                            "nodeType": "VariableDeclaration",
                            "scope": 8832,
                            "src": "13376:21:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8803,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13376:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8811,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8809,
                              "name": "sumBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8760,
                              "src": "13429:11:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "baseExpression": {
                                "id": 8805,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8726,
                                "src": "13400:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 8807,
                              "indexExpression": {
                                "id": 8806,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8728,
                                "src": "13409:10:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "13400:20:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8808,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "13400:28:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8810,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13400:41:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13376:65:33"
                      },
                      {
                        "assignments": [
                          8813
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8813,
                            "mutability": "mutable",
                            "name": "tokenBalancePercentageExcess",
                            "nodeType": "VariableDeclaration",
                            "scope": 8832,
                            "src": "13451:36:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8812,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13451:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8817,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 8814,
                              "name": "currentWeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8804,
                              "src": "13490:13:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8815,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "complement",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1814,
                            "src": "13490:24:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8816,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13490:26:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13451:65:33"
                      },
                      {
                        "assignments": [
                          8819
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8819,
                            "mutability": "mutable",
                            "name": "swapFeeExcess",
                            "nodeType": "VariableDeclaration",
                            "scope": 8832,
                            "src": "13527:21:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8818,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13527:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8824,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8822,
                              "name": "tokenBalancePercentageExcess",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8813,
                              "src": "13575:28:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 8820,
                              "name": "swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8734,
                              "src": "13551:17:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8821,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "13551:23:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8823,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13551:53:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13527:77:33"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 8827,
                                  "name": "swapFeeExcess",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8819,
                                  "src": "13645:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 8828,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "complement",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1814,
                                "src": "13645:24:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 8829,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13645:26:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 8825,
                              "name": "amountInAfterFee",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8795,
                              "src": "13622:16:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 8826,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "13622:22:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 8830,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13622:50:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 8738,
                        "id": 8831,
                        "nodeType": "Return",
                        "src": "13615:57:33"
                      }
                    ]
                  },
                  "id": 8833,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcTokenInGivenExactBptOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8735,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8723,
                        "mutability": "mutable",
                        "name": "amp",
                        "nodeType": "VariableDeclaration",
                        "scope": 8833,
                        "src": "12215:11:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8722,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12215:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8726,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 8833,
                        "src": "12236:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 8724,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12236:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8725,
                          "nodeType": "ArrayTypeName",
                          "src": "12236:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8728,
                        "mutability": "mutable",
                        "name": "tokenIndex",
                        "nodeType": "VariableDeclaration",
                        "scope": 8833,
                        "src": "12271:18:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8727,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12271:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8730,
                        "mutability": "mutable",
                        "name": "bptAmountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 8833,
                        "src": "12299:20:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8729,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12299:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8732,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 8833,
                        "src": "12329:22:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8731,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12329:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8734,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 8833,
                        "src": "12361:25:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8733,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12361:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12205:187:33"
                  },
                  "returnParameters": {
                    "id": 8738,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8737,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 8833,
                        "src": "12416:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8736,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12416:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12415:9:33"
                  },
                  "scope": 9486,
                  "src": "12168:1511:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 9053,
                    "nodeType": "Block",
                    "src": "14084:2335:33",
                    "statements": [
                      {
                        "assignments": [
                          8851
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8851,
                            "mutability": "mutable",
                            "name": "currentInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 9053,
                            "src": "14175:24:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8850,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "14175:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8856,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 8853,
                              "name": "amp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8835,
                              "src": "14222:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 8854,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8838,
                              "src": "14227:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 8852,
                            "name": "_calculateInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8366,
                            "src": "14202:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 8855,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14202:34:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14175:61:33"
                      },
                      {
                        "assignments": [
                          8858
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8858,
                            "mutability": "mutable",
                            "name": "sumBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 9053,
                            "src": "14409:19:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8857,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "14409:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8860,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 8859,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "14431:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14409:23:33"
                      },
                      {
                        "body": {
                          "id": 8881,
                          "nodeType": "Block",
                          "src": "14488:67:33",
                          "statements": [
                            {
                              "expression": {
                                "id": 8879,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8872,
                                  "name": "sumBalances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8858,
                                  "src": "14502:11:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 8875,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8838,
                                        "src": "14532:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 8877,
                                      "indexExpression": {
                                        "id": 8876,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8862,
                                        "src": "14541:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "14532:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8873,
                                      "name": "sumBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8858,
                                      "src": "14516:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8874,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "14516:15:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8878,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "14516:28:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "14502:42:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8880,
                              "nodeType": "ExpressionStatement",
                              "src": "14502:42:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8868,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8865,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8862,
                            "src": "14462:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 8866,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8838,
                              "src": "14466:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8867,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "14466:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "14462:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8882,
                        "initializationExpression": {
                          "assignments": [
                            8862
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8862,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 8882,
                              "src": "14447:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8861,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "14447:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8864,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8863,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "14459:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "14447:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8870,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "14483:3:33",
                            "subExpression": {
                              "id": 8869,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8862,
                              "src": "14483:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8871,
                          "nodeType": "ExpressionStatement",
                          "src": "14483:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "14442:113:33"
                      },
                      {
                        "assignments": [
                          8887
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8887,
                            "mutability": "mutable",
                            "name": "tokenBalanceRatiosWithoutFee",
                            "nodeType": "VariableDeclaration",
                            "scope": 9053,
                            "src": "14638:45:33",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 8885,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "14638:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8886,
                              "nodeType": "ArrayTypeName",
                              "src": "14638:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8894,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 8891,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8841,
                                "src": "14700:10:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 8892,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "14700:17:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 8890,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "14686:13:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 8888,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "14690:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8889,
                              "nodeType": "ArrayTypeName",
                              "src": "14690:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 8893,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14686:32:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14638:80:33"
                      },
                      {
                        "assignments": [
                          8896
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8896,
                            "mutability": "mutable",
                            "name": "weightedBalanceRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 9053,
                            "src": "14728:28:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 8895,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "14728:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8898,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 8897,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "14759:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14728:32:33"
                      },
                      {
                        "body": {
                          "id": 8949,
                          "nodeType": "Block",
                          "src": "14816:291:33",
                          "statements": [
                            {
                              "assignments": [
                                8911
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 8911,
                                  "mutability": "mutable",
                                  "name": "currentWeight",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 8949,
                                  "src": "14830:21:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 8910,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "14830:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 8918,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 8916,
                                    "name": "sumBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8858,
                                    "src": "14872:11:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "baseExpression": {
                                      "id": 8912,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8838,
                                      "src": "14854:8:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    "id": 8914,
                                    "indexExpression": {
                                      "id": 8913,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8900,
                                      "src": "14863:1:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "14854:11:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 8915,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "divUp",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1718,
                                  "src": "14854:17:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 8917,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "14854:30:33",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "14830:54:33"
                            },
                            {
                              "expression": {
                                "id": 8935,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 8919,
                                    "name": "tokenBalanceRatiosWithoutFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8887,
                                    "src": "14898:28:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 8921,
                                  "indexExpression": {
                                    "id": 8920,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8900,
                                    "src": "14927:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "14898:31:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 8931,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8838,
                                        "src": "14969:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 8933,
                                      "indexExpression": {
                                        "id": 8932,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8900,
                                        "src": "14978:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "14969:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 8926,
                                            "name": "amountsOut",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8841,
                                            "src": "14948:10:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 8928,
                                          "indexExpression": {
                                            "id": 8927,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8900,
                                            "src": "14959:1:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "14948:13:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 8922,
                                            "name": "balances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8838,
                                            "src": "14932:8:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 8924,
                                          "indexExpression": {
                                            "id": 8923,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8900,
                                            "src": "14941:1:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "14932:11:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 8925,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "sub",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1538,
                                        "src": "14932:15:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 8929,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "14932:30:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8930,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divUp",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1718,
                                    "src": "14932:36:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8934,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "14932:49:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "14898:83:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8936,
                              "nodeType": "ExpressionStatement",
                              "src": "14898:83:33"
                            },
                            {
                              "expression": {
                                "id": 8947,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 8937,
                                  "name": "weightedBalanceRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8896,
                                  "src": "14995:20:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "id": 8944,
                                          "name": "currentWeight",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 8911,
                                          "src": "15081:13:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 8940,
                                            "name": "tokenBalanceRatiosWithoutFee",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8887,
                                            "src": "15043:28:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 8942,
                                          "indexExpression": {
                                            "id": 8941,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 8900,
                                            "src": "15072:1:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "15043:31:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 8943,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "mulUp",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1620,
                                        "src": "15043:37:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 8945,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "15043:52:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8938,
                                      "name": "weightedBalanceRatio",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8896,
                                      "src": "15018:20:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8939,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "15018:24:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8946,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "15018:78:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "14995:101:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8948,
                              "nodeType": "ExpressionStatement",
                              "src": "14995:101:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8906,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8903,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8900,
                            "src": "14790:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 8904,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8838,
                              "src": "14794:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8905,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "14794:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "14790:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 8950,
                        "initializationExpression": {
                          "assignments": [
                            8900
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8900,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 8950,
                              "src": "14775:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8899,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "14775:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8902,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8901,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "14787:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "14775:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8908,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "14811:3:33",
                            "subExpression": {
                              "id": 8907,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8900,
                              "src": "14811:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8909,
                          "nodeType": "ExpressionStatement",
                          "src": "14811:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "14770:337:33"
                      },
                      {
                        "assignments": [
                          8955
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 8955,
                            "mutability": "mutable",
                            "name": "newBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 9053,
                            "src": "15220:28:33",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 8953,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "15220:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8954,
                              "nodeType": "ArrayTypeName",
                              "src": "15220:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 8962,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 8959,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8838,
                                "src": "15265:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 8960,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "15265:15:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 8958,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "15251:13:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 8956,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "15255:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 8957,
                              "nodeType": "ArrayTypeName",
                              "src": "15255:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 8961,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15251:30:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "15220:61:33"
                      },
                      {
                        "body": {
                          "id": 9034,
                          "nodeType": "Block",
                          "src": "15337:822:33",
                          "statements": [
                            {
                              "assignments": [
                                8975
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 8975,
                                  "mutability": "mutable",
                                  "name": "tokenBalancePercentageExcess",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 9034,
                                  "src": "15351:36:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 8974,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "15351:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 8976,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "15351:36:33"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 8981,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 8977,
                                  "name": "weightedBalanceRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8896,
                                  "src": "15570:20:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<=",
                                "rightExpression": {
                                  "baseExpression": {
                                    "id": 8978,
                                    "name": "tokenBalanceRatiosWithoutFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8887,
                                    "src": "15594:28:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 8980,
                                  "indexExpression": {
                                    "id": 8979,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8964,
                                    "src": "15623:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "15594:31:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "15570:55:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 9003,
                                "nodeType": "Block",
                                "src": "15698:211:33",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 9001,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 8987,
                                        "name": "tokenBalancePercentageExcess",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8975,
                                        "src": "15716:28:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "arguments": [
                                          {
                                            "arguments": [],
                                            "expression": {
                                              "argumentTypes": [],
                                              "expression": {
                                                "baseExpression": {
                                                  "id": 8995,
                                                  "name": "tokenBalanceRatiosWithoutFee",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8887,
                                                  "src": "15832:28:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                                    "typeString": "uint256[] memory"
                                                  }
                                                },
                                                "id": 8997,
                                                "indexExpression": {
                                                  "id": 8996,
                                                  "name": "i",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8964,
                                                  "src": "15861:1:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "isConstant": false,
                                                "isLValue": true,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "nodeType": "IndexAccess",
                                                "src": "15832:31:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "id": 8998,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "complement",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 1814,
                                              "src": "15832:42:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                "typeString": "function (uint256) pure returns (uint256)"
                                              }
                                            },
                                            "id": 8999,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "15832:44:33",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "arguments": [
                                              {
                                                "baseExpression": {
                                                  "id": 8990,
                                                  "name": "tokenBalanceRatiosWithoutFee",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8887,
                                                  "src": "15772:28:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                                    "typeString": "uint256[] memory"
                                                  }
                                                },
                                                "id": 8992,
                                                "indexExpression": {
                                                  "id": 8991,
                                                  "name": "i",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 8964,
                                                  "src": "15801:1:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "isConstant": false,
                                                "isLValue": true,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "nodeType": "IndexAccess",
                                                "src": "15772:31:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "expression": {
                                                "id": 8988,
                                                "name": "weightedBalanceRatio",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 8896,
                                                "src": "15747:20:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "id": 8989,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "sub",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 1538,
                                              "src": "15747:24:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                                              }
                                            },
                                            "id": 8993,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "15747:57:33",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 8994,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "divUp",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 1718,
                                          "src": "15747:63:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 9000,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "15747:147:33",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "15716:178:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9002,
                                    "nodeType": "ExpressionStatement",
                                    "src": "15716:178:33"
                                  }
                                ]
                              },
                              "id": 9004,
                              "nodeType": "IfStatement",
                              "src": "15566:343:33",
                              "trueBody": {
                                "id": 8986,
                                "nodeType": "Block",
                                "src": "15627:65:33",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 8984,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 8982,
                                        "name": "tokenBalancePercentageExcess",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8975,
                                        "src": "15645:28:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "hexValue": "30",
                                        "id": 8983,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "15676:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        "value": "0"
                                      },
                                      "src": "15645:32:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8985,
                                    "nodeType": "ExpressionStatement",
                                    "src": "15645:32:33"
                                  }
                                ]
                              }
                            },
                            {
                              "assignments": [
                                9006
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 9006,
                                  "mutability": "mutable",
                                  "name": "swapFeeExcess",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 9034,
                                  "src": "15923:21:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 9005,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "15923:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 9011,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 9009,
                                    "name": "tokenBalancePercentageExcess",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8975,
                                    "src": "15961:28:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 9007,
                                    "name": "swapFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8845,
                                    "src": "15947:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 9008,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mulUp",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1620,
                                  "src": "15947:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 9010,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "15947:43:33",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "15923:67:33"
                            },
                            {
                              "assignments": [
                                9013
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 9013,
                                  "mutability": "mutable",
                                  "name": "amountOutBeforeFee",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 9034,
                                  "src": "16005:26:33",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 9012,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "16005:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 9022,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "expression": {
                                        "id": 9018,
                                        "name": "swapFeeExcess",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9006,
                                        "src": "16054:13:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 9019,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "complement",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 1814,
                                      "src": "16054:24:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256) pure returns (uint256)"
                                      }
                                    },
                                    "id": 9020,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "16054:26:33",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "baseExpression": {
                                      "id": 9014,
                                      "name": "amountsOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8841,
                                      "src": "16034:10:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    "id": 9016,
                                    "indexExpression": {
                                      "id": 9015,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8964,
                                      "src": "16045:1:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "16034:13:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 9017,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "divUp",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1718,
                                  "src": "16034:19:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 9021,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "16034:47:33",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "16005:76:33"
                            },
                            {
                              "expression": {
                                "id": 9032,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 9023,
                                    "name": "newBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8955,
                                    "src": "16096:11:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 9025,
                                  "indexExpression": {
                                    "id": 9024,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8964,
                                    "src": "16108:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "16096:14:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 9030,
                                      "name": "amountOutBeforeFee",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9013,
                                      "src": "16129:18:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 9026,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8838,
                                        "src": "16113:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 9028,
                                      "indexExpression": {
                                        "id": 9027,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 8964,
                                        "src": "16122:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "16113:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9029,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sub",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1538,
                                    "src": "16113:15:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9031,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "16113:35:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "16096:52:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9033,
                              "nodeType": "ExpressionStatement",
                              "src": "16096:52:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8970,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 8967,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8964,
                            "src": "15311:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 8968,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8838,
                              "src": "15315:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 8969,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "15315:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "15311:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 9035,
                        "initializationExpression": {
                          "assignments": [
                            8964
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 8964,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 9035,
                              "src": "15296:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 8963,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "15296:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 8966,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 8965,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "15308:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "15296:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 8972,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "15332:3:33",
                            "subExpression": {
                              "id": 8971,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8964,
                              "src": "15332:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8973,
                          "nodeType": "ExpressionStatement",
                          "src": "15332:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "15291:868:33"
                      },
                      {
                        "assignments": [
                          9037
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9037,
                            "mutability": "mutable",
                            "name": "newInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 9053,
                            "src": "16233:20:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9036,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16233:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9042,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9039,
                              "name": "amp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8835,
                              "src": "16276:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9040,
                              "name": "newBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8955,
                              "src": "16281:11:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 9038,
                            "name": "_calculateInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8366,
                            "src": "16256:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 9041,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16256:37:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16233:60:33"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 9047,
                                      "name": "currentInvariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8851,
                                      "src": "16381:16:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 9045,
                                      "name": "newInvariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9037,
                                      "src": "16362:12:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9046,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divUp",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1718,
                                    "src": "16362:18:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9048,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "16362:36:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 9049,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "complement",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1814,
                                "src": "16362:47:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 9050,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "16362:49:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9043,
                              "name": "bptTotalSupply",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8843,
                              "src": "16341:14:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9044,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "16341:20:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9051,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16341:71:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 8849,
                        "id": 9052,
                        "nodeType": "Return",
                        "src": "16334:78:33"
                      }
                    ]
                  },
                  "id": 9054,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcBptInGivenExactTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 8846,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8835,
                        "mutability": "mutable",
                        "name": "amp",
                        "nodeType": "VariableDeclaration",
                        "scope": 9054,
                        "src": "13905:11:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8834,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13905:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8838,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9054,
                        "src": "13926:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 8836,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "13926:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8837,
                          "nodeType": "ArrayTypeName",
                          "src": "13926:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8841,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 9054,
                        "src": "13961:27:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 8839,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "13961:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 8840,
                          "nodeType": "ArrayTypeName",
                          "src": "13961:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8843,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 9054,
                        "src": "13998:22:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8842,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13998:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 8845,
                        "mutability": "mutable",
                        "name": "swapFee",
                        "nodeType": "VariableDeclaration",
                        "scope": 9054,
                        "src": "14030:15:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8844,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14030:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13895:156:33"
                  },
                  "returnParameters": {
                    "id": 8849,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 8848,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9054,
                        "src": "14075:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8847,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14075:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14074:9:33"
                  },
                  "scope": 9486,
                  "src": "13857:2562:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 9165,
                    "nodeType": "Block",
                    "src": "16878:1224:33",
                    "statements": [
                      {
                        "assignments": [
                          9073
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9073,
                            "mutability": "mutable",
                            "name": "currentInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 9165,
                            "src": "16925:24:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9072,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16925:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9078,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9075,
                              "name": "amp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9056,
                              "src": "16972:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9076,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9059,
                              "src": "16977:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 9074,
                            "name": "_calculateInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8366,
                            "src": "16952:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 9077,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16952:34:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16925:61:33"
                      },
                      {
                        "assignments": [
                          9080
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9080,
                            "mutability": "mutable",
                            "name": "newInvariant",
                            "nodeType": "VariableDeclaration",
                            "scope": 9165,
                            "src": "17035:20:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9079,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17035:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9091,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9089,
                              "name": "currentInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9073,
                              "src": "17118:16:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 9086,
                                  "name": "bptTotalSupply",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9065,
                                  "src": "17096:14:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 9083,
                                      "name": "bptAmountIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9063,
                                      "src": "17077:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 9081,
                                      "name": "bptTotalSupply",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9065,
                                      "src": "17058:14:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9082,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sub",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1538,
                                    "src": "17058:18:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9084,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "17058:31:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 9085,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "divUp",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1718,
                                "src": "17058:37:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 9087,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "17058:53:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9088,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "17058:59:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9090,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17058:77:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17035:100:33"
                      },
                      {
                        "assignments": [
                          9093
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9093,
                            "mutability": "mutable",
                            "name": "sumBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 9165,
                            "src": "17280:19:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9092,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17280:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9095,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 9094,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "17302:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17280:23:33"
                      },
                      {
                        "body": {
                          "id": 9116,
                          "nodeType": "Block",
                          "src": "17359:67:33",
                          "statements": [
                            {
                              "expression": {
                                "id": 9114,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 9107,
                                  "name": "sumBalances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9093,
                                  "src": "17373:11:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 9110,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9059,
                                        "src": "17403:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 9112,
                                      "indexExpression": {
                                        "id": 9111,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9097,
                                        "src": "17412:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "17403:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 9108,
                                      "name": "sumBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9093,
                                      "src": "17387:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9109,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "17387:15:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9113,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "17387:28:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "17373:42:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9115,
                              "nodeType": "ExpressionStatement",
                              "src": "17373:42:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 9103,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 9100,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9097,
                            "src": "17333:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 9101,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9059,
                              "src": "17337:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 9102,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "17337:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "17333:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 9117,
                        "initializationExpression": {
                          "assignments": [
                            9097
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 9097,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 9117,
                              "src": "17318:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 9096,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "17318:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 9099,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 9098,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "17330:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "17318:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 9105,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "17354:3:33",
                            "subExpression": {
                              "id": 9104,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9097,
                              "src": "17354:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9106,
                          "nodeType": "ExpressionStatement",
                          "src": "17354:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "17313:113:33"
                      },
                      {
                        "assignments": [
                          9119
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9119,
                            "mutability": "mutable",
                            "name": "newBalanceTokenIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 9165,
                            "src": "17470:28:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9118,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17470:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9126,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9121,
                              "name": "amp",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9056,
                              "src": "17564:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9122,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9059,
                              "src": "17581:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9123,
                              "name": "newInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9080,
                              "src": "17603:12:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9124,
                              "name": "tokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9061,
                              "src": "17629:10:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9120,
                            "name": "_getTokenBalanceGivenInvariantAndAllOtherBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9485,
                            "src": "17501:49:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9125,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17501:148:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17470:179:33"
                      },
                      {
                        "assignments": [
                          9128
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9128,
                            "mutability": "mutable",
                            "name": "amountOutBeforeFee",
                            "nodeType": "VariableDeclaration",
                            "scope": 9165,
                            "src": "17659:26:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9127,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17659:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9135,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9133,
                              "name": "newBalanceTokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9119,
                              "src": "17713:20:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "baseExpression": {
                                "id": 9129,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9059,
                                "src": "17688:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9131,
                              "indexExpression": {
                                "id": 9130,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9061,
                                "src": "17697:10:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "17688:20:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9132,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1538,
                            "src": "17688:24:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9134,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17688:46:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17659:75:33"
                      },
                      {
                        "assignments": [
                          9137
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9137,
                            "mutability": "mutable",
                            "name": "currentWeight",
                            "nodeType": "VariableDeclaration",
                            "scope": 9165,
                            "src": "17795:21:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9136,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17795:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9144,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9142,
                              "name": "sumBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9093,
                              "src": "17848:11:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "baseExpression": {
                                "id": 9138,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9059,
                                "src": "17819:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9140,
                              "indexExpression": {
                                "id": 9139,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9061,
                                "src": "17828:10:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "17819:20:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9141,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "17819:28:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9143,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17819:41:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17795:65:33"
                      },
                      {
                        "assignments": [
                          9146
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9146,
                            "mutability": "mutable",
                            "name": "tokenBalancePercentageExcess",
                            "nodeType": "VariableDeclaration",
                            "scope": 9165,
                            "src": "17870:36:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9145,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17870:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9150,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 9147,
                              "name": "currentWeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9137,
                              "src": "17909:13:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9148,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "complement",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1814,
                            "src": "17909:24:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9149,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17909:26:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17870:65:33"
                      },
                      {
                        "assignments": [
                          9152
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9152,
                            "mutability": "mutable",
                            "name": "swapFeeExcess",
                            "nodeType": "VariableDeclaration",
                            "scope": 9165,
                            "src": "17946:21:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9151,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17946:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9157,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9155,
                              "name": "tokenBalancePercentageExcess",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9146,
                              "src": "17994:28:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9153,
                              "name": "swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9067,
                              "src": "17970:17:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9154,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "17970:23:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9156,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17970:53:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17946:77:33"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 9160,
                                  "name": "swapFeeExcess",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9152,
                                  "src": "18068:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 9161,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "complement",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1814,
                                "src": "18068:24:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 9162,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "18068:26:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9158,
                              "name": "amountOutBeforeFee",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9128,
                              "src": "18041:18:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9159,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1572,
                            "src": "18041:26:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9163,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18041:54:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 9071,
                        "id": 9164,
                        "nodeType": "Return",
                        "src": "18034:61:33"
                      }
                    ]
                  },
                  "id": 9166,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcTokenOutGivenExactBptIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9068,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9056,
                        "mutability": "mutable",
                        "name": "amp",
                        "nodeType": "VariableDeclaration",
                        "scope": 9166,
                        "src": "16669:11:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9055,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16669:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9059,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9166,
                        "src": "16690:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9057,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "16690:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9058,
                          "nodeType": "ArrayTypeName",
                          "src": "16690:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9061,
                        "mutability": "mutable",
                        "name": "tokenIndex",
                        "nodeType": "VariableDeclaration",
                        "scope": 9166,
                        "src": "16725:18:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9060,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16725:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9063,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 9166,
                        "src": "16753:19:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9062,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16753:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9065,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 9166,
                        "src": "16782:22:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9064,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16782:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9067,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 9166,
                        "src": "16814:25:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9066,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16814:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16659:186:33"
                  },
                  "returnParameters": {
                    "id": 9071,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9070,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9166,
                        "src": "16869:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9069,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16869:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16868:9:33"
                  },
                  "scope": 9486,
                  "src": "16622:1480:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 9224,
                    "nodeType": "Block",
                    "src": "18290:1277:33",
                    "statements": [
                      {
                        "assignments": [
                          9180
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9180,
                            "mutability": "mutable",
                            "name": "bptRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 9224,
                            "src": "19282:16:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9179,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "19282:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9185,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9183,
                              "name": "bptTotalSupply",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9173,
                              "src": "19321:14:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9181,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9171,
                              "src": "19301:11:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9182,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "19301:19:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9184,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19301:35:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19282:54:33"
                      },
                      {
                        "assignments": [
                          9190
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9190,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 9224,
                            "src": "19347:27:33",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 9188,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "19347:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9189,
                              "nodeType": "ArrayTypeName",
                              "src": "19347:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9197,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 9194,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9169,
                                "src": "19391:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9195,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "19391:15:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9193,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "19377:13:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 9191,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "19381:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9192,
                              "nodeType": "ArrayTypeName",
                              "src": "19381:9:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 9196,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19377:30:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19347:60:33"
                      },
                      {
                        "body": {
                          "id": 9220,
                          "nodeType": "Block",
                          "src": "19463:70:33",
                          "statements": [
                            {
                              "expression": {
                                "id": 9218,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 9209,
                                    "name": "amountsOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9190,
                                    "src": "19477:10:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 9211,
                                  "indexExpression": {
                                    "id": 9210,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9199,
                                    "src": "19488:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "19477:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 9216,
                                      "name": "bptRatio",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9180,
                                      "src": "19513:8:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 9212,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9169,
                                        "src": "19493:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 9214,
                                      "indexExpression": {
                                        "id": 9213,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9199,
                                        "src": "19502:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "19493:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9215,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "mulDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1572,
                                    "src": "19493:19:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9217,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "19493:29:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "19477:45:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9219,
                              "nodeType": "ExpressionStatement",
                              "src": "19477:45:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 9205,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 9202,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9199,
                            "src": "19437:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 9203,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9169,
                              "src": "19441:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 9204,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "19441:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "19437:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 9221,
                        "initializationExpression": {
                          "assignments": [
                            9199
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 9199,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 9221,
                              "src": "19422:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 9198,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "19422:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 9201,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 9200,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "19434:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "19422:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 9207,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "19458:3:33",
                            "subExpression": {
                              "id": 9206,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9199,
                              "src": "19458:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9208,
                          "nodeType": "ExpressionStatement",
                          "src": "19458:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "19417:116:33"
                      },
                      {
                        "expression": {
                          "id": 9222,
                          "name": "amountsOut",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9190,
                          "src": "19550:10:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "functionReturnParameters": 9178,
                        "id": 9223,
                        "nodeType": "Return",
                        "src": "19543:17:33"
                      }
                    ]
                  },
                  "id": 9225,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcTokensOutGivenExactBptIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9174,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9169,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9225,
                        "src": "18156:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9167,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "18156:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9168,
                          "nodeType": "ArrayTypeName",
                          "src": "18156:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9171,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 9225,
                        "src": "18191:19:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9170,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "18191:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9173,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 9225,
                        "src": "18220:22:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9172,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "18220:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "18146:102:33"
                  },
                  "returnParameters": {
                    "id": 9178,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9177,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9225,
                        "src": "18272:16:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9175,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "18272:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9176,
                          "nodeType": "ArrayTypeName",
                          "src": "18272:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "18271:18:33"
                  },
                  "scope": 9486,
                  "src": "18108:1459:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 9275,
                    "nodeType": "Block",
                    "src": "19885:1901:33",
                    "statements": [
                      {
                        "assignments": [
                          9242
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9242,
                            "mutability": "mutable",
                            "name": "finalBalanceFeeToken",
                            "nodeType": "VariableDeclaration",
                            "scope": 9275,
                            "src": "21280:28:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9241,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "21280:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9249,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9244,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9227,
                              "src": "21374:22:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9245,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9230,
                              "src": "21410:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9246,
                              "name": "lastInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9232,
                              "src": "21432:13:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9247,
                              "name": "tokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9234,
                              "src": "21459:10:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9243,
                            "name": "_getTokenBalanceGivenInvariantAndAllOtherBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9485,
                            "src": "21311:49:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9248,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "21311:168:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "21280:199:33"
                      },
                      {
                        "assignments": [
                          9251
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9251,
                            "mutability": "mutable",
                            "name": "accumulatedTokenSwapFees",
                            "nodeType": "VariableDeclaration",
                            "scope": 9275,
                            "src": "21524:32:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9250,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "21524:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9265,
                        "initialValue": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 9256,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "baseExpression": {
                                "id": 9252,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9230,
                                "src": "21559:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9254,
                              "indexExpression": {
                                "id": 9253,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9234,
                                "src": "21568:10:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "21559:20:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": ">",
                            "rightExpression": {
                              "id": 9255,
                              "name": "finalBalanceFeeToken",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9242,
                              "src": "21582:20:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "21559:43:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "hexValue": "30",
                            "id": 9263,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "21678:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "id": 9264,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "21559:120:33",
                          "trueExpression": {
                            "arguments": [
                              {
                                "id": 9261,
                                "name": "finalBalanceFeeToken",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9242,
                                "src": "21642:20:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 9257,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9230,
                                  "src": "21617:8:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 9259,
                                "indexExpression": {
                                  "id": 9258,
                                  "name": "tokenIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9234,
                                  "src": "21626:10:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "21617:20:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9260,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1538,
                              "src": "21617:24:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 9262,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "21617:46:33",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "21524:155:33"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 9271,
                                "name": "FixedPoint",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1815,
                                "src": "21764:10:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                  "typeString": "type(library FixedPoint)"
                                }
                              },
                              "id": 9272,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ONE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1480,
                              "src": "21764:14:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 9268,
                                  "name": "protocolSwapFeePercentage",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9236,
                                  "src": "21729:25:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 9266,
                                  "name": "accumulatedTokenSwapFees",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9251,
                                  "src": "21696:24:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 9267,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "mulDown",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1572,
                                "src": "21696:32:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 9269,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "21696:59:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9270,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "21696:67:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9273,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "21696:83:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 9240,
                        "id": 9274,
                        "nodeType": "Return",
                        "src": "21689:90:33"
                      }
                    ]
                  },
                  "id": 9276,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcDueTokenProtocolSwapFeeAmount",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9237,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9227,
                        "mutability": "mutable",
                        "name": "amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 9276,
                        "src": "19679:30:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9226,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19679:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9230,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9276,
                        "src": "19719:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9228,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "19719:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9229,
                          "nodeType": "ArrayTypeName",
                          "src": "19719:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9232,
                        "mutability": "mutable",
                        "name": "lastInvariant",
                        "nodeType": "VariableDeclaration",
                        "scope": 9276,
                        "src": "19754:21:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9231,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19754:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9234,
                        "mutability": "mutable",
                        "name": "tokenIndex",
                        "nodeType": "VariableDeclaration",
                        "scope": 9276,
                        "src": "19785:18:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9233,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19785:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9236,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 9276,
                        "src": "19813:33:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9235,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19813:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19669:183:33"
                  },
                  "returnParameters": {
                    "id": 9240,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9239,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9276,
                        "src": "19876:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9238,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19876:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19875:9:33"
                  },
                  "scope": 9486,
                  "src": "19626:2160:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 9484,
                    "nodeType": "Block",
                    "src": "22172:1584:33",
                    "statements": [
                      {
                        "assignments": [
                          9291
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9291,
                            "mutability": "mutable",
                            "name": "ampTimesTotal",
                            "nodeType": "VariableDeclaration",
                            "scope": 9484,
                            "src": "22219:21:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9290,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "22219:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9298,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9294,
                              "name": "amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9278,
                              "src": "22252:22:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 9295,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9281,
                                "src": "22276:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9296,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "22276:15:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9292,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "22243:4:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 9293,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mul",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3292,
                            "src": "22243:8:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9297,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "22243:49:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "22219:73:33"
                      },
                      {
                        "assignments": [
                          9300
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9300,
                            "mutability": "mutable",
                            "name": "sum",
                            "nodeType": "VariableDeclaration",
                            "scope": 9484,
                            "src": "22302:11:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9299,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "22302:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9304,
                        "initialValue": {
                          "baseExpression": {
                            "id": 9301,
                            "name": "balances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9281,
                            "src": "22316:8:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "id": 9303,
                          "indexExpression": {
                            "hexValue": "30",
                            "id": 9302,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "22325:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "22316:11:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "22302:25:33"
                      },
                      {
                        "assignments": [
                          9306
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9306,
                            "mutability": "mutable",
                            "name": "P_D",
                            "nodeType": "VariableDeclaration",
                            "scope": 9484,
                            "src": "22337:11:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9305,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "22337:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9315,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 9309,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9281,
                                "src": "22360:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9310,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "22360:15:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "baseExpression": {
                                "id": 9311,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9281,
                                "src": "22377:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9313,
                              "indexExpression": {
                                "hexValue": "30",
                                "id": 9312,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "22386:1:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "22377:11:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9307,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "22351:4:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 9308,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mul",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3292,
                            "src": "22351:8:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9314,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "22351:38:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "22337:52:33"
                      },
                      {
                        "body": {
                          "id": 9355,
                          "nodeType": "Block",
                          "src": "22445:149:33",
                          "statements": [
                            {
                              "expression": {
                                "id": 9344,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 9327,
                                  "name": "P_D",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9306,
                                  "src": "22459:3:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "arguments": [
                                            {
                                              "id": 9334,
                                              "name": "P_D",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 9306,
                                              "src": "22496:3:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            {
                                              "baseExpression": {
                                                "id": 9335,
                                                "name": "balances",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 9281,
                                                "src": "22501:8:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                                  "typeString": "uint256[] memory"
                                                }
                                              },
                                              "id": 9337,
                                              "indexExpression": {
                                                "id": 9336,
                                                "name": "j",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 9317,
                                                "src": "22510:1:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "nodeType": "IndexAccess",
                                              "src": "22501:11:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "id": 9332,
                                              "name": "Math",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 3350,
                                              "src": "22487:4:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                "typeString": "type(library Math)"
                                              }
                                            },
                                            "id": 9333,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "mul",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 3292,
                                            "src": "22487:8:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 9338,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "22487:26:33",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "expression": {
                                            "id": 9339,
                                            "name": "balances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 9281,
                                            "src": "22515:8:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 9340,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "length",
                                          "nodeType": "MemberAccess",
                                          "src": "22515:15:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "id": 9330,
                                          "name": "Math",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 3350,
                                          "src": "22478:4:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                            "typeString": "type(library Math)"
                                          }
                                        },
                                        "id": 9331,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "mul",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 3292,
                                        "src": "22478:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 9341,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "22478:53:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 9342,
                                      "name": "invariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9283,
                                      "src": "22533:9:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 9328,
                                      "name": "Math",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3350,
                                      "src": "22465:4:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                        "typeString": "type(library Math)"
                                      }
                                    },
                                    "id": 9329,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3314,
                                    "src": "22465:12:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9343,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "22465:78:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "22459:84:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9345,
                              "nodeType": "ExpressionStatement",
                              "src": "22459:84:33"
                            },
                            {
                              "expression": {
                                "id": 9353,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 9346,
                                  "name": "sum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9300,
                                  "src": "22557:3:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 9349,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9281,
                                        "src": "22571:8:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 9351,
                                      "indexExpression": {
                                        "id": 9350,
                                        "name": "j",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9317,
                                        "src": "22580:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "22571:11:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 9347,
                                      "name": "sum",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9300,
                                      "src": "22563:3:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9348,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "22563:7:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9352,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "22563:20:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "22557:26:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9354,
                              "nodeType": "ExpressionStatement",
                              "src": "22557:26:33"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 9323,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 9320,
                            "name": "j",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9317,
                            "src": "22419:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 9321,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9281,
                              "src": "22423:8:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 9322,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "22423:15:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "22419:19:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 9356,
                        "initializationExpression": {
                          "assignments": [
                            9317
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 9317,
                              "mutability": "mutable",
                              "name": "j",
                              "nodeType": "VariableDeclaration",
                              "scope": 9356,
                              "src": "22404:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 9316,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "22404:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 9319,
                          "initialValue": {
                            "hexValue": "31",
                            "id": 9318,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "22416:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "22404:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 9325,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "22440:3:33",
                            "subExpression": {
                              "id": 9324,
                              "name": "j",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9317,
                              "src": "22440:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9326,
                          "nodeType": "ExpressionStatement",
                          "src": "22440:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "22399:195:33"
                      },
                      {
                        "expression": {
                          "id": 9364,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 9357,
                            "name": "sum",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9300,
                            "src": "22603:3:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "baseExpression": {
                                  "id": 9360,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9281,
                                  "src": "22617:8:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 9362,
                                "indexExpression": {
                                  "id": 9361,
                                  "name": "tokenIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9285,
                                  "src": "22626:10:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "22617:20:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 9358,
                                "name": "sum",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9300,
                                "src": "22609:3:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9359,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1538,
                              "src": "22609:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 9363,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "22609:29:33",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "22603:35:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9365,
                        "nodeType": "ExpressionStatement",
                        "src": "22603:35:33"
                      },
                      {
                        "assignments": [
                          9367
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9367,
                            "mutability": "mutable",
                            "name": "c",
                            "nodeType": "VariableDeclaration",
                            "scope": 9484,
                            "src": "22649:9:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9366,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "22649:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9377,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 9372,
                                  "name": "invariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9283,
                                  "src": "22681:9:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 9373,
                                  "name": "invariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9283,
                                  "src": "22692:9:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 9370,
                                  "name": "Math",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3350,
                                  "src": "22672:4:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                    "typeString": "type(library Math)"
                                  }
                                },
                                "id": 9371,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "mul",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3292,
                                "src": "22672:8:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 9374,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "22672:30:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9375,
                              "name": "ampTimesTotal",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9291,
                              "src": "22704:13:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9368,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "22661:4:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 9369,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3349,
                            "src": "22661:10:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9376,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "22661:57:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "22649:69:33"
                      },
                      {
                        "expression": {
                          "id": 9388,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 9378,
                            "name": "c",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9367,
                            "src": "22787:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 9386,
                                "name": "P_D",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9306,
                                "src": "22827:3:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 9381,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9281,
                                      "src": "22799:8:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    "id": 9383,
                                    "indexExpression": {
                                      "id": 9382,
                                      "name": "tokenIndex",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9285,
                                      "src": "22808:10:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "22799:20:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 9379,
                                    "name": "c",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9367,
                                    "src": "22791:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 9380,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mulUp",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1620,
                                  "src": "22791:7:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 9384,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "22791:29:33",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9385,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "divUp",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1718,
                              "src": "22791:35:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 9387,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "22791:40:33",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "22787:44:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9389,
                        "nodeType": "ExpressionStatement",
                        "src": "22787:44:33"
                      },
                      {
                        "assignments": [
                          9391
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9391,
                            "mutability": "mutable",
                            "name": "b",
                            "nodeType": "VariableDeclaration",
                            "scope": 9484,
                            "src": "22842:9:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9390,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "22842:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9399,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 9396,
                                  "name": "ampTimesTotal",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9291,
                                  "src": "22880:13:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 9394,
                                  "name": "invariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9283,
                                  "src": "22862:9:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 9395,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "divDown",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1666,
                                "src": "22862:17:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 9397,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "22862:32:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9392,
                              "name": "sum",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9300,
                              "src": "22854:3:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9393,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1512,
                            "src": "22854:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9398,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "22854:41:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "22842:53:33"
                      },
                      {
                        "assignments": [
                          9401
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9401,
                            "mutability": "mutable",
                            "name": "prevTokenBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 9484,
                            "src": "22948:24:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9400,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "22948:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9403,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 9402,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "22975:1:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "22948:28:33"
                      },
                      {
                        "assignments": [
                          9405
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9405,
                            "mutability": "mutable",
                            "name": "tokenBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 9484,
                            "src": "23123:20:33",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9404,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "23123:7:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9419,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 9416,
                                  "name": "b",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9391,
                                  "src": "23200:1:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 9414,
                                  "name": "invariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9283,
                                  "src": "23186:9:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 9415,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "add",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1512,
                                "src": "23186:13:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 9417,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "23186:16:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 9411,
                                  "name": "c",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9367,
                                  "src": "23177:1:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 9408,
                                      "name": "invariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9283,
                                      "src": "23162:9:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 9406,
                                      "name": "invariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9283,
                                      "src": "23146:9:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9407,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "mulUp",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1620,
                                    "src": "23146:15:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9409,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "23146:26:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 9410,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "add",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1512,
                                "src": "23146:30:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 9412,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "23146:33:33",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 9413,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "23146:39:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9418,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "23146:57:33",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "23123:80:33"
                      },
                      {
                        "body": {
                          "id": 9480,
                          "nodeType": "Block",
                          "src": "23248:473:33",
                          "statements": [
                            {
                              "expression": {
                                "id": 9432,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 9430,
                                  "name": "prevTokenBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9401,
                                  "src": "23262:16:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 9431,
                                  "name": "tokenBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9405,
                                  "src": "23281:12:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "23262:31:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9433,
                              "nodeType": "ExpressionStatement",
                              "src": "23262:31:33"
                            },
                            {
                              "expression": {
                                "id": 9455,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 9434,
                                  "name": "tokenBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9405,
                                  "src": "23308:12:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "id": 9452,
                                          "name": "invariant",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 9283,
                                          "src": "23423:9:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "arguments": [
                                            {
                                              "id": 9449,
                                              "name": "b",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 9391,
                                              "src": "23416:1:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "arguments": [
                                                {
                                                  "id": 9445,
                                                  "name": "tokenBalance",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 9405,
                                                  "src": "23395:12:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                {
                                                  "hexValue": "32",
                                                  "id": 9446,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": true,
                                                  "kind": "number",
                                                  "lValueRequested": false,
                                                  "nodeType": "Literal",
                                                  "src": "23409:1:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_rational_2_by_1",
                                                    "typeString": "int_const 2"
                                                  },
                                                  "value": "2"
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  },
                                                  {
                                                    "typeIdentifier": "t_rational_2_by_1",
                                                    "typeString": "int_const 2"
                                                  }
                                                ],
                                                "expression": {
                                                  "id": 9443,
                                                  "name": "Math",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 3350,
                                                  "src": "23386:4:33",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                                    "typeString": "type(library Math)"
                                                  }
                                                },
                                                "id": 9444,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "mul",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 3292,
                                                "src": "23386:8:33",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                }
                                              },
                                              "id": 9447,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "23386:25:33",
                                              "tryCall": false,
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "id": 9448,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "add",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1512,
                                            "src": "23386:29:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 9450,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "23386:32:33",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 9451,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "sub",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1538,
                                        "src": "23386:36:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 9453,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "23386:47:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 9440,
                                          "name": "c",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 9367,
                                          "src": "23360:1:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "arguments": [
                                            {
                                              "id": 9437,
                                              "name": "tokenBalance",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 9405,
                                              "src": "23342:12:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "id": 9435,
                                              "name": "tokenBalance",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 9405,
                                              "src": "23323:12:33",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "id": 9436,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "mulUp",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1620,
                                            "src": "23323:18:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 9438,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "23323:32:33",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 9439,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "add",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1512,
                                        "src": "23323:36:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 9441,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "23323:39:33",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9442,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divUp",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1718,
                                    "src": "23323:45:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9454,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "23323:124:33",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "23308:139:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9456,
                              "nodeType": "ExpressionStatement",
                              "src": "23308:139:33"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 9459,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 9457,
                                  "name": "tokenBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9405,
                                  "src": "23466:12:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">",
                                "rightExpression": {
                                  "id": 9458,
                                  "name": "prevTokenBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9401,
                                  "src": "23481:16:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "23466:31:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "condition": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 9475,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "arguments": [
                                      {
                                        "id": 9472,
                                        "name": "tokenBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9405,
                                        "src": "23653:12:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "id": 9470,
                                        "name": "prevTokenBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9401,
                                        "src": "23632:16:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 9471,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sub",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 1538,
                                      "src": "23632:20:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                                      }
                                    },
                                    "id": 9473,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "23632:34:33",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "<=",
                                  "rightExpression": {
                                    "hexValue": "31",
                                    "id": 9474,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "23670:1:33",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "23632:39:33",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "id": 9478,
                                "nodeType": "IfStatement",
                                "src": "23628:83:33",
                                "trueBody": {
                                  "id": 9477,
                                  "nodeType": "Block",
                                  "src": "23673:38:33",
                                  "statements": [
                                    {
                                      "id": 9476,
                                      "nodeType": "Break",
                                      "src": "23691:5:33"
                                    }
                                  ]
                                }
                              },
                              "id": 9479,
                              "nodeType": "IfStatement",
                              "src": "23462:249:33",
                              "trueBody": {
                                "id": 9469,
                                "nodeType": "Block",
                                "src": "23499:123:33",
                                "statements": [
                                  {
                                    "condition": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 9465,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "arguments": [
                                          {
                                            "id": 9462,
                                            "name": "prevTokenBalance",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 9401,
                                            "src": "23538:16:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "id": 9460,
                                            "name": "tokenBalance",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 9405,
                                            "src": "23521:12:33",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 9461,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "sub",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 1538,
                                          "src": "23521:16:33",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 9463,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "23521:34:33",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "<=",
                                      "rightExpression": {
                                        "hexValue": "31",
                                        "id": 9464,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "23559:1:33",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        },
                                        "value": "1"
                                      },
                                      "src": "23521:39:33",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "id": 9468,
                                    "nodeType": "IfStatement",
                                    "src": "23517:91:33",
                                    "trueBody": {
                                      "id": 9467,
                                      "nodeType": "Block",
                                      "src": "23562:46:33",
                                      "statements": [
                                        {
                                          "id": 9466,
                                          "nodeType": "Break",
                                          "src": "23584:5:33"
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 9426,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 9424,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9421,
                            "src": "23234:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "hexValue": "323535",
                            "id": 9425,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "23238:3:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_255_by_1",
                              "typeString": "int_const 255"
                            },
                            "value": "255"
                          },
                          "src": "23234:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 9481,
                        "initializationExpression": {
                          "assignments": [
                            9421
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 9421,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 9481,
                              "src": "23219:9:33",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 9420,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "23219:7:33",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 9423,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 9422,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "23231:1:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "23219:13:33"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 9428,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "23243:3:33",
                            "subExpression": {
                              "id": 9427,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9421,
                              "src": "23243:1:33",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9429,
                          "nodeType": "ExpressionStatement",
                          "src": "23243:3:33"
                        },
                        "nodeType": "ForStatement",
                        "src": "23214:507:33"
                      },
                      {
                        "expression": {
                          "id": 9482,
                          "name": "tokenBalance",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9405,
                          "src": "23737:12:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 9289,
                        "id": 9483,
                        "nodeType": "Return",
                        "src": "23730:19:33"
                      }
                    ]
                  },
                  "id": 9485,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getTokenBalanceGivenInvariantAndAllOtherBalances",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9286,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9278,
                        "mutability": "mutable",
                        "name": "amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 9485,
                        "src": "22014:30:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9277,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "22014:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9281,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9485,
                        "src": "22054:25:33",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9279,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "22054:7:33",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9280,
                          "nodeType": "ArrayTypeName",
                          "src": "22054:9:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9283,
                        "mutability": "mutable",
                        "name": "invariant",
                        "nodeType": "VariableDeclaration",
                        "scope": 9485,
                        "src": "22089:17:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9282,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "22089:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9285,
                        "mutability": "mutable",
                        "name": "tokenIndex",
                        "nodeType": "VariableDeclaration",
                        "scope": 9485,
                        "src": "22116:18:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9284,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "22116:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "22004:136:33"
                  },
                  "returnParameters": {
                    "id": 9289,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9288,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9485,
                        "src": "22163:7:33",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9287,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "22163:7:33",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "22162:9:33"
                  },
                  "scope": 9486,
                  "src": "21946:1810:33",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 9487,
              "src": "994:22764:33"
            }
          ],
          "src": "688:23071:33"
        },
        "id": 33
      },
      "src.sol/amm/pools/stable/StablePool.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/stable/StablePool.sol",
          "exportedSymbols": {
            "StablePool": [
              10513
            ]
          },
          "id": 10514,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 9488,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:34"
            },
            {
              "id": 9489,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:34"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
              "file": "../../lib/math/FixedPoint.sol",
              "id": 9490,
              "nodeType": "ImportDirective",
              "scope": 10514,
              "sourceUnit": 1816,
              "src": "747:39:34",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../../lib/helpers/InputHelpers.sol",
              "id": 9491,
              "nodeType": "ImportDirective",
              "scope": 10514,
              "sourceUnit": 1043,
              "src": "787:44:34",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/BaseGeneralPool.sol",
              "file": "../BaseGeneralPool.sol",
              "id": 9492,
              "nodeType": "ImportDirective",
              "scope": 10514,
              "sourceUnit": 6242,
              "src": "833:32:34",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/stable/StableMath.sol",
              "file": "./StableMath.sol",
              "id": 9493,
              "nodeType": "ImportDirective",
              "scope": 10514,
              "sourceUnit": 9487,
              "src": "867:26:34",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol",
              "file": "./StablePoolUserDataHelpers.sol",
              "id": 9494,
              "nodeType": "ImportDirective",
              "scope": 10514,
              "sourceUnit": 10776,
              "src": "894:41:34",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 9495,
                    "name": "BaseGeneralPool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6241,
                    "src": "960:15:34",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BaseGeneralPool_$6241",
                      "typeString": "contract BaseGeneralPool"
                    }
                  },
                  "id": 9496,
                  "nodeType": "InheritanceSpecifier",
                  "src": "960:15:34"
                },
                {
                  "baseName": {
                    "id": 9497,
                    "name": "StableMath",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 9486,
                    "src": "977:10:34",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_StableMath_$9486",
                      "typeString": "contract StableMath"
                    }
                  },
                  "id": 9498,
                  "nodeType": "InheritanceSpecifier",
                  "src": "977:10:34"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1473,
                3890,
                5095,
                5131,
                5976,
                6241,
                7928,
                8030,
                9486,
                20719,
                20760,
                20804
              ],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 10513,
              "linearizedBaseContracts": [
                10513,
                9486,
                6241,
                7928,
                1473,
                5976,
                3890,
                5131,
                5095,
                8030,
                343,
                911,
                20760,
                20719,
                20804
              ],
              "name": "StablePool",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 9501,
                  "libraryName": {
                    "id": 9499,
                    "name": "FixedPoint",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1815,
                    "src": "1000:10:34",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FixedPoint_$1815",
                      "typeString": "library FixedPoint"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "994:29:34",
                  "typeName": {
                    "id": 9500,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1015:7:34",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 9504,
                  "libraryName": {
                    "id": 9502,
                    "name": "StablePoolUserDataHelpers",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 10775,
                    "src": "1034:25:34",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_StablePoolUserDataHelpers_$10775",
                      "typeString": "library StablePoolUserDataHelpers"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1028:42:34",
                  "typeName": {
                    "id": 9503,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1064:5:34",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 9506,
                  "mutability": "immutable",
                  "name": "_amplificationParameter",
                  "nodeType": "VariableDeclaration",
                  "scope": 10513,
                  "src": "1076:49:34",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9505,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1076:7:34",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 9508,
                  "mutability": "mutable",
                  "name": "_lastInvariant",
                  "nodeType": "VariableDeclaration",
                  "scope": 10513,
                  "src": "1132:30:34",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9507,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1132:7:34",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "canonicalName": "StablePool.JoinKind",
                  "id": 9512,
                  "members": [
                    {
                      "id": 9509,
                      "name": "INIT",
                      "nodeType": "EnumValue",
                      "src": "1185:4:34"
                    },
                    {
                      "id": 9510,
                      "name": "EXACT_TOKENS_IN_FOR_BPT_OUT",
                      "nodeType": "EnumValue",
                      "src": "1191:27:34"
                    },
                    {
                      "id": 9511,
                      "name": "TOKEN_IN_FOR_EXACT_BPT_OUT",
                      "nodeType": "EnumValue",
                      "src": "1220:26:34"
                    }
                  ],
                  "name": "JoinKind",
                  "nodeType": "EnumDefinition",
                  "src": "1169:79:34"
                },
                {
                  "canonicalName": "StablePool.ExitKind",
                  "id": 9516,
                  "members": [
                    {
                      "id": 9513,
                      "name": "EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",
                      "nodeType": "EnumValue",
                      "src": "1269:30:34"
                    },
                    {
                      "id": 9514,
                      "name": "EXACT_BPT_IN_FOR_TOKENS_OUT",
                      "nodeType": "EnumValue",
                      "src": "1301:27:34"
                    },
                    {
                      "id": 9515,
                      "name": "BPT_IN_FOR_EXACT_TOKENS_OUT",
                      "nodeType": "EnumValue",
                      "src": "1330:27:34"
                    }
                  ],
                  "name": "ExitKind",
                  "nodeType": "EnumDefinition",
                  "src": "1253:106:34"
                },
                {
                  "body": {
                    "id": 9577,
                    "nodeType": "Block",
                    "src": "1900:288:34",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 9551,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 9549,
                                "name": "amplificationParameter",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9527,
                                "src": "1919:22:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 9550,
                                "name": "_MIN_AMP",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8168,
                                "src": "1945:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1919:34:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 9552,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "1955:6:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 9553,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MIN_AMP",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 447,
                              "src": "1955:14:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9548,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1910:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 9554,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1910:60:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9555,
                        "nodeType": "ExpressionStatement",
                        "src": "1910:60:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 9559,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 9557,
                                "name": "amplificationParameter",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9527,
                                "src": "1989:22:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 9558,
                                "name": "_MAX_AMP",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8174,
                                "src": "2015:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1989:34:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 9560,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2025:6:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 9561,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_AMP",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 450,
                              "src": "2025:14:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9556,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "1980:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 9562,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1980:60:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9563,
                        "nodeType": "ExpressionStatement",
                        "src": "1980:60:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 9568,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 9565,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9525,
                                  "src": "2060:6:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 9566,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "2060:13:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 9567,
                                "name": "_MAX_STABLE_TOKENS",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 8177,
                                "src": "2077:18:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "2060:35:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 9569,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2097:6:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 9570,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_STABLE_TOKENS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 456,
                              "src": "2097:24:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9564,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2051:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 9571,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2051:71:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9572,
                        "nodeType": "ExpressionStatement",
                        "src": "2051:71:34"
                      },
                      {
                        "expression": {
                          "id": 9575,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 9573,
                            "name": "_amplificationParameter",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9506,
                            "src": "2133:23:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 9574,
                            "name": "amplificationParameter",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9527,
                            "src": "2159:22:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2133:48:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9576,
                        "nodeType": "ExpressionStatement",
                        "src": "2133:48:34"
                      }
                    ]
                  },
                  "id": 9578,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 9538,
                          "name": "vault",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9518,
                          "src": "1705:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        {
                          "id": 9539,
                          "name": "name",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9520,
                          "src": "1724:4:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 9540,
                          "name": "symbol",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9522,
                          "src": "1742:6:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 9541,
                          "name": "tokens",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9525,
                          "src": "1762:6:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        {
                          "id": 9542,
                          "name": "swapFeePercentage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9529,
                          "src": "1782:17:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 9543,
                          "name": "pauseWindowDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9531,
                          "src": "1813:19:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 9544,
                          "name": "bufferPeriodDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9533,
                          "src": "1846:20:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 9545,
                          "name": "owner",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9535,
                          "src": "1880:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 9546,
                      "modifierName": {
                        "id": 9537,
                        "name": "BaseGeneralPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6241,
                        "src": "1676:15:34",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BaseGeneralPool_$6241_$",
                          "typeString": "type(contract BaseGeneralPool)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1676:219:34"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9536,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9518,
                        "mutability": "mutable",
                        "name": "vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1386:12:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 9517,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "1386:6:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9520,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1408:18:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 9519,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1408:6:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9522,
                        "mutability": "mutable",
                        "name": "symbol",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1436:20:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 9521,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1436:6:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9525,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1466:22:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9523,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1466:6:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 9524,
                          "nodeType": "ArrayTypeName",
                          "src": "1466:8:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9527,
                        "mutability": "mutable",
                        "name": "amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1498:30:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9526,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1498:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9529,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1538:25:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9528,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1538:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9531,
                        "mutability": "mutable",
                        "name": "pauseWindowDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1573:27:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9530,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1573:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9533,
                        "mutability": "mutable",
                        "name": "bufferPeriodDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1610:28:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9532,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1610:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9535,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 9578,
                        "src": "1648:13:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 9534,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1648:7:34",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1376:291:34"
                  },
                  "returnParameters": {
                    "id": 9547,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1900:0:34"
                  },
                  "scope": 10513,
                  "src": "1365:823:34",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 9585,
                    "nodeType": "Block",
                    "src": "2263:47:34",
                    "statements": [
                      {
                        "expression": {
                          "id": 9583,
                          "name": "_amplificationParameter",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9506,
                          "src": "2280:23:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 9582,
                        "id": 9584,
                        "nodeType": "Return",
                        "src": "2273:30:34"
                      }
                    ]
                  },
                  "functionSelector": "6daccffa",
                  "id": 9586,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getAmplificationParameter",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9579,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2228:2:34"
                  },
                  "returnParameters": {
                    "id": 9582,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9581,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9586,
                        "src": "2254:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9580,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2254:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2253:9:34"
                  },
                  "scope": 10513,
                  "src": "2194:116:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    6204
                  ],
                  "body": {
                    "id": 9617,
                    "nodeType": "Block",
                    "src": "2575:234:34",
                    "statements": [
                      {
                        "assignments": [
                          9604
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9604,
                            "mutability": "mutable",
                            "name": "amountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 9617,
                            "src": "2585:17:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9603,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2585:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9614,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9607,
                              "name": "_amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9506,
                              "src": "2645:23:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9608,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9591,
                              "src": "2682:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9609,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9593,
                              "src": "2704:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9610,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9595,
                              "src": "2725:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 9611,
                                "name": "swapRequest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9588,
                                "src": "2747:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 9612,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "amount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20792,
                              "src": "2747:18:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9605,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "2605:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 9606,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcOutGivenIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8431,
                            "src": "2605:26:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9613,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2605:170:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2585:190:34"
                      },
                      {
                        "expression": {
                          "id": 9615,
                          "name": "amountOut",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9604,
                          "src": "2793:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 9602,
                        "id": 9616,
                        "nodeType": "Return",
                        "src": "2786:16:34"
                      }
                    ]
                  },
                  "id": 9618,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 9599,
                      "modifierName": {
                        "id": 9598,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "2543:13:34",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2543:13:34"
                    }
                  ],
                  "name": "_onSwapGivenIn",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 9597,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2534:8:34"
                  },
                  "parameters": {
                    "id": 9596,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9588,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 9618,
                        "src": "2389:30:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 9587,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "2389:11:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9591,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9618,
                        "src": "2429:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9589,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2429:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9590,
                          "nodeType": "ArrayTypeName",
                          "src": "2429:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9593,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 9618,
                        "src": "2464:15:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9592,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2464:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9595,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 9618,
                        "src": "2489:16:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9594,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2489:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2379:132:34"
                  },
                  "returnParameters": {
                    "id": 9602,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9601,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9618,
                        "src": "2566:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9600,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2566:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2565:9:34"
                  },
                  "scope": 10513,
                  "src": "2356:453:34",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    6218
                  ],
                  "body": {
                    "id": 9649,
                    "nodeType": "Block",
                    "src": "3035:232:34",
                    "statements": [
                      {
                        "assignments": [
                          9636
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9636,
                            "mutability": "mutable",
                            "name": "amountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 9649,
                            "src": "3045:16:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9635,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3045:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9646,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9639,
                              "name": "_amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9506,
                              "src": "3104:23:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9640,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9623,
                              "src": "3141:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9641,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9625,
                              "src": "3163:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9642,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9627,
                              "src": "3184:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 9643,
                                "name": "swapRequest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9620,
                                "src": "3206:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 9644,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "amount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20792,
                              "src": "3206:18:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9637,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "3064:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 9638,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcInGivenOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8496,
                            "src": "3064:26:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9645,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3064:170:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3045:189:34"
                      },
                      {
                        "expression": {
                          "id": 9647,
                          "name": "amountIn",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9636,
                          "src": "3252:8:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 9634,
                        "id": 9648,
                        "nodeType": "Return",
                        "src": "3245:15:34"
                      }
                    ]
                  },
                  "id": 9650,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 9631,
                      "modifierName": {
                        "id": 9630,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "3003:13:34",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3003:13:34"
                    }
                  ],
                  "name": "_onSwapGivenOut",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 9629,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2994:8:34"
                  },
                  "parameters": {
                    "id": 9628,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9620,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 9650,
                        "src": "2849:30:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 9619,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "2849:11:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9623,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9650,
                        "src": "2889:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9621,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2889:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9622,
                          "nodeType": "ArrayTypeName",
                          "src": "2889:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9625,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 9650,
                        "src": "2924:15:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9624,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2924:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9627,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 9650,
                        "src": "2949:16:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9626,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2949:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2839:132:34"
                  },
                  "returnParameters": {
                    "id": 9634,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9633,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9650,
                        "src": "3026:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9632,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3026:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3025:9:34"
                  },
                  "scope": 10513,
                  "src": "2815:452:34",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    7305
                  ],
                  "body": {
                    "id": 9731,
                    "nodeType": "Block",
                    "src": "3483:585:34",
                    "statements": [
                      {
                        "assignments": [
                          9672
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9672,
                            "mutability": "mutable",
                            "name": "kind",
                            "nodeType": "VariableDeclaration",
                            "scope": 9731,
                            "src": "3493:24:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_JoinKind_$9512",
                              "typeString": "enum StablePool.JoinKind"
                            },
                            "typeName": {
                              "id": 9671,
                              "name": "StablePool.JoinKind",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 9512,
                              "src": "3493:19:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_JoinKind_$9512",
                                "typeString": "enum StablePool.JoinKind"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9676,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 9673,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9658,
                              "src": "3520:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 9674,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "joinKind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10606,
                            "src": "3520:17:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_enum$_JoinKind_$9512_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (enum StablePool.JoinKind)"
                            }
                          },
                          "id": 9675,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3520:19:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_JoinKind_$9512",
                            "typeString": "enum StablePool.JoinKind"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3493:46:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_enum$_JoinKind_$9512",
                                "typeString": "enum StablePool.JoinKind"
                              },
                              "id": 9682,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 9678,
                                "name": "kind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9672,
                                "src": "3558:4:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_JoinKind_$9512",
                                  "typeString": "enum StablePool.JoinKind"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "expression": {
                                  "expression": {
                                    "id": 9679,
                                    "name": "StablePool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10513,
                                    "src": "3566:10:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                      "typeString": "type(contract StablePool)"
                                    }
                                  },
                                  "id": 9680,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "JoinKind",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 9512,
                                  "src": "3566:19:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                    "typeString": "type(enum StablePool.JoinKind)"
                                  }
                                },
                                "id": 9681,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "INIT",
                                "nodeType": "MemberAccess",
                                "src": "3566:24:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_JoinKind_$9512",
                                  "typeString": "enum StablePool.JoinKind"
                                }
                              },
                              "src": "3558:32:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 9683,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3592:6:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 9684,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "UNINITIALIZED",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 435,
                              "src": "3592:20:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9677,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "3549:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 9685,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3549:64:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9686,
                        "nodeType": "ExpressionStatement",
                        "src": "3549:64:34"
                      },
                      {
                        "assignments": [
                          9691
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9691,
                            "mutability": "mutable",
                            "name": "amountsIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 9731,
                            "src": "3624:26:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 9689,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "3624:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9690,
                              "nodeType": "ArrayTypeName",
                              "src": "3624:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9695,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 9692,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9658,
                              "src": "3653:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 9693,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "initialAmountsIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10645,
                            "src": "3653:25:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256[] memory)"
                            }
                          },
                          "id": 9694,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3653:27:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3624:56:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 9699,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9691,
                                "src": "3726:9:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9700,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "3726:16:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 9701,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "3744:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 9702,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3744:17:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9696,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "3690:12:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 9698,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "3690:35:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 9703,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3690:72:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9704,
                        "nodeType": "ExpressionStatement",
                        "src": "3690:72:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 9706,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9691,
                              "src": "3786:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 9707,
                                "name": "_scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7638,
                                "src": "3797:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function () view returns (uint256[] memory)"
                                }
                              },
                              "id": 9708,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3797:17:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 9705,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "3772:13:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 9709,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3772:43:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9710,
                        "nodeType": "ExpressionStatement",
                        "src": "3772:43:34"
                      },
                      {
                        "assignments": [
                          9712
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9712,
                            "mutability": "mutable",
                            "name": "invariantAfterJoin",
                            "nodeType": "VariableDeclaration",
                            "scope": 9731,
                            "src": "3826:26:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9711,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3826:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9718,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9715,
                              "name": "_amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9506,
                              "src": "3886:23:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9716,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9691,
                              "src": "3911:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "expression": {
                              "id": 9713,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "3855:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 9714,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calculateInvariant",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8366,
                            "src": "3855:30:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 9717,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3855:66:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3826:95:34"
                      },
                      {
                        "assignments": [
                          9720
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9720,
                            "mutability": "mutable",
                            "name": "bptAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 9731,
                            "src": "3931:20:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9719,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3931:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9722,
                        "initialValue": {
                          "id": 9721,
                          "name": "invariantAfterJoin",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9712,
                          "src": "3954:18:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3931:41:34"
                      },
                      {
                        "expression": {
                          "id": 9725,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 9723,
                            "name": "_lastInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9508,
                            "src": "3983:14:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 9724,
                            "name": "invariantAfterJoin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9712,
                            "src": "4000:18:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3983:35:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9726,
                        "nodeType": "ExpressionStatement",
                        "src": "3983:35:34"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 9727,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9720,
                              "src": "4037:12:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9728,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9691,
                              "src": "4051:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 9729,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "4036:25:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 9668,
                        "id": 9730,
                        "nodeType": "Return",
                        "src": "4029:32:34"
                      }
                    ]
                  },
                  "id": 9732,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 9662,
                      "modifierName": {
                        "id": 9661,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "3433:13:34",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3433:13:34"
                    }
                  ],
                  "name": "_onInitializePool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 9660,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3424:8:34"
                  },
                  "parameters": {
                    "id": 9659,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9652,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9732,
                        "src": "3328:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 9651,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3328:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9654,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9732,
                        "src": "3345:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 9653,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3345:7:34",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9656,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9732,
                        "src": "3362:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 9655,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3362:7:34",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9658,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 9732,
                        "src": "3379:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 9657,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "3379:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3318:88:34"
                  },
                  "returnParameters": {
                    "id": 9668,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9664,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9732,
                        "src": "3456:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9663,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3456:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9667,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9732,
                        "src": "3465:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9665,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "3465:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9666,
                          "nodeType": "ArrayTypeName",
                          "src": "3465:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3455:27:34"
                  },
                  "scope": 10513,
                  "src": "3292:776:34",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    7332
                  ],
                  "body": {
                    "id": 9820,
                    "nodeType": "Block",
                    "src": "4475:1172:34",
                    "statements": [
                      {
                        "assignments": [
                          9765
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9765,
                            "mutability": "mutable",
                            "name": "dueProtocolFeeAmounts",
                            "nodeType": "VariableDeclaration",
                            "scope": 9820,
                            "src": "4791:38:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 9763,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4791:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9764,
                              "nodeType": "ArrayTypeName",
                              "src": "4791:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9771,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9767,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9741,
                              "src": "4871:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9768,
                              "name": "_lastInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9508,
                              "src": "4893:14:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9769,
                              "name": "protocolSwapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9745,
                              "src": "4921:25:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9766,
                            "name": "_getDueProtocolFeeAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10395,
                            "src": "4832:25:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256[] memory,uint256,uint256) view returns (uint256[] memory)"
                            }
                          },
                          "id": 9770,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4832:124:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4791:165:34"
                      },
                      {
                        "body": {
                          "id": 9796,
                          "nodeType": "Block",
                          "src": "5159:80:34",
                          "statements": [
                            {
                              "expression": {
                                "id": 9794,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 9783,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9741,
                                    "src": "5173:8:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 9785,
                                  "indexExpression": {
                                    "id": 9784,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9773,
                                    "src": "5182:1:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "5173:11:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 9790,
                                        "name": "dueProtocolFeeAmounts",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9765,
                                        "src": "5203:21:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 9792,
                                      "indexExpression": {
                                        "id": 9791,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9773,
                                        "src": "5225:1:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "5203:24:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 9786,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9741,
                                        "src": "5187:8:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 9788,
                                      "indexExpression": {
                                        "id": 9787,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 9773,
                                        "src": "5196:1:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "5187:11:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9789,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sub",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1538,
                                    "src": "5187:15:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9793,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5187:41:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5173:55:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9795,
                              "nodeType": "ExpressionStatement",
                              "src": "5173:55:34"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 9779,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 9776,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9773,
                            "src": "5131:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 9777,
                              "name": "_getTotalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6892,
                              "src": "5135:15:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 9778,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5135:17:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5131:21:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 9797,
                        "initializationExpression": {
                          "assignments": [
                            9773
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 9773,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 9797,
                              "src": "5116:9:34",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 9772,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5116:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 9775,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 9774,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5128:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "5116:13:34"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 9781,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "5154:3:34",
                            "subExpression": {
                              "id": 9780,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9773,
                              "src": "5156:1:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9782,
                          "nodeType": "ExpressionStatement",
                          "src": "5154:3:34"
                        },
                        "nodeType": "ForStatement",
                        "src": "5111:128:34"
                      },
                      {
                        "assignments": [
                          9799,
                          9802
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9799,
                            "mutability": "mutable",
                            "name": "bptAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 9820,
                            "src": "5250:20:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9798,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5250:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 9802,
                            "mutability": "mutable",
                            "name": "amountsIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 9820,
                            "src": "5272:26:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 9800,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5272:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9801,
                              "nodeType": "ArrayTypeName",
                              "src": "5272:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9807,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9804,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9741,
                              "src": "5310:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9805,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9747,
                              "src": "5320:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 9803,
                            "name": "_doJoin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9869,
                            "src": "5302:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                            }
                          },
                          "id": 9806,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5302:27:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5249:80:34"
                      },
                      {
                        "expression": {
                          "id": 9813,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 9808,
                            "name": "_lastInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9508,
                            "src": "5517:14:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 9810,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9741,
                                "src": "5554:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 9811,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9802,
                                "src": "5564:9:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              ],
                              "id": 9809,
                              "name": "_invariantAfterJoin",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10439,
                              "src": "5534:19:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                                "typeString": "function (uint256[] memory,uint256[] memory) view returns (uint256)"
                              }
                            },
                            "id": 9812,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5534:40:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5517:57:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9814,
                        "nodeType": "ExpressionStatement",
                        "src": "5517:57:34"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 9815,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9799,
                              "src": "5593:12:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9816,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9802,
                              "src": "5607:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9817,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9765,
                              "src": "5618:21:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 9818,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "5592:48:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 9760,
                        "id": 9819,
                        "nodeType": "Return",
                        "src": "5585:55:34"
                      }
                    ]
                  },
                  "id": 9821,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 9751,
                      "modifierName": {
                        "id": 9750,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "4349:13:34",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4349:13:34"
                    }
                  ],
                  "name": "_onJoinPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 9749,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4332:8:34"
                  },
                  "parameters": {
                    "id": 9748,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9734,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4117:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 9733,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4117:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9736,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4134:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 9735,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4134:7:34",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9738,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4151:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 9737,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4151:7:34",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9741,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4168:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9739,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4168:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9740,
                          "nodeType": "ArrayTypeName",
                          "src": "4168:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9743,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4203:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9742,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4203:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9745,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4220:33:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9744,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4220:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9747,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4263:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 9746,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "4263:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4107:183:34"
                  },
                  "returnParameters": {
                    "id": 9760,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9753,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4393:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9752,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4393:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9756,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4414:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9754,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4414:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9755,
                          "nodeType": "ArrayTypeName",
                          "src": "4414:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9759,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9821,
                        "src": "4444:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9757,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4444:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9758,
                          "nodeType": "ArrayTypeName",
                          "src": "4444:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4379:91:34"
                  },
                  "scope": 10513,
                  "src": "4087:1560:34",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 9868,
                    "nodeType": "Block",
                    "src": "5797:390:34",
                    "statements": [
                      {
                        "assignments": [
                          9835
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9835,
                            "mutability": "mutable",
                            "name": "kind",
                            "nodeType": "VariableDeclaration",
                            "scope": 9868,
                            "src": "5807:13:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_JoinKind_$9512",
                              "typeString": "enum StablePool.JoinKind"
                            },
                            "typeName": {
                              "id": 9834,
                              "name": "JoinKind",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 9512,
                              "src": "5807:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_JoinKind_$9512",
                                "typeString": "enum StablePool.JoinKind"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9839,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 9836,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9826,
                              "src": "5823:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 9837,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "joinKind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10606,
                            "src": "5823:17:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_enum$_JoinKind_$9512_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (enum StablePool.JoinKind)"
                            }
                          },
                          "id": 9838,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5823:19:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_JoinKind_$9512",
                            "typeString": "enum StablePool.JoinKind"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5807:35:34"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_JoinKind_$9512",
                            "typeString": "enum StablePool.JoinKind"
                          },
                          "id": 9843,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 9840,
                            "name": "kind",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9835,
                            "src": "5857:4:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_JoinKind_$9512",
                              "typeString": "enum StablePool.JoinKind"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 9841,
                              "name": "JoinKind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9512,
                              "src": "5865:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                "typeString": "type(enum StablePool.JoinKind)"
                              }
                            },
                            "id": 9842,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "EXACT_TOKENS_IN_FOR_BPT_OUT",
                            "nodeType": "MemberAccess",
                            "src": "5865:36:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_JoinKind_$9512",
                              "typeString": "enum StablePool.JoinKind"
                            }
                          },
                          "src": "5857:44:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_JoinKind_$9512",
                              "typeString": "enum StablePool.JoinKind"
                            },
                            "id": 9853,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 9850,
                              "name": "kind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9835,
                              "src": "5992:4:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_JoinKind_$9512",
                                "typeString": "enum StablePool.JoinKind"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 9851,
                                "name": "JoinKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9512,
                                "src": "6000:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                  "typeString": "type(enum StablePool.JoinKind)"
                                }
                              },
                              "id": 9852,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "TOKEN_IN_FOR_EXACT_BPT_OUT",
                              "nodeType": "MemberAccess",
                              "src": "6000:35:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_JoinKind_$9512",
                                "typeString": "enum StablePool.JoinKind"
                              }
                            },
                            "src": "5992:43:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 9865,
                            "nodeType": "Block",
                            "src": "6121:60:34",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "expression": {
                                        "id": 9861,
                                        "name": "Errors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 655,
                                        "src": "6143:6:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                          "typeString": "type(library Errors)"
                                        }
                                      },
                                      "id": 9862,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "UNHANDLED_JOIN_KIND",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 477,
                                      "src": "6143:26:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 9860,
                                    "name": "_revert",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 369,
                                    "src": "6135:7:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                                      "typeString": "function (uint256) pure"
                                    }
                                  },
                                  "id": 9863,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6135:35:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 9864,
                                "nodeType": "ExpressionStatement",
                                "src": "6135:35:34"
                              }
                            ]
                          },
                          "id": 9866,
                          "nodeType": "IfStatement",
                          "src": "5988:193:34",
                          "trueBody": {
                            "id": 9859,
                            "nodeType": "Block",
                            "src": "6037:78:34",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 9855,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9824,
                                      "src": "6085:8:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 9856,
                                      "name": "userData",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9826,
                                      "src": "6095:8:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    ],
                                    "id": 9854,
                                    "name": "_joinTokenInForExactBPTOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9990,
                                    "src": "6058:26:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                    }
                                  },
                                  "id": 9857,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6058:46:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "tuple(uint256,uint256[] memory)"
                                  }
                                },
                                "functionReturnParameters": 9833,
                                "id": 9858,
                                "nodeType": "Return",
                                "src": "6051:53:34"
                              }
                            ]
                          }
                        },
                        "id": 9867,
                        "nodeType": "IfStatement",
                        "src": "5853:328:34",
                        "trueBody": {
                          "id": 9849,
                          "nodeType": "Block",
                          "src": "5903:79:34",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 9845,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9824,
                                    "src": "5952:8:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 9846,
                                    "name": "userData",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9826,
                                    "src": "5962:8:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  ],
                                  "id": 9844,
                                  "name": "_joinExactTokensInForBPTOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9933,
                                  "src": "5924:27:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "function (uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                  }
                                },
                                "id": 9847,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5924:47:34",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256,uint256[] memory)"
                                }
                              },
                              "functionReturnParameters": 9833,
                              "id": 9848,
                              "nodeType": "Return",
                              "src": "5917:54:34"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 9869,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_doJoin",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9827,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9824,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9869,
                        "src": "5670:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9822,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "5670:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9823,
                          "nodeType": "ArrayTypeName",
                          "src": "5670:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9826,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 9869,
                        "src": "5697:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 9825,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "5697:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5669:50:34"
                  },
                  "returnParameters": {
                    "id": 9833,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9829,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9869,
                        "src": "5766:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9828,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5766:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9832,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9869,
                        "src": "5775:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9830,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "5775:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9831,
                          "nodeType": "ArrayTypeName",
                          "src": "5775:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5765:27:34"
                  },
                  "scope": 10513,
                  "src": "5653:534:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 9932,
                    "nodeType": "Block",
                    "src": "6357:588:34",
                    "statements": [
                      {
                        "assignments": [
                          9886,
                          9888
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9886,
                            "mutability": "mutable",
                            "name": "amountsIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 9932,
                            "src": "6368:26:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 9884,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "6368:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9885,
                              "nodeType": "ArrayTypeName",
                              "src": "6368:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 9888,
                            "mutability": "mutable",
                            "name": "minBPTAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 9932,
                            "src": "6396:23:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9887,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "6396:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9892,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 9889,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9874,
                              "src": "6423:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 9890,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "exactTokensInForBptOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10673,
                            "src": "6423:31:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256[] memory,uint256)"
                            }
                          },
                          "id": 9891,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6423:33:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6367:89:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 9896,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "6502:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 9897,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6502:17:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 9898,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9886,
                                "src": "6521:9:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 9899,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "6521:16:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9893,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "6466:12:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 9895,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "6466:35:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 9900,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6466:72:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9901,
                        "nodeType": "ExpressionStatement",
                        "src": "6466:72:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 9903,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9886,
                              "src": "6562:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 9904,
                                "name": "_scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7638,
                                "src": "6573:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function () view returns (uint256[] memory)"
                                }
                              },
                              "id": 9905,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6573:17:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 9902,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "6548:13:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 9906,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6548:43:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9907,
                        "nodeType": "ExpressionStatement",
                        "src": "6548:43:34"
                      },
                      {
                        "assignments": [
                          9909
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9909,
                            "mutability": "mutable",
                            "name": "bptAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 9932,
                            "src": "6602:20:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9908,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "6602:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9919,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9912,
                              "name": "_amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9506,
                              "src": "6679:23:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9913,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9872,
                              "src": "6716:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9914,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9886,
                              "src": "6738:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 9915,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "6761:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 9916,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6761:13:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9917,
                              "name": "_swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6481,
                              "src": "6788:18:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9910,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "6625:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 9911,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcBptOutGivenExactTokensIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8721,
                            "src": "6625:40:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9918,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6625:191:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6602:214:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 9923,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 9921,
                                "name": "bptAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9909,
                                "src": "6836:12:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 9922,
                                "name": "minBPTAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9888,
                                "src": "6852:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "6836:31:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 9924,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6869:6:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 9925,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "BPT_OUT_MIN_AMOUNT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 441,
                              "src": "6869:25:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9920,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6827:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 9926,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6827:68:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9927,
                        "nodeType": "ExpressionStatement",
                        "src": "6827:68:34"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 9928,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9909,
                              "src": "6914:12:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9929,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9886,
                              "src": "6928:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 9930,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "6913:25:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 9881,
                        "id": 9931,
                        "nodeType": "Return",
                        "src": "6906:32:34"
                      }
                    ]
                  },
                  "id": 9933,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_joinExactTokensInForBPTOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9875,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9872,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9933,
                        "src": "6230:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9870,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "6230:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9871,
                          "nodeType": "ArrayTypeName",
                          "src": "6230:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9874,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 9933,
                        "src": "6257:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 9873,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "6257:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6229:50:34"
                  },
                  "returnParameters": {
                    "id": 9881,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9877,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9933,
                        "src": "6326:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9876,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6326:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9880,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9933,
                        "src": "6335:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9878,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "6335:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9879,
                          "nodeType": "ArrayTypeName",
                          "src": "6335:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6325:27:34"
                  },
                  "scope": 10513,
                  "src": "6193:752:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 9989,
                    "nodeType": "Block",
                    "src": "7114:677:34",
                    "statements": [
                      {
                        "assignments": [
                          9947,
                          9949
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9947,
                            "mutability": "mutable",
                            "name": "bptAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 9989,
                            "src": "7125:20:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9946,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7125:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 9949,
                            "mutability": "mutable",
                            "name": "tokenIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 9989,
                            "src": "7147:18:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9948,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7147:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9953,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 9950,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9938,
                              "src": "7169:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 9951,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "tokenInForExactBptOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10699,
                            "src": "7169:30:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256,uint256)"
                            }
                          },
                          "id": 9952,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7169:32:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                            "typeString": "tuple(uint256,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7124:77:34"
                      },
                      {
                        "assignments": [
                          9955
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9955,
                            "mutability": "mutable",
                            "name": "amountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 9989,
                            "src": "7212:16:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 9954,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7212:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9966,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 9958,
                              "name": "_amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9506,
                              "src": "7284:23:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9959,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9936,
                              "src": "7321:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 9960,
                              "name": "tokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9949,
                              "src": "7343:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9961,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9947,
                              "src": "7367:12:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 9962,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "7393:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 9963,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7393:13:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9964,
                              "name": "_swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6481,
                              "src": "7420:18:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 9956,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "7231:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 9957,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcTokenInGivenExactBptOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8833,
                            "src": "7231:39:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256,uint256,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 9965,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7231:217:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7212:236:34"
                      },
                      {
                        "assignments": [
                          9971
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 9971,
                            "mutability": "mutable",
                            "name": "downscaledAmountsIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 9989,
                            "src": "7608:36:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 9969,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "7608:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9970,
                              "nodeType": "ArrayTypeName",
                              "src": "7608:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 9978,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 9975,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "7661:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 9976,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7661:17:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 9974,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "7647:13:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 9972,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "7651:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9973,
                              "nodeType": "ArrayTypeName",
                              "src": "7651:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 9977,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7647:32:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7608:71:34"
                      },
                      {
                        "expression": {
                          "id": 9983,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 9979,
                              "name": "downscaledAmountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9971,
                              "src": "7689:19:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 9981,
                            "indexExpression": {
                              "id": 9980,
                              "name": "tokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9949,
                              "src": "7709:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "7689:31:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 9982,
                            "name": "amountIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9955,
                            "src": "7723:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7689:42:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9984,
                        "nodeType": "ExpressionStatement",
                        "src": "7689:42:34"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 9985,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9947,
                              "src": "7750:12:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 9986,
                              "name": "downscaledAmountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9971,
                              "src": "7764:19:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 9987,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "7749:35:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 9945,
                        "id": 9988,
                        "nodeType": "Return",
                        "src": "7742:42:34"
                      }
                    ]
                  },
                  "id": 9990,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_joinTokenInForExactBPTOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 9939,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9936,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 9990,
                        "src": "6987:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9934,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "6987:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9935,
                          "nodeType": "ArrayTypeName",
                          "src": "6987:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9938,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 9990,
                        "src": "7014:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 9937,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "7014:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6986:50:34"
                  },
                  "returnParameters": {
                    "id": 9945,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9941,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9990,
                        "src": "7083:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 9940,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7083:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9944,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 9990,
                        "src": "7092:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9942,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "7092:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9943,
                          "nodeType": "ArrayTypeName",
                          "src": "7092:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7082:27:34"
                  },
                  "scope": 10513,
                  "src": "6951:840:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "baseFunctions": [
                    7359
                  ],
                  "body": {
                    "id": 10086,
                    "nodeType": "Block",
                    "src": "8221:1357:34",
                    "statements": [
                      {
                        "condition": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 10017,
                            "name": "_isNotPaused",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1456,
                            "src": "8235:12:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                              "typeString": "function () view returns (bool)"
                            }
                          },
                          "id": 10018,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8235:14:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 10063,
                          "nodeType": "Block",
                          "src": "8998:196:34",
                          "statements": [
                            {
                              "expression": {
                                "id": 10061,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 10054,
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10015,
                                  "src": "9127:21:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "id": 10058,
                                        "name": "_getTotalTokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 6892,
                                        "src": "9165:15:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                          "typeString": "function () view returns (uint256)"
                                        }
                                      },
                                      "id": 10059,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "9165:17:34",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 10057,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "NewExpression",
                                    "src": "9151:13:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256) pure returns (uint256[] memory)"
                                    },
                                    "typeName": {
                                      "baseType": {
                                        "id": 10055,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "9155:7:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 10056,
                                      "nodeType": "ArrayTypeName",
                                      "src": "9155:9:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                        "typeString": "uint256[]"
                                      }
                                    }
                                  },
                                  "id": 10060,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "9151:32:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "src": "9127:56:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 10062,
                              "nodeType": "ExpressionStatement",
                              "src": "9127:56:34"
                            }
                          ]
                        },
                        "id": 10064,
                        "nodeType": "IfStatement",
                        "src": "8231:963:34",
                        "trueBody": {
                          "id": 10053,
                          "nodeType": "Block",
                          "src": "8251:741:34",
                          "statements": [
                            {
                              "expression": {
                                "id": 10025,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 10019,
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10015,
                                  "src": "8577:21:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 10021,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9999,
                                      "src": "8627:8:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 10022,
                                      "name": "_lastInvariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9508,
                                      "src": "8637:14:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 10023,
                                      "name": "protocolSwapFeePercentage",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10003,
                                      "src": "8653:25:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 10020,
                                    "name": "_getDueProtocolFeeAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10395,
                                    "src": "8601:25:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256[] memory,uint256,uint256) view returns (uint256[] memory)"
                                    }
                                  },
                                  "id": 10024,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "8601:78:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "src": "8577:102:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 10026,
                              "nodeType": "ExpressionStatement",
                              "src": "8577:102:34"
                            },
                            {
                              "body": {
                                "id": 10051,
                                "nodeType": "Block",
                                "src": "8894:88:34",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 10049,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "baseExpression": {
                                          "id": 10038,
                                          "name": "balances",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 9999,
                                          "src": "8912:8:34",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                            "typeString": "uint256[] memory"
                                          }
                                        },
                                        "id": 10040,
                                        "indexExpression": {
                                          "id": 10039,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 10028,
                                          "src": "8921:1:34",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": true,
                                        "nodeType": "IndexAccess",
                                        "src": "8912:11:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "arguments": [
                                          {
                                            "baseExpression": {
                                              "id": 10045,
                                              "name": "dueProtocolFeeAmounts",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 10015,
                                              "src": "8942:21:34",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                                "typeString": "uint256[] memory"
                                              }
                                            },
                                            "id": 10047,
                                            "indexExpression": {
                                              "id": 10046,
                                              "name": "i",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 10028,
                                              "src": "8964:1:34",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "isConstant": false,
                                            "isLValue": true,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "IndexAccess",
                                            "src": "8942:24:34",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "baseExpression": {
                                              "id": 10041,
                                              "name": "balances",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 9999,
                                              "src": "8926:8:34",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                                "typeString": "uint256[] memory"
                                              }
                                            },
                                            "id": 10043,
                                            "indexExpression": {
                                              "id": 10042,
                                              "name": "i",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 10028,
                                              "src": "8935:1:34",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "isConstant": false,
                                            "isLValue": true,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "IndexAccess",
                                            "src": "8926:11:34",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 10044,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "sub",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 1538,
                                          "src": "8926:15:34",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 10048,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "8926:41:34",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "8912:55:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 10050,
                                    "nodeType": "ExpressionStatement",
                                    "src": "8912:55:34"
                                  }
                                ]
                              },
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 10034,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 10031,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10028,
                                  "src": "8866:1:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 10032,
                                    "name": "_getTotalTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6892,
                                    "src": "8870:15:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                      "typeString": "function () view returns (uint256)"
                                    }
                                  },
                                  "id": 10033,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "8870:17:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "8866:21:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 10052,
                              "initializationExpression": {
                                "assignments": [
                                  10028
                                ],
                                "declarations": [
                                  {
                                    "constant": false,
                                    "id": 10028,
                                    "mutability": "mutable",
                                    "name": "i",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 10052,
                                    "src": "8851:9:34",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "typeName": {
                                      "id": 10027,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "8851:7:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "visibility": "internal"
                                  }
                                ],
                                "id": 10030,
                                "initialValue": {
                                  "hexValue": "30",
                                  "id": 10029,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "8863:1:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "nodeType": "VariableDeclarationStatement",
                                "src": "8851:13:34"
                              },
                              "loopExpression": {
                                "expression": {
                                  "id": 10036,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "UnaryOperation",
                                  "operator": "++",
                                  "prefix": true,
                                  "src": "8889:3:34",
                                  "subExpression": {
                                    "id": 10035,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10028,
                                    "src": "8891:1:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 10037,
                                "nodeType": "ExpressionStatement",
                                "src": "8889:3:34"
                              },
                              "nodeType": "ForStatement",
                              "src": "8846:136:34"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 10072,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 10065,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10009,
                                "src": "9205:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10066,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10012,
                                "src": "9218:10:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "id": 10067,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "9204:25:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256,uint256[] memory)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10069,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9999,
                                "src": "9240:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 10070,
                                "name": "userData",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10005,
                                "src": "9250:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              ],
                              "id": 10068,
                              "name": "_doExit",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10135,
                              "src": "9232:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                              }
                            },
                            "id": 10071,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9232:27:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256,uint256[] memory)"
                            }
                          },
                          "src": "9204:55:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10073,
                        "nodeType": "ExpressionStatement",
                        "src": "9204:55:34"
                      },
                      {
                        "expression": {
                          "id": 10079,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 10074,
                            "name": "_lastInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9508,
                            "src": "9447:14:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10076,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9999,
                                "src": "9484:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 10077,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10012,
                                "src": "9494:10:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              ],
                              "id": 10075,
                              "name": "_invariantAfterExit",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10483,
                              "src": "9464:19:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                                "typeString": "function (uint256[] memory,uint256[] memory) view returns (uint256)"
                              }
                            },
                            "id": 10078,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9464:41:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "9447:58:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 10080,
                        "nodeType": "ExpressionStatement",
                        "src": "9447:58:34"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 10081,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10009,
                              "src": "9524:11:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 10082,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10012,
                              "src": "9537:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 10083,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10015,
                              "src": "9549:21:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 10084,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "9523:48:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 10016,
                        "id": 10085,
                        "nodeType": "Return",
                        "src": "9516:55:34"
                      }
                    ]
                  },
                  "id": 10087,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onExitPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 10007,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "8055:8:34"
                  },
                  "parameters": {
                    "id": 10006,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 9992,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "7840:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 9991,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7840:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9994,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "7857:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 9993,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "7857:7:34",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9996,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "7874:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 9995,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "7874:7:34",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 9999,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "7891:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 9997,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "7891:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9998,
                          "nodeType": "ArrayTypeName",
                          "src": "7891:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10001,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "7926:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10000,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7926:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10003,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "7943:33:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10002,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7943:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10005,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "7986:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10004,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "7986:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7830:183:34"
                  },
                  "returnParameters": {
                    "id": 10016,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10009,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "8094:19:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10008,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8094:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10012,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "8127:27:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10010,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "8127:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10011,
                          "nodeType": "ArrayTypeName",
                          "src": "8127:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10015,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 10087,
                        "src": "8168:38:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10013,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "8168:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10014,
                          "nodeType": "ArrayTypeName",
                          "src": "8168:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8080:136:34"
                  },
                  "scope": 10513,
                  "src": "7810:1768:34",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10134,
                    "nodeType": "Block",
                    "src": "9728:465:34",
                    "statements": [
                      {
                        "assignments": [
                          10101
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10101,
                            "mutability": "mutable",
                            "name": "kind",
                            "nodeType": "VariableDeclaration",
                            "scope": 10134,
                            "src": "9738:13:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_ExitKind_$9516",
                              "typeString": "enum StablePool.ExitKind"
                            },
                            "typeName": {
                              "id": 10100,
                              "name": "ExitKind",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 9516,
                              "src": "9738:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_ExitKind_$9516",
                                "typeString": "enum StablePool.ExitKind"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10105,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 10102,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10092,
                              "src": "9754:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 10103,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "exitKind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10622,
                            "src": "9754:17:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_enum$_ExitKind_$9516_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (enum StablePool.ExitKind)"
                            }
                          },
                          "id": 10104,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9754:19:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_ExitKind_$9516",
                            "typeString": "enum StablePool.ExitKind"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9738:35:34"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_ExitKind_$9516",
                            "typeString": "enum StablePool.ExitKind"
                          },
                          "id": 10109,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 10106,
                            "name": "kind",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10101,
                            "src": "9788:4:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_ExitKind_$9516",
                              "typeString": "enum StablePool.ExitKind"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 10107,
                              "name": "ExitKind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9516,
                              "src": "9796:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_ExitKind_$9516_$",
                                "typeString": "type(enum StablePool.ExitKind)"
                              }
                            },
                            "id": 10108,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",
                            "nodeType": "MemberAccess",
                            "src": "9796:39:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_ExitKind_$9516",
                              "typeString": "enum StablePool.ExitKind"
                            }
                          },
                          "src": "9788:47:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_ExitKind_$9516",
                              "typeString": "enum StablePool.ExitKind"
                            },
                            "id": 10119,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 10116,
                              "name": "kind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10101,
                              "src": "9925:4:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_ExitKind_$9516",
                                "typeString": "enum StablePool.ExitKind"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 10117,
                                "name": "ExitKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9516,
                                "src": "9933:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_ExitKind_$9516_$",
                                  "typeString": "type(enum StablePool.ExitKind)"
                                }
                              },
                              "id": 10118,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "EXACT_BPT_IN_FOR_TOKENS_OUT",
                              "nodeType": "MemberAccess",
                              "src": "9933:36:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_ExitKind_$9516",
                                "typeString": "enum StablePool.ExitKind"
                              }
                            },
                            "src": "9925:44:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 10131,
                            "nodeType": "Block",
                            "src": "10056:131:34",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 10127,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10090,
                                      "src": "10157:8:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 10128,
                                      "name": "userData",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10092,
                                      "src": "10167:8:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    ],
                                    "id": 10126,
                                    "name": "_exitBPTInForExactTokensOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10305,
                                    "src": "10129:27:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                    }
                                  },
                                  "id": 10129,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "10129:47:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "tuple(uint256,uint256[] memory)"
                                  }
                                },
                                "functionReturnParameters": 10099,
                                "id": 10130,
                                "nodeType": "Return",
                                "src": "10122:54:34"
                              }
                            ]
                          },
                          "id": 10132,
                          "nodeType": "IfStatement",
                          "src": "9921:266:34",
                          "trueBody": {
                            "id": 10125,
                            "nodeType": "Block",
                            "src": "9971:79:34",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 10121,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10090,
                                      "src": "10020:8:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 10122,
                                      "name": "userData",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10092,
                                      "src": "10030:8:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    ],
                                    "id": 10120,
                                    "name": "_exitExactBPTInForTokensOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10239,
                                    "src": "9992:27:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                    }
                                  },
                                  "id": 10123,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "9992:47:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "tuple(uint256,uint256[] memory)"
                                  }
                                },
                                "functionReturnParameters": 10099,
                                "id": 10124,
                                "nodeType": "Return",
                                "src": "9985:54:34"
                              }
                            ]
                          }
                        },
                        "id": 10133,
                        "nodeType": "IfStatement",
                        "src": "9784:403:34",
                        "trueBody": {
                          "id": 10115,
                          "nodeType": "Block",
                          "src": "9837:78:34",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 10111,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10090,
                                    "src": "9885:8:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 10112,
                                    "name": "userData",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10092,
                                    "src": "9895:8:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  ],
                                  "id": 10110,
                                  "name": "_exitExactBPTInForTokenOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10202,
                                  "src": "9858:26:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "function (uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                  }
                                },
                                "id": 10113,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9858:46:34",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256,uint256[] memory)"
                                }
                              },
                              "functionReturnParameters": 10099,
                              "id": 10114,
                              "nodeType": "Return",
                              "src": "9851:53:34"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 10135,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_doExit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10093,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10090,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10135,
                        "src": "9601:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10088,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "9601:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10089,
                          "nodeType": "ArrayTypeName",
                          "src": "9601:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10092,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 10135,
                        "src": "9628:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10091,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "9628:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9600:50:34"
                  },
                  "returnParameters": {
                    "id": 10099,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10095,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10135,
                        "src": "9697:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10094,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9697:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10098,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10135,
                        "src": "9706:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10096,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "9706:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10097,
                          "nodeType": "ArrayTypeName",
                          "src": "9706:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9696:27:34"
                  },
                  "scope": 10513,
                  "src": "9584:609:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 10201,
                    "nodeType": "Block",
                    "src": "10384:749:34",
                    "statements": [
                      {
                        "assignments": [
                          10151
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10151,
                            "mutability": "mutable",
                            "name": "totalTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 10201,
                            "src": "10463:19:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10150,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10463:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10154,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 10152,
                            "name": "_getTotalTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6892,
                            "src": "10485:15:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                              "typeString": "function () view returns (uint256)"
                            }
                          },
                          "id": 10153,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10485:17:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10463:39:34"
                      },
                      {
                        "assignments": [
                          10156,
                          10158
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10156,
                            "mutability": "mutable",
                            "name": "bptAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 10201,
                            "src": "10513:19:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10155,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10513:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 10158,
                            "mutability": "mutable",
                            "name": "tokenIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 10201,
                            "src": "10534:18:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10157,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10534:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10162,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 10159,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10140,
                              "src": "10556:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 10160,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "exactBptInForTokenOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10725,
                            "src": "10556:30:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256,uint256)"
                            }
                          },
                          "id": 10161,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10556:32:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                            "typeString": "tuple(uint256,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10512:76:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 10166,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 10164,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10158,
                                "src": "10607:10:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "id": 10165,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10151,
                                "src": "10620:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "10607:24:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 10167,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "10633:6:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 10168,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 402,
                              "src": "10633:20:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 10163,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "10598:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 10169,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10598:56:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10170,
                        "nodeType": "ExpressionStatement",
                        "src": "10598:56:34"
                      },
                      {
                        "assignments": [
                          10175
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10175,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 10201,
                            "src": "10775:27:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 10173,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10775:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10174,
                              "nodeType": "ArrayTypeName",
                              "src": "10775:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10181,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10179,
                              "name": "totalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10151,
                              "src": "10819:11:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 10178,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "10805:13:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 10176,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10809:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10177,
                              "nodeType": "ArrayTypeName",
                              "src": "10809:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 10180,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10805:26:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10775:56:34"
                      },
                      {
                        "expression": {
                          "id": 10195,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 10182,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10175,
                              "src": "10842:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 10184,
                            "indexExpression": {
                              "id": 10183,
                              "name": "tokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10158,
                              "src": "10853:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "10842:22:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10187,
                                "name": "_amplificationParameter",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9506,
                                "src": "10920:23:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10188,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10138,
                                "src": "10957:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 10189,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10158,
                                "src": "10979:10:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10190,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10156,
                                "src": "11003:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 10191,
                                  "name": "totalSupply",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5787,
                                  "src": "11028:11:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view returns (uint256)"
                                  }
                                },
                                "id": 10192,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11028:13:34",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10193,
                                "name": "_swapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6481,
                                "src": "11055:18:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 10185,
                                "name": "StableMath",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9486,
                                "src": "10867:10:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                  "typeString": "type(contract StableMath)"
                                }
                              },
                              "id": 10186,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_calcTokenOutGivenExactBptIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 9166,
                              "src": "10867:39:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256[] memory,uint256,uint256,uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 10194,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "10867:216:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "10842:241:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 10196,
                        "nodeType": "ExpressionStatement",
                        "src": "10842:241:34"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 10197,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10156,
                              "src": "11102:11:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 10198,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10175,
                              "src": "11115:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 10199,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "11101:25:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 10149,
                        "id": 10200,
                        "nodeType": "Return",
                        "src": "11094:32:34"
                      }
                    ]
                  },
                  "id": 10202,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 10143,
                      "modifierName": {
                        "id": 10142,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "10322:13:34",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "10322:13:34"
                    }
                  ],
                  "name": "_exitExactBPTInForTokenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10141,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10138,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10202,
                        "src": "10235:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10136,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "10235:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10137,
                          "nodeType": "ArrayTypeName",
                          "src": "10235:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10140,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 10202,
                        "src": "10262:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10139,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "10262:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10234:50:34"
                  },
                  "returnParameters": {
                    "id": 10149,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10145,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10202,
                        "src": "10353:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10144,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "10353:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10148,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10202,
                        "src": "10362:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10146,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "10362:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10147,
                          "nodeType": "ArrayTypeName",
                          "src": "10362:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10352:27:34"
                  },
                  "scope": 10513,
                  "src": "10199:934:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 10238,
                    "nodeType": "Block",
                    "src": "11303:644:34",
                    "statements": [
                      {
                        "assignments": [
                          10216
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10216,
                            "mutability": "mutable",
                            "name": "bptAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 10238,
                            "src": "11723:19:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10215,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11723:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10220,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 10217,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10207,
                              "src": "11745:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 10218,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "exactBptInForTokensOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10746,
                            "src": "11745:31:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 10219,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11745:33:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11723:55:34"
                      },
                      {
                        "assignments": [
                          10225
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10225,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 10238,
                            "src": "11789:27:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 10223,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11789:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10224,
                              "nodeType": "ArrayTypeName",
                              "src": "11789:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10233,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10228,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10205,
                              "src": "11860:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 10229,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10216,
                              "src": "11870:11:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 10230,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "11883:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 10231,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "11883:13:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10226,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "11819:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 10227,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcTokensOutGivenExactBptIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 9225,
                            "src": "11819:40:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256[] memory,uint256,uint256) pure returns (uint256[] memory)"
                            }
                          },
                          "id": 10232,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11819:78:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11789:108:34"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 10234,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10216,
                              "src": "11916:11:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 10235,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10225,
                              "src": "11929:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 10236,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "11915:25:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 10214,
                        "id": 10237,
                        "nodeType": "Return",
                        "src": "11908:32:34"
                      }
                    ]
                  },
                  "id": 10239,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_exitExactBPTInForTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10208,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10205,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10239,
                        "src": "11176:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10203,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11176:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10204,
                          "nodeType": "ArrayTypeName",
                          "src": "11176:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10207,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 10239,
                        "src": "11203:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10206,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "11203:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11175:50:34"
                  },
                  "returnParameters": {
                    "id": 10214,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10210,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10239,
                        "src": "11272:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10209,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11272:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10213,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10239,
                        "src": "11281:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10211,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11281:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10212,
                          "nodeType": "ArrayTypeName",
                          "src": "11281:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11271:27:34"
                  },
                  "scope": 10513,
                  "src": "11139:808:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 10304,
                    "nodeType": "Block",
                    "src": "12139:658:34",
                    "statements": [
                      {
                        "assignments": [
                          10258,
                          10260
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10258,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 10304,
                            "src": "12220:27:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 10256,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "12220:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10257,
                              "nodeType": "ArrayTypeName",
                              "src": "12220:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 10260,
                            "mutability": "mutable",
                            "name": "maxBPTAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 10304,
                            "src": "12249:22:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10259,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "12249:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10264,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 10261,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10244,
                              "src": "12275:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 10262,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bptInForExactTokensOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10774,
                            "src": "12275:31:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256[] memory,uint256)"
                            }
                          },
                          "id": 10263,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12275:33:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12219:89:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 10268,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10258,
                                "src": "12354:10:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 10269,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "12354:17:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 10270,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "12373:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 10271,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12373:17:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10265,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "12318:12:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 10267,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "12318:35:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 10272,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12318:73:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10273,
                        "nodeType": "ExpressionStatement",
                        "src": "12318:73:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 10275,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10258,
                              "src": "12416:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 10276,
                                "name": "_scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7638,
                                "src": "12428:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function () view returns (uint256[] memory)"
                                }
                              },
                              "id": 10277,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12428:17:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 10274,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "12402:13:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 10278,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12402:44:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10279,
                        "nodeType": "ExpressionStatement",
                        "src": "12402:44:34"
                      },
                      {
                        "assignments": [
                          10281
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10281,
                            "mutability": "mutable",
                            "name": "bptAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 10304,
                            "src": "12457:19:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10280,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "12457:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10291,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10284,
                              "name": "_amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9506,
                              "src": "12533:23:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 10285,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10242,
                              "src": "12570:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 10286,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10258,
                              "src": "12592:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 10287,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "12616:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 10288,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12616:13:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 10289,
                              "name": "_swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6481,
                              "src": "12643:18:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10282,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "12479:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 10283,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcBptInGivenExactTokensOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 9054,
                            "src": "12479:40:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10290,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12479:192:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12457:214:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 10295,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 10293,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10281,
                                "src": "12691:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 10294,
                                "name": "maxBPTAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10260,
                                "src": "12706:14:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "12691:29:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 10296,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "12722:6:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 10297,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "BPT_IN_MAX_AMOUNT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 438,
                              "src": "12722:24:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 10292,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "12682:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 10298,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12682:65:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10299,
                        "nodeType": "ExpressionStatement",
                        "src": "12682:65:34"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 10300,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10281,
                              "src": "12766:11:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 10301,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10258,
                              "src": "12779:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 10302,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "12765:25:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 10253,
                        "id": 10303,
                        "nodeType": "Return",
                        "src": "12758:32:34"
                      }
                    ]
                  },
                  "id": 10305,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 10247,
                      "modifierName": {
                        "id": 10246,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "12077:13:34",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "12077:13:34"
                    }
                  ],
                  "name": "_exitBPTInForExactTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10245,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10242,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10305,
                        "src": "11990:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10240,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11990:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10241,
                          "nodeType": "ArrayTypeName",
                          "src": "11990:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10244,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 10305,
                        "src": "12017:21:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10243,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "12017:5:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11989:50:34"
                  },
                  "returnParameters": {
                    "id": 10253,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10249,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10305,
                        "src": "12108:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10248,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12108:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10252,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10305,
                        "src": "12117:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10250,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12117:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10251,
                          "nodeType": "ArrayTypeName",
                          "src": "12117:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12107:27:34"
                  },
                  "scope": 10513,
                  "src": "11953:844:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 10394,
                    "nodeType": "Block",
                    "src": "13013:1390:34",
                    "statements": [
                      {
                        "assignments": [
                          10322
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10322,
                            "mutability": "mutable",
                            "name": "dueProtocolFeeAmounts",
                            "nodeType": "VariableDeclaration",
                            "scope": 10394,
                            "src": "13056:38:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 10320,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "13056:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10321,
                              "nodeType": "ArrayTypeName",
                              "src": "13056:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10329,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 10326,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "13111:15:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 10327,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13111:17:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 10325,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "13097:13:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 10323,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "13101:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10324,
                              "nodeType": "ArrayTypeName",
                              "src": "13101:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 10328,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13097:32:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13056:73:34"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 10332,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 10330,
                            "name": "protocolSwapFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10312,
                            "src": "13199:25:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 10331,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "13228:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "13199:30:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 10336,
                        "nodeType": "IfStatement",
                        "src": "13195:89:34",
                        "trueBody": {
                          "id": 10335,
                          "nodeType": "Block",
                          "src": "13231:53:34",
                          "statements": [
                            {
                              "expression": {
                                "id": 10333,
                                "name": "dueProtocolFeeAmounts",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10322,
                                "src": "13252:21:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "functionReturnParameters": 10317,
                              "id": 10334,
                              "nodeType": "Return",
                              "src": "13245:28:34"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          10338
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10338,
                            "mutability": "mutable",
                            "name": "chosenTokenIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 10394,
                            "src": "13699:24:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10337,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13699:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10340,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 10339,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "13726:1:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13699:28:34"
                      },
                      {
                        "assignments": [
                          10342
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10342,
                            "mutability": "mutable",
                            "name": "maxBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 10394,
                            "src": "13737:18:34",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10341,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13737:7:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10346,
                        "initialValue": {
                          "baseExpression": {
                            "id": 10343,
                            "name": "balances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10308,
                            "src": "13758:8:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "id": 10345,
                          "indexExpression": {
                            "hexValue": "30",
                            "id": 10344,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "13767:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "13758:11:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13737:32:34"
                      },
                      {
                        "body": {
                          "id": 10377,
                          "nodeType": "Block",
                          "src": "13827:205:34",
                          "statements": [
                            {
                              "assignments": [
                                10359
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 10359,
                                  "mutability": "mutable",
                                  "name": "currentBalance",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 10377,
                                  "src": "13841:22:34",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 10358,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "13841:7:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 10363,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 10360,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10308,
                                  "src": "13866:8:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 10362,
                                "indexExpression": {
                                  "id": 10361,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10348,
                                  "src": "13875:1:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "13866:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "13841:36:34"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 10366,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 10364,
                                  "name": "currentBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10359,
                                  "src": "13895:14:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">",
                                "rightExpression": {
                                  "id": 10365,
                                  "name": "maxBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10342,
                                  "src": "13912:10:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "13895:27:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 10376,
                              "nodeType": "IfStatement",
                              "src": "13891:131:34",
                              "trueBody": {
                                "id": 10375,
                                "nodeType": "Block",
                                "src": "13924:98:34",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 10369,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 10367,
                                        "name": "chosenTokenIndex",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10338,
                                        "src": "13942:16:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "id": 10368,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10348,
                                        "src": "13961:1:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "13942:20:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 10370,
                                    "nodeType": "ExpressionStatement",
                                    "src": "13942:20:34"
                                  },
                                  {
                                    "expression": {
                                      "id": 10373,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 10371,
                                        "name": "maxBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10342,
                                        "src": "13980:10:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "id": 10372,
                                        "name": "currentBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10359,
                                        "src": "13993:14:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "13980:27:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 10374,
                                    "nodeType": "ExpressionStatement",
                                    "src": "13980:27:34"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 10354,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 10351,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10348,
                            "src": "13799:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 10352,
                              "name": "_getTotalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6892,
                              "src": "13803:15:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 10353,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "13803:17:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "13799:21:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 10378,
                        "initializationExpression": {
                          "assignments": [
                            10348
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 10348,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 10378,
                              "src": "13784:9:34",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 10347,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "13784:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 10350,
                          "initialValue": {
                            "hexValue": "31",
                            "id": 10349,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "13796:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "13784:13:34"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 10356,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "13822:3:34",
                            "subExpression": {
                              "id": 10355,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10348,
                              "src": "13824:1:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10357,
                          "nodeType": "ExpressionStatement",
                          "src": "13822:3:34"
                        },
                        "nodeType": "ForStatement",
                        "src": "13779:253:34"
                      },
                      {
                        "expression": {
                          "id": 10390,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 10379,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10322,
                              "src": "14101:21:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 10381,
                            "indexExpression": {
                              "id": 10380,
                              "name": "chosenTokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10338,
                              "src": "14123:16:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "14101:39:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10384,
                                "name": "_amplificationParameter",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9506,
                                "src": "14202:23:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10385,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10308,
                                "src": "14239:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 10386,
                                "name": "previousInvariant",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10310,
                                "src": "14261:17:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10387,
                                "name": "chosenTokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10338,
                                "src": "14292:16:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10388,
                                "name": "protocolSwapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10312,
                                "src": "14322:25:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 10382,
                                "name": "StableMath",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9486,
                                "src": "14143:10:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                  "typeString": "type(contract StableMath)"
                                }
                              },
                              "id": 10383,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_calcDueTokenProtocolSwapFeeAmount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 9276,
                              "src": "14143:45:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256[] memory,uint256,uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 10389,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "14143:214:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "14101:256:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 10391,
                        "nodeType": "ExpressionStatement",
                        "src": "14101:256:34"
                      },
                      {
                        "expression": {
                          "id": 10392,
                          "name": "dueProtocolFeeAmounts",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10322,
                          "src": "14375:21:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "functionReturnParameters": 10317,
                        "id": 10393,
                        "nodeType": "Return",
                        "src": "14368:28:34"
                      }
                    ]
                  },
                  "id": 10395,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getDueProtocolFeeAmounts",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10313,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10308,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10395,
                        "src": "12863:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10306,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12863:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10307,
                          "nodeType": "ArrayTypeName",
                          "src": "12863:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10310,
                        "mutability": "mutable",
                        "name": "previousInvariant",
                        "nodeType": "VariableDeclaration",
                        "scope": 10395,
                        "src": "12898:25:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10309,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12898:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10312,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 10395,
                        "src": "12933:33:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10311,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12933:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12853:119:34"
                  },
                  "returnParameters": {
                    "id": 10317,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10316,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10395,
                        "src": "12995:16:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10314,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12995:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10315,
                          "nodeType": "ArrayTypeName",
                          "src": "12995:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12994:18:34"
                  },
                  "scope": 10513,
                  "src": "12819:1584:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 10438,
                    "nodeType": "Block",
                    "src": "14524:215:34",
                    "statements": [
                      {
                        "body": {
                          "id": 10430,
                          "nodeType": "Block",
                          "src": "14582:68:34",
                          "statements": [
                            {
                              "expression": {
                                "id": 10428,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 10417,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10398,
                                    "src": "14596:8:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 10419,
                                  "indexExpression": {
                                    "id": 10418,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10407,
                                    "src": "14605:1:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "14596:11:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 10424,
                                        "name": "amountsIn",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10401,
                                        "src": "14626:9:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 10426,
                                      "indexExpression": {
                                        "id": 10425,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10407,
                                        "src": "14636:1:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "14626:12:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 10420,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10398,
                                        "src": "14610:8:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 10422,
                                      "indexExpression": {
                                        "id": 10421,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10407,
                                        "src": "14619:1:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "14610:11:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 10423,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "14610:15:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 10427,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "14610:29:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "14596:43:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10429,
                              "nodeType": "ExpressionStatement",
                              "src": "14596:43:34"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 10413,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 10410,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10407,
                            "src": "14554:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 10411,
                              "name": "_getTotalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6892,
                              "src": "14558:15:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 10412,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "14558:17:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "14554:21:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 10431,
                        "initializationExpression": {
                          "assignments": [
                            10407
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 10407,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 10431,
                              "src": "14539:9:34",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 10406,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "14539:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 10409,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 10408,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "14551:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "14539:13:34"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 10415,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "14577:3:34",
                            "subExpression": {
                              "id": 10414,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10407,
                              "src": "14579:1:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10416,
                          "nodeType": "ExpressionStatement",
                          "src": "14577:3:34"
                        },
                        "nodeType": "ForStatement",
                        "src": "14534:116:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 10434,
                              "name": "_amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9506,
                              "src": "14698:23:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 10435,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10398,
                              "src": "14723:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "expression": {
                              "id": 10432,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "14667:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 10433,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calculateInvariant",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8366,
                            "src": "14667:30:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 10436,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14667:65:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 10405,
                        "id": 10437,
                        "nodeType": "Return",
                        "src": "14660:72:34"
                      }
                    ]
                  },
                  "id": 10439,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_invariantAfterJoin",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10402,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10398,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10439,
                        "src": "14438:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10396,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "14438:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10397,
                          "nodeType": "ArrayTypeName",
                          "src": "14438:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10401,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10439,
                        "src": "14465:26:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10399,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "14465:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10400,
                          "nodeType": "ArrayTypeName",
                          "src": "14465:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14437:55:34"
                  },
                  "returnParameters": {
                    "id": 10405,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10404,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10439,
                        "src": "14515:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10403,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14515:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14514:9:34"
                  },
                  "scope": 10513,
                  "src": "14409:330:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 10482,
                    "nodeType": "Block",
                    "src": "14889:216:34",
                    "statements": [
                      {
                        "body": {
                          "id": 10474,
                          "nodeType": "Block",
                          "src": "14947:69:34",
                          "statements": [
                            {
                              "expression": {
                                "id": 10472,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 10461,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10442,
                                    "src": "14961:8:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 10463,
                                  "indexExpression": {
                                    "id": 10462,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10451,
                                    "src": "14970:1:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "14961:11:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 10468,
                                        "name": "amountsOut",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10445,
                                        "src": "14991:10:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 10470,
                                      "indexExpression": {
                                        "id": 10469,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10451,
                                        "src": "15002:1:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "14991:13:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 10464,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10442,
                                        "src": "14975:8:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 10466,
                                      "indexExpression": {
                                        "id": 10465,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10451,
                                        "src": "14984:1:34",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "14975:11:34",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 10467,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sub",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1538,
                                    "src": "14975:15:34",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 10471,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "14975:30:34",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "14961:44:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10473,
                              "nodeType": "ExpressionStatement",
                              "src": "14961:44:34"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 10457,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 10454,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10451,
                            "src": "14919:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 10455,
                              "name": "_getTotalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6892,
                              "src": "14923:15:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 10456,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "14923:17:34",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "14919:21:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 10475,
                        "initializationExpression": {
                          "assignments": [
                            10451
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 10451,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 10475,
                              "src": "14904:9:34",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 10450,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "14904:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 10453,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 10452,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "14916:1:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "14904:13:34"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 10459,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "14942:3:34",
                            "subExpression": {
                              "id": 10458,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10451,
                              "src": "14944:1:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10460,
                          "nodeType": "ExpressionStatement",
                          "src": "14942:3:34"
                        },
                        "nodeType": "ForStatement",
                        "src": "14899:117:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 10478,
                              "name": "_amplificationParameter",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9506,
                              "src": "15064:23:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 10479,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10442,
                              "src": "15089:8:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "expression": {
                              "id": 10476,
                              "name": "StableMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9486,
                              "src": "15033:10:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                "typeString": "type(contract StableMath)"
                              }
                            },
                            "id": 10477,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calculateInvariant",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 8366,
                            "src": "15033:30:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 10480,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15033:65:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 10449,
                        "id": 10481,
                        "nodeType": "Return",
                        "src": "15026:72:34"
                      }
                    ]
                  },
                  "id": 10483,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_invariantAfterExit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10446,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10442,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10483,
                        "src": "14774:25:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10440,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "14774:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10441,
                          "nodeType": "ArrayTypeName",
                          "src": "14774:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10445,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10483,
                        "src": "14801:27:34",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10443,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "14801:7:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10444,
                          "nodeType": "ArrayTypeName",
                          "src": "14801:9:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14773:56:34"
                  },
                  "returnParameters": {
                    "id": 10449,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10448,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10483,
                        "src": "14876:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10447,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14876:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14875:9:34"
                  },
                  "scope": 10513,
                  "src": "14745:360:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 10511,
                    "nodeType": "Block",
                    "src": "15342:193:34",
                    "statements": [
                      {
                        "assignments": [
                          null,
                          10493,
                          null
                        ],
                        "declarations": [
                          null,
                          {
                            "constant": false,
                            "id": 10493,
                            "mutability": "mutable",
                            "name": "balances",
                            "nodeType": "VariableDeclaration",
                            "scope": 10511,
                            "src": "15355:25:34",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 10491,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "15355:7:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10492,
                              "nodeType": "ArrayTypeName",
                              "src": "15355:9:34",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          null
                        ],
                        "id": 10500,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 10497,
                                "name": "getPoolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6884,
                                "src": "15411:9:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$",
                                  "typeString": "function () view returns (bytes32)"
                                }
                              },
                              "id": 10498,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "15411:11:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 10494,
                                "name": "getVault",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6876,
                                "src": "15386:8:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IVault_$21266_$",
                                  "typeString": "function () view returns (contract IVault)"
                                }
                              },
                              "id": 10495,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "15386:10:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 10496,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getPoolTokens",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21033,
                            "src": "15386:24:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "function (bytes32) view external returns (contract IERC20[] memory,uint256[] memory,uint256)"
                            }
                          },
                          "id": 10499,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15386:37:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(contract IERC20[] memory,uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "15352:71:34"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 10507,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "15514:11:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 10508,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "15514:13:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 10503,
                                  "name": "_amplificationParameter",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9506,
                                  "src": "15471:23:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 10504,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10493,
                                  "src": "15496:8:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                ],
                                "expression": {
                                  "id": 10501,
                                  "name": "StableMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9486,
                                  "src": "15440:10:34",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_StableMath_$9486_$",
                                    "typeString": "type(contract StableMath)"
                                  }
                                },
                                "id": 10502,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "_calculateInvariant",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 8366,
                                "src": "15440:30:34",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                                  "typeString": "function (uint256,uint256[] memory) pure returns (uint256)"
                                }
                              },
                              "id": 10505,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "15440:65:34",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10506,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "15440:73:34",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10509,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15440:88:34",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 10488,
                        "id": 10510,
                        "nodeType": "Return",
                        "src": "15433:95:34"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 10484,
                    "nodeType": "StructuredDocumentation",
                    "src": "15111:177:34",
                    "text": " @dev This function returns the appreciation of one BPT relative to the\n underlying tokens. This starts at 1 when the pool is created and grows over time"
                  },
                  "functionSelector": "679aefce",
                  "id": 10512,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getRate",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10485,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "15309:2:34"
                  },
                  "returnParameters": {
                    "id": 10488,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10487,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10512,
                        "src": "15333:7:34",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10486,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "15333:7:34",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15332:9:34"
                  },
                  "scope": 10513,
                  "src": "15293:242:34",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                }
              ],
              "scope": 10514,
              "src": "937:14600:34"
            }
          ],
          "src": "688:14850:34"
        },
        "id": 34
      },
      "src.sol/amm/pools/stable/StablePoolFactory.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/stable/StablePoolFactory.sol",
          "exportedSymbols": {
            "StablePoolFactory": [
              10586
            ]
          },
          "id": 10587,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 10515,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:35"
            },
            {
              "id": 10516,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:35"
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "../../vault/interfaces/IVault.sol",
              "id": 10517,
              "nodeType": "ImportDirective",
              "scope": 10587,
              "sourceUnit": 21267,
              "src": "747:43:35",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/factories/BasePoolFactory.sol",
              "file": "../factories/BasePoolFactory.sol",
              "id": 10518,
              "nodeType": "ImportDirective",
              "scope": 10587,
              "sourceUnit": 8097,
              "src": "792:42:35",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/factories/FactoryWidePauseWindow.sol",
              "file": "../factories/FactoryWidePauseWindow.sol",
              "id": 10519,
              "nodeType": "ImportDirective",
              "scope": 10587,
              "sourceUnit": 8159,
              "src": "835:49:35",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/stable/StablePool.sol",
              "file": "./StablePool.sol",
              "id": 10520,
              "nodeType": "ImportDirective",
              "scope": 10587,
              "sourceUnit": 10514,
              "src": "886:26:35",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 10521,
                    "name": "BasePoolFactory",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 8096,
                    "src": "944:15:35",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BasePoolFactory_$8096",
                      "typeString": "contract BasePoolFactory"
                    }
                  },
                  "id": 10522,
                  "nodeType": "InheritanceSpecifier",
                  "src": "944:15:35"
                },
                {
                  "baseName": {
                    "id": 10523,
                    "name": "FactoryWidePauseWindow",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 8158,
                    "src": "961:22:35",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FactoryWidePauseWindow_$8158",
                      "typeString": "contract FactoryWidePauseWindow"
                    }
                  },
                  "id": 10524,
                  "nodeType": "InheritanceSpecifier",
                  "src": "961:22:35"
                }
              ],
              "contractDependencies": [
                8096,
                8158,
                10513
              ],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 10586,
              "linearizedBaseContracts": [
                10586,
                8158,
                8096
              ],
              "name": "StablePoolFactory",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 10532,
                    "nodeType": "Block",
                    "src": "1039:64:35",
                    "statements": []
                  },
                  "id": 10533,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 10529,
                          "name": "vault",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10526,
                          "src": "1032:5:35",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        }
                      ],
                      "id": 10530,
                      "modifierName": {
                        "id": 10528,
                        "name": "BasePoolFactory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8096,
                        "src": "1016:15:35",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BasePoolFactory_$8096_$",
                          "typeString": "type(contract BasePoolFactory)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1016:22:35"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10527,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10526,
                        "mutability": "mutable",
                        "name": "vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 10533,
                        "src": "1002:12:35",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 10525,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "1002:6:35",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1001:14:35"
                  },
                  "returnParameters": {
                    "id": 10531,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1039:0:35"
                  },
                  "scope": 10586,
                  "src": "990:113:35",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 10584,
                    "nodeType": "Block",
                    "src": "1402:504:35",
                    "statements": [
                      {
                        "assignments": [
                          10553,
                          10555
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10553,
                            "mutability": "mutable",
                            "name": "pauseWindowDuration",
                            "nodeType": "VariableDeclaration",
                            "scope": 10584,
                            "src": "1413:27:35",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10552,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1413:7:35",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 10555,
                            "mutability": "mutable",
                            "name": "bufferPeriodDuration",
                            "nodeType": "VariableDeclaration",
                            "scope": 10584,
                            "src": "1442:28:35",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10554,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1442:7:35",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10558,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 10556,
                            "name": "getPauseConfiguration",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8157,
                            "src": "1474:21:35",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$",
                              "typeString": "function () view returns (uint256,uint256)"
                            }
                          },
                          "id": 10557,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1474:23:35",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                            "typeString": "tuple(uint256,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1412:85:35"
                      },
                      {
                        "assignments": [
                          10560
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10560,
                            "mutability": "mutable",
                            "name": "pool",
                            "nodeType": "VariableDeclaration",
                            "scope": 10584,
                            "src": "1508:12:35",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 10559,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1508:7:35",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10577,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 10565,
                                    "name": "getVault",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8065,
                                    "src": "1576:8:35",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IVault_$21266_$",
                                      "typeString": "function () view returns (contract IVault)"
                                    }
                                  },
                                  "id": 10566,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "1576:10:35",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IVault_$21266",
                                    "typeString": "contract IVault"
                                  }
                                },
                                {
                                  "id": 10567,
                                  "name": "name",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10536,
                                  "src": "1604:4:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_string_memory_ptr",
                                    "typeString": "string memory"
                                  }
                                },
                                {
                                  "id": 10568,
                                  "name": "symbol",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10538,
                                  "src": "1626:6:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_string_memory_ptr",
                                    "typeString": "string memory"
                                  }
                                },
                                {
                                  "id": 10569,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10541,
                                  "src": "1650:6:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                {
                                  "id": 10570,
                                  "name": "amplificationParameter",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10543,
                                  "src": "1674:22:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 10571,
                                  "name": "swapFeePercentage",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10545,
                                  "src": "1714:17:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 10572,
                                  "name": "pauseWindowDuration",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10553,
                                  "src": "1749:19:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 10573,
                                  "name": "bufferPeriodDuration",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10555,
                                  "src": "1786:20:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 10574,
                                  "name": "owner",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10547,
                                  "src": "1824:5:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IVault_$21266",
                                    "typeString": "contract IVault"
                                  },
                                  {
                                    "typeIdentifier": "t_string_memory_ptr",
                                    "typeString": "string memory"
                                  },
                                  {
                                    "typeIdentifier": "t_string_memory_ptr",
                                    "typeString": "string memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 10564,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "NewExpression",
                                "src": "1544:14:35",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_IVault_$21266_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$returns$_t_contract$_StablePool_$10513_$",
                                  "typeString": "function (contract IVault,string memory,string memory,contract IERC20[] memory,uint256,uint256,uint256,uint256,address) returns (contract StablePool)"
                                },
                                "typeName": {
                                  "id": 10563,
                                  "name": "StablePool",
                                  "nodeType": "UserDefinedTypeName",
                                  "referencedDeclaration": 10513,
                                  "src": "1548:10:35",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_StablePool_$10513",
                                    "typeString": "contract StablePool"
                                  }
                                }
                              },
                              "id": 10575,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1544:299:35",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StablePool_$10513",
                                "typeString": "contract StablePool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_StablePool_$10513",
                                "typeString": "contract StablePool"
                              }
                            ],
                            "id": 10562,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1523:7:35",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 10561,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1523:7:35",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 10576,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1523:330:35",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1508:345:35"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 10579,
                              "name": "pool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10560,
                              "src": "1873:4:35",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 10578,
                            "name": "_register",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8095,
                            "src": "1863:9:35",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                              "typeString": "function (address)"
                            }
                          },
                          "id": 10580,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1863:15:35",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10581,
                        "nodeType": "ExpressionStatement",
                        "src": "1863:15:35"
                      },
                      {
                        "expression": {
                          "id": 10582,
                          "name": "pool",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10560,
                          "src": "1895:4:35",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 10551,
                        "id": 10583,
                        "nodeType": "Return",
                        "src": "1888:11:35"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 10534,
                    "nodeType": "StructuredDocumentation",
                    "src": "1109:51:35",
                    "text": " @dev Deploys a new `StablePool`."
                  },
                  "functionSelector": "7932c7f3",
                  "id": 10585,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "create",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10548,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10536,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 10585,
                        "src": "1190:18:35",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 10535,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1190:6:35",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10538,
                        "mutability": "mutable",
                        "name": "symbol",
                        "nodeType": "VariableDeclaration",
                        "scope": 10585,
                        "src": "1218:20:35",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 10537,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1218:6:35",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10541,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 10585,
                        "src": "1248:22:35",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10539,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1248:6:35",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 10540,
                          "nodeType": "ArrayTypeName",
                          "src": "1248:8:35",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10543,
                        "mutability": "mutable",
                        "name": "amplificationParameter",
                        "nodeType": "VariableDeclaration",
                        "scope": 10585,
                        "src": "1280:30:35",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10542,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1280:7:35",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10545,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 10585,
                        "src": "1320:25:35",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10544,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1320:7:35",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10547,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 10585,
                        "src": "1355:13:35",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 10546,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1355:7:35",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1180:194:35"
                  },
                  "returnParameters": {
                    "id": 10551,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10550,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10585,
                        "src": "1393:7:35",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 10549,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1393:7:35",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1392:9:35"
                  },
                  "scope": 10586,
                  "src": "1165:741:35",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 10587,
              "src": "914:994:35"
            }
          ],
          "src": "688:1221:35"
        },
        "id": 35
      },
      "src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/stable/StablePoolUserDataHelpers.sol",
          "exportedSymbols": {
            "StablePoolUserDataHelpers": [
              10775
            ]
          },
          "id": 10776,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 10588,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:36"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 10589,
              "nodeType": "ImportDirective",
              "scope": 10776,
              "sourceUnit": 5096,
              "src": "713:43:36",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/stable/StablePool.sol",
              "file": "./StablePool.sol",
              "id": 10590,
              "nodeType": "ImportDirective",
              "scope": 10776,
              "sourceUnit": 10514,
              "src": "758:26:36",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "fullyImplemented": true,
              "id": 10775,
              "linearizedBaseContracts": [
                10775
              ],
              "name": "StablePoolUserDataHelpers",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 10605,
                    "nodeType": "Block",
                    "src": "907:63:36",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 10599,
                              "name": "self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10592,
                              "src": "935:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            {
                              "components": [
                                {
                                  "expression": {
                                    "id": 10600,
                                    "name": "StablePool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10513,
                                    "src": "942:10:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                      "typeString": "type(contract StablePool)"
                                    }
                                  },
                                  "id": 10601,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "JoinKind",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 9512,
                                  "src": "942:19:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                    "typeString": "type(enum StablePool.JoinKind)"
                                  }
                                }
                              ],
                              "id": 10602,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "941:21:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                "typeString": "type(enum StablePool.JoinKind)"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              },
                              {
                                "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                "typeString": "type(enum StablePool.JoinKind)"
                              }
                            ],
                            "expression": {
                              "id": 10597,
                              "name": "abi",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -1,
                              "src": "924:3:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_abi",
                                "typeString": "abi"
                              }
                            },
                            "id": 10598,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "decode",
                            "nodeType": "MemberAccess",
                            "src": "924:10:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                              "typeString": "function () pure"
                            }
                          },
                          "id": 10603,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "924:39:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_JoinKind_$9512",
                            "typeString": "enum StablePool.JoinKind"
                          }
                        },
                        "functionReturnParameters": 10596,
                        "id": 10604,
                        "nodeType": "Return",
                        "src": "917:46:36"
                      }
                    ]
                  },
                  "id": 10606,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "joinKind",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10593,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10592,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 10606,
                        "src": "844:17:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10591,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "844:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "843:19:36"
                  },
                  "returnParameters": {
                    "id": 10596,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10595,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10606,
                        "src": "886:19:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_JoinKind_$9512",
                          "typeString": "enum StablePool.JoinKind"
                        },
                        "typeName": {
                          "id": 10594,
                          "name": "StablePool.JoinKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 9512,
                          "src": "886:19:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_JoinKind_$9512",
                            "typeString": "enum StablePool.JoinKind"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "885:21:36"
                  },
                  "scope": 10775,
                  "src": "826:144:36",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10621,
                    "nodeType": "Block",
                    "src": "1057:63:36",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 10615,
                              "name": "self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10608,
                              "src": "1085:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            {
                              "components": [
                                {
                                  "expression": {
                                    "id": 10616,
                                    "name": "StablePool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10513,
                                    "src": "1092:10:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                      "typeString": "type(contract StablePool)"
                                    }
                                  },
                                  "id": 10617,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "ExitKind",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 9516,
                                  "src": "1092:19:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_ExitKind_$9516_$",
                                    "typeString": "type(enum StablePool.ExitKind)"
                                  }
                                }
                              ],
                              "id": 10618,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1091:21:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_ExitKind_$9516_$",
                                "typeString": "type(enum StablePool.ExitKind)"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              },
                              {
                                "typeIdentifier": "t_type$_t_enum$_ExitKind_$9516_$",
                                "typeString": "type(enum StablePool.ExitKind)"
                              }
                            ],
                            "expression": {
                              "id": 10613,
                              "name": "abi",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -1,
                              "src": "1074:3:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_abi",
                                "typeString": "abi"
                              }
                            },
                            "id": 10614,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "decode",
                            "nodeType": "MemberAccess",
                            "src": "1074:10:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                              "typeString": "function () pure"
                            }
                          },
                          "id": 10619,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1074:39:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_ExitKind_$9516",
                            "typeString": "enum StablePool.ExitKind"
                          }
                        },
                        "functionReturnParameters": 10612,
                        "id": 10620,
                        "nodeType": "Return",
                        "src": "1067:46:36"
                      }
                    ]
                  },
                  "id": 10622,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exitKind",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10609,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10608,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 10622,
                        "src": "994:17:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10607,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "994:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "993:19:36"
                  },
                  "returnParameters": {
                    "id": 10612,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10611,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10622,
                        "src": "1036:19:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_ExitKind_$9516",
                          "typeString": "enum StablePool.ExitKind"
                        },
                        "typeName": {
                          "id": 10610,
                          "name": "StablePool.ExitKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 9516,
                          "src": "1036:19:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_ExitKind_$9516",
                            "typeString": "enum StablePool.ExitKind"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1035:21:36"
                  },
                  "scope": 10775,
                  "src": "976:144:36",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10644,
                    "nodeType": "Block",
                    "src": "1222:83:36",
                    "statements": [
                      {
                        "expression": {
                          "id": 10642,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 10630,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10628,
                                "src": "1235:9:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "id": 10631,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "1232:13:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(,uint256[] memory)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10634,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10624,
                                "src": "1259:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 10635,
                                      "name": "StablePool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10513,
                                      "src": "1266:10:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                        "typeString": "type(contract StablePool)"
                                      }
                                    },
                                    "id": 10636,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "JoinKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 9512,
                                    "src": "1266:19:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                      "typeString": "type(enum StablePool.JoinKind)"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 10638,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "1287:7:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": {
                                        "id": 10637,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1287:7:36",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 10639,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "1287:9:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "type(uint256[] memory)"
                                    }
                                  }
                                ],
                                "id": 10640,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1265:32:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$9512_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$",
                                  "typeString": "tuple(type(enum StablePool.JoinKind),type(uint256[] memory))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$9512_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$",
                                  "typeString": "tuple(type(enum StablePool.JoinKind),type(uint256[] memory))"
                                }
                              ],
                              "expression": {
                                "id": 10632,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "1248:3:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 10633,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "1248:10:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 10641,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1248:50:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_JoinKind_$9512_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(enum StablePool.JoinKind,uint256[] memory)"
                            }
                          },
                          "src": "1232:66:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10643,
                        "nodeType": "ExpressionStatement",
                        "src": "1232:66:36"
                      }
                    ]
                  },
                  "id": 10645,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "initialAmountsIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10625,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10624,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 10645,
                        "src": "1152:17:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10623,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1152:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1151:19:36"
                  },
                  "returnParameters": {
                    "id": 10629,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10628,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10645,
                        "src": "1194:26:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10626,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1194:7:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10627,
                          "nodeType": "ArrayTypeName",
                          "src": "1194:9:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1193:28:36"
                  },
                  "scope": 10775,
                  "src": "1126:179:36",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10672,
                    "nodeType": "Block",
                    "src": "1465:108:36",
                    "statements": [
                      {
                        "expression": {
                          "id": 10670,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 10655,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10651,
                                "src": "1478:9:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 10656,
                                "name": "minBPTAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10653,
                                "src": "1489:14:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 10657,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "1475:29:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(,uint256[] memory,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10660,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10647,
                                "src": "1518:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 10661,
                                      "name": "StablePool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10513,
                                      "src": "1525:10:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                        "typeString": "type(contract StablePool)"
                                      }
                                    },
                                    "id": 10662,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "JoinKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 9512,
                                    "src": "1525:19:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                      "typeString": "type(enum StablePool.JoinKind)"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 10664,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "1546:7:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": {
                                        "id": 10663,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1546:7:36",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 10665,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "1546:9:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "type(uint256[] memory)"
                                    }
                                  },
                                  {
                                    "id": 10667,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1557:7:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 10666,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "1557:7:36",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 10668,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1524:41:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$9512_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.JoinKind),type(uint256[] memory),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$9512_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.JoinKind),type(uint256[] memory),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 10658,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "1507:3:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 10659,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "1507:10:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 10669,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1507:59:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_JoinKind_$9512_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(enum StablePool.JoinKind,uint256[] memory,uint256)"
                            }
                          },
                          "src": "1475:91:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10671,
                        "nodeType": "ExpressionStatement",
                        "src": "1475:91:36"
                      }
                    ]
                  },
                  "id": 10673,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exactTokensInForBptOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10648,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10647,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 10673,
                        "src": "1343:17:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10646,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1343:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1342:19:36"
                  },
                  "returnParameters": {
                    "id": 10654,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10651,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10673,
                        "src": "1409:26:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10649,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1409:7:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10650,
                          "nodeType": "ArrayTypeName",
                          "src": "1409:9:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10653,
                        "mutability": "mutable",
                        "name": "minBPTAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10673,
                        "src": "1437:22:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10652,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1437:7:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1408:52:36"
                  },
                  "scope": 10775,
                  "src": "1311:262:36",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10698,
                    "nodeType": "Block",
                    "src": "1694:105:36",
                    "statements": [
                      {
                        "expression": {
                          "id": 10696,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 10682,
                                "name": "bptAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10678,
                                "src": "1707:12:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10683,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10680,
                                "src": "1721:10:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 10684,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "1704:28:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(,uint256,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10687,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10675,
                                "src": "1746:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 10688,
                                      "name": "StablePool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10513,
                                      "src": "1753:10:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                        "typeString": "type(contract StablePool)"
                                      }
                                    },
                                    "id": 10689,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "JoinKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 9512,
                                    "src": "1753:19:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_JoinKind_$9512_$",
                                      "typeString": "type(enum StablePool.JoinKind)"
                                    }
                                  },
                                  {
                                    "id": 10691,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1774:7:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 10690,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "1774:7:36",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  {
                                    "id": 10693,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1783:7:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 10692,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "1783:7:36",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 10694,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1752:39:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$9512_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.JoinKind),type(uint256),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$9512_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.JoinKind),type(uint256),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 10685,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "1735:3:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 10686,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "1735:10:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 10695,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1735:57:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_JoinKind_$9512_$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(enum StablePool.JoinKind,uint256,uint256)"
                            }
                          },
                          "src": "1704:88:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10697,
                        "nodeType": "ExpressionStatement",
                        "src": "1704:88:36"
                      }
                    ]
                  },
                  "id": 10699,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "tokenInForExactBptOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10676,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10675,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 10699,
                        "src": "1610:17:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10674,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1610:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1609:19:36"
                  },
                  "returnParameters": {
                    "id": 10681,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10678,
                        "mutability": "mutable",
                        "name": "bptAmountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10699,
                        "src": "1652:20:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10677,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1652:7:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10680,
                        "mutability": "mutable",
                        "name": "tokenIndex",
                        "nodeType": "VariableDeclaration",
                        "scope": 10699,
                        "src": "1674:18:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10679,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1674:7:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1651:42:36"
                  },
                  "scope": 10775,
                  "src": "1579:220:36",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10724,
                    "nodeType": "Block",
                    "src": "1919:104:36",
                    "statements": [
                      {
                        "expression": {
                          "id": 10722,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 10708,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10704,
                                "src": "1932:11:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 10709,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10706,
                                "src": "1945:10:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 10710,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "1929:27:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(,uint256,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10713,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10701,
                                "src": "1970:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 10714,
                                      "name": "StablePool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10513,
                                      "src": "1977:10:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                        "typeString": "type(contract StablePool)"
                                      }
                                    },
                                    "id": 10715,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "ExitKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 9516,
                                    "src": "1977:19:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_ExitKind_$9516_$",
                                      "typeString": "type(enum StablePool.ExitKind)"
                                    }
                                  },
                                  {
                                    "id": 10717,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1998:7:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 10716,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "1998:7:36",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  {
                                    "id": 10719,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2007:7:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 10718,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2007:7:36",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 10720,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1976:39:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$9516_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.ExitKind),type(uint256),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$9516_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.ExitKind),type(uint256),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 10711,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "1959:3:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 10712,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "1959:10:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 10721,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1959:57:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_ExitKind_$9516_$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(enum StablePool.ExitKind,uint256,uint256)"
                            }
                          },
                          "src": "1929:87:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10723,
                        "nodeType": "ExpressionStatement",
                        "src": "1929:87:36"
                      }
                    ]
                  },
                  "id": 10725,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exactBptInForTokenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10702,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10701,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 10725,
                        "src": "1836:17:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10700,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1836:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1835:19:36"
                  },
                  "returnParameters": {
                    "id": 10707,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10704,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10725,
                        "src": "1878:19:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10703,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1878:7:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10706,
                        "mutability": "mutable",
                        "name": "tokenIndex",
                        "nodeType": "VariableDeclaration",
                        "scope": 10725,
                        "src": "1899:18:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10705,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1899:7:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1877:41:36"
                  },
                  "scope": 10775,
                  "src": "1805:218:36",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10745,
                    "nodeType": "Block",
                    "src": "2124:83:36",
                    "statements": [
                      {
                        "expression": {
                          "id": 10743,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 10732,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10730,
                                "src": "2137:11:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 10733,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "2134:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_uint256_$",
                              "typeString": "tuple(,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10736,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10727,
                                "src": "2163:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 10737,
                                      "name": "StablePool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10513,
                                      "src": "2170:10:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                        "typeString": "type(contract StablePool)"
                                      }
                                    },
                                    "id": 10738,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "ExitKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 9516,
                                    "src": "2170:19:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_ExitKind_$9516_$",
                                      "typeString": "type(enum StablePool.ExitKind)"
                                    }
                                  },
                                  {
                                    "id": 10740,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2191:7:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 10739,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2191:7:36",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 10741,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "2169:30:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$9516_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.ExitKind),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$9516_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.ExitKind),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 10734,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "2152:3:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 10735,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "2152:10:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 10742,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2152:48:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_ExitKind_$9516_$_t_uint256_$",
                              "typeString": "tuple(enum StablePool.ExitKind,uint256)"
                            }
                          },
                          "src": "2134:66:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10744,
                        "nodeType": "ExpressionStatement",
                        "src": "2134:66:36"
                      }
                    ]
                  },
                  "id": 10746,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exactBptInForTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10728,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10727,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 10746,
                        "src": "2061:17:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10726,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "2061:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2060:19:36"
                  },
                  "returnParameters": {
                    "id": 10731,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10730,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10746,
                        "src": "2103:19:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10729,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2103:7:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2102:21:36"
                  },
                  "scope": 10775,
                  "src": "2029:178:36",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10773,
                    "nodeType": "Block",
                    "src": "2368:109:36",
                    "statements": [
                      {
                        "expression": {
                          "id": 10771,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 10756,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10752,
                                "src": "2381:10:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 10757,
                                "name": "maxBPTAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10754,
                                "src": "2393:14:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 10758,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "2378:30:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(,uint256[] memory,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 10761,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10748,
                                "src": "2422:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 10762,
                                      "name": "StablePool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10513,
                                      "src": "2429:10:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_StablePool_$10513_$",
                                        "typeString": "type(contract StablePool)"
                                      }
                                    },
                                    "id": 10763,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "ExitKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 9516,
                                    "src": "2429:19:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_ExitKind_$9516_$",
                                      "typeString": "type(enum StablePool.ExitKind)"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 10765,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "2450:7:36",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": {
                                        "id": 10764,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "2450:7:36",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 10766,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2450:9:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "type(uint256[] memory)"
                                    }
                                  },
                                  {
                                    "id": 10768,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2461:7:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 10767,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2461:7:36",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 10769,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "2428:41:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$9516_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.ExitKind),type(uint256[] memory),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$9516_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum StablePool.ExitKind),type(uint256[] memory),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 10759,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "2411:3:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 10760,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "2411:10:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 10770,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2411:59:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_ExitKind_$9516_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(enum StablePool.ExitKind,uint256[] memory,uint256)"
                            }
                          },
                          "src": "2378:92:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10772,
                        "nodeType": "ExpressionStatement",
                        "src": "2378:92:36"
                      }
                    ]
                  },
                  "id": 10774,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "bptInForExactTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10749,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10748,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 10774,
                        "src": "2245:17:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 10747,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "2245:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2244:19:36"
                  },
                  "returnParameters": {
                    "id": 10755,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10752,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10774,
                        "src": "2311:27:36",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10750,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2311:7:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10751,
                          "nodeType": "ArrayTypeName",
                          "src": "2311:9:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10754,
                        "mutability": "mutable",
                        "name": "maxBPTAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10774,
                        "src": "2340:22:36",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10753,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2340:7:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2310:53:36"
                  },
                  "scope": 10775,
                  "src": "2213:264:36",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 10776,
              "src": "786:1693:36"
            }
          ],
          "src": "688:1792:36"
        },
        "id": 36
      },
      "src.sol/amm/pools/weighted/WeightedMath.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/weighted/WeightedMath.sol",
          "exportedSymbols": {
            "WeightedMath": [
              11652
            ]
          },
          "id": 11653,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 10777,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:37"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
              "file": "../../lib/math/FixedPoint.sol",
              "id": 10778,
              "nodeType": "ImportDirective",
              "scope": 11653,
              "sourceUnit": 1816,
              "src": "713:39:37",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../../lib/math/Math.sol",
              "id": 10779,
              "nodeType": "ImportDirective",
              "scope": 11653,
              "sourceUnit": 3351,
              "src": "753:33:37",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../../lib/helpers/InputHelpers.sol",
              "id": 10780,
              "nodeType": "ImportDirective",
              "scope": 11653,
              "sourceUnit": 1043,
              "src": "787:44:37",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 11652,
              "linearizedBaseContracts": [
                11652
              ],
              "name": "WeightedMath",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 10783,
                  "libraryName": {
                    "id": 10781,
                    "name": "FixedPoint",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1815,
                    "src": "922:10:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FixedPoint_$1815",
                      "typeString": "library FixedPoint"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "916:29:37",
                  "typeName": {
                    "id": 10782,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "937:7:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "constant": true,
                  "id": 10786,
                  "mutability": "constant",
                  "name": "_MIN_WEIGHT",
                  "nodeType": "VariableDeclaration",
                  "scope": 11652,
                  "src": "1138:47:37",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10784,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1138:7:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "302e3031653138",
                    "id": 10785,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1178:7:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_10000000000000000_by_1",
                      "typeString": "int_const 10000000000000000"
                    },
                    "value": "0.01e18"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 10789,
                  "mutability": "constant",
                  "name": "_MAX_WEIGHTED_TOKENS",
                  "nodeType": "VariableDeclaration",
                  "scope": 11652,
                  "src": "1378:52:37",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10787,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1378:7:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "313030",
                    "id": 10788,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1427:3:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_100_by_1",
                      "typeString": "int_const 100"
                    },
                    "value": "100"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 10792,
                  "mutability": "constant",
                  "name": "_MAX_IN_RATIO",
                  "nodeType": "VariableDeclaration",
                  "scope": 11652,
                  "src": "1665:48:37",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10790,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1665:7:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "302e33653138",
                    "id": 10791,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1707:6:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_300000000000000000_by_1",
                      "typeString": "int_const 300000000000000000"
                    },
                    "value": "0.3e18"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 10795,
                  "mutability": "constant",
                  "name": "_MAX_OUT_RATIO",
                  "nodeType": "VariableDeclaration",
                  "scope": 11652,
                  "src": "1719:49:37",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10793,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1719:7:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "302e33653138",
                    "id": 10794,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1762:6:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_300000000000000000_by_1",
                      "typeString": "int_const 300000000000000000"
                    },
                    "value": "0.3e18"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 10798,
                  "mutability": "constant",
                  "name": "_MAX_INVARIANT_RATIO",
                  "nodeType": "VariableDeclaration",
                  "scope": 11652,
                  "src": "1893:53:37",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10796,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1893:7:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "33653138",
                    "id": 10797,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1942:4:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_3000000000000000000_by_1",
                      "typeString": "int_const 3000000000000000000"
                    },
                    "value": "3e18"
                  },
                  "visibility": "internal"
                },
                {
                  "constant": true,
                  "id": 10801,
                  "mutability": "constant",
                  "name": "_MIN_INVARIANT_RATIO",
                  "nodeType": "VariableDeclaration",
                  "scope": 11652,
                  "src": "2070:55:37",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10799,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2070:7:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "302e37653138",
                    "id": 10800,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2119:6:37",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_700000000000000000_by_1",
                      "typeString": "int_const 700000000000000000"
                    },
                    "value": "0.7e18"
                  },
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10852,
                    "nodeType": "Block",
                    "src": "2560:886:37",
                    "statements": [
                      {
                        "expression": {
                          "id": 10815,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 10812,
                            "name": "invariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10810,
                            "src": "3195:9:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 10813,
                              "name": "FixedPoint",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1815,
                              "src": "3207:10:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                "typeString": "type(library FixedPoint)"
                              }
                            },
                            "id": 10814,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ONE",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1480,
                            "src": "3207:14:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3195:26:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 10816,
                        "nodeType": "ExpressionStatement",
                        "src": "3195:26:37"
                      },
                      {
                        "body": {
                          "id": 10842,
                          "nodeType": "Block",
                          "src": "3286:97:37",
                          "statements": [
                            {
                              "expression": {
                                "id": 10840,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 10828,
                                  "name": "invariant",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10810,
                                  "src": "3300:9:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 10835,
                                            "name": "normalizedWeights",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10804,
                                            "src": "3350:17:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 10837,
                                          "indexExpression": {
                                            "id": 10836,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10818,
                                            "src": "3368:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "3350:20:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 10831,
                                            "name": "balances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10807,
                                            "src": "3330:8:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 10833,
                                          "indexExpression": {
                                            "id": 10832,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10818,
                                            "src": "3339:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "3330:11:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 10834,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "powDown",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1760,
                                        "src": "3330:19:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 10838,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3330:41:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 10829,
                                      "name": "invariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10810,
                                      "src": "3312:9:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 10830,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "mulDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1572,
                                    "src": "3312:17:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 10839,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3312:60:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3300:72:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 10841,
                              "nodeType": "ExpressionStatement",
                              "src": "3300:72:37"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 10824,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 10821,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10818,
                            "src": "3251:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 10822,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10804,
                              "src": "3255:17:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 10823,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "3255:24:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3251:28:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 10843,
                        "initializationExpression": {
                          "assignments": [
                            10818
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 10818,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 10843,
                              "src": "3236:9:37",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 10817,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "3236:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 10820,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 10819,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3248:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "3236:13:37"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 10826,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "3281:3:37",
                            "subExpression": {
                              "id": 10825,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10818,
                              "src": "3281:1:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10827,
                          "nodeType": "ExpressionStatement",
                          "src": "3281:3:37"
                        },
                        "nodeType": "ForStatement",
                        "src": "3231:152:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 10847,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 10845,
                                "name": "invariant",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10810,
                                "src": "3402:9:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 10846,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3414:1:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "3402:13:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 10848,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3417:6:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 10849,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ZERO_INVARIANT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 480,
                              "src": "3417:21:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 10844,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "3393:8:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 10850,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3393:46:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10851,
                        "nodeType": "ExpressionStatement",
                        "src": "3393:46:37"
                      }
                    ]
                  },
                  "id": 10853,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calculateInvariant",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10808,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10804,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 10853,
                        "src": "2427:34:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10802,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2427:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10803,
                          "nodeType": "ArrayTypeName",
                          "src": "2427:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10807,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 10853,
                        "src": "2463:25:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10805,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2463:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10806,
                          "nodeType": "ArrayTypeName",
                          "src": "2463:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2426:63:37"
                  },
                  "returnParameters": {
                    "id": 10811,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10810,
                        "mutability": "mutable",
                        "name": "invariant",
                        "nodeType": "VariableDeclaration",
                        "scope": 10853,
                        "src": "2537:17:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10809,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2537:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2536:19:37"
                  },
                  "scope": 11652,
                  "src": "2398:1048:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10914,
                    "nodeType": "Block",
                    "src": "3779:1564:37",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 10874,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 10869,
                                "name": "amountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10863,
                                "src": "5003:8:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "id": 10872,
                                    "name": "_MAX_IN_RATIO",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10792,
                                    "src": "5033:13:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 10870,
                                    "name": "balanceIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10855,
                                    "src": "5015:9:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 10871,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mulDown",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1572,
                                  "src": "5015:17:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 10873,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5015:32:37",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5003:44:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 10875,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5049:6:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 10876,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_IN_RATIO",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 459,
                              "src": "5049:19:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 10868,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4994:8:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 10877,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4994:75:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10878,
                        "nodeType": "ExpressionStatement",
                        "src": "4994:75:37"
                      },
                      {
                        "assignments": [
                          10880
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10880,
                            "mutability": "mutable",
                            "name": "denominator",
                            "nodeType": "VariableDeclaration",
                            "scope": 10914,
                            "src": "5080:19:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10879,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5080:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10885,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10883,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10863,
                              "src": "5116:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10881,
                              "name": "balanceIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10855,
                              "src": "5102:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10882,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1512,
                            "src": "5102:13:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10884,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5102:23:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5080:45:37"
                      },
                      {
                        "assignments": [
                          10887
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10887,
                            "mutability": "mutable",
                            "name": "base",
                            "nodeType": "VariableDeclaration",
                            "scope": 10914,
                            "src": "5135:12:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10886,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5135:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10892,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10890,
                              "name": "denominator",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10880,
                              "src": "5166:11:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10888,
                              "name": "balanceIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10855,
                              "src": "5150:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10889,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "5150:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10891,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5150:28:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5135:43:37"
                      },
                      {
                        "assignments": [
                          10894
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10894,
                            "mutability": "mutable",
                            "name": "exponent",
                            "nodeType": "VariableDeclaration",
                            "scope": 10914,
                            "src": "5188:16:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10893,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5188:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10899,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10897,
                              "name": "weightOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10861,
                              "src": "5224:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10895,
                              "name": "weightIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10857,
                              "src": "5207:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10896,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "5207:16:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10898,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5207:27:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5188:46:37"
                      },
                      {
                        "assignments": [
                          10901
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10901,
                            "mutability": "mutable",
                            "name": "power",
                            "nodeType": "VariableDeclaration",
                            "scope": 10914,
                            "src": "5244:13:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10900,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5244:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10906,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10904,
                              "name": "exponent",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10894,
                              "src": "5271:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10902,
                              "name": "base",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10887,
                              "src": "5260:4:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10903,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "powUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1794,
                            "src": "5260:10:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10905,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5260:20:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5244:36:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 10909,
                                  "name": "power",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10901,
                                  "src": "5317:5:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 10910,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "complement",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1814,
                                "src": "5317:16:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 10911,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5317:18:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10907,
                              "name": "balanceOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10859,
                              "src": "5298:10:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10908,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1572,
                            "src": "5298:18:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10912,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5298:38:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 10867,
                        "id": 10913,
                        "nodeType": "Return",
                        "src": "5291:45:37"
                      }
                    ]
                  },
                  "id": 10915,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcOutGivenIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10864,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10855,
                        "mutability": "mutable",
                        "name": "balanceIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10915,
                        "src": "3616:17:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10854,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3616:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10857,
                        "mutability": "mutable",
                        "name": "weightIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10915,
                        "src": "3643:16:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10856,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3643:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10859,
                        "mutability": "mutable",
                        "name": "balanceOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10915,
                        "src": "3669:18:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10858,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3669:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10861,
                        "mutability": "mutable",
                        "name": "weightOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10915,
                        "src": "3697:17:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10860,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3697:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10863,
                        "mutability": "mutable",
                        "name": "amountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10915,
                        "src": "3724:16:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10862,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3724:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3606:140:37"
                  },
                  "returnParameters": {
                    "id": 10867,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10866,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10915,
                        "src": "3770:7:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10865,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3770:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3769:9:37"
                  },
                  "scope": 11652,
                  "src": "3582:1761:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 10978,
                    "nodeType": "Block",
                    "src": "5679:1722:37",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 10936,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 10931,
                                "name": "amountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10925,
                                "src": "6884:9:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "id": 10934,
                                    "name": "_MAX_OUT_RATIO",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10795,
                                    "src": "6916:14:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 10932,
                                    "name": "balanceOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10921,
                                    "src": "6897:10:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 10933,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mulDown",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1572,
                                  "src": "6897:18:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 10935,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "6897:34:37",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "6884:47:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 10937,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6933:6:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 10938,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_OUT_RATIO",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 462,
                              "src": "6933:20:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 10930,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6875:8:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 10939,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6875:79:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 10940,
                        "nodeType": "ExpressionStatement",
                        "src": "6875:79:37"
                      },
                      {
                        "assignments": [
                          10942
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10942,
                            "mutability": "mutable",
                            "name": "base",
                            "nodeType": "VariableDeclaration",
                            "scope": 10978,
                            "src": "6965:12:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10941,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "6965:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10950,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 10947,
                                  "name": "amountOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10925,
                                  "src": "7012:9:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 10945,
                                  "name": "balanceOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10921,
                                  "src": "6997:10:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 10946,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sub",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1538,
                                "src": "6997:14:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 10948,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6997:25:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10943,
                              "name": "balanceOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10921,
                              "src": "6980:10:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10944,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "6980:16:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10949,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6980:43:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6965:58:37"
                      },
                      {
                        "assignments": [
                          10952
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10952,
                            "mutability": "mutable",
                            "name": "exponent",
                            "nodeType": "VariableDeclaration",
                            "scope": 10978,
                            "src": "7033:16:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10951,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7033:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10957,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10955,
                              "name": "weightIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10919,
                              "src": "7068:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10953,
                              "name": "weightOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10923,
                              "src": "7052:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10954,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "7052:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10956,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7052:25:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7033:44:37"
                      },
                      {
                        "assignments": [
                          10959
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10959,
                            "mutability": "mutable",
                            "name": "power",
                            "nodeType": "VariableDeclaration",
                            "scope": 10978,
                            "src": "7087:13:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10958,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7087:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10964,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 10962,
                              "name": "exponent",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10952,
                              "src": "7114:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10960,
                              "name": "base",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10942,
                              "src": "7103:4:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10961,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "powUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1794,
                            "src": "7103:10:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10963,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7103:20:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7087:36:37"
                      },
                      {
                        "assignments": [
                          10966
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 10966,
                            "mutability": "mutable",
                            "name": "ratio",
                            "nodeType": "VariableDeclaration",
                            "scope": 10978,
                            "src": "7313:13:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 10965,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7313:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 10972,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 10969,
                                "name": "FixedPoint",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1815,
                                "src": "7339:10:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                  "typeString": "type(library FixedPoint)"
                                }
                              },
                              "id": 10970,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ONE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1480,
                              "src": "7339:14:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10967,
                              "name": "power",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10959,
                              "src": "7329:5:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10968,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1538,
                            "src": "7329:9:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10971,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7329:25:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7313:41:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 10975,
                              "name": "ratio",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10966,
                              "src": "7388:5:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 10973,
                              "name": "balanceIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10917,
                              "src": "7372:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 10974,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "7372:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 10976,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7372:22:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 10929,
                        "id": 10977,
                        "nodeType": "Return",
                        "src": "7365:29:37"
                      }
                    ]
                  },
                  "id": 10979,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcInGivenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10926,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10917,
                        "mutability": "mutable",
                        "name": "balanceIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10979,
                        "src": "5515:17:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10916,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5515:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10919,
                        "mutability": "mutable",
                        "name": "weightIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 10979,
                        "src": "5542:16:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10918,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5542:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10921,
                        "mutability": "mutable",
                        "name": "balanceOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10979,
                        "src": "5568:18:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10920,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5568:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10923,
                        "mutability": "mutable",
                        "name": "weightOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10979,
                        "src": "5596:17:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10922,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5596:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10925,
                        "mutability": "mutable",
                        "name": "amountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 10979,
                        "src": "5623:17:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10924,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5623:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5505:141:37"
                  },
                  "returnParameters": {
                    "id": 10929,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10928,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 10979,
                        "src": "5670:7:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10927,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5670:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5669:9:37"
                  },
                  "scope": 11652,
                  "src": "5481:1920:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 11173,
                    "nodeType": "Block",
                    "src": "7656:1431:37",
                    "statements": [
                      {
                        "assignments": [
                          11001
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11001,
                            "mutability": "mutable",
                            "name": "balanceRatiosWithFee",
                            "nodeType": "VariableDeclaration",
                            "scope": 11173,
                            "src": "7713:37:37",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 10999,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "7713:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11000,
                              "nodeType": "ArrayTypeName",
                              "src": "7713:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11008,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 11005,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10988,
                                "src": "7767:9:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11006,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "7767:16:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 11004,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "7753:13:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 11002,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "7757:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11003,
                              "nodeType": "ArrayTypeName",
                              "src": "7757:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 11007,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7753:31:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7713:71:37"
                      },
                      {
                        "assignments": [
                          11010
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11010,
                            "mutability": "mutable",
                            "name": "invariantRatioWithFees",
                            "nodeType": "VariableDeclaration",
                            "scope": 11173,
                            "src": "7795:30:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11009,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7795:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11012,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 11011,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "7828:1:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7795:34:37"
                      },
                      {
                        "body": {
                          "id": 11056,
                          "nodeType": "Block",
                          "src": "7885:221:37",
                          "statements": [
                            {
                              "expression": {
                                "id": 11040,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 11024,
                                    "name": "balanceRatiosWithFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11001,
                                    "src": "7899:20:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 11026,
                                  "indexExpression": {
                                    "id": 11025,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11014,
                                    "src": "7920:1:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "7899:23:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 11036,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 10982,
                                        "src": "7963:8:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 11038,
                                      "indexExpression": {
                                        "id": 11037,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11014,
                                        "src": "7972:1:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "7963:11:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 11031,
                                            "name": "amountsIn",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10988,
                                            "src": "7941:9:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11033,
                                          "indexExpression": {
                                            "id": 11032,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11014,
                                            "src": "7951:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "7941:12:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 11027,
                                            "name": "balances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10982,
                                            "src": "7925:8:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11029,
                                          "indexExpression": {
                                            "id": 11028,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11014,
                                            "src": "7934:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "7925:11:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11030,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "add",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1512,
                                        "src": "7925:15:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11034,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "7925:29:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11035,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1666,
                                    "src": "7925:37:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11039,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "7925:50:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "7899:76:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11041,
                              "nodeType": "ExpressionStatement",
                              "src": "7899:76:37"
                            },
                            {
                              "expression": {
                                "id": 11054,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 11042,
                                  "name": "invariantRatioWithFees",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11010,
                                  "src": "7989:22:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 11049,
                                            "name": "normalizedWeights",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10985,
                                            "src": "8073:17:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11051,
                                          "indexExpression": {
                                            "id": 11050,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11014,
                                            "src": "8091:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "8073:20:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 11045,
                                            "name": "balanceRatiosWithFee",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11001,
                                            "src": "8041:20:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11047,
                                          "indexExpression": {
                                            "id": 11046,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11014,
                                            "src": "8062:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "8041:23:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11048,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "mulDown",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1572,
                                        "src": "8041:31:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11052,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "8041:53:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 11043,
                                      "name": "invariantRatioWithFees",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11010,
                                      "src": "8014:22:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11044,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "8014:26:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11053,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "8014:81:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "7989:106:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11055,
                              "nodeType": "ExpressionStatement",
                              "src": "7989:106:37"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11020,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11017,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11014,
                            "src": "7859:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 11018,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10982,
                              "src": "7863:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 11019,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "7863:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7859:19:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 11057,
                        "initializationExpression": {
                          "assignments": [
                            11014
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 11014,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 11057,
                              "src": "7844:9:37",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 11013,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "7844:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 11016,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 11015,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "7856:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "7844:13:37"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 11022,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "7880:3:37",
                            "subExpression": {
                              "id": 11021,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11014,
                              "src": "7880:1:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11023,
                          "nodeType": "ExpressionStatement",
                          "src": "7880:3:37"
                        },
                        "nodeType": "ForStatement",
                        "src": "7839:267:37"
                      },
                      {
                        "assignments": [
                          11059
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11059,
                            "mutability": "mutable",
                            "name": "invariantRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 11173,
                            "src": "8116:22:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11058,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8116:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11062,
                        "initialValue": {
                          "expression": {
                            "id": 11060,
                            "name": "FixedPoint",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1815,
                            "src": "8141:10:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                              "typeString": "type(library FixedPoint)"
                            }
                          },
                          "id": 11061,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "ONE",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1480,
                          "src": "8141:14:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8116:39:37"
                      },
                      {
                        "body": {
                          "id": 11153,
                          "nodeType": "Block",
                          "src": "8211:693:37",
                          "statements": [
                            {
                              "assignments": [
                                11075
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 11075,
                                  "mutability": "mutable",
                                  "name": "amountInWithoutFee",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 11153,
                                  "src": "8225:26:37",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 11074,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "8225:7:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 11076,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "8225:26:37"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 11081,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "baseExpression": {
                                    "id": 11077,
                                    "name": "balanceRatiosWithFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11001,
                                    "src": "8270:20:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 11079,
                                  "indexExpression": {
                                    "id": 11078,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11064,
                                    "src": "8291:1:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "8270:23:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">",
                                "rightExpression": {
                                  "id": 11080,
                                  "name": "invariantRatioWithFees",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11010,
                                  "src": "8296:22:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "8270:48:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 11125,
                                "nodeType": "Block",
                                "src": "8636:66:37",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 11123,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 11119,
                                        "name": "amountInWithoutFee",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11075,
                                        "src": "8654:18:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "baseExpression": {
                                          "id": 11120,
                                          "name": "amountsIn",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 10988,
                                          "src": "8675:9:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                            "typeString": "uint256[] memory"
                                          }
                                        },
                                        "id": 11122,
                                        "indexExpression": {
                                          "id": 11121,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11064,
                                          "src": "8685:1:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "8675:12:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "8654:33:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11124,
                                    "nodeType": "ExpressionStatement",
                                    "src": "8654:33:37"
                                  }
                                ]
                              },
                              "id": 11126,
                              "nodeType": "IfStatement",
                              "src": "8266:436:37",
                              "trueBody": {
                                "id": 11118,
                                "nodeType": "Block",
                                "src": "8320:310:37",
                                "statements": [
                                  {
                                    "assignments": [
                                      11083
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 11083,
                                        "mutability": "mutable",
                                        "name": "nonTaxableAmount",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 11118,
                                        "src": "8338:24:37",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "typeName": {
                                          "id": 11082,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "8338:7:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 11094,
                                    "initialValue": {
                                      "arguments": [
                                        {
                                          "arguments": [
                                            {
                                              "expression": {
                                                "id": 11090,
                                                "name": "FixedPoint",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 1815,
                                                "src": "8412:10:37",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                                  "typeString": "type(library FixedPoint)"
                                                }
                                              },
                                              "id": 11091,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "ONE",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 1480,
                                              "src": "8412:14:37",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "id": 11088,
                                              "name": "invariantRatioWithFees",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 11010,
                                              "src": "8385:22:37",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "id": 11089,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "sub",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1538,
                                            "src": "8385:26:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 11092,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "8385:42:37",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 11084,
                                            "name": "balances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10982,
                                            "src": "8365:8:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11086,
                                          "indexExpression": {
                                            "id": 11085,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11064,
                                            "src": "8374:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "8365:11:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11087,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "mulDown",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1572,
                                        "src": "8365:19:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11093,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "8365:63:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "8338:90:37"
                                  },
                                  {
                                    "assignments": [
                                      11096
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 11096,
                                        "mutability": "mutable",
                                        "name": "taxableAmount",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 11118,
                                        "src": "8446:21:37",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "typeName": {
                                          "id": 11095,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "8446:7:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 11103,
                                    "initialValue": {
                                      "arguments": [
                                        {
                                          "id": 11101,
                                          "name": "nonTaxableAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11083,
                                          "src": "8487:16:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 11097,
                                            "name": "amountsIn",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10988,
                                            "src": "8470:9:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11099,
                                          "indexExpression": {
                                            "id": 11098,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11064,
                                            "src": "8480:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "8470:12:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11100,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "sub",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1538,
                                        "src": "8470:16:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11102,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "8470:34:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "8446:58:37"
                                  },
                                  {
                                    "expression": {
                                      "id": 11116,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 11104,
                                        "name": "amountInWithoutFee",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11075,
                                        "src": "8522:18:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "arguments": [
                                          {
                                            "arguments": [
                                              {
                                                "arguments": [
                                                  {
                                                    "id": 11112,
                                                    "name": "swapFee",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 10992,
                                                    "src": "8605:7:37",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  }
                                                ],
                                                "expression": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  ],
                                                  "expression": {
                                                    "expression": {
                                                      "id": 11109,
                                                      "name": "FixedPoint",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 1815,
                                                      "src": "8586:10:37",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                                        "typeString": "type(library FixedPoint)"
                                                      }
                                                    },
                                                    "id": 11110,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "memberName": "ONE",
                                                    "nodeType": "MemberAccess",
                                                    "referencedDeclaration": 1480,
                                                    "src": "8586:14:37",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  },
                                                  "id": 11111,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "sub",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 1538,
                                                  "src": "8586:18:37",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                  }
                                                },
                                                "id": 11113,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "8586:27:37",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "expression": {
                                                "id": 11107,
                                                "name": "taxableAmount",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 11096,
                                                "src": "8564:13:37",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "id": 11108,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "mulDown",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 1572,
                                              "src": "8564:21:37",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                                              }
                                            },
                                            "id": 11114,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "8564:50:37",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "id": 11105,
                                            "name": "nonTaxableAmount",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11083,
                                            "src": "8543:16:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 11106,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "add",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 1512,
                                          "src": "8543:20:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 11115,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "8543:72:37",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "8522:93:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11117,
                                    "nodeType": "ExpressionStatement",
                                    "src": "8522:93:37"
                                  }
                                ]
                              }
                            },
                            {
                              "assignments": [
                                11128
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 11128,
                                  "mutability": "mutable",
                                  "name": "balanceRatio",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 11153,
                                  "src": "8716:20:37",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 11127,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "8716:7:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 11140,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 11136,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10982,
                                      "src": "8783:8:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    "id": 11138,
                                    "indexExpression": {
                                      "id": 11137,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11064,
                                      "src": "8792:1:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "8783:11:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "arguments": [
                                      {
                                        "id": 11133,
                                        "name": "amountInWithoutFee",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11075,
                                        "src": "8755:18:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "baseExpression": {
                                          "id": 11129,
                                          "name": "balances",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 10982,
                                          "src": "8739:8:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                            "typeString": "uint256[] memory"
                                          }
                                        },
                                        "id": 11131,
                                        "indexExpression": {
                                          "id": 11130,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11064,
                                          "src": "8748:1:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "8739:11:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 11132,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "add",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 1512,
                                      "src": "8739:15:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                                      }
                                    },
                                    "id": 11134,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "8739:35:37",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 11135,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "divDown",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1666,
                                  "src": "8739:43:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 11139,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8739:56:37",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "8716:79:37"
                            },
                            {
                              "expression": {
                                "id": 11151,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 11141,
                                  "name": "invariantRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11059,
                                  "src": "8810:14:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 11146,
                                            "name": "normalizedWeights",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 10985,
                                            "src": "8871:17:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11148,
                                          "indexExpression": {
                                            "id": 11147,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11064,
                                            "src": "8889:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "8871:20:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "id": 11144,
                                          "name": "balanceRatio",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11128,
                                          "src": "8850:12:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11145,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "powDown",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1760,
                                        "src": "8850:20:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11149,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "8850:42:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 11142,
                                      "name": "invariantRatio",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11059,
                                      "src": "8827:14:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11143,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "mulDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1572,
                                    "src": "8827:22:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11150,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "8827:66:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "8810:83:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11152,
                              "nodeType": "ExpressionStatement",
                              "src": "8810:83:37"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11070,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11067,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11064,
                            "src": "8185:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 11068,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10982,
                              "src": "8189:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 11069,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "8189:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8185:19:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 11154,
                        "initializationExpression": {
                          "assignments": [
                            11064
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 11064,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 11154,
                              "src": "8170:9:37",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 11063,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "8170:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 11066,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 11065,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "8182:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "8170:13:37"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 11072,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "8206:3:37",
                            "subExpression": {
                              "id": 11071,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11064,
                              "src": "8206:1:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11073,
                          "nodeType": "ExpressionStatement",
                          "src": "8206:3:37"
                        },
                        "nodeType": "ForStatement",
                        "src": "8165:739:37"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11158,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11155,
                            "name": "invariantRatio",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11059,
                            "src": "8918:14:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "id": 11156,
                              "name": "FixedPoint",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1815,
                              "src": "8936:10:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                "typeString": "type(library FixedPoint)"
                              }
                            },
                            "id": 11157,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ONE",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1480,
                            "src": "8936:14:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8918:32:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 11171,
                          "nodeType": "Block",
                          "src": "9048:33:37",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 11169,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9069:1:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 10996,
                              "id": 11170,
                              "nodeType": "Return",
                              "src": "9062:8:37"
                            }
                          ]
                        },
                        "id": 11172,
                        "nodeType": "IfStatement",
                        "src": "8914:167:37",
                        "trueBody": {
                          "id": 11168,
                          "nodeType": "Block",
                          "src": "8952:90:37",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "expression": {
                                          "id": 11163,
                                          "name": "FixedPoint",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 1815,
                                          "src": "9015:10:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                            "typeString": "type(library FixedPoint)"
                                          }
                                        },
                                        "id": 11164,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "ONE",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1480,
                                        "src": "9015:14:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "id": 11161,
                                        "name": "invariantRatio",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11059,
                                        "src": "8996:14:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 11162,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sub",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 1538,
                                      "src": "8996:18:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                                      }
                                    },
                                    "id": 11165,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "8996:34:37",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 11159,
                                    "name": "bptTotalSupply",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 10990,
                                    "src": "8973:14:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 11160,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mulDown",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1572,
                                  "src": "8973:22:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 11166,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8973:58:37",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 10996,
                              "id": 11167,
                              "nodeType": "Return",
                              "src": "8966:65:37"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 11174,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcBptOutGivenExactTokensIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 10993,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10982,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 11174,
                        "src": "7455:25:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10980,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "7455:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10981,
                          "nodeType": "ArrayTypeName",
                          "src": "7455:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10985,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 11174,
                        "src": "7490:34:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10983,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "7490:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10984,
                          "nodeType": "ArrayTypeName",
                          "src": "7490:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10988,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 11174,
                        "src": "7534:26:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 10986,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "7534:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 10987,
                          "nodeType": "ArrayTypeName",
                          "src": "7534:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10990,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 11174,
                        "src": "7570:22:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10989,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7570:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 10992,
                        "mutability": "mutable",
                        "name": "swapFee",
                        "nodeType": "VariableDeclaration",
                        "scope": 11174,
                        "src": "7602:15:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10991,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7602:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7445:178:37"
                  },
                  "returnParameters": {
                    "id": 10996,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 10995,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 11174,
                        "src": "7647:7:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 10994,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7647:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7646:9:37"
                  },
                  "scope": 11652,
                  "src": "7407:1680:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 11259,
                    "nodeType": "Block",
                    "src": "9315:1850:37",
                    "statements": [
                      {
                        "assignments": [
                          11190
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11190,
                            "mutability": "mutable",
                            "name": "invariantRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 11259,
                            "src": "10268:22:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11189,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10268:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11198,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11196,
                              "name": "bptTotalSupply",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11182,
                              "src": "10332:14:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 11193,
                                  "name": "bptAmountOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11180,
                                  "src": "10312:12:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 11191,
                                  "name": "bptTotalSupply",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11182,
                                  "src": "10293:14:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11192,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "add",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1512,
                                "src": "10293:18:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11194,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "10293:32:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11195,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "10293:38:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11197,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10293:54:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10268:79:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11202,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 11200,
                                "name": "invariantRatio",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11190,
                                "src": "10366:14:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 11201,
                                "name": "_MAX_INVARIANT_RATIO",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10798,
                                "src": "10384:20:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "10366:38:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 11203,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "10406:6:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 11204,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MAX_OUT_BPT_FOR_TOKEN_IN",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 468,
                              "src": "10406:31:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 11199,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "10357:8:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 11205,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10357:81:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 11206,
                        "nodeType": "ExpressionStatement",
                        "src": "10357:81:37"
                      },
                      {
                        "assignments": [
                          11208
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11208,
                            "mutability": "mutable",
                            "name": "balanceRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 11259,
                            "src": "10544:20:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11207,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10544:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11217,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 11214,
                                  "name": "normalizedWeight",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11178,
                                  "src": "10609:16:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "expression": {
                                    "id": 11211,
                                    "name": "FixedPoint",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1815,
                                    "src": "10588:10:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                      "typeString": "type(library FixedPoint)"
                                    }
                                  },
                                  "id": 11212,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "ONE",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1480,
                                  "src": "10588:14:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11213,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "divUp",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1718,
                                "src": "10588:20:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11215,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "10588:38:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11209,
                              "name": "invariantRatio",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11190,
                              "src": "10567:14:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11210,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "powUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1794,
                            "src": "10567:20:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11216,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10567:60:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10544:83:37"
                      },
                      {
                        "assignments": [
                          11219
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11219,
                            "mutability": "mutable",
                            "name": "amountInWithoutFee",
                            "nodeType": "VariableDeclaration",
                            "scope": 11259,
                            "src": "10638:26:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11218,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10638:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11228,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "id": 11224,
                                    "name": "FixedPoint",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1815,
                                    "src": "10698:10:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                      "typeString": "type(library FixedPoint)"
                                    }
                                  },
                                  "id": 11225,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "ONE",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1480,
                                  "src": "10698:14:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 11222,
                                  "name": "balanceRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11208,
                                  "src": "10681:12:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11223,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sub",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1538,
                                "src": "10681:16:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11226,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "10681:32:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11220,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11176,
                              "src": "10667:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11221,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "10667:13:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11227,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10667:47:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10638:76:37"
                      },
                      {
                        "assignments": [
                          11230
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11230,
                            "mutability": "mutable",
                            "name": "taxablePercentage",
                            "nodeType": "VariableDeclaration",
                            "scope": 11259,
                            "src": "10869:25:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11229,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10869:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11234,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 11231,
                              "name": "normalizedWeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11178,
                              "src": "10897:16:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11232,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "complement",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1814,
                            "src": "10897:27:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11233,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10897:29:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10869:57:37"
                      },
                      {
                        "assignments": [
                          11236
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11236,
                            "mutability": "mutable",
                            "name": "taxableAmount",
                            "nodeType": "VariableDeclaration",
                            "scope": 11259,
                            "src": "10936:21:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11235,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10936:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11241,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11239,
                              "name": "taxablePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11230,
                              "src": "10985:17:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11237,
                              "name": "amountInWithoutFee",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11219,
                              "src": "10960:18:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11238,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "10960:24:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11240,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10960:43:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10936:67:37"
                      },
                      {
                        "assignments": [
                          11243
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11243,
                            "mutability": "mutable",
                            "name": "nonTaxableAmount",
                            "nodeType": "VariableDeclaration",
                            "scope": 11259,
                            "src": "11013:24:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11242,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11013:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11248,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11246,
                              "name": "taxableAmount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11236,
                              "src": "11063:13:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11244,
                              "name": "amountInWithoutFee",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11219,
                              "src": "11040:18:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11245,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1538,
                            "src": "11040:22:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11247,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11040:37:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11013:64:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "expression": {
                                      "id": 11253,
                                      "name": "swapFee",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11184,
                                      "src": "11136:7:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11254,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "complement",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1814,
                                    "src": "11136:18:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11255,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11136:20:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 11251,
                                  "name": "taxableAmount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11236,
                                  "src": "11116:13:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11252,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "divUp",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1718,
                                "src": "11116:19:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11256,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "11116:41:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11249,
                              "name": "nonTaxableAmount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11243,
                              "src": "11095:16:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11250,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1512,
                            "src": "11095:20:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11257,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11095:63:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 11188,
                        "id": 11258,
                        "nodeType": "Return",
                        "src": "11088:70:37"
                      }
                    ]
                  },
                  "id": 11260,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcTokenInGivenExactBptOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 11185,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11176,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 11260,
                        "src": "9140:15:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11175,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9140:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11178,
                        "mutability": "mutable",
                        "name": "normalizedWeight",
                        "nodeType": "VariableDeclaration",
                        "scope": 11260,
                        "src": "9165:24:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11177,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9165:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11180,
                        "mutability": "mutable",
                        "name": "bptAmountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 11260,
                        "src": "9199:20:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11179,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9199:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11182,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 11260,
                        "src": "9229:22:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11181,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9229:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11184,
                        "mutability": "mutable",
                        "name": "swapFee",
                        "nodeType": "VariableDeclaration",
                        "scope": 11260,
                        "src": "9261:15:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11183,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9261:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9130:152:37"
                  },
                  "returnParameters": {
                    "id": 11188,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11187,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 11260,
                        "src": "9306:7:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11186,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9306:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9305:9:37"
                  },
                  "scope": 11652,
                  "src": "9093:2072:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 11439,
                    "nodeType": "Block",
                    "src": "11421:1552:37",
                    "statements": [
                      {
                        "assignments": [
                          11282
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11282,
                            "mutability": "mutable",
                            "name": "balanceRatiosWithoutFee",
                            "nodeType": "VariableDeclaration",
                            "scope": 11439,
                            "src": "11475:40:37",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 11280,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11475:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11281,
                              "nodeType": "ArrayTypeName",
                              "src": "11475:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11289,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 11286,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11269,
                                "src": "11532:10:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11287,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "11532:17:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 11285,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "11518:13:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 11283,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11522:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11284,
                              "nodeType": "ArrayTypeName",
                              "src": "11522:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 11288,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11518:32:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11475:75:37"
                      },
                      {
                        "assignments": [
                          11291
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11291,
                            "mutability": "mutable",
                            "name": "invariantRatioWithoutFees",
                            "nodeType": "VariableDeclaration",
                            "scope": 11439,
                            "src": "11560:33:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11290,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11560:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11293,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 11292,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "11596:1:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11560:37:37"
                      },
                      {
                        "body": {
                          "id": 11337,
                          "nodeType": "Block",
                          "src": "11653:260:37",
                          "statements": [
                            {
                              "expression": {
                                "id": 11321,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 11305,
                                    "name": "balanceRatiosWithoutFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11282,
                                    "src": "11667:23:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 11307,
                                  "indexExpression": {
                                    "id": 11306,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11295,
                                    "src": "11691:1:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "11667:26:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 11317,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11263,
                                        "src": "11733:8:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 11319,
                                      "indexExpression": {
                                        "id": 11318,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11295,
                                        "src": "11742:1:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "11733:11:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 11312,
                                            "name": "amountsOut",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11269,
                                            "src": "11712:10:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11314,
                                          "indexExpression": {
                                            "id": 11313,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11295,
                                            "src": "11723:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "11712:13:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 11308,
                                            "name": "balances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11263,
                                            "src": "11696:8:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11310,
                                          "indexExpression": {
                                            "id": 11309,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11295,
                                            "src": "11705:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "11696:11:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11311,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "sub",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1538,
                                        "src": "11696:15:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11315,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "11696:30:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11316,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "divUp",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1718,
                                    "src": "11696:36:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11320,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11696:49:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "11667:78:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11322,
                              "nodeType": "ExpressionStatement",
                              "src": "11667:78:37"
                            },
                            {
                              "expression": {
                                "id": 11335,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 11323,
                                  "name": "invariantRatioWithoutFees",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11291,
                                  "src": "11759:25:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 11330,
                                            "name": "normalizedWeights",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11266,
                                            "src": "11867:17:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11332,
                                          "indexExpression": {
                                            "id": 11331,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11295,
                                            "src": "11885:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "11867:20:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 11326,
                                            "name": "balanceRatiosWithoutFee",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11282,
                                            "src": "11834:23:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11328,
                                          "indexExpression": {
                                            "id": 11327,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11295,
                                            "src": "11858:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "11834:26:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11329,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "mulUp",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1620,
                                        "src": "11834:32:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11333,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "11834:54:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 11324,
                                      "name": "invariantRatioWithoutFees",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11291,
                                      "src": "11787:25:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11325,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "11787:29:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11334,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11787:115:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "11759:143:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11336,
                              "nodeType": "ExpressionStatement",
                              "src": "11759:143:37"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11301,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11298,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11295,
                            "src": "11627:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 11299,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11263,
                              "src": "11631:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 11300,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "11631:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "11627:19:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 11338,
                        "initializationExpression": {
                          "assignments": [
                            11295
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 11295,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 11338,
                              "src": "11612:9:37",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 11294,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11612:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 11297,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 11296,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "11624:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "11612:13:37"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 11303,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "11648:3:37",
                            "subExpression": {
                              "id": 11302,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11295,
                              "src": "11648:1:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11304,
                          "nodeType": "ExpressionStatement",
                          "src": "11648:3:37"
                        },
                        "nodeType": "ForStatement",
                        "src": "11607:306:37"
                      },
                      {
                        "assignments": [
                          11340
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11340,
                            "mutability": "mutable",
                            "name": "invariantRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 11439,
                            "src": "11923:22:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11339,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11923:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11343,
                        "initialValue": {
                          "expression": {
                            "id": 11341,
                            "name": "FixedPoint",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1815,
                            "src": "11948:10:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                              "typeString": "type(library FixedPoint)"
                            }
                          },
                          "id": 11342,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "ONE",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1480,
                          "src": "11948:14:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11923:39:37"
                      },
                      {
                        "body": {
                          "id": 11430,
                          "nodeType": "Block",
                          "src": "12018:882:37",
                          "statements": [
                            {
                              "assignments": [
                                11356
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 11356,
                                  "mutability": "mutable",
                                  "name": "amountOutWithFee",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 11430,
                                  "src": "12234:24:37",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 11355,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "12234:7:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 11357,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "12234:24:37"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 11362,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 11358,
                                  "name": "invariantRatioWithoutFees",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11291,
                                  "src": "12276:25:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">",
                                "rightExpression": {
                                  "baseExpression": {
                                    "id": 11359,
                                    "name": "balanceRatiosWithoutFee",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11282,
                                    "src": "12304:23:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 11361,
                                  "indexExpression": {
                                    "id": 11360,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11345,
                                    "src": "12328:1:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "12304:26:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "12276:54:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 11402,
                                "nodeType": "Block",
                                "src": "12635:65:37",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 11400,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 11396,
                                        "name": "amountOutWithFee",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11356,
                                        "src": "12653:16:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "baseExpression": {
                                          "id": 11397,
                                          "name": "amountsOut",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11269,
                                          "src": "12672:10:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                            "typeString": "uint256[] memory"
                                          }
                                        },
                                        "id": 11399,
                                        "indexExpression": {
                                          "id": 11398,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11345,
                                          "src": "12683:1:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "12672:13:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "12653:32:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11401,
                                    "nodeType": "ExpressionStatement",
                                    "src": "12653:32:37"
                                  }
                                ]
                              },
                              "id": 11403,
                              "nodeType": "IfStatement",
                              "src": "12272:428:37",
                              "trueBody": {
                                "id": 11395,
                                "nodeType": "Block",
                                "src": "12332:297:37",
                                "statements": [
                                  {
                                    "assignments": [
                                      11364
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 11364,
                                        "mutability": "mutable",
                                        "name": "nonTaxableAmount",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 11395,
                                        "src": "12350:24:37",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "typeName": {
                                          "id": 11363,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "12350:7:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 11373,
                                    "initialValue": {
                                      "arguments": [
                                        {
                                          "arguments": [],
                                          "expression": {
                                            "argumentTypes": [],
                                            "expression": {
                                              "id": 11369,
                                              "name": "invariantRatioWithoutFees",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 11291,
                                              "src": "12397:25:37",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "id": 11370,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "complement",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1814,
                                            "src": "12397:36:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                              "typeString": "function (uint256) pure returns (uint256)"
                                            }
                                          },
                                          "id": 11371,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "12397:38:37",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 11365,
                                            "name": "balances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11263,
                                            "src": "12377:8:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11367,
                                          "indexExpression": {
                                            "id": 11366,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11345,
                                            "src": "12386:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "12377:11:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11368,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "mulDown",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1572,
                                        "src": "12377:19:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11372,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "12377:59:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "12350:86:37"
                                  },
                                  {
                                    "assignments": [
                                      11375
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 11375,
                                        "mutability": "mutable",
                                        "name": "taxableAmount",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 11395,
                                        "src": "12454:21:37",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "typeName": {
                                          "id": 11374,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "12454:7:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 11382,
                                    "initialValue": {
                                      "arguments": [
                                        {
                                          "id": 11380,
                                          "name": "nonTaxableAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11364,
                                          "src": "12496:16:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "baseExpression": {
                                            "id": 11376,
                                            "name": "amountsOut",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11269,
                                            "src": "12478:10:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11378,
                                          "indexExpression": {
                                            "id": 11377,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11345,
                                            "src": "12489:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "12478:13:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11379,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "sub",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1538,
                                        "src": "12478:17:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11381,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "12478:35:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "12454:59:37"
                                  },
                                  {
                                    "expression": {
                                      "id": 11393,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 11383,
                                        "name": "amountOutWithFee",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11356,
                                        "src": "12532:16:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "arguments": [
                                          {
                                            "arguments": [
                                              {
                                                "arguments": [],
                                                "expression": {
                                                  "argumentTypes": [],
                                                  "expression": {
                                                    "id": 11388,
                                                    "name": "swapFee",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 11273,
                                                    "src": "12592:7:37",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  },
                                                  "id": 11389,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "complement",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 1814,
                                                  "src": "12592:18:37",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                    "typeString": "function (uint256) pure returns (uint256)"
                                                  }
                                                },
                                                "id": 11390,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "12592:20:37",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "expression": {
                                                "id": 11386,
                                                "name": "taxableAmount",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 11375,
                                                "src": "12572:13:37",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              },
                                              "id": 11387,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "divUp",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 1718,
                                              "src": "12572:19:37",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                                              }
                                            },
                                            "id": 11391,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "12572:41:37",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "id": 11384,
                                            "name": "nonTaxableAmount",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11364,
                                            "src": "12551:16:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 11385,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "add",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 1512,
                                          "src": "12551:20:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 11392,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "12551:63:37",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "12532:82:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11394,
                                    "nodeType": "ExpressionStatement",
                                    "src": "12532:82:37"
                                  }
                                ]
                              }
                            },
                            {
                              "assignments": [
                                11405
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 11405,
                                  "mutability": "mutable",
                                  "name": "balanceRatio",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 11430,
                                  "src": "12714:20:37",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 11404,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "12714:7:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 11417,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 11413,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11263,
                                      "src": "12779:8:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    "id": 11415,
                                    "indexExpression": {
                                      "id": 11414,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11345,
                                      "src": "12788:1:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "12779:11:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "arguments": [
                                      {
                                        "id": 11410,
                                        "name": "amountOutWithFee",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11356,
                                        "src": "12753:16:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "baseExpression": {
                                          "id": 11406,
                                          "name": "balances",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11263,
                                          "src": "12737:8:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                            "typeString": "uint256[] memory"
                                          }
                                        },
                                        "id": 11408,
                                        "indexExpression": {
                                          "id": 11407,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11345,
                                          "src": "12746:1:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "12737:11:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 11409,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sub",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 1538,
                                      "src": "12737:15:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                                      }
                                    },
                                    "id": 11411,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "12737:33:37",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 11412,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "divDown",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1666,
                                  "src": "12737:41:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 11416,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "12737:54:37",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "12714:77:37"
                            },
                            {
                              "expression": {
                                "id": 11428,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 11418,
                                  "name": "invariantRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11340,
                                  "src": "12806:14:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 11423,
                                            "name": "normalizedWeights",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11266,
                                            "src": "12867:17:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 11425,
                                          "indexExpression": {
                                            "id": 11424,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11345,
                                            "src": "12885:1:37",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "12867:20:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "id": 11421,
                                          "name": "balanceRatio",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11405,
                                          "src": "12846:12:37",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 11422,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "powDown",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 1760,
                                        "src": "12846:20:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 11426,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "12846:42:37",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 11419,
                                      "name": "invariantRatio",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11340,
                                      "src": "12823:14:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11420,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "mulDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1572,
                                    "src": "12823:22:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11427,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "12823:66:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "12806:83:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11429,
                              "nodeType": "ExpressionStatement",
                              "src": "12806:83:37"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11351,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11348,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11345,
                            "src": "11992:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 11349,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11263,
                              "src": "11996:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 11350,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "11996:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "11992:19:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 11431,
                        "initializationExpression": {
                          "assignments": [
                            11345
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 11345,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 11431,
                              "src": "11977:9:37",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 11344,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11977:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 11347,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 11346,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "11989:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "11977:13:37"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 11353,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "12013:3:37",
                            "subExpression": {
                              "id": 11352,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11345,
                              "src": "12013:1:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11354,
                          "nodeType": "ExpressionStatement",
                          "src": "12013:3:37"
                        },
                        "nodeType": "ForStatement",
                        "src": "11972:928:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 11434,
                                  "name": "invariantRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11340,
                                  "src": "12938:14:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11435,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "complement",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1814,
                                "src": "12938:25:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11436,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12938:27:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11432,
                              "name": "bptTotalSupply",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11271,
                              "src": "12917:14:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11433,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "12917:20:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11437,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12917:49:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 11277,
                        "id": 11438,
                        "nodeType": "Return",
                        "src": "12910:56:37"
                      }
                    ]
                  },
                  "id": 11440,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcBptInGivenExactTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 11274,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11263,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 11440,
                        "src": "11219:25:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 11261,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11219:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11262,
                          "nodeType": "ArrayTypeName",
                          "src": "11219:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11266,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 11440,
                        "src": "11254:34:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 11264,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11254:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11265,
                          "nodeType": "ArrayTypeName",
                          "src": "11254:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11269,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 11440,
                        "src": "11298:27:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 11267,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11298:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11268,
                          "nodeType": "ArrayTypeName",
                          "src": "11298:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11271,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 11440,
                        "src": "11335:22:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11270,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11335:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11273,
                        "mutability": "mutable",
                        "name": "swapFee",
                        "nodeType": "VariableDeclaration",
                        "scope": 11440,
                        "src": "11367:15:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11272,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11367:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11209:179:37"
                  },
                  "returnParameters": {
                    "id": 11277,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11276,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 11440,
                        "src": "11412:7:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11275,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11412:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11411:9:37"
                  },
                  "scope": 11652,
                  "src": "11171:1802:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 11523,
                    "nodeType": "Block",
                    "src": "13200:2313:37",
                    "statements": [
                      {
                        "assignments": [
                          11456
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11456,
                            "mutability": "mutable",
                            "name": "invariantRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 11523,
                            "src": "14309:22:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11455,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "14309:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11464,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11462,
                              "name": "bptTotalSupply",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11448,
                              "src": "14372:14:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 11459,
                                  "name": "bptAmountIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11446,
                                  "src": "14353:11:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 11457,
                                  "name": "bptTotalSupply",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11448,
                                  "src": "14334:14:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11458,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sub",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1538,
                                "src": "14334:18:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11460,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "14334:31:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11461,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "14334:37:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11463,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14334:53:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14309:78:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11468,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 11466,
                                "name": "invariantRatio",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11456,
                                "src": "14406:14:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 11467,
                                "name": "_MIN_INVARIANT_RATIO",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 10801,
                                "src": "14424:20:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "14406:38:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 11469,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "14446:6:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 11470,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "MIN_BPT_IN_FOR_TOKEN_OUT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 465,
                              "src": "14446:31:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 11465,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "14397:8:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 11471,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14397:81:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 11472,
                        "nodeType": "ExpressionStatement",
                        "src": "14397:81:37"
                      },
                      {
                        "assignments": [
                          11474
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11474,
                            "mutability": "mutable",
                            "name": "balanceRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 11523,
                            "src": "14580:20:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11473,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "14580:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11483,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 11480,
                                  "name": "normalizedWeight",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11444,
                                  "src": "14647:16:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "expression": {
                                    "id": 11477,
                                    "name": "FixedPoint",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1815,
                                    "src": "14624:10:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                      "typeString": "type(library FixedPoint)"
                                    }
                                  },
                                  "id": 11478,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "ONE",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1480,
                                  "src": "14624:14:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11479,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "divDown",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1666,
                                "src": "14624:22:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11481,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "14624:40:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11475,
                              "name": "invariantRatio",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11456,
                              "src": "14603:14:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11476,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "powUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1794,
                            "src": "14603:20:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11482,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14603:62:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14580:85:37"
                      },
                      {
                        "assignments": [
                          11485
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11485,
                            "mutability": "mutable",
                            "name": "amountOutWithoutFee",
                            "nodeType": "VariableDeclaration",
                            "scope": 11523,
                            "src": "14784:27:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11484,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "14784:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11492,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 11488,
                                  "name": "balanceRatio",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11474,
                                  "src": "14830:12:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11489,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "complement",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1814,
                                "src": "14830:23:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11490,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "14830:25:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11486,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11442,
                              "src": "14814:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11487,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1572,
                            "src": "14814:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11491,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14814:42:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14784:72:37"
                      },
                      {
                        "assignments": [
                          11494
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11494,
                            "mutability": "mutable",
                            "name": "taxablePercentage",
                            "nodeType": "VariableDeclaration",
                            "scope": 11523,
                            "src": "15012:25:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11493,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "15012:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11498,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 11495,
                              "name": "normalizedWeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11444,
                              "src": "15040:16:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11496,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "complement",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1814,
                            "src": "15040:27:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11497,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15040:29:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "15012:57:37"
                      },
                      {
                        "assignments": [
                          11500
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11500,
                            "mutability": "mutable",
                            "name": "taxableAmount",
                            "nodeType": "VariableDeclaration",
                            "scope": 11523,
                            "src": "15280:21:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11499,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "15280:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11505,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11503,
                              "name": "taxablePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11494,
                              "src": "15330:17:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11501,
                              "name": "amountOutWithoutFee",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11485,
                              "src": "15304:19:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11502,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "15304:25:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11504,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15304:44:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "15280:68:37"
                      },
                      {
                        "assignments": [
                          11507
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11507,
                            "mutability": "mutable",
                            "name": "nonTaxableAmount",
                            "nodeType": "VariableDeclaration",
                            "scope": 11523,
                            "src": "15358:24:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11506,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "15358:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11512,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11510,
                              "name": "taxableAmount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11500,
                              "src": "15409:13:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11508,
                              "name": "amountOutWithoutFee",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11485,
                              "src": "15385:19:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11509,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1538,
                            "src": "15385:23:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11511,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15385:38:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "15358:65:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "expression": {
                                      "id": 11517,
                                      "name": "swapFee",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11450,
                                      "src": "15484:7:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11518,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "complement",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1814,
                                    "src": "15484:18:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11519,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "15484:20:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 11515,
                                  "name": "taxableAmount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11500,
                                  "src": "15462:13:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11516,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "mulDown",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1572,
                                "src": "15462:21:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11520,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "15462:43:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11513,
                              "name": "nonTaxableAmount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11507,
                              "src": "15441:16:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11514,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1512,
                            "src": "15441:20:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11521,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "15441:65:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 11454,
                        "id": 11522,
                        "nodeType": "Return",
                        "src": "15434:72:37"
                      }
                    ]
                  },
                  "id": 11524,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcTokenOutGivenExactBptIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 11451,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11442,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 11524,
                        "src": "13026:15:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11441,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13026:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11444,
                        "mutability": "mutable",
                        "name": "normalizedWeight",
                        "nodeType": "VariableDeclaration",
                        "scope": 11524,
                        "src": "13051:24:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11443,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13051:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11446,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 11524,
                        "src": "13085:19:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11445,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13085:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11448,
                        "mutability": "mutable",
                        "name": "bptTotalSupply",
                        "nodeType": "VariableDeclaration",
                        "scope": 11524,
                        "src": "13114:22:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11447,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13114:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11450,
                        "mutability": "mutable",
                        "name": "swapFee",
                        "nodeType": "VariableDeclaration",
                        "scope": 11524,
                        "src": "13146:15:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11449,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13146:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13016:151:37"
                  },
                  "returnParameters": {
                    "id": 11454,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11453,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 11524,
                        "src": "13191:7:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11452,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13191:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13190:9:37"
                  },
                  "scope": 11652,
                  "src": "12979:2534:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 11582,
                    "nodeType": "Block",
                    "src": "15695:1271:37",
                    "statements": [
                      {
                        "assignments": [
                          11538
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11538,
                            "mutability": "mutable",
                            "name": "bptRatio",
                            "nodeType": "VariableDeclaration",
                            "scope": 11582,
                            "src": "16687:16:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11537,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16687:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11543,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11541,
                              "name": "totalBPT",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11531,
                              "src": "16726:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11539,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11529,
                              "src": "16706:11:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11540,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "16706:19:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11542,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16706:29:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16687:48:37"
                      },
                      {
                        "assignments": [
                          11548
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11548,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 11582,
                            "src": "16746:27:37",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 11546,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "16746:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11547,
                              "nodeType": "ArrayTypeName",
                              "src": "16746:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11555,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 11552,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11527,
                                "src": "16790:8:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11553,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "16790:15:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 11551,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "16776:13:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 11549,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "16780:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11550,
                              "nodeType": "ArrayTypeName",
                              "src": "16780:9:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 11554,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16776:30:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16746:60:37"
                      },
                      {
                        "body": {
                          "id": 11578,
                          "nodeType": "Block",
                          "src": "16862:70:37",
                          "statements": [
                            {
                              "expression": {
                                "id": 11576,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 11567,
                                    "name": "amountsOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11548,
                                    "src": "16876:10:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 11569,
                                  "indexExpression": {
                                    "id": 11568,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11557,
                                    "src": "16887:1:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "16876:13:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 11574,
                                      "name": "bptRatio",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11538,
                                      "src": "16912:8:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 11570,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11527,
                                        "src": "16892:8:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 11572,
                                      "indexExpression": {
                                        "id": 11571,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11557,
                                        "src": "16901:1:37",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "16892:11:37",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11573,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "mulDown",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1572,
                                    "src": "16892:19:37",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11575,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "16892:29:37",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "16876:45:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11577,
                              "nodeType": "ExpressionStatement",
                              "src": "16876:45:37"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11563,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11560,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11557,
                            "src": "16836:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 11561,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11527,
                              "src": "16840:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 11562,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "16840:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "16836:19:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 11579,
                        "initializationExpression": {
                          "assignments": [
                            11557
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 11557,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 11579,
                              "src": "16821:9:37",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 11556,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "16821:7:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 11559,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 11558,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "16833:1:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "16821:13:37"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 11565,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "16857:3:37",
                            "subExpression": {
                              "id": 11564,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11557,
                              "src": "16857:1:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11566,
                          "nodeType": "ExpressionStatement",
                          "src": "16857:3:37"
                        },
                        "nodeType": "ForStatement",
                        "src": "16816:116:37"
                      },
                      {
                        "expression": {
                          "id": 11580,
                          "name": "amountsOut",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11548,
                          "src": "16949:10:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "functionReturnParameters": 11536,
                        "id": 11581,
                        "nodeType": "Return",
                        "src": "16942:17:37"
                      }
                    ]
                  },
                  "id": 11583,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcTokensOutGivenExactBptIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 11532,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11527,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 11583,
                        "src": "15567:25:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 11525,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "15567:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11526,
                          "nodeType": "ArrayTypeName",
                          "src": "15567:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11529,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 11583,
                        "src": "15602:19:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11528,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "15602:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11531,
                        "mutability": "mutable",
                        "name": "totalBPT",
                        "nodeType": "VariableDeclaration",
                        "scope": 11583,
                        "src": "15631:16:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11530,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "15631:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15557:96:37"
                  },
                  "returnParameters": {
                    "id": 11536,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11535,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 11583,
                        "src": "15677:16:37",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 11533,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "15677:7:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11534,
                          "nodeType": "ArrayTypeName",
                          "src": "15677:9:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15676:18:37"
                  },
                  "scope": 11652,
                  "src": "15519:1447:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 11650,
                    "nodeType": "Block",
                    "src": "17225:1710:37",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11600,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11598,
                            "name": "currentInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11591,
                            "src": "17543:16:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "id": 11599,
                            "name": "previousInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11589,
                            "src": "17563:17:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "17543:37:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 11604,
                        "nodeType": "IfStatement",
                        "src": "17539:312:37",
                        "trueBody": {
                          "id": 11603,
                          "nodeType": "Block",
                          "src": "17582:269:37",
                          "statements": [
                            {
                              "expression": {
                                "hexValue": "30",
                                "id": 11601,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "17839:1:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "functionReturnParameters": 11597,
                              "id": 11602,
                              "nodeType": "Return",
                              "src": "17832:8:37"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          11606
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11606,
                            "mutability": "mutable",
                            "name": "base",
                            "nodeType": "VariableDeclaration",
                            "scope": 11650,
                            "src": "18225:12:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11605,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18225:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11611,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11609,
                              "name": "currentInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11591,
                              "src": "18264:16:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11607,
                              "name": "previousInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11589,
                              "src": "18240:17:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11608,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1718,
                            "src": "18240:23:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11610,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18240:41:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18225:56:37"
                      },
                      {
                        "assignments": [
                          11613
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11613,
                            "mutability": "mutable",
                            "name": "exponent",
                            "nodeType": "VariableDeclaration",
                            "scope": 11650,
                            "src": "18291:16:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11612,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18291:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11619,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11617,
                              "name": "normalizedWeight",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11587,
                              "src": "18333:16:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "expression": {
                                "id": 11614,
                                "name": "FixedPoint",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1815,
                                "src": "18310:10:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                  "typeString": "type(library FixedPoint)"
                                }
                              },
                              "id": 11615,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ONE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1480,
                              "src": "18310:14:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11616,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "18310:22:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11618,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18310:40:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18291:59:37"
                      },
                      {
                        "expression": {
                          "id": 11627,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11620,
                            "name": "base",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11606,
                            "src": "18680:4:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 11623,
                                "name": "base",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11606,
                                "src": "18696:4:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "expression": {
                                  "id": 11624,
                                  "name": "FixedPoint",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1815,
                                  "src": "18702:10:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                    "typeString": "type(library FixedPoint)"
                                  }
                                },
                                "id": 11625,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "MIN_POW_BASE_FREE_EXPONENT",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1486,
                                "src": "18702:37:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 11621,
                                "name": "Math",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3350,
                                "src": "18687:4:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                  "typeString": "type(library Math)"
                                }
                              },
                              "id": 11622,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "max",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3242,
                              "src": "18687:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 11626,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "18687:53:37",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "18680:60:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11628,
                        "nodeType": "ExpressionStatement",
                        "src": "18680:60:37"
                      },
                      {
                        "assignments": [
                          11630
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11630,
                            "mutability": "mutable",
                            "name": "power",
                            "nodeType": "VariableDeclaration",
                            "scope": 11650,
                            "src": "18751:13:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11629,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18751:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11635,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 11633,
                              "name": "exponent",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11613,
                              "src": "18778:8:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11631,
                              "name": "base",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11606,
                              "src": "18767:4:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11632,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "powUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1794,
                            "src": "18767:10:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11634,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18767:20:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18751:36:37"
                      },
                      {
                        "assignments": [
                          11637
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11637,
                            "mutability": "mutable",
                            "name": "tokenAccruedFees",
                            "nodeType": "VariableDeclaration",
                            "scope": 11650,
                            "src": "18798:24:37",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11636,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18798:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11644,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 11640,
                                  "name": "power",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11630,
                                  "src": "18841:5:37",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 11641,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "complement",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1814,
                                "src": "18841:16:37",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 11642,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "18841:18:37",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11638,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11585,
                              "src": "18825:7:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11639,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1572,
                            "src": "18825:15:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11643,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18825:35:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18798:62:37"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 11647,
                              "name": "protocolSwapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11593,
                              "src": "18902:25:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11645,
                              "name": "tokenAccruedFees",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11637,
                              "src": "18877:16:37",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 11646,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1572,
                            "src": "18877:24:37",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 11648,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18877:51:37",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 11597,
                        "id": 11649,
                        "nodeType": "Return",
                        "src": "18870:58:37"
                      }
                    ]
                  },
                  "id": 11651,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calcDueTokenProtocolSwapFeeAmount",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 11594,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11585,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 11651,
                        "src": "17025:15:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11584,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17025:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11587,
                        "mutability": "mutable",
                        "name": "normalizedWeight",
                        "nodeType": "VariableDeclaration",
                        "scope": 11651,
                        "src": "17050:24:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11586,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17050:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11589,
                        "mutability": "mutable",
                        "name": "previousInvariant",
                        "nodeType": "VariableDeclaration",
                        "scope": 11651,
                        "src": "17084:25:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11588,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17084:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11591,
                        "mutability": "mutable",
                        "name": "currentInvariant",
                        "nodeType": "VariableDeclaration",
                        "scope": 11651,
                        "src": "17119:24:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11590,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17119:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11593,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 11651,
                        "src": "17153:33:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11592,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17153:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "17015:177:37"
                  },
                  "returnParameters": {
                    "id": 11597,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11596,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 11651,
                        "src": "17216:7:37",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11595,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17216:7:37",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "17215:9:37"
                  },
                  "scope": 11652,
                  "src": "16972:1963:37",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 11653,
              "src": "888:18049:37"
            }
          ],
          "src": "688:18250:37"
        },
        "id": 37
      },
      "src.sol/amm/pools/weighted/WeightedPool.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/weighted/WeightedPool.sol",
          "exportedSymbols": {
            "WeightedPool": [
              13120
            ]
          },
          "id": 13121,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 11654,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:38"
            },
            {
              "id": 11655,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:38"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
              "file": "../../lib/math/FixedPoint.sol",
              "id": 11656,
              "nodeType": "ImportDirective",
              "scope": 13121,
              "sourceUnit": 1816,
              "src": "747:39:38",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../../lib/helpers/InputHelpers.sol",
              "id": 11657,
              "nodeType": "ImportDirective",
              "scope": 13121,
              "sourceUnit": 1043,
              "src": "787:44:38",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/BaseMinimalSwapInfoPool.sol",
              "file": "../BaseMinimalSwapInfoPool.sol",
              "id": 11658,
              "nodeType": "ImportDirective",
              "scope": 13121,
              "sourceUnit": 6442,
              "src": "833:40:38",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/weighted/WeightedMath.sol",
              "file": "./WeightedMath.sol",
              "id": 11659,
              "nodeType": "ImportDirective",
              "scope": 13121,
              "sourceUnit": 11653,
              "src": "875:28:38",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol",
              "file": "./WeightedPoolUserDataHelpers.sol",
              "id": 11660,
              "nodeType": "ImportDirective",
              "scope": 13121,
              "sourceUnit": 13384,
              "src": "904:43:38",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 11661,
                    "name": "BaseMinimalSwapInfoPool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6441,
                    "src": "1267:23:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BaseMinimalSwapInfoPool_$6441",
                      "typeString": "contract BaseMinimalSwapInfoPool"
                    }
                  },
                  "id": 11662,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1267:23:38"
                },
                {
                  "baseName": {
                    "id": 11663,
                    "name": "WeightedMath",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11652,
                    "src": "1292:12:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WeightedMath_$11652",
                      "typeString": "contract WeightedMath"
                    }
                  },
                  "id": 11664,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1292:12:38"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1473,
                3890,
                5095,
                5131,
                5976,
                6441,
                7928,
                8030,
                11652,
                20719,
                20779,
                20804
              ],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 13120,
              "linearizedBaseContracts": [
                13120,
                11652,
                6441,
                7928,
                1473,
                5976,
                3890,
                5131,
                5095,
                8030,
                343,
                911,
                20779,
                20719,
                20804
              ],
              "name": "WeightedPool",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 11667,
                  "libraryName": {
                    "id": 11665,
                    "name": "FixedPoint",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1815,
                    "src": "1317:10:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FixedPoint_$1815",
                      "typeString": "library FixedPoint"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1311:29:38",
                  "typeName": {
                    "id": 11666,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1332:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 11670,
                  "libraryName": {
                    "id": 11668,
                    "name": "WeightedPoolUserDataHelpers",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 13383,
                    "src": "1351:27:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_WeightedPoolUserDataHelpers_$13383",
                      "typeString": "library WeightedPoolUserDataHelpers"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1345:44:38",
                  "typeName": {
                    "id": 11669,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1383:5:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 11672,
                  "mutability": "immutable",
                  "name": "_maxWeightTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "1603:46:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11671,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1603:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11674,
                  "mutability": "immutable",
                  "name": "_normalizedWeight0",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "1656:44:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11673,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1656:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11676,
                  "mutability": "immutable",
                  "name": "_normalizedWeight1",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "1706:44:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11675,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1706:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11678,
                  "mutability": "immutable",
                  "name": "_normalizedWeight2",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "1756:44:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11677,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1756:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11680,
                  "mutability": "immutable",
                  "name": "_normalizedWeight3",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "1806:44:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11679,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1806:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11682,
                  "mutability": "immutable",
                  "name": "_normalizedWeight4",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "1856:44:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11681,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1856:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11684,
                  "mutability": "immutable",
                  "name": "_normalizedWeight5",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "1906:44:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11683,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1906:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11686,
                  "mutability": "immutable",
                  "name": "_normalizedWeight6",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "1956:44:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11685,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1956:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11688,
                  "mutability": "immutable",
                  "name": "_normalizedWeight7",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "2006:44:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11687,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2006:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 11690,
                  "mutability": "mutable",
                  "name": "_lastInvariant",
                  "nodeType": "VariableDeclaration",
                  "scope": 13120,
                  "src": "2057:30:38",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11689,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2057:7:38",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "canonicalName": "WeightedPool.JoinKind",
                  "id": 11694,
                  "members": [
                    {
                      "id": 11691,
                      "name": "INIT",
                      "nodeType": "EnumValue",
                      "src": "2110:4:38"
                    },
                    {
                      "id": 11692,
                      "name": "EXACT_TOKENS_IN_FOR_BPT_OUT",
                      "nodeType": "EnumValue",
                      "src": "2116:27:38"
                    },
                    {
                      "id": 11693,
                      "name": "TOKEN_IN_FOR_EXACT_BPT_OUT",
                      "nodeType": "EnumValue",
                      "src": "2145:26:38"
                    }
                  ],
                  "name": "JoinKind",
                  "nodeType": "EnumDefinition",
                  "src": "2094:79:38"
                },
                {
                  "canonicalName": "WeightedPool.ExitKind",
                  "id": 11698,
                  "members": [
                    {
                      "id": 11695,
                      "name": "EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",
                      "nodeType": "EnumValue",
                      "src": "2194:30:38"
                    },
                    {
                      "id": 11696,
                      "name": "EXACT_BPT_IN_FOR_TOKENS_OUT",
                      "nodeType": "EnumValue",
                      "src": "2226:27:38"
                    },
                    {
                      "id": 11697,
                      "name": "BPT_IN_FOR_EXACT_TOKENS_OUT",
                      "nodeType": "EnumValue",
                      "src": "2255:27:38"
                    }
                  ],
                  "name": "ExitKind",
                  "nodeType": "EnumDefinition",
                  "src": "2178:106:38"
                },
                {
                  "body": {
                    "id": 11911,
                    "nodeType": "Block",
                    "src": "2837:1674:38",
                    "statements": [
                      {
                        "assignments": [
                          11732
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11732,
                            "mutability": "mutable",
                            "name": "numTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 11911,
                            "src": "2847:17:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11731,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2847:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11735,
                        "initialValue": {
                          "expression": {
                            "id": 11733,
                            "name": "tokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11707,
                            "src": "2867:6:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[] memory"
                            }
                          },
                          "id": 11734,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "2867:13:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2847:33:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 11739,
                              "name": "numTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11732,
                              "src": "2926:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 11740,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "2937:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11741,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "2937:24:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 11736,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "2890:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 11738,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "2890:35:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 11742,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2890:72:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 11743,
                        "nodeType": "ExpressionStatement",
                        "src": "2890:72:38"
                      },
                      {
                        "assignments": [
                          11745
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11745,
                            "mutability": "mutable",
                            "name": "normalizedSum",
                            "nodeType": "VariableDeclaration",
                            "scope": 11911,
                            "src": "3084:21:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11744,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3084:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11747,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 11746,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3108:1:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3084:25:38"
                      },
                      {
                        "assignments": [
                          11749
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11749,
                            "mutability": "mutable",
                            "name": "maxWeightTokenIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 11911,
                            "src": "3119:27:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11748,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3119:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11751,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 11750,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3149:1:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3119:31:38"
                      },
                      {
                        "assignments": [
                          11753
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11753,
                            "mutability": "mutable",
                            "name": "maxNormalizedWeight",
                            "nodeType": "VariableDeclaration",
                            "scope": 11911,
                            "src": "3160:27:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11752,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3160:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11755,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 11754,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3190:1:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3160:31:38"
                      },
                      {
                        "body": {
                          "id": 11800,
                          "nodeType": "Block",
                          "src": "3239:381:38",
                          "statements": [
                            {
                              "assignments": [
                                11767
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 11767,
                                  "mutability": "mutable",
                                  "name": "normalizedWeight",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 11800,
                                  "src": "3253:24:38",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 11766,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3253:7:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 11771,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 11768,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "3280:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11770,
                                "indexExpression": {
                                  "id": 11769,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11757,
                                  "src": "3298:1:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3280:20:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3253:47:38"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 11775,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 11773,
                                      "name": "normalizedWeight",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11767,
                                      "src": "3323:16:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">=",
                                    "rightExpression": {
                                      "id": 11774,
                                      "name": "_MIN_WEIGHT",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 10786,
                                      "src": "3343:11:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3323:31:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 11776,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3356:6:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 11777,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "MIN_WEIGHT",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 453,
                                    "src": "3356:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 11772,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3314:8:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 11778,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3314:60:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 11779,
                              "nodeType": "ExpressionStatement",
                              "src": "3314:60:38"
                            },
                            {
                              "expression": {
                                "id": 11785,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 11780,
                                  "name": "normalizedSum",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11745,
                                  "src": "3389:13:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 11783,
                                      "name": "normalizedWeight",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11767,
                                      "src": "3423:16:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 11781,
                                      "name": "normalizedSum",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11745,
                                      "src": "3405:13:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11782,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1512,
                                    "src": "3405:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 11784,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3405:35:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3389:51:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11786,
                              "nodeType": "ExpressionStatement",
                              "src": "3389:51:38"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 11789,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 11787,
                                  "name": "normalizedWeight",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11767,
                                  "src": "3458:16:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">",
                                "rightExpression": {
                                  "id": 11788,
                                  "name": "maxNormalizedWeight",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11753,
                                  "src": "3477:19:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3458:38:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 11799,
                              "nodeType": "IfStatement",
                              "src": "3454:156:38",
                              "trueBody": {
                                "id": 11798,
                                "nodeType": "Block",
                                "src": "3498:112:38",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 11792,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 11790,
                                        "name": "maxWeightTokenIndex",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11749,
                                        "src": "3516:19:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "id": 11791,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11757,
                                        "src": "3538:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "src": "3516:23:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11793,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3516:23:38"
                                  },
                                  {
                                    "expression": {
                                      "id": 11796,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 11794,
                                        "name": "maxNormalizedWeight",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11753,
                                        "src": "3557:19:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "id": 11795,
                                        "name": "normalizedWeight",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11767,
                                        "src": "3579:16:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3557:38:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 11797,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3557:38:38"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11762,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11760,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11757,
                            "src": "3219:1:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "id": 11761,
                            "name": "numTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11732,
                            "src": "3223:9:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3219:13:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 11801,
                        "initializationExpression": {
                          "assignments": [
                            11757
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 11757,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 11801,
                              "src": "3206:7:38",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              },
                              "typeName": {
                                "id": 11756,
                                "name": "uint8",
                                "nodeType": "ElementaryTypeName",
                                "src": "3206:5:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 11759,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 11758,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3216:1:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "3206:11:38"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 11764,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "3234:3:38",
                            "subExpression": {
                              "id": 11763,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11757,
                              "src": "3234:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "id": 11765,
                          "nodeType": "ExpressionStatement",
                          "src": "3234:3:38"
                        },
                        "nodeType": "ForStatement",
                        "src": "3201:419:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11806,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 11803,
                                "name": "normalizedSum",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11745,
                                "src": "3695:13:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "expression": {
                                  "id": 11804,
                                  "name": "FixedPoint",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1815,
                                  "src": "3712:10:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                    "typeString": "type(library FixedPoint)"
                                  }
                                },
                                "id": 11805,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "ONE",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1480,
                                "src": "3712:14:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "3695:31:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 11807,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3728:6:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 11808,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "NORMALIZED_WEIGHT_INVARIANT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 471,
                              "src": "3728:34:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 11802,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "3686:8:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 11809,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3686:77:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 11810,
                        "nodeType": "ExpressionStatement",
                        "src": "3686:77:38"
                      },
                      {
                        "expression": {
                          "id": 11813,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11811,
                            "name": "_maxWeightTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11672,
                            "src": "3774:20:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 11812,
                            "name": "maxWeightTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11749,
                            "src": "3797:19:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3774:42:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11814,
                        "nodeType": "ExpressionStatement",
                        "src": "3774:42:38"
                      },
                      {
                        "expression": {
                          "id": 11825,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11815,
                            "name": "_normalizedWeight0",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11674,
                            "src": "3826:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11819,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 11816,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "3847:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11817,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "3847:24:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 11818,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3874:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "3847:28:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 11823,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3901:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 11824,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "3847:55:38",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 11820,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "3878:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11822,
                              "indexExpression": {
                                "hexValue": "30",
                                "id": 11821,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3896:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "3878:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3826:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11826,
                        "nodeType": "ExpressionStatement",
                        "src": "3826:76:38"
                      },
                      {
                        "expression": {
                          "id": 11837,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11827,
                            "name": "_normalizedWeight1",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11676,
                            "src": "3912:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11831,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 11828,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "3933:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11829,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "3933:24:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "31",
                                "id": 11830,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3960:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "3933:28:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 11835,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3987:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 11836,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "3933:55:38",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 11832,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "3964:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11834,
                              "indexExpression": {
                                "hexValue": "31",
                                "id": 11833,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3982:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "3964:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3912:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11838,
                        "nodeType": "ExpressionStatement",
                        "src": "3912:76:38"
                      },
                      {
                        "expression": {
                          "id": 11849,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11839,
                            "name": "_normalizedWeight2",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11678,
                            "src": "3998:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11843,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 11840,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "4019:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11841,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "4019:24:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 11842,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4046:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "4019:28:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 11847,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4073:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 11848,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "4019:55:38",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 11844,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "4050:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11846,
                              "indexExpression": {
                                "hexValue": "32",
                                "id": 11845,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4068:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "4050:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3998:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11850,
                        "nodeType": "ExpressionStatement",
                        "src": "3998:76:38"
                      },
                      {
                        "expression": {
                          "id": 11861,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11851,
                            "name": "_normalizedWeight3",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11680,
                            "src": "4084:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11855,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 11852,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "4105:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11853,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "4105:24:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "33",
                                "id": 11854,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4132:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_3_by_1",
                                  "typeString": "int_const 3"
                                },
                                "value": "3"
                              },
                              "src": "4105:28:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 11859,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4159:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 11860,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "4105:55:38",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 11856,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "4136:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11858,
                              "indexExpression": {
                                "hexValue": "33",
                                "id": 11857,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4154:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_3_by_1",
                                  "typeString": "int_const 3"
                                },
                                "value": "3"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "4136:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4084:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11862,
                        "nodeType": "ExpressionStatement",
                        "src": "4084:76:38"
                      },
                      {
                        "expression": {
                          "id": 11873,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11863,
                            "name": "_normalizedWeight4",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11682,
                            "src": "4170:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11867,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 11864,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "4191:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11865,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "4191:24:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "34",
                                "id": 11866,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4218:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_4_by_1",
                                  "typeString": "int_const 4"
                                },
                                "value": "4"
                              },
                              "src": "4191:28:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 11871,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4245:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 11872,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "4191:55:38",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 11868,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "4222:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11870,
                              "indexExpression": {
                                "hexValue": "34",
                                "id": 11869,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4240:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_4_by_1",
                                  "typeString": "int_const 4"
                                },
                                "value": "4"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "4222:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4170:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11874,
                        "nodeType": "ExpressionStatement",
                        "src": "4170:76:38"
                      },
                      {
                        "expression": {
                          "id": 11885,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11875,
                            "name": "_normalizedWeight5",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11684,
                            "src": "4256:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11879,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 11876,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "4277:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11877,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "4277:24:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "35",
                                "id": 11878,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4304:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_5_by_1",
                                  "typeString": "int_const 5"
                                },
                                "value": "5"
                              },
                              "src": "4277:28:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 11883,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4331:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 11884,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "4277:55:38",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 11880,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "4308:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11882,
                              "indexExpression": {
                                "hexValue": "35",
                                "id": 11881,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4326:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_5_by_1",
                                  "typeString": "int_const 5"
                                },
                                "value": "5"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "4308:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4256:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11886,
                        "nodeType": "ExpressionStatement",
                        "src": "4256:76:38"
                      },
                      {
                        "expression": {
                          "id": 11897,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11887,
                            "name": "_normalizedWeight6",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11686,
                            "src": "4342:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11891,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 11888,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "4363:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11889,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "4363:24:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "36",
                                "id": 11890,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4390:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_6_by_1",
                                  "typeString": "int_const 6"
                                },
                                "value": "6"
                              },
                              "src": "4363:28:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 11895,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4417:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 11896,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "4363:55:38",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 11892,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "4394:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11894,
                              "indexExpression": {
                                "hexValue": "36",
                                "id": 11893,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4412:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_6_by_1",
                                  "typeString": "int_const 6"
                                },
                                "value": "6"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "4394:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4342:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11898,
                        "nodeType": "ExpressionStatement",
                        "src": "4342:76:38"
                      },
                      {
                        "expression": {
                          "id": 11909,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 11899,
                            "name": "_normalizedWeight7",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11688,
                            "src": "4428:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 11903,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 11900,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11710,
                                  "src": "4449:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 11901,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "4449:24:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "37",
                                "id": 11902,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4476:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_7_by_1",
                                  "typeString": "int_const 7"
                                },
                                "value": "7"
                              },
                              "src": "4449:28:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "hexValue": "30",
                              "id": 11907,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4503:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "id": 11908,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "4449:55:38",
                            "trueExpression": {
                              "baseExpression": {
                                "id": 11904,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11710,
                                "src": "4480:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 11906,
                              "indexExpression": {
                                "hexValue": "37",
                                "id": 11905,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4498:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_7_by_1",
                                  "typeString": "int_const 7"
                                },
                                "value": "7"
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "4480:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4428:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 11910,
                        "nodeType": "ExpressionStatement",
                        "src": "4428:76:38"
                      }
                    ]
                  },
                  "id": 11912,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 11721,
                          "name": "vault",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11700,
                          "src": "2642:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        {
                          "id": 11722,
                          "name": "name",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11702,
                          "src": "2661:4:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 11723,
                          "name": "symbol",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11704,
                          "src": "2679:6:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_memory_ptr",
                            "typeString": "string memory"
                          }
                        },
                        {
                          "id": 11724,
                          "name": "tokens",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11707,
                          "src": "2699:6:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        {
                          "id": 11725,
                          "name": "swapFeePercentage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11712,
                          "src": "2719:17:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 11726,
                          "name": "pauseWindowDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11714,
                          "src": "2750:19:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 11727,
                          "name": "bufferPeriodDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11716,
                          "src": "2783:20:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 11728,
                          "name": "owner",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11718,
                          "src": "2817:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 11729,
                      "modifierName": {
                        "id": 11720,
                        "name": "BaseMinimalSwapInfoPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6441,
                        "src": "2605:23:38",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BaseMinimalSwapInfoPool_$6441_$",
                          "typeString": "type(contract BaseMinimalSwapInfoPool)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2605:227:38"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 11719,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11700,
                        "mutability": "mutable",
                        "name": "vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2311:12:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 11699,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "2311:6:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11702,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2333:18:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 11701,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "2333:6:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11704,
                        "mutability": "mutable",
                        "name": "symbol",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2361:20:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 11703,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "2361:6:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11707,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2391:22:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 11705,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "2391:6:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 11706,
                          "nodeType": "ArrayTypeName",
                          "src": "2391:8:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11710,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2423:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 11708,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2423:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11709,
                          "nodeType": "ArrayTypeName",
                          "src": "2423:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11712,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2467:25:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11711,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2467:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11714,
                        "mutability": "mutable",
                        "name": "pauseWindowDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2502:27:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11713,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2502:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11716,
                        "mutability": "mutable",
                        "name": "bufferPeriodDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2539:28:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11715,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2539:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 11718,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 11912,
                        "src": "2577:13:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 11717,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2577:7:38",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2301:295:38"
                  },
                  "returnParameters": {
                    "id": 11730,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2837:0:38"
                  },
                  "scope": 13120,
                  "src": "2290:2221:38",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 11981,
                    "nodeType": "Block",
                    "src": "4598:625:38",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          },
                          "id": 11921,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11919,
                            "name": "token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11914,
                            "src": "4639:5:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "id": 11920,
                            "name": "_token0",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6489,
                            "src": "4648:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "4639:16:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "id": 11927,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 11925,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11914,
                              "src": "4705:5:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "id": 11926,
                              "name": "_token1",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6491,
                              "src": "4714:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "src": "4705:16:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              "id": 11933,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 11931,
                                "name": "token",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11914,
                                "src": "4771:5:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "id": 11932,
                                "name": "_token2",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6493,
                                "src": "4780:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "src": "4771:16:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                },
                                "id": 11939,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 11937,
                                  "name": "token",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11914,
                                  "src": "4837:5:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 11938,
                                  "name": "_token3",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6495,
                                  "src": "4846:7:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "4837:16:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "condition": {
                                  "commonType": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "id": 11945,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 11943,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11914,
                                    "src": "4903:5:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "==",
                                  "rightExpression": {
                                    "id": 11944,
                                    "name": "_token4",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6497,
                                    "src": "4912:7:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "src": "4903:16:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "falseBody": {
                                  "condition": {
                                    "commonType": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    "id": 11951,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 11949,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11914,
                                      "src": "4969:5:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "id": 11950,
                                      "name": "_token5",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6499,
                                      "src": "4978:7:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "src": "4969:16:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "falseBody": {
                                    "condition": {
                                      "commonType": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      "id": 11957,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 11955,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11914,
                                        "src": "5035:5:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "==",
                                      "rightExpression": {
                                        "id": 11956,
                                        "name": "_token6",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 6501,
                                        "src": "5044:7:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "src": "5035:16:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "falseBody": {
                                      "condition": {
                                        "commonType": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        },
                                        "id": 11963,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 11961,
                                          "name": "token",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11914,
                                          "src": "5101:5:38",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "==",
                                        "rightExpression": {
                                          "id": 11962,
                                          "name": "_token7",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 6503,
                                          "src": "5110:7:38",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        "src": "5101:16:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        }
                                      },
                                      "falseBody": {
                                        "id": 11972,
                                        "nodeType": "Block",
                                        "src": "5163:54:38",
                                        "statements": [
                                          {
                                            "expression": {
                                              "arguments": [
                                                {
                                                  "expression": {
                                                    "id": 11968,
                                                    "name": "Errors",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 655,
                                                    "src": "5185:6:38",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                                      "typeString": "type(library Errors)"
                                                    }
                                                  },
                                                  "id": 11969,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "INVALID_TOKEN",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 474,
                                                  "src": "5185:20:38",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                ],
                                                "id": 11967,
                                                "name": "_revert",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 369,
                                                "src": "5177:7:38",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                                                  "typeString": "function (uint256) pure"
                                                }
                                              },
                                              "id": 11970,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "5177:29:38",
                                              "tryCall": false,
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_tuple$__$",
                                                "typeString": "tuple()"
                                              }
                                            },
                                            "id": 11971,
                                            "nodeType": "ExpressionStatement",
                                            "src": "5177:29:38"
                                          }
                                        ]
                                      },
                                      "id": 11973,
                                      "nodeType": "IfStatement",
                                      "src": "5097:120:38",
                                      "trueBody": {
                                        "id": 11966,
                                        "nodeType": "Block",
                                        "src": "5119:30:38",
                                        "statements": [
                                          {
                                            "expression": {
                                              "id": 11964,
                                              "name": "_normalizedWeight7",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 11688,
                                              "src": "5128:18:38",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "functionReturnParameters": 11918,
                                            "id": 11965,
                                            "nodeType": "Return",
                                            "src": "5121:25:38"
                                          }
                                        ]
                                      }
                                    },
                                    "id": 11974,
                                    "nodeType": "IfStatement",
                                    "src": "5031:186:38",
                                    "trueBody": {
                                      "id": 11960,
                                      "nodeType": "Block",
                                      "src": "5053:30:38",
                                      "statements": [
                                        {
                                          "expression": {
                                            "id": 11958,
                                            "name": "_normalizedWeight6",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 11686,
                                            "src": "5062:18:38",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "functionReturnParameters": 11918,
                                          "id": 11959,
                                          "nodeType": "Return",
                                          "src": "5055:25:38"
                                        }
                                      ]
                                    }
                                  },
                                  "id": 11975,
                                  "nodeType": "IfStatement",
                                  "src": "4965:252:38",
                                  "trueBody": {
                                    "id": 11954,
                                    "nodeType": "Block",
                                    "src": "4987:30:38",
                                    "statements": [
                                      {
                                        "expression": {
                                          "id": 11952,
                                          "name": "_normalizedWeight5",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 11684,
                                          "src": "4996:18:38",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "functionReturnParameters": 11918,
                                        "id": 11953,
                                        "nodeType": "Return",
                                        "src": "4989:25:38"
                                      }
                                    ]
                                  }
                                },
                                "id": 11976,
                                "nodeType": "IfStatement",
                                "src": "4899:318:38",
                                "trueBody": {
                                  "id": 11948,
                                  "nodeType": "Block",
                                  "src": "4921:30:38",
                                  "statements": [
                                    {
                                      "expression": {
                                        "id": 11946,
                                        "name": "_normalizedWeight4",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11682,
                                        "src": "4930:18:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "functionReturnParameters": 11918,
                                      "id": 11947,
                                      "nodeType": "Return",
                                      "src": "4923:25:38"
                                    }
                                  ]
                                }
                              },
                              "id": 11977,
                              "nodeType": "IfStatement",
                              "src": "4833:384:38",
                              "trueBody": {
                                "id": 11942,
                                "nodeType": "Block",
                                "src": "4855:30:38",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 11940,
                                      "name": "_normalizedWeight3",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11680,
                                      "src": "4864:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "functionReturnParameters": 11918,
                                    "id": 11941,
                                    "nodeType": "Return",
                                    "src": "4857:25:38"
                                  }
                                ]
                              }
                            },
                            "id": 11978,
                            "nodeType": "IfStatement",
                            "src": "4767:450:38",
                            "trueBody": {
                              "id": 11936,
                              "nodeType": "Block",
                              "src": "4789:30:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 11934,
                                    "name": "_normalizedWeight2",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11678,
                                    "src": "4798:18:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "functionReturnParameters": 11918,
                                  "id": 11935,
                                  "nodeType": "Return",
                                  "src": "4791:25:38"
                                }
                              ]
                            }
                          },
                          "id": 11979,
                          "nodeType": "IfStatement",
                          "src": "4701:516:38",
                          "trueBody": {
                            "id": 11930,
                            "nodeType": "Block",
                            "src": "4723:30:38",
                            "statements": [
                              {
                                "expression": {
                                  "id": 11928,
                                  "name": "_normalizedWeight1",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11676,
                                  "src": "4732:18:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "functionReturnParameters": 11918,
                                "id": 11929,
                                "nodeType": "Return",
                                "src": "4725:25:38"
                              }
                            ]
                          }
                        },
                        "id": 11980,
                        "nodeType": "IfStatement",
                        "src": "4635:582:38",
                        "trueBody": {
                          "id": 11924,
                          "nodeType": "Block",
                          "src": "4657:30:38",
                          "statements": [
                            {
                              "expression": {
                                "id": 11922,
                                "name": "_normalizedWeight0",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11674,
                                "src": "4666:18:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "functionReturnParameters": 11918,
                              "id": 11923,
                              "nodeType": "Return",
                              "src": "4659:25:38"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 11982,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_normalizedWeight",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 11915,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11914,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 11982,
                        "src": "4544:12:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 11913,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "4544:6:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4543:14:38"
                  },
                  "returnParameters": {
                    "id": 11918,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11917,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 11982,
                        "src": "4589:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 11916,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4589:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4588:9:38"
                  },
                  "scope": 13120,
                  "src": "4517:706:38",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 12119,
                    "nodeType": "Block",
                    "src": "5308:1132:38",
                    "statements": [
                      {
                        "assignments": [
                          11989
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11989,
                            "mutability": "mutable",
                            "name": "totalTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 12119,
                            "src": "5318:19:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 11988,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5318:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 11992,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 11990,
                            "name": "_getTotalTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6892,
                            "src": "5340:15:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                              "typeString": "function () view returns (uint256)"
                            }
                          },
                          "id": 11991,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5340:17:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5318:39:38"
                      },
                      {
                        "assignments": [
                          11997
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 11997,
                            "mutability": "mutable",
                            "name": "normalizedWeights",
                            "nodeType": "VariableDeclaration",
                            "scope": 12119,
                            "src": "5367:34:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 11995,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5367:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11996,
                              "nodeType": "ArrayTypeName",
                              "src": "5367:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12003,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12001,
                              "name": "totalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11989,
                              "src": "5418:11:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12000,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "5404:13:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 11998,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5408:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 11999,
                              "nodeType": "ArrayTypeName",
                              "src": "5408:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 12002,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5404:26:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5367:63:38"
                      },
                      {
                        "id": 12116,
                        "nodeType": "Block",
                        "src": "5468:931:38",
                        "statements": [
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12006,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12004,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11989,
                                "src": "5486:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 12005,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5500:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "5486:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 12016,
                              "nodeType": "Block",
                              "src": "5555:29:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12014,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11997,
                                    "src": "5564:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 11987,
                                  "id": 12015,
                                  "nodeType": "Return",
                                  "src": "5557:24:38"
                                }
                              ]
                            },
                            "id": 12017,
                            "nodeType": "IfStatement",
                            "src": "5482:102:38",
                            "trueBody": {
                              "id": 12013,
                              "nodeType": "Block",
                              "src": "5503:46:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12011,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 12007,
                                        "name": "normalizedWeights",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11997,
                                        "src": "5505:17:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 12009,
                                      "indexExpression": {
                                        "hexValue": "30",
                                        "id": 12008,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5523:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        "value": "0"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "5505:20:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 12010,
                                      "name": "_normalizedWeight0",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11674,
                                      "src": "5528:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "5505:41:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 12012,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5505:41:38"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12020,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12018,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11989,
                                "src": "5601:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "31",
                                "id": 12019,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5615:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "5601:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 12030,
                              "nodeType": "Block",
                              "src": "5670:29:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12028,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11997,
                                    "src": "5679:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 11987,
                                  "id": 12029,
                                  "nodeType": "Return",
                                  "src": "5672:24:38"
                                }
                              ]
                            },
                            "id": 12031,
                            "nodeType": "IfStatement",
                            "src": "5597:102:38",
                            "trueBody": {
                              "id": 12027,
                              "nodeType": "Block",
                              "src": "5618:46:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12025,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 12021,
                                        "name": "normalizedWeights",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11997,
                                        "src": "5620:17:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 12023,
                                      "indexExpression": {
                                        "hexValue": "31",
                                        "id": 12022,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5638:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        },
                                        "value": "1"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "5620:20:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 12024,
                                      "name": "_normalizedWeight1",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11676,
                                      "src": "5643:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "5620:41:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 12026,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5620:41:38"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12034,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12032,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11989,
                                "src": "5716:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 12033,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5730:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5716:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 12044,
                              "nodeType": "Block",
                              "src": "5785:29:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12042,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11997,
                                    "src": "5794:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 11987,
                                  "id": 12043,
                                  "nodeType": "Return",
                                  "src": "5787:24:38"
                                }
                              ]
                            },
                            "id": 12045,
                            "nodeType": "IfStatement",
                            "src": "5712:102:38",
                            "trueBody": {
                              "id": 12041,
                              "nodeType": "Block",
                              "src": "5733:46:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12039,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 12035,
                                        "name": "normalizedWeights",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11997,
                                        "src": "5735:17:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 12037,
                                      "indexExpression": {
                                        "hexValue": "32",
                                        "id": 12036,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5753:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_2_by_1",
                                          "typeString": "int_const 2"
                                        },
                                        "value": "2"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "5735:20:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 12038,
                                      "name": "_normalizedWeight2",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11678,
                                      "src": "5758:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "5735:41:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 12040,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5735:41:38"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12048,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12046,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11989,
                                "src": "5831:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "33",
                                "id": 12047,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5845:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_3_by_1",
                                  "typeString": "int_const 3"
                                },
                                "value": "3"
                              },
                              "src": "5831:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 12058,
                              "nodeType": "Block",
                              "src": "5900:29:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12056,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11997,
                                    "src": "5909:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 11987,
                                  "id": 12057,
                                  "nodeType": "Return",
                                  "src": "5902:24:38"
                                }
                              ]
                            },
                            "id": 12059,
                            "nodeType": "IfStatement",
                            "src": "5827:102:38",
                            "trueBody": {
                              "id": 12055,
                              "nodeType": "Block",
                              "src": "5848:46:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12053,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 12049,
                                        "name": "normalizedWeights",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11997,
                                        "src": "5850:17:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 12051,
                                      "indexExpression": {
                                        "hexValue": "33",
                                        "id": 12050,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5868:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_3_by_1",
                                          "typeString": "int_const 3"
                                        },
                                        "value": "3"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "5850:20:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 12052,
                                      "name": "_normalizedWeight3",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11680,
                                      "src": "5873:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "5850:41:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 12054,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5850:41:38"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12062,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12060,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11989,
                                "src": "5946:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "34",
                                "id": 12061,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5960:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_4_by_1",
                                  "typeString": "int_const 4"
                                },
                                "value": "4"
                              },
                              "src": "5946:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 12072,
                              "nodeType": "Block",
                              "src": "6015:29:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12070,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11997,
                                    "src": "6024:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 11987,
                                  "id": 12071,
                                  "nodeType": "Return",
                                  "src": "6017:24:38"
                                }
                              ]
                            },
                            "id": 12073,
                            "nodeType": "IfStatement",
                            "src": "5942:102:38",
                            "trueBody": {
                              "id": 12069,
                              "nodeType": "Block",
                              "src": "5963:46:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12067,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 12063,
                                        "name": "normalizedWeights",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11997,
                                        "src": "5965:17:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 12065,
                                      "indexExpression": {
                                        "hexValue": "34",
                                        "id": 12064,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5983:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_4_by_1",
                                          "typeString": "int_const 4"
                                        },
                                        "value": "4"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "5965:20:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 12066,
                                      "name": "_normalizedWeight4",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11682,
                                      "src": "5988:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "5965:41:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 12068,
                                  "nodeType": "ExpressionStatement",
                                  "src": "5965:41:38"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12076,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12074,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11989,
                                "src": "6061:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "35",
                                "id": 12075,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6075:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_5_by_1",
                                  "typeString": "int_const 5"
                                },
                                "value": "5"
                              },
                              "src": "6061:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 12086,
                              "nodeType": "Block",
                              "src": "6130:29:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12084,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11997,
                                    "src": "6139:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 11987,
                                  "id": 12085,
                                  "nodeType": "Return",
                                  "src": "6132:24:38"
                                }
                              ]
                            },
                            "id": 12087,
                            "nodeType": "IfStatement",
                            "src": "6057:102:38",
                            "trueBody": {
                              "id": 12083,
                              "nodeType": "Block",
                              "src": "6078:46:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12081,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 12077,
                                        "name": "normalizedWeights",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11997,
                                        "src": "6080:17:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 12079,
                                      "indexExpression": {
                                        "hexValue": "35",
                                        "id": 12078,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "6098:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_5_by_1",
                                          "typeString": "int_const 5"
                                        },
                                        "value": "5"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "6080:20:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 12080,
                                      "name": "_normalizedWeight5",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11684,
                                      "src": "6103:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "6080:41:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 12082,
                                  "nodeType": "ExpressionStatement",
                                  "src": "6080:41:38"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12090,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12088,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11989,
                                "src": "6176:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "36",
                                "id": 12089,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6190:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_6_by_1",
                                  "typeString": "int_const 6"
                                },
                                "value": "6"
                              },
                              "src": "6176:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 12100,
                              "nodeType": "Block",
                              "src": "6245:29:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12098,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11997,
                                    "src": "6254:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 11987,
                                  "id": 12099,
                                  "nodeType": "Return",
                                  "src": "6247:24:38"
                                }
                              ]
                            },
                            "id": 12101,
                            "nodeType": "IfStatement",
                            "src": "6172:102:38",
                            "trueBody": {
                              "id": 12097,
                              "nodeType": "Block",
                              "src": "6193:46:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12095,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 12091,
                                        "name": "normalizedWeights",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11997,
                                        "src": "6195:17:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 12093,
                                      "indexExpression": {
                                        "hexValue": "36",
                                        "id": 12092,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "6213:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_6_by_1",
                                          "typeString": "int_const 6"
                                        },
                                        "value": "6"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "6195:20:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 12094,
                                      "name": "_normalizedWeight6",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11686,
                                      "src": "6218:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "6195:41:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 12096,
                                  "nodeType": "ExpressionStatement",
                                  "src": "6195:41:38"
                                }
                              ]
                            }
                          },
                          {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12104,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12102,
                                "name": "totalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11989,
                                "src": "6291:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "37",
                                "id": 12103,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6305:1:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_7_by_1",
                                  "typeString": "int_const 7"
                                },
                                "value": "7"
                              },
                              "src": "6291:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseBody": {
                              "id": 12114,
                              "nodeType": "Block",
                              "src": "6360:29:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12112,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11997,
                                    "src": "6369:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "functionReturnParameters": 11987,
                                  "id": 12113,
                                  "nodeType": "Return",
                                  "src": "6362:24:38"
                                }
                              ]
                            },
                            "id": 12115,
                            "nodeType": "IfStatement",
                            "src": "6287:102:38",
                            "trueBody": {
                              "id": 12111,
                              "nodeType": "Block",
                              "src": "6308:46:38",
                              "statements": [
                                {
                                  "expression": {
                                    "id": 12109,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftHandSide": {
                                      "baseExpression": {
                                        "id": 12105,
                                        "name": "normalizedWeights",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 11997,
                                        "src": "6310:17:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 12107,
                                      "indexExpression": {
                                        "hexValue": "37",
                                        "id": 12106,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "6328:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_7_by_1",
                                          "typeString": "int_const 7"
                                        },
                                        "value": "7"
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "6310:20:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "Assignment",
                                    "operator": "=",
                                    "rightHandSide": {
                                      "id": 12108,
                                      "name": "_normalizedWeight7",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11688,
                                      "src": "6333:18:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "6310:41:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 12110,
                                  "nodeType": "ExpressionStatement",
                                  "src": "6310:41:38"
                                }
                              ]
                            }
                          }
                        ]
                      },
                      {
                        "expression": {
                          "id": 12117,
                          "name": "normalizedWeights",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11997,
                          "src": "6416:17:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "functionReturnParameters": 11987,
                        "id": 12118,
                        "nodeType": "Return",
                        "src": "6409:24:38"
                      }
                    ]
                  },
                  "id": 12120,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_normalizedWeights",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 11983,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5256:2:38"
                  },
                  "returnParameters": {
                    "id": 11987,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 11986,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12120,
                        "src": "5290:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 11984,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "5290:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 11985,
                          "nodeType": "ArrayTypeName",
                          "src": "5290:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5289:18:38"
                  },
                  "scope": 13120,
                  "src": "5229:1211:38",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 12127,
                    "nodeType": "Block",
                    "src": "6506:38:38",
                    "statements": [
                      {
                        "expression": {
                          "id": 12125,
                          "name": "_lastInvariant",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11690,
                          "src": "6523:14:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 12124,
                        "id": 12126,
                        "nodeType": "Return",
                        "src": "6516:21:38"
                      }
                    ]
                  },
                  "functionSelector": "9b02cdde",
                  "id": 12128,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getLastInvariant",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12121,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6471:2:38"
                  },
                  "returnParameters": {
                    "id": 12124,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12123,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12128,
                        "src": "6497:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12122,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6497:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6496:9:38"
                  },
                  "scope": 13120,
                  "src": "6446:98:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 12166,
                    "nodeType": "Block",
                    "src": "6676:407:38",
                    "statements": [
                      {
                        "assignments": [
                          null,
                          12138,
                          null
                        ],
                        "declarations": [
                          null,
                          {
                            "constant": false,
                            "id": 12138,
                            "mutability": "mutable",
                            "name": "balances",
                            "nodeType": "VariableDeclaration",
                            "scope": 12166,
                            "src": "6689:25:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12136,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "6689:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12137,
                              "nodeType": "ArrayTypeName",
                              "src": "6689:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          null
                        ],
                        "id": 12145,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12142,
                                "name": "getPoolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6884,
                                "src": "6745:9:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$",
                                  "typeString": "function () view returns (bytes32)"
                                }
                              },
                              "id": 12143,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6745:11:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12139,
                                "name": "getVault",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6876,
                                "src": "6720:8:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IVault_$21266_$",
                                  "typeString": "function () view returns (contract IVault)"
                                }
                              },
                              "id": 12140,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6720:10:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 12141,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getPoolTokens",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21033,
                            "src": "6720:24:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "function (bytes32) view external returns (contract IERC20[] memory,uint256[] memory,uint256)"
                            }
                          },
                          "id": 12144,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6720:37:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(contract IERC20[] memory,uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6686:71:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 12147,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12138,
                              "src": "6902:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12148,
                                "name": "_scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7638,
                                "src": "6912:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function () view returns (uint256[] memory)"
                                }
                              },
                              "id": 12149,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6912:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 12146,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "6888:13:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 12150,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6888:42:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12151,
                        "nodeType": "ExpressionStatement",
                        "src": "6888:42:38"
                      },
                      {
                        "assignments": [
                          12156
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12156,
                            "mutability": "mutable",
                            "name": "normalizedWeights",
                            "nodeType": "VariableDeclaration",
                            "scope": 12166,
                            "src": "6941:34:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12154,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "6941:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12155,
                              "nodeType": "ArrayTypeName",
                              "src": "6941:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12159,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 12157,
                            "name": "_normalizedWeights",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12120,
                            "src": "6978:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function () view returns (uint256[] memory)"
                            }
                          },
                          "id": 12158,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6978:20:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6941:57:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 12162,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12156,
                              "src": "7048:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12163,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12138,
                              "src": "7067:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "expression": {
                              "id": 12160,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "7015:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 12161,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calculateInvariant",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10853,
                            "src": "7015:32:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256[] memory,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 12164,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7015:61:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 12133,
                        "id": 12165,
                        "nodeType": "Return",
                        "src": "7008:68:38"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 12129,
                    "nodeType": "StructuredDocumentation",
                    "src": "6550:67:38",
                    "text": " @dev Returns the current value of the invariant."
                  },
                  "functionSelector": "c0ff1a15",
                  "id": 12167,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getInvariant",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12130,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6643:2:38"
                  },
                  "returnParameters": {
                    "id": 12133,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12132,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12167,
                        "src": "6667:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12131,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6667:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6666:9:38"
                  },
                  "scope": 13120,
                  "src": "6622:461:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 12176,
                    "nodeType": "Block",
                    "src": "7162:44:38",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 12173,
                            "name": "_normalizedWeights",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12120,
                            "src": "7179:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function () view returns (uint256[] memory)"
                            }
                          },
                          "id": 12174,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7179:20:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "functionReturnParameters": 12172,
                        "id": 12175,
                        "nodeType": "Return",
                        "src": "7172:27:38"
                      }
                    ]
                  },
                  "functionSelector": "f89f27ed",
                  "id": 12177,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getNormalizedWeights",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12168,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7118:2:38"
                  },
                  "returnParameters": {
                    "id": 12172,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12171,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12177,
                        "src": "7144:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12169,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "7144:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12170,
                          "nodeType": "ArrayTypeName",
                          "src": "7144:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7143:18:38"
                  },
                  "scope": 13120,
                  "src": "7089:117:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    6429
                  ],
                  "body": {
                    "id": 12207,
                    "nodeType": "Block",
                    "src": "7464:367:38",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 12193,
                              "name": "currentBalanceTokenIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12181,
                              "src": "7600:21:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "id": 12195,
                                    "name": "swapRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12179,
                                    "src": "7657:11:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 12196,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "tokenIn",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20788,
                                  "src": "7657:19:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 12194,
                                "name": "_normalizedWeight",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11982,
                                "src": "7639:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 12197,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7639:38:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12198,
                              "name": "currentBalanceTokenOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12183,
                              "src": "7695:22:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "id": 12200,
                                    "name": "swapRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12179,
                                    "src": "7753:11:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 12201,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "tokenOut",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20790,
                                  "src": "7753:20:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 12199,
                                "name": "_normalizedWeight",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11982,
                                "src": "7735:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 12202,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7735:39:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 12203,
                                "name": "swapRequest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12179,
                                "src": "7792:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 12204,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "amount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20792,
                              "src": "7792:18:38",
                              "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"
                              }
                            ],
                            "expression": {
                              "id": 12191,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "7554:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 12192,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcOutGivenIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10915,
                            "src": "7554:28:38",
                            "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": 12205,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7554:270:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 12190,
                        "id": 12206,
                        "nodeType": "Return",
                        "src": "7535:289:38"
                      }
                    ]
                  },
                  "id": 12208,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 12187,
                      "modifierName": {
                        "id": 12186,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "7432:13:38",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "7432:13:38"
                    }
                  ],
                  "name": "_onSwapGivenIn",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 12185,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "7423:8:38"
                  },
                  "parameters": {
                    "id": 12184,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12179,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 12208,
                        "src": "7285:30:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 12178,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "7285:11:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12181,
                        "mutability": "mutable",
                        "name": "currentBalanceTokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 12208,
                        "src": "7325:29:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12180,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7325:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12183,
                        "mutability": "mutable",
                        "name": "currentBalanceTokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 12208,
                        "src": "7364:30:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12182,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7364:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7275:125:38"
                  },
                  "returnParameters": {
                    "id": 12190,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12189,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12208,
                        "src": "7455:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12188,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7455:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7454:9:38"
                  },
                  "scope": 13120,
                  "src": "7252:579:38",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    6440
                  ],
                  "body": {
                    "id": 12238,
                    "nodeType": "Block",
                    "src": "8050:367:38",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 12224,
                              "name": "currentBalanceTokenIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12212,
                              "src": "8186:21:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "id": 12226,
                                    "name": "swapRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12210,
                                    "src": "8243:11:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 12227,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "tokenIn",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20788,
                                  "src": "8243:19:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 12225,
                                "name": "_normalizedWeight",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11982,
                                "src": "8225:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 12228,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8225:38:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12229,
                              "name": "currentBalanceTokenOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12214,
                              "src": "8281:22:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "expression": {
                                    "id": 12231,
                                    "name": "swapRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12210,
                                    "src": "8339:11:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 12232,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "tokenOut",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20790,
                                  "src": "8339:20:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 12230,
                                "name": "_normalizedWeight",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11982,
                                "src": "8321:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                  "typeString": "function (contract IERC20) view returns (uint256)"
                                }
                              },
                              "id": 12233,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8321:39:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 12234,
                                "name": "swapRequest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12210,
                                "src": "8378:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 12235,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "amount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20792,
                              "src": "8378:18:38",
                              "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"
                              }
                            ],
                            "expression": {
                              "id": 12222,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "8140:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 12223,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcInGivenOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10979,
                            "src": "8140:28:38",
                            "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": 12236,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8140:270:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 12221,
                        "id": 12237,
                        "nodeType": "Return",
                        "src": "8121:289:38"
                      }
                    ]
                  },
                  "id": 12239,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 12218,
                      "modifierName": {
                        "id": 12217,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "8018:13:38",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "8018:13:38"
                    }
                  ],
                  "name": "_onSwapGivenOut",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 12216,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "8009:8:38"
                  },
                  "parameters": {
                    "id": 12215,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12210,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 12239,
                        "src": "7871:30:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 12209,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "7871:11:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12212,
                        "mutability": "mutable",
                        "name": "currentBalanceTokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 12239,
                        "src": "7911:29:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12211,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7911:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12214,
                        "mutability": "mutable",
                        "name": "currentBalanceTokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 12239,
                        "src": "7950:30:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12213,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7950:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7861:125:38"
                  },
                  "returnParameters": {
                    "id": 12221,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12220,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12239,
                        "src": "8041:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12219,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8041:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8040:9:38"
                  },
                  "scope": 13120,
                  "src": "7837:580:38",
                  "stateMutability": "view",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    7305
                  ],
                  "body": {
                    "id": 12333,
                    "nodeType": "Block",
                    "src": "8633:1043:38",
                    "statements": [
                      {
                        "assignments": [
                          12261
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12261,
                            "mutability": "mutable",
                            "name": "kind",
                            "nodeType": "VariableDeclaration",
                            "scope": 12333,
                            "src": "8798:26:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_JoinKind_$11694",
                              "typeString": "enum WeightedPool.JoinKind"
                            },
                            "typeName": {
                              "id": 12260,
                              "name": "WeightedPool.JoinKind",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 11694,
                              "src": "8798:21:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_JoinKind_$11694",
                                "typeString": "enum WeightedPool.JoinKind"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12265,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12262,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12247,
                              "src": "8827:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12263,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "joinKind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13214,
                            "src": "8827:17:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_enum$_JoinKind_$11694_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (enum WeightedPool.JoinKind)"
                            }
                          },
                          "id": 12264,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8827:19:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_JoinKind_$11694",
                            "typeString": "enum WeightedPool.JoinKind"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8798:48:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_enum$_JoinKind_$11694",
                                "typeString": "enum WeightedPool.JoinKind"
                              },
                              "id": 12271,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12267,
                                "name": "kind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12261,
                                "src": "8865:4:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_JoinKind_$11694",
                                  "typeString": "enum WeightedPool.JoinKind"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "expression": {
                                  "expression": {
                                    "id": 12268,
                                    "name": "WeightedPool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13120,
                                    "src": "8873:12:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                      "typeString": "type(contract WeightedPool)"
                                    }
                                  },
                                  "id": 12269,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "JoinKind",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 11694,
                                  "src": "8873:21:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                    "typeString": "type(enum WeightedPool.JoinKind)"
                                  }
                                },
                                "id": 12270,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "INIT",
                                "nodeType": "MemberAccess",
                                "src": "8873:26:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_JoinKind_$11694",
                                  "typeString": "enum WeightedPool.JoinKind"
                                }
                              },
                              "src": "8865:34:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 12272,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "8901:6:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 12273,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "UNINITIALIZED",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 435,
                              "src": "8901:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12266,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "8856:8:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 12274,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8856:66:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12275,
                        "nodeType": "ExpressionStatement",
                        "src": "8856:66:38"
                      },
                      {
                        "assignments": [
                          12280
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12280,
                            "mutability": "mutable",
                            "name": "amountsIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 12333,
                            "src": "8933:26:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12278,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "8933:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12279,
                              "nodeType": "ArrayTypeName",
                              "src": "8933:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12284,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12281,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12247,
                              "src": "8962:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12282,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "initialAmountsIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13253,
                            "src": "8962:25:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256[] memory)"
                            }
                          },
                          "id": 12283,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8962:27:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8933:56:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12288,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "9035:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12289,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "9035:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 12290,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12280,
                                "src": "9054:9:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 12291,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "9054:16:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 12285,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "8999:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 12287,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "8999:35:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 12292,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8999:72:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12293,
                        "nodeType": "ExpressionStatement",
                        "src": "8999:72:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 12295,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12280,
                              "src": "9095:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12296,
                                "name": "_scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7638,
                                "src": "9106:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function () view returns (uint256[] memory)"
                                }
                              },
                              "id": 12297,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "9106:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 12294,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "9081:13:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 12298,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9081:43:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12299,
                        "nodeType": "ExpressionStatement",
                        "src": "9081:43:38"
                      },
                      {
                        "assignments": [
                          12304
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12304,
                            "mutability": "mutable",
                            "name": "normalizedWeights",
                            "nodeType": "VariableDeclaration",
                            "scope": 12333,
                            "src": "9135:34:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12302,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "9135:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12303,
                              "nodeType": "ArrayTypeName",
                              "src": "9135:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12307,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 12305,
                            "name": "_normalizedWeights",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12120,
                            "src": "9172:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function () view returns (uint256[] memory)"
                            }
                          },
                          "id": 12306,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9172:20:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9135:57:38"
                      },
                      {
                        "assignments": [
                          12309
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12309,
                            "mutability": "mutable",
                            "name": "invariantAfterJoin",
                            "nodeType": "VariableDeclaration",
                            "scope": 12333,
                            "src": "9203:26:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12308,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9203:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12315,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12312,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12304,
                              "src": "9265:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12313,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12280,
                              "src": "9284:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "expression": {
                              "id": 12310,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "9232:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 12311,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calculateInvariant",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10853,
                            "src": "9232:32:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256[] memory,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 12314,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9232:62:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9203:91:38"
                      },
                      {
                        "assignments": [
                          12317
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12317,
                            "mutability": "mutable",
                            "name": "bptAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 12333,
                            "src": "9510:20:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12316,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9510:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12324,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12320,
                              "name": "invariantAfterJoin",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12309,
                              "src": "9542:18:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12321,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "9562:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12322,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "9562:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 12318,
                              "name": "Math",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3350,
                              "src": "9533:4:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                "typeString": "type(library Math)"
                              }
                            },
                            "id": 12319,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mul",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3292,
                            "src": "9533:8:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 12323,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9533:47:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9510:70:38"
                      },
                      {
                        "expression": {
                          "id": 12327,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 12325,
                            "name": "_lastInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11690,
                            "src": "9591:14:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 12326,
                            "name": "invariantAfterJoin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12309,
                            "src": "9608:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "9591:35:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 12328,
                        "nodeType": "ExpressionStatement",
                        "src": "9591:35:38"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 12329,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12317,
                              "src": "9645:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12330,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12280,
                              "src": "9659:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 12331,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "9644:25:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 12257,
                        "id": 12332,
                        "nodeType": "Return",
                        "src": "9637:32:38"
                      }
                    ]
                  },
                  "id": 12334,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 12251,
                      "modifierName": {
                        "id": 12250,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "8583:13:38",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "8583:13:38"
                    }
                  ],
                  "name": "_onInitializePool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 12249,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "8574:8:38"
                  },
                  "parameters": {
                    "id": 12248,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12241,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12334,
                        "src": "8478:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 12240,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8478:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12243,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12334,
                        "src": "8495:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 12242,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8495:7:38",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12245,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12334,
                        "src": "8512:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 12244,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8512:7:38",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12247,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12334,
                        "src": "8529:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12246,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "8529:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8468:88:38"
                  },
                  "returnParameters": {
                    "id": 12257,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12253,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12334,
                        "src": "8606:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12252,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8606:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12256,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12334,
                        "src": "8615:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12254,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "8615:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12255,
                          "nodeType": "ArrayTypeName",
                          "src": "8615:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8605:27:38"
                  },
                  "scope": 13120,
                  "src": "8442:1234:38",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    7332
                  ],
                  "body": {
                    "id": 12423,
                    "nodeType": "Block",
                    "src": "10083:1356:38",
                    "statements": [
                      {
                        "assignments": [
                          12367
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12367,
                            "mutability": "mutable",
                            "name": "normalizedWeights",
                            "nodeType": "VariableDeclaration",
                            "scope": 12423,
                            "src": "10158:34:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12365,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10158:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12366,
                              "nodeType": "ArrayTypeName",
                              "src": "10158:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12370,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 12368,
                            "name": "_normalizedWeights",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12120,
                            "src": "10195:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function () view returns (uint256[] memory)"
                            }
                          },
                          "id": 12369,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10195:20:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10158:57:38"
                      },
                      {
                        "assignments": [
                          12372
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12372,
                            "mutability": "mutable",
                            "name": "invariantBeforeJoin",
                            "nodeType": "VariableDeclaration",
                            "scope": 12423,
                            "src": "10513:27:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12371,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "10513:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12378,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12375,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12367,
                              "src": "10576:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12376,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12343,
                              "src": "10595:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "expression": {
                              "id": 12373,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "10543:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 12374,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calculateInvariant",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10853,
                            "src": "10543:32:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256[] memory,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 12377,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10543:61:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10513:91:38"
                      },
                      {
                        "assignments": [
                          12383
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12383,
                            "mutability": "mutable",
                            "name": "dueProtocolFeeAmounts",
                            "nodeType": "VariableDeclaration",
                            "scope": 12423,
                            "src": "10615:38:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12381,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10615:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12382,
                              "nodeType": "ArrayTypeName",
                              "src": "10615:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12391,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12385,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12343,
                              "src": "10695:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12386,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12367,
                              "src": "10717:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12387,
                              "name": "_lastInvariant",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11690,
                              "src": "10748:14:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12388,
                              "name": "invariantBeforeJoin",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12372,
                              "src": "10776:19:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12389,
                              "name": "protocolSwapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12347,
                              "src": "10809:25:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12384,
                            "name": "_getDueProtocolFeeAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12996,
                            "src": "10656:25:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256[] memory,uint256[] memory,uint256,uint256,uint256) view returns (uint256[] memory)"
                            }
                          },
                          "id": 12390,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10656:188:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "10615:229:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 12393,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12343,
                              "src": "10945:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12394,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12383,
                              "src": "10955:21:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "expression": {
                                "id": 12395,
                                "name": "FixedPoint",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1815,
                                "src": "10978:10:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                  "typeString": "type(library FixedPoint)"
                                }
                              },
                              "id": 12396,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1538,
                              "src": "10978:14:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            ],
                            "id": 12392,
                            "name": "_mutateAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13100,
                            "src": "10930:14:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory,function (uint256,uint256) pure returns (uint256)) view"
                            }
                          },
                          "id": 12397,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10930:63:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12398,
                        "nodeType": "ExpressionStatement",
                        "src": "10930:63:38"
                      },
                      {
                        "assignments": [
                          12400,
                          12403
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12400,
                            "mutability": "mutable",
                            "name": "bptAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 12423,
                            "src": "11004:20:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12399,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11004:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 12403,
                            "mutability": "mutable",
                            "name": "amountsIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 12423,
                            "src": "11026:26:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12401,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11026:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12402,
                              "nodeType": "ArrayTypeName",
                              "src": "11026:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12409,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12405,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12343,
                              "src": "11064:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12406,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12367,
                              "src": "11074:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12407,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12349,
                              "src": "11093:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 12404,
                            "name": "_doJoin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12477,
                            "src": "11056:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256[] memory,uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                            }
                          },
                          "id": 12408,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11056:46:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11003:99:38"
                      },
                      {
                        "expression": {
                          "id": 12416,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 12410,
                            "name": "_lastInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11690,
                            "src": "11290:14:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 12412,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12343,
                                "src": "11327:8:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 12413,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12403,
                                "src": "11337:9:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 12414,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12367,
                                "src": "11348:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              ],
                              "id": 12411,
                              "name": "_invariantAfterJoin",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13025,
                              "src": "11307:19:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                                "typeString": "function (uint256[] memory,uint256[] memory,uint256[] memory) view returns (uint256)"
                              }
                            },
                            "id": 12415,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "11307:59:38",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "11290:76:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 12417,
                        "nodeType": "ExpressionStatement",
                        "src": "11290:76:38"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 12418,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12400,
                              "src": "11385:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12419,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12403,
                              "src": "11399:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12420,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12383,
                              "src": "11410:21:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 12421,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "11384:48:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 12362,
                        "id": 12422,
                        "nodeType": "Return",
                        "src": "11377:55:38"
                      }
                    ]
                  },
                  "id": 12424,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 12353,
                      "modifierName": {
                        "id": 12352,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "9957:13:38",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "9957:13:38"
                    }
                  ],
                  "name": "_onJoinPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 12351,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "9940:8:38"
                  },
                  "parameters": {
                    "id": 12350,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12336,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "9725:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 12335,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "9725:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12338,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "9742:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 12337,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "9742:7:38",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12340,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "9759:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 12339,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "9759:7:38",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12343,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "9776:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12341,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "9776:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12342,
                          "nodeType": "ArrayTypeName",
                          "src": "9776:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12345,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "9811:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12344,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9811:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12347,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "9828:33:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12346,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9828:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12349,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "9871:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12348,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "9871:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9715:183:38"
                  },
                  "returnParameters": {
                    "id": 12362,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12355,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "10001:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12354,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "10001:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12358,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "10022:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12356,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "10022:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12357,
                          "nodeType": "ArrayTypeName",
                          "src": "10022:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12361,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12424,
                        "src": "10052:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12359,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "10052:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12360,
                          "nodeType": "ArrayTypeName",
                          "src": "10052:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9987:91:38"
                  },
                  "scope": 13120,
                  "src": "9695:1744:38",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 12476,
                    "nodeType": "Block",
                    "src": "11627:428:38",
                    "statements": [
                      {
                        "assignments": [
                          12441
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12441,
                            "mutability": "mutable",
                            "name": "kind",
                            "nodeType": "VariableDeclaration",
                            "scope": 12476,
                            "src": "11637:13:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_JoinKind_$11694",
                              "typeString": "enum WeightedPool.JoinKind"
                            },
                            "typeName": {
                              "id": 12440,
                              "name": "JoinKind",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 11694,
                              "src": "11637:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_JoinKind_$11694",
                                "typeString": "enum WeightedPool.JoinKind"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12445,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12442,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12432,
                              "src": "11653:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12443,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "joinKind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13214,
                            "src": "11653:17:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_enum$_JoinKind_$11694_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (enum WeightedPool.JoinKind)"
                            }
                          },
                          "id": 12444,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11653:19:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_JoinKind_$11694",
                            "typeString": "enum WeightedPool.JoinKind"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11637:35:38"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_JoinKind_$11694",
                            "typeString": "enum WeightedPool.JoinKind"
                          },
                          "id": 12449,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 12446,
                            "name": "kind",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12441,
                            "src": "11687:4:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_JoinKind_$11694",
                              "typeString": "enum WeightedPool.JoinKind"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 12447,
                              "name": "JoinKind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11694,
                              "src": "11695:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                "typeString": "type(enum WeightedPool.JoinKind)"
                              }
                            },
                            "id": 12448,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "EXACT_TOKENS_IN_FOR_BPT_OUT",
                            "nodeType": "MemberAccess",
                            "src": "11695:36:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_JoinKind_$11694",
                              "typeString": "enum WeightedPool.JoinKind"
                            }
                          },
                          "src": "11687:44:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_JoinKind_$11694",
                              "typeString": "enum WeightedPool.JoinKind"
                            },
                            "id": 12460,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 12457,
                              "name": "kind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12441,
                              "src": "11841:4:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_JoinKind_$11694",
                                "typeString": "enum WeightedPool.JoinKind"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 12458,
                                "name": "JoinKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11694,
                                "src": "11849:8:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                  "typeString": "type(enum WeightedPool.JoinKind)"
                                }
                              },
                              "id": 12459,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "TOKEN_IN_FOR_EXACT_BPT_OUT",
                              "nodeType": "MemberAccess",
                              "src": "11849:35:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_JoinKind_$11694",
                                "typeString": "enum WeightedPool.JoinKind"
                              }
                            },
                            "src": "11841:43:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 12473,
                            "nodeType": "Block",
                            "src": "11989:60:38",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "expression": {
                                        "id": 12469,
                                        "name": "Errors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 655,
                                        "src": "12011:6:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                          "typeString": "type(library Errors)"
                                        }
                                      },
                                      "id": 12470,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "UNHANDLED_JOIN_KIND",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 477,
                                      "src": "12011:26:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 12468,
                                    "name": "_revert",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 369,
                                    "src": "12003:7:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                                      "typeString": "function (uint256) pure"
                                    }
                                  },
                                  "id": 12471,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "12003:35:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 12472,
                                "nodeType": "ExpressionStatement",
                                "src": "12003:35:38"
                              }
                            ]
                          },
                          "id": 12474,
                          "nodeType": "IfStatement",
                          "src": "11837:212:38",
                          "trueBody": {
                            "id": 12467,
                            "nodeType": "Block",
                            "src": "11886:97:38",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 12462,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12427,
                                      "src": "11934:8:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 12463,
                                      "name": "normalizedWeights",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12430,
                                      "src": "11944:17:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 12464,
                                      "name": "userData",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12432,
                                      "src": "11963:8:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    ],
                                    "id": 12461,
                                    "name": "_joinTokenInForExactBPTOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12612,
                                    "src": "11907:26:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256[] memory,uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                    }
                                  },
                                  "id": 12465,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11907:65:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "tuple(uint256,uint256[] memory)"
                                  }
                                },
                                "functionReturnParameters": 12439,
                                "id": 12466,
                                "nodeType": "Return",
                                "src": "11900:72:38"
                              }
                            ]
                          }
                        },
                        "id": 12475,
                        "nodeType": "IfStatement",
                        "src": "11683:366:38",
                        "trueBody": {
                          "id": 12456,
                          "nodeType": "Block",
                          "src": "11733:98:38",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 12451,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12427,
                                    "src": "11782:8:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 12452,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12430,
                                    "src": "11792:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 12453,
                                    "name": "userData",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12432,
                                    "src": "11811:8:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  ],
                                  "id": 12450,
                                  "name": "_joinExactTokensInForBPTOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12544,
                                  "src": "11754:27:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "function (uint256[] memory,uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                  }
                                },
                                "id": 12454,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11754:66:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256,uint256[] memory)"
                                }
                              },
                              "functionReturnParameters": 12439,
                              "id": 12455,
                              "nodeType": "Return",
                              "src": "11747:73:38"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 12477,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_doJoin",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12433,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12427,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12477,
                        "src": "11471:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12425,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11471:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12426,
                          "nodeType": "ArrayTypeName",
                          "src": "11471:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12430,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 12477,
                        "src": "11506:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12428,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11506:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12429,
                          "nodeType": "ArrayTypeName",
                          "src": "11506:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12432,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12477,
                        "src": "11550:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12431,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "11550:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11461:116:38"
                  },
                  "returnParameters": {
                    "id": 12439,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12435,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12477,
                        "src": "11600:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12434,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11600:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12438,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12477,
                        "src": "11609:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12436,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "11609:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12437,
                          "nodeType": "ArrayTypeName",
                          "src": "11609:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11599:27:38"
                  },
                  "scope": 13120,
                  "src": "11445:610:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 12543,
                    "nodeType": "Block",
                    "src": "12263:585:38",
                    "statements": [
                      {
                        "assignments": [
                          12497,
                          12499
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12497,
                            "mutability": "mutable",
                            "name": "amountsIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 12543,
                            "src": "12274:26:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12495,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "12274:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12496,
                              "nodeType": "ArrayTypeName",
                              "src": "12274:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 12499,
                            "mutability": "mutable",
                            "name": "minBPTAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 12543,
                            "src": "12302:23:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12498,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "12302:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12503,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12500,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12485,
                              "src": "12329:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12501,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "exactTokensInForBptOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13281,
                            "src": "12329:31:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256[] memory,uint256)"
                            }
                          },
                          "id": 12502,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12329:33:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12273:89:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12507,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "12408:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12508,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12408:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 12509,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12497,
                                "src": "12427:9:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 12510,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "12427:16:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 12504,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "12372:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 12506,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "12372:35:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 12511,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12372:72:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12512,
                        "nodeType": "ExpressionStatement",
                        "src": "12372:72:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 12514,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12497,
                              "src": "12469:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12515,
                                "name": "_scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7638,
                                "src": "12480:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function () view returns (uint256[] memory)"
                                }
                              },
                              "id": 12516,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12480:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 12513,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "12455:13:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 12517,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12455:43:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12518,
                        "nodeType": "ExpressionStatement",
                        "src": "12455:43:38"
                      },
                      {
                        "assignments": [
                          12520
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12520,
                            "mutability": "mutable",
                            "name": "bptAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 12543,
                            "src": "12509:20:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12519,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "12509:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12530,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12523,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12480,
                              "src": "12588:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12524,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12483,
                              "src": "12610:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12525,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12497,
                              "src": "12641:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12526,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "12664:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12527,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12664:13:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12528,
                              "name": "_swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6481,
                              "src": "12691:18:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 12521,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "12532:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 12522,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcBptOutGivenExactTokensIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11174,
                            "src": "12532:42:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256[] memory,uint256[] memory,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 12529,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12532:187:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12509:210:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12534,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12532,
                                "name": "bptAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12520,
                                "src": "12739:12:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 12533,
                                "name": "minBPTAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12499,
                                "src": "12755:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "12739:31:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 12535,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "12772:6:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 12536,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "BPT_OUT_MIN_AMOUNT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 441,
                              "src": "12772:25:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12531,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "12730:8:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 12537,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12730:68:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12538,
                        "nodeType": "ExpressionStatement",
                        "src": "12730:68:38"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 12539,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12520,
                              "src": "12817:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12540,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12497,
                              "src": "12831:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 12541,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "12816:25:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 12492,
                        "id": 12542,
                        "nodeType": "Return",
                        "src": "12809:32:38"
                      }
                    ]
                  },
                  "id": 12544,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_joinExactTokensInForBPTOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12486,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12480,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12544,
                        "src": "12107:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12478,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12107:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12479,
                          "nodeType": "ArrayTypeName",
                          "src": "12107:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12483,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 12544,
                        "src": "12142:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12481,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12142:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12482,
                          "nodeType": "ArrayTypeName",
                          "src": "12142:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12485,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12544,
                        "src": "12186:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12484,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "12186:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12097:116:38"
                  },
                  "returnParameters": {
                    "id": 12492,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12488,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12544,
                        "src": "12236:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12487,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12236:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12491,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12544,
                        "src": "12245:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12489,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12245:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12490,
                          "nodeType": "ArrayTypeName",
                          "src": "12245:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12235:27:38"
                  },
                  "scope": 13120,
                  "src": "12061:787:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 12611,
                    "nodeType": "Block",
                    "src": "13055:628:38",
                    "statements": [
                      {
                        "assignments": [
                          12561,
                          12563
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12561,
                            "mutability": "mutable",
                            "name": "bptAmountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 12611,
                            "src": "13066:20:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12560,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13066:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 12563,
                            "mutability": "mutable",
                            "name": "tokenIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 12611,
                            "src": "13088:18:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12562,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "13088:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12567,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12564,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12552,
                              "src": "13110:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12565,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "tokenInForExactBptOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13307,
                            "src": "13110:30:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256,uint256)"
                            }
                          },
                          "id": 12566,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13110:32:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                            "typeString": "tuple(uint256,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13065:77:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12572,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12569,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12563,
                                "src": "13261:10:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 12570,
                                  "name": "_getTotalTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6892,
                                  "src": "13274:15:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view returns (uint256)"
                                  }
                                },
                                "id": 12571,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "13274:17:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "13261:30:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 12573,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "13293:6:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 12574,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 402,
                              "src": "13293:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12568,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "13252:8:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 12575,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13252:62:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12576,
                        "nodeType": "ExpressionStatement",
                        "src": "13252:62:38"
                      },
                      {
                        "assignments": [
                          12581
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12581,
                            "mutability": "mutable",
                            "name": "amountsIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 12611,
                            "src": "13325:26:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12579,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "13325:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12580,
                              "nodeType": "ArrayTypeName",
                              "src": "13325:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12588,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12585,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "13368:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12586,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13368:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12584,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "13354:13:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12582,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "13358:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12583,
                              "nodeType": "ArrayTypeName",
                              "src": "13358:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 12587,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13354:32:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13325:61:38"
                      },
                      {
                        "expression": {
                          "id": 12605,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 12589,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12581,
                              "src": "13396:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 12591,
                            "indexExpression": {
                              "id": 12590,
                              "name": "tokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12563,
                              "src": "13406:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "13396:21:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "baseExpression": {
                                  "id": 12594,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12547,
                                  "src": "13475:8:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 12596,
                                "indexExpression": {
                                  "id": 12595,
                                  "name": "tokenIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12563,
                                  "src": "13484:10:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "13475:20:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "baseExpression": {
                                  "id": 12597,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12550,
                                  "src": "13509:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 12599,
                                "indexExpression": {
                                  "id": 12598,
                                  "name": "tokenIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12563,
                                  "src": "13527:10:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "13509:29:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 12600,
                                "name": "bptAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12561,
                                "src": "13552:12:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 12601,
                                  "name": "totalSupply",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5787,
                                  "src": "13578:11:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view returns (uint256)"
                                  }
                                },
                                "id": 12602,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "13578:13:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 12603,
                                "name": "_swapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6481,
                                "src": "13605:18:38",
                                "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"
                                }
                              ],
                              "expression": {
                                "id": 12592,
                                "name": "WeightedMath",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11652,
                                "src": "13420:12:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                  "typeString": "type(contract WeightedMath)"
                                }
                              },
                              "id": 12593,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_calcTokenInGivenExactBptOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11260,
                              "src": "13420:41:38",
                              "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": 12604,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "13420:213:38",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "13396:237:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 12606,
                        "nodeType": "ExpressionStatement",
                        "src": "13396:237:38"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 12607,
                              "name": "bptAmountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12561,
                              "src": "13652:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12608,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12581,
                              "src": "13666:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 12609,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "13651:25:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 12559,
                        "id": 12610,
                        "nodeType": "Return",
                        "src": "13644:32:38"
                      }
                    ]
                  },
                  "id": 12612,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_joinTokenInForExactBPTOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12553,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12547,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12612,
                        "src": "12899:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12545,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12899:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12546,
                          "nodeType": "ArrayTypeName",
                          "src": "12899:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12550,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 12612,
                        "src": "12934:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12548,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12934:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12549,
                          "nodeType": "ArrayTypeName",
                          "src": "12934:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12552,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12612,
                        "src": "12978:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12551,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "12978:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12889:116:38"
                  },
                  "returnParameters": {
                    "id": 12559,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12555,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12612,
                        "src": "13028:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12554,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13028:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12558,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12612,
                        "src": "13037:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12556,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "13037:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12557,
                          "nodeType": "ArrayTypeName",
                          "src": "13037:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13027:27:38"
                  },
                  "scope": 13120,
                  "src": "12854:829:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "baseFunctions": [
                    7359
                  ],
                  "body": {
                    "id": 12709,
                    "nodeType": "Block",
                    "src": "14113:1748:38",
                    "statements": [
                      {
                        "assignments": [
                          12643
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12643,
                            "mutability": "mutable",
                            "name": "normalizedWeights",
                            "nodeType": "VariableDeclaration",
                            "scope": 12709,
                            "src": "14278:34:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12641,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "14278:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12642,
                              "nodeType": "ArrayTypeName",
                              "src": "14278:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12646,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 12644,
                            "name": "_normalizedWeights",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12120,
                            "src": "14315:18:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function () view returns (uint256[] memory)"
                            }
                          },
                          "id": 12645,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14315:20:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14278:57:38"
                      },
                      {
                        "condition": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 12647,
                            "name": "_isNotPaused",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1456,
                            "src": "14350:12:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                              "typeString": "function () view returns (bool)"
                            }
                          },
                          "id": 12648,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14350:14:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 12684,
                          "nodeType": "Block",
                          "src": "15201:245:38",
                          "statements": [
                            {
                              "expression": {
                                "id": 12682,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 12675,
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12637,
                                  "src": "15379:21:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "id": 12679,
                                        "name": "_getTotalTokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 6892,
                                        "src": "15417:15:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                          "typeString": "function () view returns (uint256)"
                                        }
                                      },
                                      "id": 12680,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "15417:17:38",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 12678,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "NewExpression",
                                    "src": "15403:13:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256) pure returns (uint256[] memory)"
                                    },
                                    "typeName": {
                                      "baseType": {
                                        "id": 12676,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "15407:7:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 12677,
                                      "nodeType": "ArrayTypeName",
                                      "src": "15407:9:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                        "typeString": "uint256[]"
                                      }
                                    }
                                  },
                                  "id": 12681,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "15403:32:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "src": "15379:56:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 12683,
                              "nodeType": "ExpressionStatement",
                              "src": "15379:56:38"
                            }
                          ]
                        },
                        "id": 12685,
                        "nodeType": "IfStatement",
                        "src": "14346:1100:38",
                        "trueBody": {
                          "id": 12674,
                          "nodeType": "Block",
                          "src": "14366:829:38",
                          "statements": [
                            {
                              "assignments": [
                                12650
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 12650,
                                  "mutability": "mutable",
                                  "name": "invariantBeforeExit",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 12674,
                                  "src": "14686:27:38",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 12649,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "14686:7:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 12656,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 12653,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12643,
                                    "src": "14749:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 12654,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12621,
                                    "src": "14768:8:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  ],
                                  "expression": {
                                    "id": 12651,
                                    "name": "WeightedMath",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11652,
                                    "src": "14716:12:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                      "typeString": "type(contract WeightedMath)"
                                    }
                                  },
                                  "id": 12652,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "_calculateInvariant",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 10853,
                                  "src": "14716:32:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                                    "typeString": "function (uint256[] memory,uint256[] memory) pure returns (uint256)"
                                  }
                                },
                                "id": 12655,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "14716:61:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "14686:91:38"
                            },
                            {
                              "expression": {
                                "id": 12665,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 12657,
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12637,
                                  "src": "14791:21:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 12659,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12621,
                                      "src": "14858:8:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 12660,
                                      "name": "normalizedWeights",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12643,
                                      "src": "14884:17:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 12661,
                                      "name": "_lastInvariant",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 11690,
                                      "src": "14919:14:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 12662,
                                      "name": "invariantBeforeExit",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12650,
                                      "src": "14951:19:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 12663,
                                      "name": "protocolSwapFeePercentage",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12625,
                                      "src": "14988:25:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 12658,
                                    "name": "_getDueProtocolFeeAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12996,
                                    "src": "14815:25:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256[] memory,uint256[] memory,uint256,uint256,uint256) view returns (uint256[] memory)"
                                    }
                                  },
                                  "id": 12664,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "14815:212:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "src": "14791:236:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 12666,
                              "nodeType": "ExpressionStatement",
                              "src": "14791:236:38"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 12668,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12621,
                                    "src": "15136:8:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 12669,
                                    "name": "dueProtocolFeeAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12637,
                                    "src": "15146:21:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 12670,
                                      "name": "FixedPoint",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1815,
                                      "src": "15169:10:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                        "typeString": "type(library FixedPoint)"
                                      }
                                    },
                                    "id": 12671,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sub",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1538,
                                    "src": "15169:14:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  ],
                                  "id": 12667,
                                  "name": "_mutateAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13100,
                                  "src": "15121:14:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_$returns$__$",
                                    "typeString": "function (uint256[] memory,uint256[] memory,function (uint256,uint256) pure returns (uint256)) view"
                                  }
                                },
                                "id": 12672,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "15121:63:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 12673,
                              "nodeType": "ExpressionStatement",
                              "src": "15121:63:38"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 12694,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 12686,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12631,
                                "src": "15457:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 12687,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12634,
                                "src": "15470:10:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "id": 12688,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "15456:25:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256,uint256[] memory)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 12690,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12621,
                                "src": "15492:8:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 12691,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12643,
                                "src": "15502:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 12692,
                                "name": "userData",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12627,
                                "src": "15521:8:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              ],
                              "id": 12689,
                              "name": "_doExit",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12763,
                              "src": "15484:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (uint256[] memory,uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                              }
                            },
                            "id": 12693,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "15484:46:38",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256,uint256[] memory)"
                            }
                          },
                          "src": "15456:74:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12695,
                        "nodeType": "ExpressionStatement",
                        "src": "15456:74:38"
                      },
                      {
                        "expression": {
                          "id": 12702,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 12696,
                            "name": "_lastInvariant",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11690,
                            "src": "15711:14:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 12698,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12621,
                                "src": "15748:8:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 12699,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12634,
                                "src": "15758:10:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 12700,
                                "name": "normalizedWeights",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12643,
                                "src": "15770:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              ],
                              "id": 12697,
                              "name": "_invariantAfterExit",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13053,
                              "src": "15728:19:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                                "typeString": "function (uint256[] memory,uint256[] memory,uint256[] memory) view returns (uint256)"
                              }
                            },
                            "id": 12701,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "15728:60:38",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "15711:77:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 12703,
                        "nodeType": "ExpressionStatement",
                        "src": "15711:77:38"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 12704,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12631,
                              "src": "15807:11:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12705,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12634,
                              "src": "15820:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12706,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12637,
                              "src": "15832:21:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 12707,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "15806:48:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 12638,
                        "id": 12708,
                        "nodeType": "Return",
                        "src": "15799:55:38"
                      }
                    ]
                  },
                  "id": 12710,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_onExitPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 12629,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "13947:8:38"
                  },
                  "parameters": {
                    "id": 12628,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12614,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "13732:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 12613,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13732:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12616,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "13749:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 12615,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "13749:7:38",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12618,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "13766:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 12617,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "13766:7:38",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12621,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "13783:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12619,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "13783:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12620,
                          "nodeType": "ArrayTypeName",
                          "src": "13783:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12623,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "13818:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12622,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13818:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12625,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "13835:33:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12624,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13835:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12627,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "13878:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12626,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "13878:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13722:183:38"
                  },
                  "returnParameters": {
                    "id": 12638,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12631,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "13986:19:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12630,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "13986:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12634,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "14019:27:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12632,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "14019:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12633,
                          "nodeType": "ArrayTypeName",
                          "src": "14019:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12637,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 12710,
                        "src": "14060:38:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12635,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "14060:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12636,
                          "nodeType": "ArrayTypeName",
                          "src": "14060:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13972:136:38"
                  },
                  "scope": 13120,
                  "src": "13702:2159:38",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 12762,
                    "nodeType": "Block",
                    "src": "16049:503:38",
                    "statements": [
                      {
                        "assignments": [
                          12727
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12727,
                            "mutability": "mutable",
                            "name": "kind",
                            "nodeType": "VariableDeclaration",
                            "scope": 12762,
                            "src": "16059:13:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_ExitKind_$11698",
                              "typeString": "enum WeightedPool.ExitKind"
                            },
                            "typeName": {
                              "id": 12726,
                              "name": "ExitKind",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 11698,
                              "src": "16059:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_ExitKind_$11698",
                                "typeString": "enum WeightedPool.ExitKind"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12731,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12728,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12718,
                              "src": "16075:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12729,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "exitKind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13230,
                            "src": "16075:17:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_enum$_ExitKind_$11698_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (enum WeightedPool.ExitKind)"
                            }
                          },
                          "id": 12730,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16075:19:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_ExitKind_$11698",
                            "typeString": "enum WeightedPool.ExitKind"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16059:35:38"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_ExitKind_$11698",
                            "typeString": "enum WeightedPool.ExitKind"
                          },
                          "id": 12735,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 12732,
                            "name": "kind",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12727,
                            "src": "16109:4:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_ExitKind_$11698",
                              "typeString": "enum WeightedPool.ExitKind"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 12733,
                              "name": "ExitKind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11698,
                              "src": "16117:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_ExitKind_$11698_$",
                                "typeString": "type(enum WeightedPool.ExitKind)"
                              }
                            },
                            "id": 12734,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",
                            "nodeType": "MemberAccess",
                            "src": "16117:39:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_ExitKind_$11698",
                              "typeString": "enum WeightedPool.ExitKind"
                            }
                          },
                          "src": "16109:47:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_ExitKind_$11698",
                              "typeString": "enum WeightedPool.ExitKind"
                            },
                            "id": 12746,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 12743,
                              "name": "kind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12727,
                              "src": "16265:4:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_ExitKind_$11698",
                                "typeString": "enum WeightedPool.ExitKind"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 12744,
                                "name": "ExitKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11698,
                                "src": "16273:8:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_ExitKind_$11698_$",
                                  "typeString": "type(enum WeightedPool.ExitKind)"
                                }
                              },
                              "id": 12745,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "EXACT_BPT_IN_FOR_TOKENS_OUT",
                              "nodeType": "MemberAccess",
                              "src": "16273:36:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_ExitKind_$11698",
                                "typeString": "enum WeightedPool.ExitKind"
                              }
                            },
                            "src": "16265:44:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 12759,
                            "nodeType": "Block",
                            "src": "16396:150:38",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 12754,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12713,
                                      "src": "16497:8:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 12755,
                                      "name": "normalizedWeights",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12716,
                                      "src": "16507:17:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 12756,
                                      "name": "userData",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12718,
                                      "src": "16526:8:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    ],
                                    "id": 12753,
                                    "name": "_exitBPTInForExactTokensOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12939,
                                    "src": "16469:27:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256[] memory,uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                    }
                                  },
                                  "id": 12757,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "16469:66:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "tuple(uint256,uint256[] memory)"
                                  }
                                },
                                "functionReturnParameters": 12725,
                                "id": 12758,
                                "nodeType": "Return",
                                "src": "16462:73:38"
                              }
                            ]
                          },
                          "id": 12760,
                          "nodeType": "IfStatement",
                          "src": "16261:285:38",
                          "trueBody": {
                            "id": 12752,
                            "nodeType": "Block",
                            "src": "16311:79:38",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 12748,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12713,
                                      "src": "16360:8:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      }
                                    },
                                    {
                                      "id": 12749,
                                      "name": "userData",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 12718,
                                      "src": "16370:8:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                        "typeString": "uint256[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes memory"
                                      }
                                    ],
                                    "id": 12747,
                                    "name": "_exitExactBPTInForTokensOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12870,
                                    "src": "16332:27:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "function (uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                    }
                                  },
                                  "id": 12750,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "16332:47:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "tuple(uint256,uint256[] memory)"
                                  }
                                },
                                "functionReturnParameters": 12725,
                                "id": 12751,
                                "nodeType": "Return",
                                "src": "16325:54:38"
                              }
                            ]
                          }
                        },
                        "id": 12761,
                        "nodeType": "IfStatement",
                        "src": "16105:441:38",
                        "trueBody": {
                          "id": 12742,
                          "nodeType": "Block",
                          "src": "16158:97:38",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 12737,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12713,
                                    "src": "16206:8:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 12738,
                                    "name": "normalizedWeights",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12716,
                                    "src": "16216:17:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  {
                                    "id": 12739,
                                    "name": "userData",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12718,
                                    "src": "16235:8:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  ],
                                  "id": 12736,
                                  "name": "_exitExactBPTInForTokenOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12833,
                                  "src": "16179:26:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                    "typeString": "function (uint256[] memory,uint256[] memory,bytes memory) view returns (uint256,uint256[] memory)"
                                  }
                                },
                                "id": 12740,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "16179:65:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "tuple(uint256,uint256[] memory)"
                                }
                              },
                              "functionReturnParameters": 12725,
                              "id": 12741,
                              "nodeType": "Return",
                              "src": "16172:72:38"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 12763,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_doExit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12719,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12713,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12763,
                        "src": "15893:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12711,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "15893:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12712,
                          "nodeType": "ArrayTypeName",
                          "src": "15893:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12716,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 12763,
                        "src": "15928:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12714,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "15928:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12715,
                          "nodeType": "ArrayTypeName",
                          "src": "15928:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12718,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12763,
                        "src": "15972:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12717,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "15972:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15883:116:38"
                  },
                  "returnParameters": {
                    "id": 12725,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12721,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12763,
                        "src": "16022:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12720,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16022:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12724,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12763,
                        "src": "16031:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12722,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "16031:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12723,
                          "nodeType": "ArrayTypeName",
                          "src": "16031:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16021:27:38"
                  },
                  "scope": 13120,
                  "src": "15867:685:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 12832,
                    "nodeType": "Block",
                    "src": "16773:837:38",
                    "statements": [
                      {
                        "assignments": [
                          12782,
                          12784
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12782,
                            "mutability": "mutable",
                            "name": "bptAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 12832,
                            "src": "16854:19:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12781,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16854:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 12784,
                            "mutability": "mutable",
                            "name": "tokenIndex",
                            "nodeType": "VariableDeclaration",
                            "scope": 12832,
                            "src": "16875:18:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12783,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16875:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12788,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12785,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12771,
                              "src": "16897:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12786,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "exactBptInForTokenOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13333,
                            "src": "16897:30:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256,uint256)"
                            }
                          },
                          "id": 12787,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16897:32:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                            "typeString": "tuple(uint256,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16853:76:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12793,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12790,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12784,
                                "src": "17049:10:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 12791,
                                  "name": "_getTotalTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6892,
                                  "src": "17062:15:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view returns (uint256)"
                                  }
                                },
                                "id": 12792,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "17062:17:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "17049:30:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 12794,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "17081:6:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 12795,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "OUT_OF_BOUNDS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 402,
                              "src": "17081:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12789,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "17040:8:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 12796,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17040:62:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12797,
                        "nodeType": "ExpressionStatement",
                        "src": "17040:62:38"
                      },
                      {
                        "assignments": [
                          12802
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12802,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 12832,
                            "src": "17190:27:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12800,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "17190:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12801,
                              "nodeType": "ArrayTypeName",
                              "src": "17190:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12809,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12806,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "17234:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12807,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "17234:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12805,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "17220:13:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12803,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "17224:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12804,
                              "nodeType": "ArrayTypeName",
                              "src": "17224:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 12808,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17220:32:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17190:62:38"
                      },
                      {
                        "expression": {
                          "id": 12826,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 12810,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12802,
                              "src": "17323:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 12812,
                            "indexExpression": {
                              "id": 12811,
                              "name": "tokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12784,
                              "src": "17334:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "17323:22:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "baseExpression": {
                                  "id": 12815,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12766,
                                  "src": "17403:8:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 12817,
                                "indexExpression": {
                                  "id": 12816,
                                  "name": "tokenIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12784,
                                  "src": "17412:10:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "17403:20:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "baseExpression": {
                                  "id": 12818,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12769,
                                  "src": "17437:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 12820,
                                "indexExpression": {
                                  "id": 12819,
                                  "name": "tokenIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12784,
                                  "src": "17455:10:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "17437:29:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 12821,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12782,
                                "src": "17480:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 12822,
                                  "name": "totalSupply",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5787,
                                  "src": "17505:11:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view returns (uint256)"
                                  }
                                },
                                "id": 12823,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "17505:13:38",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 12824,
                                "name": "_swapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6481,
                                "src": "17532:18:38",
                                "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"
                                }
                              ],
                              "expression": {
                                "id": 12813,
                                "name": "WeightedMath",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11652,
                                "src": "17348:12:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                  "typeString": "type(contract WeightedMath)"
                                }
                              },
                              "id": 12814,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_calcTokenOutGivenExactBptIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11524,
                              "src": "17348:41:38",
                              "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": 12825,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "17348:212:38",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "17323:237:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 12827,
                        "nodeType": "ExpressionStatement",
                        "src": "17323:237:38"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 12828,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12782,
                              "src": "17579:11:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12829,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12802,
                              "src": "17592:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 12830,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "17578:25:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 12780,
                        "id": 12831,
                        "nodeType": "Return",
                        "src": "17571:32:38"
                      }
                    ]
                  },
                  "id": 12833,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 12774,
                      "modifierName": {
                        "id": 12773,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "16723:13:38",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "16723:13:38"
                    }
                  ],
                  "name": "_exitExactBPTInForTokenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12772,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12766,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12833,
                        "src": "16603:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12764,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "16603:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12765,
                          "nodeType": "ArrayTypeName",
                          "src": "16603:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12769,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 12833,
                        "src": "16638:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12767,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "16638:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12768,
                          "nodeType": "ArrayTypeName",
                          "src": "16638:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12771,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12833,
                        "src": "16682:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12770,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "16682:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16593:116:38"
                  },
                  "returnParameters": {
                    "id": 12780,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12776,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12833,
                        "src": "16746:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12775,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16746:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12779,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12833,
                        "src": "16755:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12777,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "16755:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12778,
                          "nodeType": "ArrayTypeName",
                          "src": "16755:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16745:27:38"
                  },
                  "scope": 13120,
                  "src": "16558:1052:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 12869,
                    "nodeType": "Block",
                    "src": "17780:746:38",
                    "statements": [
                      {
                        "assignments": [
                          12847
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12847,
                            "mutability": "mutable",
                            "name": "bptAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 12869,
                            "src": "18201:19:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12846,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18201:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12851,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12848,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12838,
                              "src": "18223:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12849,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "exactBptInForTokensOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13354,
                            "src": "18223:31:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256)"
                            }
                          },
                          "id": 12850,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18223:33:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18201:55:38"
                      },
                      {
                        "assignments": [
                          12856
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12856,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 12869,
                            "src": "18367:27:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12854,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "18367:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12855,
                              "nodeType": "ArrayTypeName",
                              "src": "18367:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12864,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12859,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12836,
                              "src": "18440:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12860,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12847,
                              "src": "18450:11:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12861,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "18463:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12862,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "18463:13:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 12857,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "18397:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 12858,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcTokensOutGivenExactBptIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11583,
                            "src": "18397:42:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256[] memory,uint256,uint256) pure returns (uint256[] memory)"
                            }
                          },
                          "id": 12863,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18397:80:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18367:110:38"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 12865,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12847,
                              "src": "18495:11:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12866,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12856,
                              "src": "18508:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 12867,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "18494:25:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 12845,
                        "id": 12868,
                        "nodeType": "Return",
                        "src": "18487:32:38"
                      }
                    ]
                  },
                  "id": 12870,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_exitExactBPTInForTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12839,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12836,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12870,
                        "src": "17653:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12834,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "17653:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12835,
                          "nodeType": "ArrayTypeName",
                          "src": "17653:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12838,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12870,
                        "src": "17680:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12837,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "17680:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "17652:50:38"
                  },
                  "returnParameters": {
                    "id": 12845,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12841,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12870,
                        "src": "17749:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12840,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "17749:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12844,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12870,
                        "src": "17758:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12842,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "17758:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12843,
                          "nodeType": "ArrayTypeName",
                          "src": "17758:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "17748:27:38"
                  },
                  "scope": 13120,
                  "src": "17616:910:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 12938,
                    "nodeType": "Block",
                    "src": "18748:652:38",
                    "statements": [
                      {
                        "assignments": [
                          12892,
                          12894
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12892,
                            "mutability": "mutable",
                            "name": "amountsOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 12938,
                            "src": "18829:27:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12890,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "18829:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12891,
                              "nodeType": "ArrayTypeName",
                              "src": "18829:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 12894,
                            "mutability": "mutable",
                            "name": "maxBPTAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 12938,
                            "src": "18858:22:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12893,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18858:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12898,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 12895,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12878,
                              "src": "18884:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            "id": 12896,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "bptInForExactTokensOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 13382,
                            "src": "18884:31:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$bound_to$_t_bytes_memory_ptr_$",
                              "typeString": "function (bytes memory) pure returns (uint256[] memory,uint256)"
                            }
                          },
                          "id": 12897,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18884:33:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18828:89:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 12902,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12892,
                                "src": "18963:10:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 12903,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "18963:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12904,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "18982:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12905,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "18982:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 12899,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "18927:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 12901,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "18927:35:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 12906,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18927:73:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12907,
                        "nodeType": "ExpressionStatement",
                        "src": "18927:73:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 12909,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12892,
                              "src": "19024:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12910,
                                "name": "_scalingFactors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7638,
                                "src": "19036:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function () view returns (uint256[] memory)"
                                }
                              },
                              "id": 12911,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "19036:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 12908,
                            "name": "_upscaleArray",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7693,
                            "src": "19010:13:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory) view"
                            }
                          },
                          "id": 12912,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19010:44:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12913,
                        "nodeType": "ExpressionStatement",
                        "src": "19010:44:38"
                      },
                      {
                        "assignments": [
                          12915
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12915,
                            "mutability": "mutable",
                            "name": "bptAmountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 12938,
                            "src": "19065:19:38",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 12914,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "19065:7:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12925,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 12918,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12873,
                              "src": "19143:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12919,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12876,
                              "src": "19165:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 12920,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12892,
                              "src": "19196:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12921,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "19220:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12922,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "19220:13:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12923,
                              "name": "_swapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6481,
                              "src": "19247:18:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 12916,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "19087:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 12917,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calcBptInGivenExactTokensOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11440,
                            "src": "19087:42:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256[] memory,uint256[] memory,uint256[] memory,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 12924,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19087:188:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19065:210:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 12929,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 12927,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12915,
                                "src": "19294:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 12928,
                                "name": "maxBPTAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12894,
                                "src": "19309:14:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "19294:29:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 12930,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "19325:6:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 12931,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "BPT_IN_MAX_AMOUNT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 438,
                              "src": "19325:24:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12926,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "19285:8:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 12932,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19285:65:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 12933,
                        "nodeType": "ExpressionStatement",
                        "src": "19285:65:38"
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "id": 12934,
                              "name": "bptAmountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12915,
                              "src": "19369:11:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 12935,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12892,
                              "src": "19382:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "id": 12936,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "19368:25:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(uint256,uint256[] memory)"
                          }
                        },
                        "functionReturnParameters": 12887,
                        "id": 12937,
                        "nodeType": "Return",
                        "src": "19361:32:38"
                      }
                    ]
                  },
                  "id": 12939,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 12881,
                      "modifierName": {
                        "id": 12880,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "18698:13:38",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "18698:13:38"
                    }
                  ],
                  "name": "_exitBPTInForExactTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12879,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12873,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12939,
                        "src": "18578:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12871,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "18578:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12872,
                          "nodeType": "ArrayTypeName",
                          "src": "18578:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12876,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 12939,
                        "src": "18613:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12874,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "18613:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12875,
                          "nodeType": "ArrayTypeName",
                          "src": "18613:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12878,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 12939,
                        "src": "18657:21:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 12877,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "18657:5:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "18568:116:38"
                  },
                  "returnParameters": {
                    "id": 12887,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12883,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12939,
                        "src": "18721:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12882,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "18721:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12886,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12939,
                        "src": "18730:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12884,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "18730:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12885,
                          "nodeType": "ArrayTypeName",
                          "src": "18730:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "18720:27:38"
                  },
                  "scope": 13120,
                  "src": "18532:868:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 12995,
                    "nodeType": "Block",
                    "src": "19694:886:38",
                    "statements": [
                      {
                        "assignments": [
                          12961
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 12961,
                            "mutability": "mutable",
                            "name": "dueProtocolFeeAmounts",
                            "nodeType": "VariableDeclaration",
                            "scope": 12995,
                            "src": "19737:38:38",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12959,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "19737:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12960,
                              "nodeType": "ArrayTypeName",
                              "src": "19737:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 12968,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 12965,
                                "name": "_getTotalTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6892,
                                "src": "19792:15:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 12966,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "19792:17:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 12964,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "19778:13:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 12962,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "19782:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 12963,
                              "nodeType": "ArrayTypeName",
                              "src": "19782:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 12967,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19778:32:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "19737:73:38"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 12971,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 12969,
                            "name": "protocolSwapFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 12951,
                            "src": "19906:25:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 12970,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "19935:1:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "19906:30:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 12975,
                        "nodeType": "IfStatement",
                        "src": "19902:89:38",
                        "trueBody": {
                          "id": 12974,
                          "nodeType": "Block",
                          "src": "19938:53:38",
                          "statements": [
                            {
                              "expression": {
                                "id": 12972,
                                "name": "dueProtocolFeeAmounts",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12961,
                                "src": "19959:21:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "functionReturnParameters": 12956,
                              "id": 12973,
                              "nodeType": "Return",
                              "src": "19952:28:38"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 12991,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 12976,
                              "name": "dueProtocolFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 12961,
                              "src": "20234:21:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 12978,
                            "indexExpression": {
                              "id": 12977,
                              "name": "_maxWeightTokenIndex",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11672,
                              "src": "20256:20:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "20234:43:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "baseExpression": {
                                  "id": 12981,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12942,
                                  "src": "20341:8:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 12983,
                                "indexExpression": {
                                  "id": 12982,
                                  "name": "_maxWeightTokenIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11672,
                                  "src": "20350:20:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "20341:30:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "baseExpression": {
                                  "id": 12984,
                                  "name": "normalizedWeights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 12945,
                                  "src": "20385:17:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 12986,
                                "indexExpression": {
                                  "id": 12985,
                                  "name": "_maxWeightTokenIndex",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11672,
                                  "src": "20403:20:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "20385:39:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 12987,
                                "name": "previousInvariant",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12947,
                                "src": "20438:17:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 12988,
                                "name": "currentInvariant",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12949,
                                "src": "20469:16:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 12989,
                                "name": "protocolSwapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 12951,
                                "src": "20499:25:38",
                                "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"
                                }
                              ],
                              "expression": {
                                "id": 12979,
                                "name": "WeightedMath",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 11652,
                                "src": "20280:12:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                  "typeString": "type(contract WeightedMath)"
                                }
                              },
                              "id": 12980,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "_calcDueTokenProtocolSwapFeeAmount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11651,
                              "src": "20280:47:38",
                              "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": 12990,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "20280:254:38",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "20234:300:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 12992,
                        "nodeType": "ExpressionStatement",
                        "src": "20234:300:38"
                      },
                      {
                        "expression": {
                          "id": 12993,
                          "name": "dueProtocolFeeAmounts",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 12961,
                          "src": "20552:21:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "functionReturnParameters": 12956,
                        "id": 12994,
                        "nodeType": "Return",
                        "src": "20545:28:38"
                      }
                    ]
                  },
                  "id": 12996,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getDueProtocolFeeAmounts",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 12952,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12942,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 12996,
                        "src": "19466:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12940,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "19466:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12941,
                          "nodeType": "ArrayTypeName",
                          "src": "19466:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12945,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 12996,
                        "src": "19501:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12943,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "19501:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12944,
                          "nodeType": "ArrayTypeName",
                          "src": "19501:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12947,
                        "mutability": "mutable",
                        "name": "previousInvariant",
                        "nodeType": "VariableDeclaration",
                        "scope": 12996,
                        "src": "19545:25:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12946,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19545:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12949,
                        "mutability": "mutable",
                        "name": "currentInvariant",
                        "nodeType": "VariableDeclaration",
                        "scope": 12996,
                        "src": "19580:24:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12948,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19580:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 12951,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 12996,
                        "src": "19614:33:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 12950,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "19614:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19456:197:38"
                  },
                  "returnParameters": {
                    "id": 12956,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 12955,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 12996,
                        "src": "19676:16:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12953,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "19676:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12954,
                          "nodeType": "ArrayTypeName",
                          "src": "19676:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19675:18:38"
                  },
                  "scope": 13120,
                  "src": "19422:1158:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 13024,
                    "nodeType": "Block",
                    "src": "20940:146:38",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 13012,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13000,
                              "src": "20965:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 13013,
                              "name": "amountsIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13003,
                              "src": "20975:9:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "expression": {
                                "id": 13014,
                                "name": "FixedPoint",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1815,
                                "src": "20986:10:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                  "typeString": "type(library FixedPoint)"
                                }
                              },
                              "id": 13015,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "add",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1512,
                              "src": "20986:14:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            ],
                            "id": 13011,
                            "name": "_mutateAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13100,
                            "src": "20950:14:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory,function (uint256,uint256) pure returns (uint256)) view"
                            }
                          },
                          "id": 13016,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "20950:51:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13017,
                        "nodeType": "ExpressionStatement",
                        "src": "20950:51:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 13020,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13006,
                              "src": "21051:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 13021,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13000,
                              "src": "21070:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "expression": {
                              "id": 13018,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "21018:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 13019,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calculateInvariant",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10853,
                            "src": "21018:32:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256[] memory,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 13022,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "21018:61:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 13010,
                        "id": 13023,
                        "nodeType": "Return",
                        "src": "21011:68:38"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 12997,
                    "nodeType": "StructuredDocumentation",
                    "src": "20586:168:38",
                    "text": " @dev Returns the value of the invariant given `balances`, assuming they are increased by `amountsIn`. All\n amounts are expected to be upscaled."
                  },
                  "id": 13025,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_invariantAfterJoin",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13007,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13000,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 13025,
                        "src": "20797:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 12998,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "20797:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 12999,
                          "nodeType": "ArrayTypeName",
                          "src": "20797:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13003,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 13025,
                        "src": "20832:26:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13001,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "20832:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13002,
                          "nodeType": "ArrayTypeName",
                          "src": "20832:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13006,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 13025,
                        "src": "20868:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13004,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "20868:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13005,
                          "nodeType": "ArrayTypeName",
                          "src": "20868:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "20787:121:38"
                  },
                  "returnParameters": {
                    "id": 13010,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13009,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13025,
                        "src": "20931:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13008,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "20931:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "20930:9:38"
                  },
                  "scope": 13120,
                  "src": "20759:327:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 13052,
                    "nodeType": "Block",
                    "src": "21274:147:38",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 13040,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13028,
                              "src": "21299:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 13041,
                              "name": "amountsOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13031,
                              "src": "21309:10:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "expression": {
                                "id": 13042,
                                "name": "FixedPoint",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1815,
                                "src": "21321:10:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                  "typeString": "type(library FixedPoint)"
                                }
                              },
                              "id": 13043,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sub",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1538,
                              "src": "21321:14:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            ],
                            "id": 13039,
                            "name": "_mutateAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13100,
                            "src": "21284:14:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_$returns$__$",
                              "typeString": "function (uint256[] memory,uint256[] memory,function (uint256,uint256) pure returns (uint256)) view"
                            }
                          },
                          "id": 13044,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "21284:52:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13045,
                        "nodeType": "ExpressionStatement",
                        "src": "21284:52:38"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 13048,
                              "name": "normalizedWeights",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13034,
                              "src": "21386:17:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 13049,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13028,
                              "src": "21405:8:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "expression": {
                              "id": 13046,
                              "name": "WeightedMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11652,
                              "src": "21353:12:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_WeightedMath_$11652_$",
                                "typeString": "type(contract WeightedMath)"
                              }
                            },
                            "id": 13047,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "_calculateInvariant",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 10853,
                            "src": "21353:32:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$",
                              "typeString": "function (uint256[] memory,uint256[] memory) pure returns (uint256)"
                            }
                          },
                          "id": 13050,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "21353:61:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 13038,
                        "id": 13051,
                        "nodeType": "Return",
                        "src": "21346:68:38"
                      }
                    ]
                  },
                  "id": 13053,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_invariantAfterExit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13035,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13028,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 13053,
                        "src": "21130:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13026,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "21130:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13027,
                          "nodeType": "ArrayTypeName",
                          "src": "21130:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13031,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 13053,
                        "src": "21165:27:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13029,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "21165:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13030,
                          "nodeType": "ArrayTypeName",
                          "src": "21165:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13034,
                        "mutability": "mutable",
                        "name": "normalizedWeights",
                        "nodeType": "VariableDeclaration",
                        "scope": 13053,
                        "src": "21202:34:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13032,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "21202:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13033,
                          "nodeType": "ArrayTypeName",
                          "src": "21202:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "21120:122:38"
                  },
                  "returnParameters": {
                    "id": 13038,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13037,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13053,
                        "src": "21265:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13036,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "21265:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "21264:9:38"
                  },
                  "scope": 13120,
                  "src": "21092:329:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 13099,
                    "nodeType": "Block",
                    "src": "21773:138:38",
                    "statements": [
                      {
                        "body": {
                          "id": 13097,
                          "nodeType": "Block",
                          "src": "21831:74:38",
                          "statements": [
                            {
                              "expression": {
                                "id": 13095,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 13084,
                                    "name": "toMutate",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13057,
                                    "src": "21845:8:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 13086,
                                  "indexExpression": {
                                    "id": 13085,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13074,
                                    "src": "21854:1:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "21845:11:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 13088,
                                        "name": "toMutate",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13057,
                                        "src": "21868:8:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 13090,
                                      "indexExpression": {
                                        "id": 13089,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13074,
                                        "src": "21877:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "21868:11:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "baseExpression": {
                                        "id": 13091,
                                        "name": "arguments",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13060,
                                        "src": "21881:9:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 13093,
                                      "indexExpression": {
                                        "id": 13092,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13074,
                                        "src": "21891:1:38",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "21881:12:38",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 13087,
                                    "name": "mutation",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13070,
                                    "src": "21859:8:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 13094,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "21859:35:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "21845:49:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 13096,
                              "nodeType": "ExpressionStatement",
                              "src": "21845:49:38"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 13080,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13077,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13074,
                            "src": "21803:1:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 13078,
                              "name": "_getTotalTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6892,
                              "src": "21807:15:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 13079,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "21807:17:38",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "21803:21:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 13098,
                        "initializationExpression": {
                          "assignments": [
                            13074
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 13074,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 13098,
                              "src": "21788:9:38",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 13073,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "21788:7:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 13076,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 13075,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "21800:1:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "21788:13:38"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 13082,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "21826:3:38",
                            "subExpression": {
                              "id": 13081,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13074,
                              "src": "21828:1:38",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13083,
                          "nodeType": "ExpressionStatement",
                          "src": "21826:3:38"
                        },
                        "nodeType": "ForStatement",
                        "src": "21783:122:38"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13054,
                    "nodeType": "StructuredDocumentation",
                    "src": "21427:159:38",
                    "text": " @dev Mutates `amounts` by applying `mutation` with each entry in `arguments`.\n Equivalent to `amounts = amounts.map(mutation)`."
                  },
                  "id": 13100,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_mutateAmounts",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13071,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13057,
                        "mutability": "mutable",
                        "name": "toMutate",
                        "nodeType": "VariableDeclaration",
                        "scope": 13100,
                        "src": "21624:25:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13055,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "21624:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13056,
                          "nodeType": "ArrayTypeName",
                          "src": "21624:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13060,
                        "mutability": "mutable",
                        "name": "arguments",
                        "nodeType": "VariableDeclaration",
                        "scope": 13100,
                        "src": "21659:26:38",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13058,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "21659:7:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13059,
                          "nodeType": "ArrayTypeName",
                          "src": "21659:9:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13070,
                        "mutability": "mutable",
                        "name": "mutation",
                        "nodeType": "VariableDeclaration",
                        "scope": 13100,
                        "src": "21695:58:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        },
                        "typeName": {
                          "id": 13069,
                          "nodeType": "FunctionTypeName",
                          "parameterTypes": {
                            "id": 13065,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 13062,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 13069,
                                "src": "21704:7:38",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 13061,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "21704:7:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 13064,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 13069,
                                "src": "21713:7:38",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 13063,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "21713:7:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "21703:18:38"
                          },
                          "returnParameterTypes": {
                            "id": 13068,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 13067,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 13069,
                                "src": "21736:7:38",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 13066,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "21736:7:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "21735:9:38"
                          },
                          "src": "21695:58:38",
                          "stateMutability": "pure",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          },
                          "visibility": "internal"
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "21614:145:38"
                  },
                  "returnParameters": {
                    "id": 13072,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "21773:0:38"
                  },
                  "scope": 13120,
                  "src": "21591:320:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 13118,
                    "nodeType": "Block",
                    "src": "22148:178:38",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 13114,
                                "name": "totalSupply",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5787,
                                "src": "22305:11:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view returns (uint256)"
                                }
                              },
                              "id": 13115,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "22305:13:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 13108,
                                    "name": "getInvariant",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 12167,
                                    "src": "22262:12:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                      "typeString": "function () view returns (uint256)"
                                    }
                                  },
                                  "id": 13109,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "22262:14:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 13110,
                                    "name": "_getTotalTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6892,
                                    "src": "22278:15:38",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                      "typeString": "function () view returns (uint256)"
                                    }
                                  },
                                  "id": 13111,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "22278:17:38",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 13106,
                                  "name": "Math",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3350,
                                  "src": "22253:4:38",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                    "typeString": "type(library Math)"
                                  }
                                },
                                "id": 13107,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "mul",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3292,
                                "src": "22253:8:38",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 13112,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "22253:43:38",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 13113,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "divDown",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1666,
                            "src": "22253:51:38",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 13116,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "22253:66:38",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 13105,
                        "id": 13117,
                        "nodeType": "Return",
                        "src": "22246:73:38"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13101,
                    "nodeType": "StructuredDocumentation",
                    "src": "21917:177:38",
                    "text": " @dev This function returns the appreciation of one BPT relative to the\n underlying tokens. This starts at 1 when the pool is created and grows over time"
                  },
                  "functionSelector": "679aefce",
                  "id": 13119,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getRate",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13102,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "22115:2:38"
                  },
                  "returnParameters": {
                    "id": 13105,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13104,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13119,
                        "src": "22139:7:38",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13103,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "22139:7:38",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "22138:9:38"
                  },
                  "scope": 13120,
                  "src": "22099:227:38",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                }
              ],
              "scope": 13121,
              "src": "1242:21086:38"
            }
          ],
          "src": "688:21641:38"
        },
        "id": 38
      },
      "src.sol/amm/pools/weighted/WeightedPoolFactory.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/weighted/WeightedPoolFactory.sol",
          "exportedSymbols": {
            "WeightedPoolFactory": [
              13194
            ]
          },
          "id": 13195,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 13122,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:39"
            },
            {
              "id": 13123,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:39"
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "../../vault/interfaces/IVault.sol",
              "id": 13124,
              "nodeType": "ImportDirective",
              "scope": 13195,
              "sourceUnit": 21267,
              "src": "747:43:39",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/factories/BasePoolFactory.sol",
              "file": "../factories/BasePoolFactory.sol",
              "id": 13125,
              "nodeType": "ImportDirective",
              "scope": 13195,
              "sourceUnit": 8097,
              "src": "792:42:39",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/factories/FactoryWidePauseWindow.sol",
              "file": "../factories/FactoryWidePauseWindow.sol",
              "id": 13126,
              "nodeType": "ImportDirective",
              "scope": 13195,
              "sourceUnit": 8159,
              "src": "835:49:39",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/weighted/WeightedPool.sol",
              "file": "./WeightedPool.sol",
              "id": 13127,
              "nodeType": "ImportDirective",
              "scope": 13195,
              "sourceUnit": 13121,
              "src": "886:28:39",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 13128,
                    "name": "BasePoolFactory",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 8096,
                    "src": "948:15:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BasePoolFactory_$8096",
                      "typeString": "contract BasePoolFactory"
                    }
                  },
                  "id": 13129,
                  "nodeType": "InheritanceSpecifier",
                  "src": "948:15:39"
                },
                {
                  "baseName": {
                    "id": 13130,
                    "name": "FactoryWidePauseWindow",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 8158,
                    "src": "965:22:39",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FactoryWidePauseWindow_$8158",
                      "typeString": "contract FactoryWidePauseWindow"
                    }
                  },
                  "id": 13131,
                  "nodeType": "InheritanceSpecifier",
                  "src": "965:22:39"
                }
              ],
              "contractDependencies": [
                8096,
                8158,
                13120
              ],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 13194,
              "linearizedBaseContracts": [
                13194,
                8158,
                8096
              ],
              "name": "WeightedPoolFactory",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 13139,
                    "nodeType": "Block",
                    "src": "1043:64:39",
                    "statements": []
                  },
                  "id": 13140,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 13136,
                          "name": "vault",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 13133,
                          "src": "1036:5:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        }
                      ],
                      "id": 13137,
                      "modifierName": {
                        "id": 13135,
                        "name": "BasePoolFactory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8096,
                        "src": "1020:15:39",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_BasePoolFactory_$8096_$",
                          "typeString": "type(contract BasePoolFactory)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1020:22:39"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13134,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13133,
                        "mutability": "mutable",
                        "name": "vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 13140,
                        "src": "1006:12:39",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 13132,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "1006:6:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1005:14:39"
                  },
                  "returnParameters": {
                    "id": 13138,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1043:0:39"
                  },
                  "scope": 13194,
                  "src": "994:113:39",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 13192,
                    "nodeType": "Block",
                    "src": "1402:491:39",
                    "statements": [
                      {
                        "assignments": [
                          13161,
                          13163
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 13161,
                            "mutability": "mutable",
                            "name": "pauseWindowDuration",
                            "nodeType": "VariableDeclaration",
                            "scope": 13192,
                            "src": "1413:27:39",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 13160,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1413:7:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 13163,
                            "mutability": "mutable",
                            "name": "bufferPeriodDuration",
                            "nodeType": "VariableDeclaration",
                            "scope": 13192,
                            "src": "1442:28:39",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 13162,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1442:7:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 13166,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 13164,
                            "name": "getPauseConfiguration",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8157,
                            "src": "1474:21:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$",
                              "typeString": "function () view returns (uint256,uint256)"
                            }
                          },
                          "id": 13165,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1474:23:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                            "typeString": "tuple(uint256,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1412:85:39"
                      },
                      {
                        "assignments": [
                          13168
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 13168,
                            "mutability": "mutable",
                            "name": "pool",
                            "nodeType": "VariableDeclaration",
                            "scope": 13192,
                            "src": "1508:12:39",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 13167,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1508:7:39",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 13185,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 13173,
                                    "name": "getVault",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 8065,
                                    "src": "1578:8:39",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IVault_$21266_$",
                                      "typeString": "function () view returns (contract IVault)"
                                    }
                                  },
                                  "id": 13174,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "1578:10:39",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IVault_$21266",
                                    "typeString": "contract IVault"
                                  }
                                },
                                {
                                  "id": 13175,
                                  "name": "name",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13143,
                                  "src": "1606:4:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_string_memory_ptr",
                                    "typeString": "string memory"
                                  }
                                },
                                {
                                  "id": 13176,
                                  "name": "symbol",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13145,
                                  "src": "1628:6:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_string_memory_ptr",
                                    "typeString": "string memory"
                                  }
                                },
                                {
                                  "id": 13177,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13148,
                                  "src": "1652:6:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                {
                                  "id": 13178,
                                  "name": "weights",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13151,
                                  "src": "1676:7:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                {
                                  "id": 13179,
                                  "name": "swapFeePercentage",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13153,
                                  "src": "1701:17:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 13180,
                                  "name": "pauseWindowDuration",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13161,
                                  "src": "1736:19:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 13181,
                                  "name": "bufferPeriodDuration",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13163,
                                  "src": "1773:20:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "id": 13182,
                                  "name": "owner",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13155,
                                  "src": "1811:5:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IVault_$21266",
                                    "typeString": "contract IVault"
                                  },
                                  {
                                    "typeIdentifier": "t_string_memory_ptr",
                                    "typeString": "string memory"
                                  },
                                  {
                                    "typeIdentifier": "t_string_memory_ptr",
                                    "typeString": "string memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 13172,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "NewExpression",
                                "src": "1544:16:39",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_IVault_$21266_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$returns$_t_contract$_WeightedPool_$13120_$",
                                  "typeString": "function (contract IVault,string memory,string memory,contract IERC20[] memory,uint256[] memory,uint256,uint256,uint256,address) returns (contract WeightedPool)"
                                },
                                "typeName": {
                                  "id": 13171,
                                  "name": "WeightedPool",
                                  "nodeType": "UserDefinedTypeName",
                                  "referencedDeclaration": 13120,
                                  "src": "1548:12:39",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_WeightedPool_$13120",
                                    "typeString": "contract WeightedPool"
                                  }
                                }
                              },
                              "id": 13183,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1544:286:39",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_WeightedPool_$13120",
                                "typeString": "contract WeightedPool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_WeightedPool_$13120",
                                "typeString": "contract WeightedPool"
                              }
                            ],
                            "id": 13170,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1523:7:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 13169,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1523:7:39",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 13184,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1523:317:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1508:332:39"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 13187,
                              "name": "pool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13168,
                              "src": "1860:4:39",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 13186,
                            "name": "_register",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8095,
                            "src": "1850:9:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                              "typeString": "function (address)"
                            }
                          },
                          "id": 13188,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1850:15:39",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13189,
                        "nodeType": "ExpressionStatement",
                        "src": "1850:15:39"
                      },
                      {
                        "expression": {
                          "id": 13190,
                          "name": "pool",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 13168,
                          "src": "1882:4:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "functionReturnParameters": 13159,
                        "id": 13191,
                        "nodeType": "Return",
                        "src": "1875:11:39"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13141,
                    "nodeType": "StructuredDocumentation",
                    "src": "1113:53:39",
                    "text": " @dev Deploys a new `WeightedPool`."
                  },
                  "functionSelector": "fbce0393",
                  "id": 13193,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "create",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13156,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13143,
                        "mutability": "mutable",
                        "name": "name",
                        "nodeType": "VariableDeclaration",
                        "scope": 13193,
                        "src": "1196:18:39",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 13142,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1196:6:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13145,
                        "mutability": "mutable",
                        "name": "symbol",
                        "nodeType": "VariableDeclaration",
                        "scope": 13193,
                        "src": "1224:20:39",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory_ptr",
                          "typeString": "string"
                        },
                        "typeName": {
                          "id": 13144,
                          "name": "string",
                          "nodeType": "ElementaryTypeName",
                          "src": "1224:6:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_string_storage_ptr",
                            "typeString": "string"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13148,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 13193,
                        "src": "1254:22:39",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13146,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1254:6:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 13147,
                          "nodeType": "ArrayTypeName",
                          "src": "1254:8:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13151,
                        "mutability": "mutable",
                        "name": "weights",
                        "nodeType": "VariableDeclaration",
                        "scope": 13193,
                        "src": "1286:24:39",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13149,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1286:7:39",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13150,
                          "nodeType": "ArrayTypeName",
                          "src": "1286:9:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13153,
                        "mutability": "mutable",
                        "name": "swapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 13193,
                        "src": "1320:25:39",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13152,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1320:7:39",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13155,
                        "mutability": "mutable",
                        "name": "owner",
                        "nodeType": "VariableDeclaration",
                        "scope": 13193,
                        "src": "1355:13:39",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 13154,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1355:7:39",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1186:188:39"
                  },
                  "returnParameters": {
                    "id": 13159,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13158,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13193,
                        "src": "1393:7:39",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 13157,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1393:7:39",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1392:9:39"
                  },
                  "scope": 13194,
                  "src": "1171:722:39",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 13195,
              "src": "916:979:39"
            }
          ],
          "src": "688:1208:39"
        },
        "id": 39
      },
      "src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/pools/weighted/WeightedPoolUserDataHelpers.sol",
          "exportedSymbols": {
            "WeightedPoolUserDataHelpers": [
              13383
            ]
          },
          "id": 13384,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 13196,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:40"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 13197,
              "nodeType": "ImportDirective",
              "scope": 13384,
              "sourceUnit": 5096,
              "src": "713:43:40",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/pools/weighted/WeightedPool.sol",
              "file": "./WeightedPool.sol",
              "id": 13198,
              "nodeType": "ImportDirective",
              "scope": 13384,
              "sourceUnit": 13121,
              "src": "758:28:40",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "fullyImplemented": true,
              "id": 13383,
              "linearizedBaseContracts": [
                13383
              ],
              "name": "WeightedPoolUserDataHelpers",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 13213,
                    "nodeType": "Block",
                    "src": "913:65:40",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 13207,
                              "name": "self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13200,
                              "src": "941:4:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            {
                              "components": [
                                {
                                  "expression": {
                                    "id": 13208,
                                    "name": "WeightedPool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13120,
                                    "src": "948:12:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                      "typeString": "type(contract WeightedPool)"
                                    }
                                  },
                                  "id": 13209,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "JoinKind",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 11694,
                                  "src": "948:21:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                    "typeString": "type(enum WeightedPool.JoinKind)"
                                  }
                                }
                              ],
                              "id": 13210,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "947:23:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                "typeString": "type(enum WeightedPool.JoinKind)"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              },
                              {
                                "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                "typeString": "type(enum WeightedPool.JoinKind)"
                              }
                            ],
                            "expression": {
                              "id": 13205,
                              "name": "abi",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -1,
                              "src": "930:3:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_abi",
                                "typeString": "abi"
                              }
                            },
                            "id": 13206,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "decode",
                            "nodeType": "MemberAccess",
                            "src": "930:10:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                              "typeString": "function () pure"
                            }
                          },
                          "id": 13211,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "930:41:40",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_JoinKind_$11694",
                            "typeString": "enum WeightedPool.JoinKind"
                          }
                        },
                        "functionReturnParameters": 13204,
                        "id": 13212,
                        "nodeType": "Return",
                        "src": "923:48:40"
                      }
                    ]
                  },
                  "id": 13214,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "joinKind",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13201,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13200,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 13214,
                        "src": "848:17:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 13199,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "848:5:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "847:19:40"
                  },
                  "returnParameters": {
                    "id": 13204,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13203,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13214,
                        "src": "890:21:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_JoinKind_$11694",
                          "typeString": "enum WeightedPool.JoinKind"
                        },
                        "typeName": {
                          "id": 13202,
                          "name": "WeightedPool.JoinKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 11694,
                          "src": "890:21:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_JoinKind_$11694",
                            "typeString": "enum WeightedPool.JoinKind"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "889:23:40"
                  },
                  "scope": 13383,
                  "src": "830:148:40",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 13229,
                    "nodeType": "Block",
                    "src": "1067:65:40",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 13223,
                              "name": "self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13216,
                              "src": "1095:4:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            },
                            {
                              "components": [
                                {
                                  "expression": {
                                    "id": 13224,
                                    "name": "WeightedPool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13120,
                                    "src": "1102:12:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                      "typeString": "type(contract WeightedPool)"
                                    }
                                  },
                                  "id": 13225,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "ExitKind",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 11698,
                                  "src": "1102:21:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_ExitKind_$11698_$",
                                    "typeString": "type(enum WeightedPool.ExitKind)"
                                  }
                                }
                              ],
                              "id": 13226,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1101:23:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_ExitKind_$11698_$",
                                "typeString": "type(enum WeightedPool.ExitKind)"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              },
                              {
                                "typeIdentifier": "t_type$_t_enum$_ExitKind_$11698_$",
                                "typeString": "type(enum WeightedPool.ExitKind)"
                              }
                            ],
                            "expression": {
                              "id": 13221,
                              "name": "abi",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -1,
                              "src": "1084:3:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_abi",
                                "typeString": "abi"
                              }
                            },
                            "id": 13222,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "decode",
                            "nodeType": "MemberAccess",
                            "src": "1084:10:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                              "typeString": "function () pure"
                            }
                          },
                          "id": 13227,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1084:41:40",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_ExitKind_$11698",
                            "typeString": "enum WeightedPool.ExitKind"
                          }
                        },
                        "functionReturnParameters": 13220,
                        "id": 13228,
                        "nodeType": "Return",
                        "src": "1077:48:40"
                      }
                    ]
                  },
                  "id": 13230,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exitKind",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13217,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13216,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 13230,
                        "src": "1002:17:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 13215,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1002:5:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1001:19:40"
                  },
                  "returnParameters": {
                    "id": 13220,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13219,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13230,
                        "src": "1044:21:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_ExitKind_$11698",
                          "typeString": "enum WeightedPool.ExitKind"
                        },
                        "typeName": {
                          "id": 13218,
                          "name": "WeightedPool.ExitKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 11698,
                          "src": "1044:21:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_ExitKind_$11698",
                            "typeString": "enum WeightedPool.ExitKind"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1043:23:40"
                  },
                  "scope": 13383,
                  "src": "984:148:40",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 13252,
                    "nodeType": "Block",
                    "src": "1248:85:40",
                    "statements": [
                      {
                        "expression": {
                          "id": 13250,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 13238,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13236,
                                "src": "1261:9:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "id": 13239,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "1258:13:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(,uint256[] memory)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13242,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13232,
                                "src": "1285:4:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 13243,
                                      "name": "WeightedPool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13120,
                                      "src": "1292:12:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                        "typeString": "type(contract WeightedPool)"
                                      }
                                    },
                                    "id": 13244,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "JoinKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11694,
                                    "src": "1292:21:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                      "typeString": "type(enum WeightedPool.JoinKind)"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 13246,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "1315:7:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": {
                                        "id": 13245,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1315:7:40",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 13247,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "1315:9:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "type(uint256[] memory)"
                                    }
                                  }
                                ],
                                "id": 13248,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1291:34:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$11694_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.JoinKind),type(uint256[] memory))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$11694_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.JoinKind),type(uint256[] memory))"
                                }
                              ],
                              "expression": {
                                "id": 13240,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "1274:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 13241,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "1274:10:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 13249,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1274:52:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_JoinKind_$11694_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(enum WeightedPool.JoinKind,uint256[] memory)"
                            }
                          },
                          "src": "1258:68:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13251,
                        "nodeType": "ExpressionStatement",
                        "src": "1258:68:40"
                      }
                    ]
                  },
                  "id": 13253,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "initialAmountsIn",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13233,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13232,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 13253,
                        "src": "1178:17:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 13231,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1178:5:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1177:19:40"
                  },
                  "returnParameters": {
                    "id": 13237,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13236,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 13253,
                        "src": "1220:26:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13234,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1220:7:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13235,
                          "nodeType": "ArrayTypeName",
                          "src": "1220:9:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1219:28:40"
                  },
                  "scope": 13383,
                  "src": "1152:181:40",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 13280,
                    "nodeType": "Block",
                    "src": "1494:111:40",
                    "statements": [
                      {
                        "expression": {
                          "id": 13278,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 13263,
                                "name": "amountsIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13259,
                                "src": "1507:9:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 13264,
                                "name": "minBPTAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13261,
                                "src": "1518:15:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 13265,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "1504:30:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(,uint256[] memory,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13268,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13255,
                                "src": "1548:4:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 13269,
                                      "name": "WeightedPool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13120,
                                      "src": "1555:12:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                        "typeString": "type(contract WeightedPool)"
                                      }
                                    },
                                    "id": 13270,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "JoinKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11694,
                                    "src": "1555:21:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                      "typeString": "type(enum WeightedPool.JoinKind)"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 13272,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "1578:7:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": {
                                        "id": 13271,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1578:7:40",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 13273,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "1578:9:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "type(uint256[] memory)"
                                    }
                                  },
                                  {
                                    "id": 13275,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1589:7:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 13274,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "1589:7:40",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 13276,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1554:43:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$11694_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.JoinKind),type(uint256[] memory),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$11694_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.JoinKind),type(uint256[] memory),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 13266,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "1537:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 13267,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "1537:10:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 13277,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1537:61:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_JoinKind_$11694_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(enum WeightedPool.JoinKind,uint256[] memory,uint256)"
                            }
                          },
                          "src": "1504:94:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13279,
                        "nodeType": "ExpressionStatement",
                        "src": "1504:94:40"
                      }
                    ]
                  },
                  "id": 13281,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exactTokensInForBptOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13256,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13255,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 13281,
                        "src": "1371:17:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 13254,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1371:5:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1370:19:40"
                  },
                  "returnParameters": {
                    "id": 13262,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13259,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 13281,
                        "src": "1437:26:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13257,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1437:7:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13258,
                          "nodeType": "ArrayTypeName",
                          "src": "1437:9:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13261,
                        "mutability": "mutable",
                        "name": "minBPTAmountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 13281,
                        "src": "1465:23:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13260,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1465:7:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1436:53:40"
                  },
                  "scope": 13383,
                  "src": "1339:266:40",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 13306,
                    "nodeType": "Block",
                    "src": "1726:107:40",
                    "statements": [
                      {
                        "expression": {
                          "id": 13304,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 13290,
                                "name": "bptAmountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13286,
                                "src": "1739:12:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 13291,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13288,
                                "src": "1753:10:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 13292,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "1736:28:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(,uint256,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13295,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13283,
                                "src": "1778:4:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 13296,
                                      "name": "WeightedPool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13120,
                                      "src": "1785:12:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                        "typeString": "type(contract WeightedPool)"
                                      }
                                    },
                                    "id": 13297,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "JoinKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11694,
                                    "src": "1785:21:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_JoinKind_$11694_$",
                                      "typeString": "type(enum WeightedPool.JoinKind)"
                                    }
                                  },
                                  {
                                    "id": 13299,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1808:7:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 13298,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "1808:7:40",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  {
                                    "id": 13301,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1817:7:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 13300,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "1817:7:40",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 13302,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "1784:41:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$11694_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.JoinKind),type(uint256),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_JoinKind_$11694_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.JoinKind),type(uint256),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 13293,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "1767:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 13294,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "1767:10:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 13303,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1767:59:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_JoinKind_$11694_$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(enum WeightedPool.JoinKind,uint256,uint256)"
                            }
                          },
                          "src": "1736:90:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13305,
                        "nodeType": "ExpressionStatement",
                        "src": "1736:90:40"
                      }
                    ]
                  },
                  "id": 13307,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "tokenInForExactBptOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13284,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13283,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 13307,
                        "src": "1642:17:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 13282,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1642:5:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1641:19:40"
                  },
                  "returnParameters": {
                    "id": 13289,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13286,
                        "mutability": "mutable",
                        "name": "bptAmountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 13307,
                        "src": "1684:20:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13285,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1684:7:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13288,
                        "mutability": "mutable",
                        "name": "tokenIndex",
                        "nodeType": "VariableDeclaration",
                        "scope": 13307,
                        "src": "1706:18:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13287,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1706:7:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1683:42:40"
                  },
                  "scope": 13383,
                  "src": "1611:222:40",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 13332,
                    "nodeType": "Block",
                    "src": "1967:106:40",
                    "statements": [
                      {
                        "expression": {
                          "id": 13330,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 13316,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13312,
                                "src": "1980:11:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 13317,
                                "name": "tokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13314,
                                "src": "1993:10:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 13318,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "1977:27:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(,uint256,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13321,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13309,
                                "src": "2018:4:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 13322,
                                      "name": "WeightedPool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13120,
                                      "src": "2025:12:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                        "typeString": "type(contract WeightedPool)"
                                      }
                                    },
                                    "id": 13323,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "ExitKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11698,
                                    "src": "2025:21:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_ExitKind_$11698_$",
                                      "typeString": "type(enum WeightedPool.ExitKind)"
                                    }
                                  },
                                  {
                                    "id": 13325,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2048:7:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 13324,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2048:7:40",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  {
                                    "id": 13327,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2057:7:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 13326,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2057:7:40",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 13328,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "2024:41:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$11698_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.ExitKind),type(uint256),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$11698_$_$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.ExitKind),type(uint256),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 13319,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "2007:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 13320,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "2007:10:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 13329,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2007:59:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_ExitKind_$11698_$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(enum WeightedPool.ExitKind,uint256,uint256)"
                            }
                          },
                          "src": "1977:89:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13331,
                        "nodeType": "ExpressionStatement",
                        "src": "1977:89:40"
                      }
                    ]
                  },
                  "id": 13333,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exactBptInForTokenOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13310,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13309,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 13333,
                        "src": "1884:17:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 13308,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1884:5:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1883:19:40"
                  },
                  "returnParameters": {
                    "id": 13315,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13312,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 13333,
                        "src": "1926:19:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13311,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1926:7:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13314,
                        "mutability": "mutable",
                        "name": "tokenIndex",
                        "nodeType": "VariableDeclaration",
                        "scope": 13333,
                        "src": "1947:18:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13313,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1947:7:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1925:41:40"
                  },
                  "scope": 13383,
                  "src": "1853:220:40",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 13353,
                    "nodeType": "Block",
                    "src": "2174:85:40",
                    "statements": [
                      {
                        "expression": {
                          "id": 13351,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 13340,
                                "name": "bptAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13338,
                                "src": "2187:11:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 13341,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "2184:15:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_uint256_$",
                              "typeString": "tuple(,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13344,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13335,
                                "src": "2213:4:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 13345,
                                      "name": "WeightedPool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13120,
                                      "src": "2220:12:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                        "typeString": "type(contract WeightedPool)"
                                      }
                                    },
                                    "id": 13346,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "ExitKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11698,
                                    "src": "2220:21:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_ExitKind_$11698_$",
                                      "typeString": "type(enum WeightedPool.ExitKind)"
                                    }
                                  },
                                  {
                                    "id": 13348,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2243:7:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 13347,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2243:7:40",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 13349,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "2219:32:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$11698_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.ExitKind),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$11698_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.ExitKind),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 13342,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "2202:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 13343,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "2202:10:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 13350,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2202:50:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_ExitKind_$11698_$_t_uint256_$",
                              "typeString": "tuple(enum WeightedPool.ExitKind,uint256)"
                            }
                          },
                          "src": "2184:68:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13352,
                        "nodeType": "ExpressionStatement",
                        "src": "2184:68:40"
                      }
                    ]
                  },
                  "id": 13354,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exactBptInForTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13336,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13335,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 13354,
                        "src": "2111:17:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 13334,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "2111:5:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2110:19:40"
                  },
                  "returnParameters": {
                    "id": 13339,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13338,
                        "mutability": "mutable",
                        "name": "bptAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 13354,
                        "src": "2153:19:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13337,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2153:7:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2152:21:40"
                  },
                  "scope": 13383,
                  "src": "2079:180:40",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 13381,
                    "nodeType": "Block",
                    "src": "2420:111:40",
                    "statements": [
                      {
                        "expression": {
                          "id": 13379,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              null,
                              {
                                "id": 13364,
                                "name": "amountsOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13360,
                                "src": "2433:10:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 13365,
                                "name": "maxBPTAmountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13362,
                                "src": "2445:14:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 13366,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "2430:30:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$__$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(,uint256[] memory,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13369,
                                "name": "self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13356,
                                "src": "2474:4:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              {
                                "components": [
                                  {
                                    "expression": {
                                      "id": 13370,
                                      "name": "WeightedPool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13120,
                                      "src": "2481:12:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_WeightedPool_$13120_$",
                                        "typeString": "type(contract WeightedPool)"
                                      }
                                    },
                                    "id": 13371,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "ExitKind",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11698,
                                    "src": "2481:21:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_ExitKind_$11698_$",
                                      "typeString": "type(enum WeightedPool.ExitKind)"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 13373,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "2504:7:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": {
                                        "id": 13372,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "2504:7:40",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 13374,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2504:9:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                      "typeString": "type(uint256[] memory)"
                                    }
                                  },
                                  {
                                    "id": 13376,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2515:7:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 13375,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2515:7:40",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "id": 13377,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "2480:43:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$11698_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.ExitKind),type(uint256[] memory),type(uint256))"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                },
                                {
                                  "typeIdentifier": "t_tuple$_t_type$_t_enum$_ExitKind_$11698_$_$_t_type$_t_array$_t_uint256_$dyn_memory_ptr_$_$_t_type$_t_uint256_$_$",
                                  "typeString": "tuple(type(enum WeightedPool.ExitKind),type(uint256[] memory),type(uint256))"
                                }
                              ],
                              "expression": {
                                "id": 13367,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -1,
                                "src": "2463:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 13368,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "decode",
                              "nodeType": "MemberAccess",
                              "src": "2463:10:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 13378,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2463:61:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_enum$_ExitKind_$11698_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(enum WeightedPool.ExitKind,uint256[] memory,uint256)"
                            }
                          },
                          "src": "2430:94:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 13380,
                        "nodeType": "ExpressionStatement",
                        "src": "2430:94:40"
                      }
                    ]
                  },
                  "id": 13382,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "bptInForExactTokensOut",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13357,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13356,
                        "mutability": "mutable",
                        "name": "self",
                        "nodeType": "VariableDeclaration",
                        "scope": 13382,
                        "src": "2297:17:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 13355,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "2297:5:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2296:19:40"
                  },
                  "returnParameters": {
                    "id": 13363,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13360,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 13382,
                        "src": "2363:27:40",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13358,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2363:7:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13359,
                          "nodeType": "ArrayTypeName",
                          "src": "2363:9:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13362,
                        "mutability": "mutable",
                        "name": "maxBPTAmountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 13382,
                        "src": "2392:22:40",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13361,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2392:7:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2362:53:40"
                  },
                  "scope": 13383,
                  "src": "2265:266:40",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 13384,
              "src": "788:1745:40"
            }
          ],
          "src": "688:1846:40"
        },
        "id": 40
      },
      "src.sol/amm/vault/AssetManagers.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/AssetManagers.sol",
          "exportedSymbols": {
            "AssetManagers": [
              13834
            ]
          },
          "id": 13835,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 13385,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:41"
            },
            {
              "id": 13386,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:41"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../lib/math/Math.sol",
              "id": 13387,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 3351,
              "src": "747:30:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 13388,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 656,
              "src": "778:43:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../lib/helpers/InputHelpers.sol",
              "id": 13389,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 1043,
              "src": "822:41:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 13390,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 5096,
              "src": "864:40:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
              "file": "../lib/openzeppelin/SafeERC20.sol",
              "id": 13391,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 5312,
              "src": "905:43:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 13392,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 5188,
              "src": "949:49:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/UserBalance.sol",
              "file": "./UserBalance.sol",
              "id": 13393,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 18121,
              "src": "1000:27:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/BalanceAllocation.sol",
              "file": "./balances/BalanceAllocation.sol",
              "id": 13394,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 19058,
              "src": "1028:42:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/GeneralPoolsBalance.sol",
              "file": "./balances/GeneralPoolsBalance.sol",
              "id": 13395,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 19468,
              "src": "1071:44:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol",
              "file": "./balances/MinimalSwapInfoPoolsBalance.sol",
              "id": 13396,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 19918,
              "src": "1116:52:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol",
              "file": "./balances/TwoTokenPoolsBalance.sol",
              "id": 13397,
              "nodeType": "ImportDirective",
              "scope": 13835,
              "sourceUnit": 20642,
              "src": "1169:45:41",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 13398,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "1255:15:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 13399,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1255:15:41"
                },
                {
                  "baseName": {
                    "id": 13400,
                    "name": "GeneralPoolsBalance",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19467,
                    "src": "1276:19:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_GeneralPoolsBalance_$19467",
                      "typeString": "contract GeneralPoolsBalance"
                    }
                  },
                  "id": 13401,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1276:19:41"
                },
                {
                  "baseName": {
                    "id": 13402,
                    "name": "MinimalSwapInfoPoolsBalance",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19917,
                    "src": "1301:27:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MinimalSwapInfoPoolsBalance_$19917",
                      "typeString": "contract MinimalSwapInfoPoolsBalance"
                    }
                  },
                  "id": 13403,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1301:27:41"
                },
                {
                  "baseName": {
                    "id": 13404,
                    "name": "TwoTokenPoolsBalance",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20641,
                    "src": "1334:20:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_TwoTokenPoolsBalance_$20641",
                      "typeString": "contract TwoTokenPoolsBalance"
                    }
                  },
                  "id": 13405,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1334:20:41"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                15609,
                18418,
                19467,
                19917,
                20641,
                20822,
                21266
              ],
              "contractKind": "contract",
              "fullyImplemented": false,
              "id": 13834,
              "linearizedBaseContracts": [
                13834,
                20641,
                19917,
                15609,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                19467,
                5187,
                21266,
                20822
              ],
              "name": "AssetManagers",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 13408,
                  "libraryName": {
                    "id": 13406,
                    "name": "Math",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3350,
                    "src": "1367:4:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Math_$3350",
                      "typeString": "library Math"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1361:23:41",
                  "typeName": {
                    "id": 13407,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1376:7:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 13411,
                  "libraryName": {
                    "id": 13409,
                    "name": "SafeERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5311,
                    "src": "1395:9:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeERC20_$5311",
                      "typeString": "library SafeERC20"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1389:27:41",
                  "typeName": {
                    "id": 13410,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "1409:6:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 13417,
                  "mutability": "mutable",
                  "name": "_poolAssetManagers",
                  "nodeType": "VariableDeclaration",
                  "scope": 13834,
                  "src": "1483:74:41",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_address_$_$",
                    "typeString": "mapping(bytes32 => mapping(contract IERC20 => address))"
                  },
                  "typeName": {
                    "id": 13416,
                    "keyType": {
                      "id": 13412,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1491:7:41",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1483:46:41",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_address_$_$",
                      "typeString": "mapping(bytes32 => mapping(contract IERC20 => address))"
                    },
                    "valueType": {
                      "id": 13415,
                      "keyType": {
                        "id": 13413,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "1510:6:41",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "nodeType": "Mapping",
                      "src": "1502:26:41",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_address_$",
                        "typeString": "mapping(contract IERC20 => address)"
                      },
                      "valueType": {
                        "id": 13414,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "1520:7:41",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    21221
                  ],
                  "body": {
                    "id": 13516,
                    "nodeType": "Block",
                    "src": "1664:996:41",
                    "statements": [
                      {
                        "assignments": [
                          13429
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 13429,
                            "mutability": "mutable",
                            "name": "op",
                            "nodeType": "VariableDeclaration",
                            "scope": 13516,
                            "src": "1839:23:41",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_memory_ptr",
                              "typeString": "struct IVault.PoolBalanceOp"
                            },
                            "typeName": {
                              "id": 13428,
                              "name": "PoolBalanceOp",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 21230,
                              "src": "1839:13:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_storage_ptr",
                                "typeString": "struct IVault.PoolBalanceOp"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 13430,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1839:23:41"
                      },
                      {
                        "body": {
                          "id": 13514,
                          "nodeType": "Block",
                          "src": "1914:740:41",
                          "statements": [
                            {
                              "expression": {
                                "id": 13446,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 13442,
                                  "name": "op",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13429,
                                  "src": "2027:2:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_memory_ptr",
                                    "typeString": "struct IVault.PoolBalanceOp memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "baseExpression": {
                                    "id": 13443,
                                    "name": "ops",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13420,
                                    "src": "2032:3:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_struct$_PoolBalanceOp_$21230_memory_ptr_$dyn_memory_ptr",
                                      "typeString": "struct IVault.PoolBalanceOp memory[] memory"
                                    }
                                  },
                                  "id": 13445,
                                  "indexExpression": {
                                    "id": 13444,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13432,
                                    "src": "2036:1:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "2032:6:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_memory_ptr",
                                    "typeString": "struct IVault.PoolBalanceOp memory"
                                  }
                                },
                                "src": "2027:11:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_memory_ptr",
                                  "typeString": "struct IVault.PoolBalanceOp memory"
                                }
                              },
                              "id": 13447,
                              "nodeType": "ExpressionStatement",
                              "src": "2027:11:41"
                            },
                            {
                              "assignments": [
                                13449
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 13449,
                                  "mutability": "mutable",
                                  "name": "poolId",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 13514,
                                  "src": "2053:14:41",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "typeName": {
                                    "id": 13448,
                                    "name": "bytes32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2053:7:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 13452,
                              "initialValue": {
                                "expression": {
                                  "id": 13450,
                                  "name": "op",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13429,
                                  "src": "2070:2:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_memory_ptr",
                                    "typeString": "struct IVault.PoolBalanceOp memory"
                                  }
                                },
                                "id": 13451,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "poolId",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 21225,
                                "src": "2070:9:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2053:26:41"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13454,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13449,
                                    "src": "2115:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 13453,
                                  "name": "_ensureRegisteredPool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15394,
                                  "src": "2093:21:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$",
                                    "typeString": "function (bytes32) view"
                                  }
                                },
                                "id": 13455,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2093:29:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13456,
                              "nodeType": "ExpressionStatement",
                              "src": "2093:29:41"
                            },
                            {
                              "assignments": [
                                13458
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 13458,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 13514,
                                  "src": "2137:12:41",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 13457,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "2137:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 13461,
                              "initialValue": {
                                "expression": {
                                  "id": 13459,
                                  "name": "op",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13429,
                                  "src": "2152:2:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_memory_ptr",
                                    "typeString": "struct IVault.PoolBalanceOp memory"
                                  }
                                },
                                "id": 13460,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "token",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 21227,
                                "src": "2152:8:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2137:23:41"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "id": 13464,
                                        "name": "poolId",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13449,
                                        "src": "2202:6:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      {
                                        "id": 13465,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13458,
                                        "src": "2210:5:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        },
                                        {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      ],
                                      "id": 13463,
                                      "name": "_isTokenRegistered",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13833,
                                      "src": "2183:18:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bool_$",
                                        "typeString": "function (bytes32,contract IERC20) view returns (bool)"
                                      }
                                    },
                                    "id": 13466,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2183:33:41",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 13467,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2218:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 13468,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKEN_NOT_REGISTERED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 624,
                                    "src": "2218:27:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13462,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2174:8:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 13469,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2174:72:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13470,
                              "nodeType": "ExpressionStatement",
                              "src": "2174:72:41"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    "id": 13479,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "baseExpression": {
                                        "baseExpression": {
                                          "id": 13472,
                                          "name": "_poolAssetManagers",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13417,
                                          "src": "2269:18:41",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_address_$_$",
                                            "typeString": "mapping(bytes32 => mapping(contract IERC20 => address))"
                                          }
                                        },
                                        "id": 13474,
                                        "indexExpression": {
                                          "id": 13473,
                                          "name": "poolId",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13449,
                                          "src": "2288:6:41",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "2269:26:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_address_$",
                                          "typeString": "mapping(contract IERC20 => address)"
                                        }
                                      },
                                      "id": 13476,
                                      "indexExpression": {
                                        "id": 13475,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13458,
                                        "src": "2296:5:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "2269:33:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "expression": {
                                        "id": 13477,
                                        "name": "msg",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -15,
                                        "src": "2306:3:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_message",
                                          "typeString": "msg"
                                        }
                                      },
                                      "id": 13478,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sender",
                                      "nodeType": "MemberAccess",
                                      "src": "2306:10:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address_payable",
                                        "typeString": "address payable"
                                      }
                                    },
                                    "src": "2269:47:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 13480,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2318:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 13481,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "SENDER_NOT_ASSET_MANAGER",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 567,
                                    "src": "2318:31:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13471,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2260:8:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 13482,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2260:90:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13483,
                              "nodeType": "ExpressionStatement",
                              "src": "2260:90:41"
                            },
                            {
                              "assignments": [
                                13485
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 13485,
                                  "mutability": "mutable",
                                  "name": "kind",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 13514,
                                  "src": "2365:22:41",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                                    "typeString": "enum IVault.PoolBalanceOpKind"
                                  },
                                  "typeName": {
                                    "id": 13484,
                                    "name": "PoolBalanceOpKind",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 21234,
                                    "src": "2365:17:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                                      "typeString": "enum IVault.PoolBalanceOpKind"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 13488,
                              "initialValue": {
                                "expression": {
                                  "id": 13486,
                                  "name": "op",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13429,
                                  "src": "2390:2:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_memory_ptr",
                                    "typeString": "struct IVault.PoolBalanceOp memory"
                                  }
                                },
                                "id": 13487,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "kind",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 21223,
                                "src": "2390:7:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                                  "typeString": "enum IVault.PoolBalanceOpKind"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2365:32:41"
                            },
                            {
                              "assignments": [
                                13490
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 13490,
                                  "mutability": "mutable",
                                  "name": "amount",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 13514,
                                  "src": "2411:14:41",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 13489,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2411:7:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 13493,
                              "initialValue": {
                                "expression": {
                                  "id": 13491,
                                  "name": "op",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13429,
                                  "src": "2428:2:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_memory_ptr",
                                    "typeString": "struct IVault.PoolBalanceOp memory"
                                  }
                                },
                                "id": 13492,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "amount",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 21229,
                                "src": "2428:9:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2411:26:41"
                            },
                            {
                              "assignments": [
                                13495,
                                13497
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 13495,
                                  "mutability": "mutable",
                                  "name": "cashDelta",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 13514,
                                  "src": "2452:16:41",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "typeName": {
                                    "id": 13494,
                                    "name": "int256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2452:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "visibility": "internal"
                                },
                                {
                                  "constant": false,
                                  "id": 13497,
                                  "mutability": "mutable",
                                  "name": "managedDelta",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 13514,
                                  "src": "2470:19:41",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "typeName": {
                                    "id": 13496,
                                    "name": "int256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2470:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 13504,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 13499,
                                    "name": "kind",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13485,
                                    "src": "2525:4:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                                      "typeString": "enum IVault.PoolBalanceOpKind"
                                    }
                                  },
                                  {
                                    "id": 13500,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13449,
                                    "src": "2531:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 13501,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13458,
                                    "src": "2539:5:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 13502,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13490,
                                    "src": "2546:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                                      "typeString": "enum IVault.PoolBalanceOpKind"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13498,
                                  "name": "_performPoolManagementOperation",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13574,
                                  "src": "2493:31:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_PoolBalanceOpKind_$21234_$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$_t_int256_$_t_int256_$",
                                    "typeString": "function (enum IVault.PoolBalanceOpKind,bytes32,contract IERC20,uint256) returns (int256,int256)"
                                  }
                                },
                                "id": 13503,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2493:60:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$",
                                  "typeString": "tuple(int256,int256)"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2451:102:41"
                            },
                            {
                              "eventCall": {
                                "arguments": [
                                  {
                                    "id": 13506,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13449,
                                    "src": "2592:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 13507,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "2600:3:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 13508,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "2600:10:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "id": 13509,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13458,
                                    "src": "2612:5:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 13510,
                                    "name": "cashDelta",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13495,
                                    "src": "2619:9:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  {
                                    "id": 13511,
                                    "name": "managedDelta",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13497,
                                    "src": "2630:12:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    },
                                    {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  ],
                                  "id": 13505,
                                  "name": "PoolBalanceManaged",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 21247,
                                  "src": "2573:18:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_contract$_IERC20_$5095_$_t_int256_$_t_int256_$returns$__$",
                                    "typeString": "function (bytes32,address,contract IERC20,int256,int256)"
                                  }
                                },
                                "id": 13512,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2573:70:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13513,
                              "nodeType": "EmitStatement",
                              "src": "2568:75:41"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 13438,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13435,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13432,
                            "src": "1893:1:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 13436,
                              "name": "ops",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13420,
                              "src": "1897:3:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_PoolBalanceOp_$21230_memory_ptr_$dyn_memory_ptr",
                                "typeString": "struct IVault.PoolBalanceOp memory[] memory"
                              }
                            },
                            "id": 13437,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "1897:10:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1893:14:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 13515,
                        "initializationExpression": {
                          "assignments": [
                            13432
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 13432,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 13515,
                              "src": "1878:9:41",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 13431,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1878:7:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 13434,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 13433,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1890:1:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "1878:13:41"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 13440,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "1909:3:41",
                            "subExpression": {
                              "id": 13439,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13432,
                              "src": "1911:1:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 13441,
                          "nodeType": "ExpressionStatement",
                          "src": "1909:3:41"
                        },
                        "nodeType": "ForStatement",
                        "src": "1873:781:41"
                      }
                    ]
                  },
                  "functionSelector": "e6c46092",
                  "id": 13517,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 13424,
                      "modifierName": {
                        "id": 13423,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "1637:12:41",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1637:12:41"
                    },
                    {
                      "id": 13426,
                      "modifierName": {
                        "id": 13425,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "1650:13:41",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1650:13:41"
                    }
                  ],
                  "name": "managePoolBalance",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 13422,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1628:8:41"
                  },
                  "parameters": {
                    "id": 13421,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13420,
                        "mutability": "mutable",
                        "name": "ops",
                        "nodeType": "VariableDeclaration",
                        "scope": 13517,
                        "src": "1591:26:41",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_PoolBalanceOp_$21230_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.PoolBalanceOp[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 13418,
                            "name": "PoolBalanceOp",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 21230,
                            "src": "1591:13:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_storage_ptr",
                              "typeString": "struct IVault.PoolBalanceOp"
                            }
                          },
                          "id": 13419,
                          "nodeType": "ArrayTypeName",
                          "src": "1591:15:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_PoolBalanceOp_$21230_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.PoolBalanceOp[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1590:28:41"
                  },
                  "returnParameters": {
                    "id": 13427,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1664:0:41"
                  },
                  "scope": 13834,
                  "src": "1564:1096:41",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 13573,
                    "nodeType": "Block",
                    "src": "3220:497:41",
                    "statements": [
                      {
                        "assignments": [
                          13534
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 13534,
                            "mutability": "mutable",
                            "name": "specialization",
                            "nodeType": "VariableDeclaration",
                            "scope": 13573,
                            "src": "3230:33:41",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "typeName": {
                              "id": 13533,
                              "name": "PoolSpecialization",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20940,
                              "src": "3230:18:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 13538,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 13536,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13522,
                              "src": "3289:6:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 13535,
                            "name": "_getPoolSpecialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15608,
                            "src": "3266:22:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 13537,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3266:30:41",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3230:66:41"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                            "typeString": "enum IVault.PoolBalanceOpKind"
                          },
                          "id": 13542,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13539,
                            "name": "kind",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13520,
                            "src": "3311:4:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                              "typeString": "enum IVault.PoolBalanceOpKind"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 13540,
                              "name": "PoolBalanceOpKind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21234,
                              "src": "3319:17:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolBalanceOpKind_$21234_$",
                                "typeString": "type(enum IVault.PoolBalanceOpKind)"
                              }
                            },
                            "id": 13541,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "WITHDRAW",
                            "nodeType": "MemberAccess",
                            "src": "3319:26:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                              "typeString": "enum IVault.PoolBalanceOpKind"
                            }
                          },
                          "src": "3311:34:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                              "typeString": "enum IVault.PoolBalanceOpKind"
                            },
                            "id": 13554,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 13551,
                              "name": "kind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13520,
                              "src": "3448:4:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                                "typeString": "enum IVault.PoolBalanceOpKind"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 13552,
                                "name": "PoolBalanceOpKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21234,
                                "src": "3456:17:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolBalanceOpKind_$21234_$",
                                  "typeString": "type(enum IVault.PoolBalanceOpKind)"
                                }
                              },
                              "id": 13553,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "DEPOSIT",
                              "nodeType": "MemberAccess",
                              "src": "3456:25:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                                "typeString": "enum IVault.PoolBalanceOpKind"
                              }
                            },
                            "src": "3448:33:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 13570,
                            "nodeType": "Block",
                            "src": "3579:132:41",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 13564,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13522,
                                      "src": "3662:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13565,
                                      "name": "specialization",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13534,
                                      "src": "3670:14:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                        "typeString": "enum IVault.PoolSpecialization"
                                      }
                                    },
                                    {
                                      "id": 13566,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13524,
                                      "src": "3686:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 13567,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13526,
                                      "src": "3693:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                        "typeString": "enum IVault.PoolSpecialization"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 13563,
                                    "name": "_updateManagedBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13788,
                                    "src": "3640:21:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_enum$_PoolSpecialization_$20940_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$_t_int256_$_t_int256_$",
                                      "typeString": "function (bytes32,enum IVault.PoolSpecialization,contract IERC20,uint256) returns (int256,int256)"
                                    }
                                  },
                                  "id": 13568,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3640:60:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$",
                                    "typeString": "tuple(int256,int256)"
                                  }
                                },
                                "functionReturnParameters": 13532,
                                "id": 13569,
                                "nodeType": "Return",
                                "src": "3633:67:41"
                              }
                            ]
                          },
                          "id": 13571,
                          "nodeType": "IfStatement",
                          "src": "3444:267:41",
                          "trueBody": {
                            "id": 13562,
                            "nodeType": "Block",
                            "src": "3483:90:41",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 13556,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13522,
                                      "src": "3524:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13557,
                                      "name": "specialization",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13534,
                                      "src": "3532:14:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                        "typeString": "enum IVault.PoolSpecialization"
                                      }
                                    },
                                    {
                                      "id": 13558,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13524,
                                      "src": "3548:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 13559,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13526,
                                      "src": "3555:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                        "typeString": "enum IVault.PoolSpecialization"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 13555,
                                    "name": "_depositPoolBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13730,
                                    "src": "3504:19:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_enum$_PoolSpecialization_$20940_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$_t_int256_$_t_int256_$",
                                      "typeString": "function (bytes32,enum IVault.PoolSpecialization,contract IERC20,uint256) returns (int256,int256)"
                                    }
                                  },
                                  "id": 13560,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3504:58:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$",
                                    "typeString": "tuple(int256,int256)"
                                  }
                                },
                                "functionReturnParameters": 13532,
                                "id": 13561,
                                "nodeType": "Return",
                                "src": "3497:65:41"
                              }
                            ]
                          }
                        },
                        "id": 13572,
                        "nodeType": "IfStatement",
                        "src": "3307:404:41",
                        "trueBody": {
                          "id": 13550,
                          "nodeType": "Block",
                          "src": "3347:91:41",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13544,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13522,
                                    "src": "3389:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 13545,
                                    "name": "specialization",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13534,
                                    "src": "3397:14:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                      "typeString": "enum IVault.PoolSpecialization"
                                    }
                                  },
                                  {
                                    "id": 13546,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13524,
                                    "src": "3413:5:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 13547,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13526,
                                    "src": "3420:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                      "typeString": "enum IVault.PoolSpecialization"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13543,
                                  "name": "_withdrawPoolBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13650,
                                  "src": "3368:20:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_enum$_PoolSpecialization_$20940_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$_t_int256_$_t_int256_$",
                                    "typeString": "function (bytes32,enum IVault.PoolSpecialization,contract IERC20,uint256) returns (int256,int256)"
                                  }
                                },
                                "id": 13548,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3368:59:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$",
                                  "typeString": "tuple(int256,int256)"
                                }
                              },
                              "functionReturnParameters": 13532,
                              "id": 13549,
                              "nodeType": "Return",
                              "src": "3361:66:41"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13518,
                    "nodeType": "StructuredDocumentation",
                    "src": "2666:367:41",
                    "text": " @dev Performs the `kind` Asset Manager operation on a Pool.\n Withdrawals will transfer `amount` tokens to the caller, deposits will transfer `amount` tokens from the caller,\n and updates will set the managed balance to `amount`.\n Returns a tuple with the 'cash' and 'managed' balance deltas as a result of this call."
                  },
                  "id": 13574,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_performPoolManagementOperation",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13527,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13520,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 13574,
                        "src": "3088:22:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                          "typeString": "enum IVault.PoolBalanceOpKind"
                        },
                        "typeName": {
                          "id": 13519,
                          "name": "PoolBalanceOpKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21234,
                          "src": "3088:17:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                            "typeString": "enum IVault.PoolBalanceOpKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13522,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 13574,
                        "src": "3120:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 13521,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3120:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13524,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 13574,
                        "src": "3144:12:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 13523,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "3144:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13526,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 13574,
                        "src": "3166:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13525,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3166:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3078:108:41"
                  },
                  "returnParameters": {
                    "id": 13532,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13529,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13574,
                        "src": "3204:6:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 13528,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3204:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13531,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13574,
                        "src": "3212:6:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 13530,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3212:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3203:16:41"
                  },
                  "scope": 13834,
                  "src": "3038:679:41",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 13649,
                    "nodeType": "Block",
                    "src": "4172:747:41",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 13593,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13590,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13579,
                            "src": "4186:14:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 13591,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "4204:18:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 13592,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "4204:28:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "4186:46:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 13604,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 13601,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13579,
                              "src": "4318:14:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 13602,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "4336:18:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 13603,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "4336:36:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "4318:54:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 13618,
                            "nodeType": "Block",
                            "src": "4461:115:41",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 13613,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13577,
                                      "src": "4543:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13614,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13581,
                                      "src": "4551:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 13615,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13583,
                                      "src": "4558:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 13612,
                                    "name": "_generalPoolCashToManaged",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19237,
                                    "src": "4517:25:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20,uint256)"
                                    }
                                  },
                                  "id": 13616,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4517:48:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 13617,
                                "nodeType": "ExpressionStatement",
                                "src": "4517:48:41"
                              }
                            ]
                          },
                          "id": 13619,
                          "nodeType": "IfStatement",
                          "src": "4314:262:41",
                          "trueBody": {
                            "id": 13611,
                            "nodeType": "Block",
                            "src": "4374:81:41",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 13606,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13577,
                                      "src": "4422:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13607,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13581,
                                      "src": "4430:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 13608,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13583,
                                      "src": "4437:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 13605,
                                    "name": "_minimalSwapInfoPoolCashToManaged",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19671,
                                    "src": "4388:33:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20,uint256)"
                                    }
                                  },
                                  "id": 13609,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4388:56:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 13610,
                                "nodeType": "ExpressionStatement",
                                "src": "4388:56:41"
                              }
                            ]
                          }
                        },
                        "id": 13620,
                        "nodeType": "IfStatement",
                        "src": "4182:394:41",
                        "trueBody": {
                          "id": 13600,
                          "nodeType": "Block",
                          "src": "4234:74:41",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13595,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13577,
                                    "src": "4275:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 13596,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13581,
                                    "src": "4283:5:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 13597,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13583,
                                    "src": "4290:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13594,
                                  "name": "_twoTokenPoolCashToManaged",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20114,
                                  "src": "4248:26:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                    "typeString": "function (bytes32,contract IERC20,uint256)"
                                  }
                                },
                                "id": 13598,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4248:49:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13599,
                              "nodeType": "ExpressionStatement",
                              "src": "4248:49:41"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 13623,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13621,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13583,
                            "src": "4590:6:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 13622,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4599:1:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4590:10:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 13633,
                        "nodeType": "IfStatement",
                        "src": "4586:79:41",
                        "trueBody": {
                          "id": 13632,
                          "nodeType": "Block",
                          "src": "4602:63:41",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 13627,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "4635:3:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 13628,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "4635:10:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "id": 13629,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13583,
                                    "src": "4647:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 13624,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13581,
                                    "src": "4616:5:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 13626,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "safeTransfer",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 5246,
                                  "src": "4616:18:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IERC20,address,uint256)"
                                  }
                                },
                                "id": 13630,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4616:38:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13631,
                              "nodeType": "ExpressionStatement",
                              "src": "4616:38:41"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 13640,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 13634,
                            "name": "cashDelta",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13586,
                            "src": "4846:9:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13638,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "-",
                                "prefix": true,
                                "src": "4865:7:41",
                                "subExpression": {
                                  "id": 13637,
                                  "name": "amount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13583,
                                  "src": "4866:6:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 13636,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4858:6:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": {
                                "id": 13635,
                                "name": "int256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4858:6:41",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 13639,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4858:15:41",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "4846:27:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 13641,
                        "nodeType": "ExpressionStatement",
                        "src": "4846:27:41"
                      },
                      {
                        "expression": {
                          "id": 13647,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 13642,
                            "name": "managedDelta",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13588,
                            "src": "4883:12:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13645,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13583,
                                "src": "4905:6:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 13644,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4898:6:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": {
                                "id": 13643,
                                "name": "int256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4898:6:41",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 13646,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4898:14:41",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "4883:29:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 13648,
                        "nodeType": "ExpressionStatement",
                        "src": "4883:29:41"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13575,
                    "nodeType": "StructuredDocumentation",
                    "src": "3723:239:41",
                    "text": " @dev Moves `amount` tokens from a Pool's 'cash' to 'managed' balance, and transfers them to the caller.\n Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary."
                  },
                  "id": 13650,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_withdrawPoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13584,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13577,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 13650,
                        "src": "4006:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 13576,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4006:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13579,
                        "mutability": "mutable",
                        "name": "specialization",
                        "nodeType": "VariableDeclaration",
                        "scope": 13650,
                        "src": "4030:33:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 13578,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "4030:18:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13581,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 13650,
                        "src": "4073:12:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 13580,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "4073:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13583,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 13650,
                        "src": "4095:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13582,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4095:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3996:119:41"
                  },
                  "returnParameters": {
                    "id": 13589,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13586,
                        "mutability": "mutable",
                        "name": "cashDelta",
                        "nodeType": "VariableDeclaration",
                        "scope": 13650,
                        "src": "4133:16:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 13585,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4133:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13588,
                        "mutability": "mutable",
                        "name": "managedDelta",
                        "nodeType": "VariableDeclaration",
                        "scope": 13650,
                        "src": "4151:19:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 13587,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4151:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4132:39:41"
                  },
                  "scope": 13834,
                  "src": "3967:952:41",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 13729,
                    "nodeType": "Block",
                    "src": "5375:766:41",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 13669,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13666,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13655,
                            "src": "5389:14:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 13667,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "5407:18:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 13668,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "5407:28:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "5389:46:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 13680,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 13677,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13655,
                              "src": "5521:14:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 13678,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "5539:18:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 13679,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "5539:36:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "5521:54:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 13694,
                            "nodeType": "Block",
                            "src": "5664:115:41",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 13689,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13653,
                                      "src": "5746:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13690,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13657,
                                      "src": "5754:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 13691,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13659,
                                      "src": "5761:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 13688,
                                    "name": "_generalPoolManagedToCash",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19256,
                                    "src": "5720:25:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20,uint256)"
                                    }
                                  },
                                  "id": 13692,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5720:48:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 13693,
                                "nodeType": "ExpressionStatement",
                                "src": "5720:48:41"
                              }
                            ]
                          },
                          "id": 13695,
                          "nodeType": "IfStatement",
                          "src": "5517:262:41",
                          "trueBody": {
                            "id": 13687,
                            "nodeType": "Block",
                            "src": "5577:81:41",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 13682,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13653,
                                      "src": "5625:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13683,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13657,
                                      "src": "5633:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 13684,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13659,
                                      "src": "5640:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 13681,
                                    "name": "_minimalSwapInfoPoolManagedToCash",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19690,
                                    "src": "5591:33:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20,uint256)"
                                    }
                                  },
                                  "id": 13685,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5591:56:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 13686,
                                "nodeType": "ExpressionStatement",
                                "src": "5591:56:41"
                              }
                            ]
                          }
                        },
                        "id": 13696,
                        "nodeType": "IfStatement",
                        "src": "5385:394:41",
                        "trueBody": {
                          "id": 13676,
                          "nodeType": "Block",
                          "src": "5437:74:41",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13671,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13653,
                                    "src": "5478:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 13672,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13657,
                                    "src": "5486:5:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 13673,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13659,
                                    "src": "5493:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13670,
                                  "name": "_twoTokenPoolManagedToCash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20133,
                                  "src": "5451:26:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                    "typeString": "function (bytes32,contract IERC20,uint256)"
                                  }
                                },
                                "id": 13674,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5451:49:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13675,
                              "nodeType": "ExpressionStatement",
                              "src": "5451:49:41"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 13699,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13697,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13659,
                            "src": "5793:6:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 13698,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5802:1:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5793:10:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 13713,
                        "nodeType": "IfStatement",
                        "src": "5789:98:41",
                        "trueBody": {
                          "id": 13712,
                          "nodeType": "Block",
                          "src": "5805:82:41",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 13703,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "5842:3:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 13704,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "5842:10:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "id": 13707,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -28,
                                        "src": "5862:4:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_AssetManagers_$13834",
                                          "typeString": "contract AssetManagers"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_AssetManagers_$13834",
                                          "typeString": "contract AssetManagers"
                                        }
                                      ],
                                      "id": 13706,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "5854:7:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 13705,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "5854:7:41",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 13708,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "5854:13:41",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 13709,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13659,
                                    "src": "5869:6:41",
                                    "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"
                                    }
                                  ],
                                  "expression": {
                                    "id": 13700,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13657,
                                    "src": "5819:5:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 13702,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "safeTransferFrom",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 5274,
                                  "src": "5819:22:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IERC20,address,address,uint256)"
                                  }
                                },
                                "id": 13710,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5819:57:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13711,
                              "nodeType": "ExpressionStatement",
                              "src": "5819:57:41"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 13719,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 13714,
                            "name": "cashDelta",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13662,
                            "src": "6068:9:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13717,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13659,
                                "src": "6087:6:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 13716,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "6080:6:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": {
                                "id": 13715,
                                "name": "int256",
                                "nodeType": "ElementaryTypeName",
                                "src": "6080:6:41",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 13718,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6080:14:41",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "6068:26:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 13720,
                        "nodeType": "ExpressionStatement",
                        "src": "6068:26:41"
                      },
                      {
                        "expression": {
                          "id": 13727,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 13721,
                            "name": "managedDelta",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13664,
                            "src": "6104:12:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 13725,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "-",
                                "prefix": true,
                                "src": "6126:7:41",
                                "subExpression": {
                                  "id": 13724,
                                  "name": "amount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13659,
                                  "src": "6127:6:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 13723,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "6119:6:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": {
                                "id": 13722,
                                "name": "int256",
                                "nodeType": "ElementaryTypeName",
                                "src": "6119:6:41",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 13726,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6119:15:41",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "6104:30:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 13728,
                        "nodeType": "ExpressionStatement",
                        "src": "6104:30:41"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13651,
                    "nodeType": "StructuredDocumentation",
                    "src": "4925:241:41",
                    "text": " @dev Moves `amount` tokens from a Pool's 'managed' to 'cash' balance, and transfers them from the caller.\n Returns the 'cash' and 'managed' balance deltas as a result of this call, which will be complementary."
                  },
                  "id": 13730,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_depositPoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13660,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13653,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 13730,
                        "src": "5209:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 13652,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5209:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13655,
                        "mutability": "mutable",
                        "name": "specialization",
                        "nodeType": "VariableDeclaration",
                        "scope": 13730,
                        "src": "5233:33:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 13654,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "5233:18:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13657,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 13730,
                        "src": "5276:12:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 13656,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5276:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13659,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 13730,
                        "src": "5298:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13658,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5298:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5199:119:41"
                  },
                  "returnParameters": {
                    "id": 13665,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13662,
                        "mutability": "mutable",
                        "name": "cashDelta",
                        "nodeType": "VariableDeclaration",
                        "scope": 13730,
                        "src": "5336:16:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 13661,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5336:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13664,
                        "mutability": "mutable",
                        "name": "managedDelta",
                        "nodeType": "VariableDeclaration",
                        "scope": 13730,
                        "src": "5354:19:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 13663,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5354:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5335:39:41"
                  },
                  "scope": 13834,
                  "src": "5171:970:41",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 13787,
                    "nodeType": "Block",
                    "src": "6553:491:41",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 13749,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13746,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13735,
                            "src": "6567:14:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 13747,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "6585:18:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 13748,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "6585:28:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "6567:46:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 13762,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 13759,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13735,
                              "src": "6718:14:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 13760,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "6736:18:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 13761,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "6736:36:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "6718:54:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 13780,
                            "nodeType": "Block",
                            "src": "6880:134:41",
                            "statements": [
                              {
                                "expression": {
                                  "id": 13778,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 13772,
                                    "name": "managedDelta",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13744,
                                    "src": "6936:12:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "arguments": [
                                      {
                                        "id": 13774,
                                        "name": "poolId",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13733,
                                        "src": "6981:6:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      {
                                        "id": 13775,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13737,
                                        "src": "6989:5:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      {
                                        "id": 13776,
                                        "name": "amount",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13739,
                                        "src": "6996:6:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        },
                                        {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "id": 13773,
                                      "name": "_setGeneralPoolManagedBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19277,
                                      "src": "6951:29:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$_t_int256_$",
                                        "typeString": "function (bytes32,contract IERC20,uint256) returns (int256)"
                                      }
                                    },
                                    "id": 13777,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "6951:52:41",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "6936:67:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "id": 13779,
                                "nodeType": "ExpressionStatement",
                                "src": "6936:67:41"
                              }
                            ]
                          },
                          "id": 13781,
                          "nodeType": "IfStatement",
                          "src": "6714:300:41",
                          "trueBody": {
                            "id": 13771,
                            "nodeType": "Block",
                            "src": "6774:100:41",
                            "statements": [
                              {
                                "expression": {
                                  "id": 13769,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 13763,
                                    "name": "managedDelta",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13744,
                                    "src": "6788:12:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "arguments": [
                                      {
                                        "id": 13765,
                                        "name": "poolId",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13733,
                                        "src": "6841:6:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      {
                                        "id": 13766,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13737,
                                        "src": "6849:5:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      {
                                        "id": 13767,
                                        "name": "amount",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13739,
                                        "src": "6856:6:41",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        },
                                        {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "id": 13764,
                                      "name": "_setMinimalSwapInfoPoolManagedBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19711,
                                      "src": "6803:37:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$_t_int256_$",
                                        "typeString": "function (bytes32,contract IERC20,uint256) returns (int256)"
                                      }
                                    },
                                    "id": 13768,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "6803:60:41",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "src": "6788:75:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "id": 13770,
                                "nodeType": "ExpressionStatement",
                                "src": "6788:75:41"
                              }
                            ]
                          }
                        },
                        "id": 13782,
                        "nodeType": "IfStatement",
                        "src": "6563:451:41",
                        "trueBody": {
                          "id": 13758,
                          "nodeType": "Block",
                          "src": "6615:93:41",
                          "statements": [
                            {
                              "expression": {
                                "id": 13756,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 13750,
                                  "name": "managedDelta",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13744,
                                  "src": "6629:12:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 13752,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13733,
                                      "src": "6675:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13753,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13737,
                                      "src": "6683:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 13754,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13739,
                                      "src": "6690:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 13751,
                                    "name": "_setTwoTokenPoolManagedBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20154,
                                    "src": "6644:30:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$_t_int256_$",
                                      "typeString": "function (bytes32,contract IERC20,uint256) returns (int256)"
                                    }
                                  },
                                  "id": 13755,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "6644:53:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "6629:68:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 13757,
                              "nodeType": "ExpressionStatement",
                              "src": "6629:68:41"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 13785,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 13783,
                            "name": "cashDelta",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13742,
                            "src": "7024:9:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "hexValue": "30",
                            "id": 13784,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "7036:1:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "7024:13:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 13786,
                        "nodeType": "ExpressionStatement",
                        "src": "7024:13:41"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13731,
                    "nodeType": "StructuredDocumentation",
                    "src": "6147:195:41",
                    "text": " @dev Sets a Pool's 'managed' balance to `amount`.\n Returns the 'cash' and 'managed' balance deltas as a result of this call (the 'cash' delta will always be zero)."
                  },
                  "id": 13788,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_updateManagedBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13740,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13733,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 13788,
                        "src": "6387:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 13732,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6387:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13735,
                        "mutability": "mutable",
                        "name": "specialization",
                        "nodeType": "VariableDeclaration",
                        "scope": 13788,
                        "src": "6411:33:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 13734,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "6411:18:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13737,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 13788,
                        "src": "6454:12:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 13736,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6454:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13739,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 13788,
                        "src": "6476:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13738,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6476:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6377:119:41"
                  },
                  "returnParameters": {
                    "id": 13745,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13742,
                        "mutability": "mutable",
                        "name": "cashDelta",
                        "nodeType": "VariableDeclaration",
                        "scope": 13788,
                        "src": "6514:16:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 13741,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6514:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13744,
                        "mutability": "mutable",
                        "name": "managedDelta",
                        "nodeType": "VariableDeclaration",
                        "scope": 13788,
                        "src": "6532:19:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 13743,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6532:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6513:39:41"
                  },
                  "scope": 13834,
                  "src": "6347:697:41",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 13832,
                    "nodeType": "Block",
                    "src": "7216:495:41",
                    "statements": [
                      {
                        "assignments": [
                          13799
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 13799,
                            "mutability": "mutable",
                            "name": "specialization",
                            "nodeType": "VariableDeclaration",
                            "scope": 13832,
                            "src": "7226:33:41",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "typeName": {
                              "id": 13798,
                              "name": "PoolSpecialization",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20940,
                              "src": "7226:18:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 13803,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 13801,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13791,
                              "src": "7285:6:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 13800,
                            "name": "_getPoolSpecialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15608,
                            "src": "7262:22:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 13802,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7262:30:41",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7226:66:41"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 13807,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13804,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13799,
                            "src": "7306:14:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 13805,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "7324:18:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 13806,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "7324:28:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "7306:46:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 13817,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 13814,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13799,
                              "src": "7441:14:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 13815,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "7459:18:41",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 13816,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "7459:36:41",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "7441:54:41",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 13829,
                            "nodeType": "Block",
                            "src": "7587:118:41",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 13825,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13791,
                                      "src": "7680:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13826,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13793,
                                      "src": "7688:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    ],
                                    "id": 13824,
                                    "name": "_isGeneralPoolTokenRegistered",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19466,
                                    "src": "7650:29:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bool_$",
                                      "typeString": "function (bytes32,contract IERC20) view returns (bool)"
                                    }
                                  },
                                  "id": 13827,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "7650:44:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "functionReturnParameters": 13797,
                                "id": 13828,
                                "nodeType": "Return",
                                "src": "7643:51:41"
                              }
                            ]
                          },
                          "id": 13830,
                          "nodeType": "IfStatement",
                          "src": "7437:268:41",
                          "trueBody": {
                            "id": 13823,
                            "nodeType": "Block",
                            "src": "7497:84:41",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 13819,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13791,
                                      "src": "7556:6:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 13820,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13793,
                                      "src": "7564:5:41",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    ],
                                    "id": 13818,
                                    "name": "_isMinimalSwapInfoPoolTokenRegistered",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19916,
                                    "src": "7518:37:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bool_$",
                                      "typeString": "function (bytes32,contract IERC20) view returns (bool)"
                                    }
                                  },
                                  "id": 13821,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "7518:52:41",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "functionReturnParameters": 13797,
                                "id": 13822,
                                "nodeType": "Return",
                                "src": "7511:59:41"
                              }
                            ]
                          }
                        },
                        "id": 13831,
                        "nodeType": "IfStatement",
                        "src": "7302:403:41",
                        "trueBody": {
                          "id": 13813,
                          "nodeType": "Block",
                          "src": "7354:77:41",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13809,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13791,
                                    "src": "7406:6:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 13810,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13793,
                                    "src": "7414:5:41",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  ],
                                  "id": 13808,
                                  "name": "_isTwoTokenPoolTokenRegistered",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20597,
                                  "src": "7375:30:41",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bool_$",
                                    "typeString": "function (bytes32,contract IERC20) view returns (bool)"
                                  }
                                },
                                "id": 13811,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7375:45:41",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "functionReturnParameters": 13797,
                              "id": 13812,
                              "nodeType": "Return",
                              "src": "7368:52:41"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13789,
                    "nodeType": "StructuredDocumentation",
                    "src": "7050:75:41",
                    "text": " @dev Returns true if `token` is registered for `poolId`."
                  },
                  "id": 13833,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_isTokenRegistered",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13794,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13791,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 13833,
                        "src": "7158:14:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 13790,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7158:7:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13793,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 13833,
                        "src": "7174:12:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 13792,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7174:6:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7157:30:41"
                  },
                  "returnParameters": {
                    "id": 13797,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13796,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 13833,
                        "src": "7210:4:41",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 13795,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "7210:4:41",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7209:6:41"
                  },
                  "scope": 13834,
                  "src": "7130:581:41",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 13835,
              "src": "1216:6497:41"
            }
          ],
          "src": "688:7026:41"
        },
        "id": 41
      },
      "src.sol/amm/vault/AssetTransfersHandler.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/AssetTransfersHandler.sol",
          "exportedSymbols": {
            "AssetTransfersHandler": [
              14087
            ]
          },
          "id": 14088,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 13836,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:42"
            },
            {
              "id": 13837,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:42"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../lib/math/Math.sol",
              "id": 13838,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 3351,
              "src": "747:30:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 13839,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 656,
              "src": "778:43:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 13840,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 5096,
              "src": "822:40:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/AssetHelpers.sol",
              "file": "../lib/helpers/AssetHelpers.sol",
              "id": 13841,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 267,
              "src": "863:41:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
              "file": "../lib/openzeppelin/SafeERC20.sol",
              "id": 13842,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 5312,
              "src": "905:43:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/Address.sol",
              "file": "../lib/openzeppelin/Address.sol",
              "id": 13843,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 3689,
              "src": "949:41:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IWETH.sol",
              "file": "./interfaces/IWETH.sol",
              "id": 13844,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 21282,
              "src": "992:32:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAsset.sol",
              "file": "./interfaces/IAsset.sol",
              "id": 13845,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 20646,
              "src": "1025:33:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "./interfaces/IVault.sol",
              "id": 13846,
              "nodeType": "ImportDirective",
              "scope": 14088,
              "sourceUnit": 21267,
              "src": "1059:33:42",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 13847,
                    "name": "AssetHelpers",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 266,
                    "src": "1137:12:42",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_AssetHelpers_$266",
                      "typeString": "contract AssetHelpers"
                    }
                  },
                  "id": 13848,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1137:12:42"
                }
              ],
              "contractDependencies": [
                266
              ],
              "contractKind": "contract",
              "fullyImplemented": false,
              "id": 14087,
              "linearizedBaseContracts": [
                14087,
                266
              ],
              "name": "AssetTransfersHandler",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 13851,
                  "libraryName": {
                    "id": 13849,
                    "name": "SafeERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5311,
                    "src": "1162:9:42",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeERC20_$5311",
                      "typeString": "library SafeERC20"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1156:27:42",
                  "typeName": {
                    "id": 13850,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "1176:6:42",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  }
                },
                {
                  "id": 13854,
                  "libraryName": {
                    "id": 13852,
                    "name": "Address",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3688,
                    "src": "1194:7:42",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Address_$3688",
                      "typeString": "library Address"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1188:34:42",
                  "typeName": {
                    "id": 13853,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1206:15:42",
                    "stateMutability": "payable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address_payable",
                      "typeString": "address payable"
                    }
                  }
                },
                {
                  "body": {
                    "id": 13942,
                    "nodeType": "Block",
                    "src": "2025:1372:42",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 13868,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13866,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13859,
                            "src": "2039:6:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 13867,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2049:1:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2039:11:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 13871,
                        "nodeType": "IfStatement",
                        "src": "2035:48:42",
                        "trueBody": {
                          "id": 13870,
                          "nodeType": "Block",
                          "src": "2052:31:42",
                          "statements": [
                            {
                              "functionReturnParameters": 13865,
                              "id": 13869,
                              "nodeType": "Return",
                              "src": "2066:7:42"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "arguments": [
                            {
                              "id": 13873,
                              "name": "asset",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13857,
                              "src": "2104:5:42",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            ],
                            "id": 13872,
                            "name": "_isETH",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 183,
                            "src": "2097:6:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_bool_$",
                              "typeString": "function (contract IAsset) pure returns (bool)"
                            }
                          },
                          "id": 13874,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2097:13:42",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 13940,
                          "nodeType": "Block",
                          "src": "2711:680:42",
                          "statements": [
                            {
                              "assignments": [
                                13903
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 13903,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 13940,
                                  "src": "2725:12:42",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 13902,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "2725:6:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 13907,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 13905,
                                    "name": "asset",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13857,
                                    "src": "2750:5:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  ],
                                  "id": 13904,
                                  "name": "_asIERC20",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 265,
                                  "src": "2740:9:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IAsset) pure returns (contract IERC20)"
                                  }
                                },
                                "id": 13906,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2740:16:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2725:31:42"
                            },
                            {
                              "condition": {
                                "id": 13908,
                                "name": "fromInternalBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13863,
                                "src": "2775:19:42",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 13923,
                              "nodeType": "IfStatement",
                              "src": "2771:494:42",
                              "trueBody": {
                                "id": 13922,
                                "nodeType": "Block",
                                "src": "2796:469:42",
                                "statements": [
                                  {
                                    "assignments": [
                                      13910
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 13910,
                                        "mutability": "mutable",
                                        "name": "deductedBalance",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 13922,
                                        "src": "2934:23:42",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "typeName": {
                                          "id": 13909,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "2934:7:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 13917,
                                    "initialValue": {
                                      "arguments": [
                                        {
                                          "id": 13912,
                                          "name": "sender",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13861,
                                          "src": "2985:6:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          }
                                        },
                                        {
                                          "id": 13913,
                                          "name": "token",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13903,
                                          "src": "2993:5:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        {
                                          "id": 13914,
                                          "name": "amount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13859,
                                          "src": "3000:6:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "hexValue": "74727565",
                                          "id": 13915,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "bool",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "3008:4:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          },
                                          "value": "true"
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          },
                                          {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        ],
                                        "id": 13911,
                                        "name": "_decreaseInternalBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14086,
                                        "src": "2960:24:42",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_uint256_$_t_bool_$returns$_t_uint256_$",
                                          "typeString": "function (address,contract IERC20,uint256,bool) returns (uint256)"
                                        }
                                      },
                                      "id": 13916,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "2960:53:42",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "2934:79:42"
                                  },
                                  {
                                    "expression": {
                                      "id": 13920,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 13918,
                                        "name": "amount",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13859,
                                        "src": "3225:6:42",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "-=",
                                      "rightHandSide": {
                                        "id": 13919,
                                        "name": "deductedBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13910,
                                        "src": "3235:15:42",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "3225:25:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 13921,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3225:25:42"
                                  }
                                ]
                              }
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 13926,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 13924,
                                  "name": "amount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13859,
                                  "src": "3283:6:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">",
                                "rightExpression": {
                                  "hexValue": "30",
                                  "id": 13925,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3292:1:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "3283:10:42",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 13939,
                              "nodeType": "IfStatement",
                              "src": "3279:102:42",
                              "trueBody": {
                                "id": 13938,
                                "nodeType": "Block",
                                "src": "3295:86:42",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 13930,
                                          "name": "sender",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13861,
                                          "src": "3336:6:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          }
                                        },
                                        {
                                          "arguments": [
                                            {
                                              "id": 13933,
                                              "name": "this",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": -28,
                                              "src": "3352:4:42",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_contract$_AssetTransfersHandler_$14087",
                                                "typeString": "contract AssetTransfersHandler"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_contract$_AssetTransfersHandler_$14087",
                                                "typeString": "contract AssetTransfersHandler"
                                              }
                                            ],
                                            "id": 13932,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "lValueRequested": false,
                                            "nodeType": "ElementaryTypeNameExpression",
                                            "src": "3344:7:42",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_type$_t_address_$",
                                              "typeString": "type(address)"
                                            },
                                            "typeName": {
                                              "id": 13931,
                                              "name": "address",
                                              "nodeType": "ElementaryTypeName",
                                              "src": "3344:7:42",
                                              "typeDescriptions": {}
                                            }
                                          },
                                          "id": 13934,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "typeConversion",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "3344:13:42",
                                          "tryCall": false,
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address_payable",
                                            "typeString": "address payable"
                                          }
                                        },
                                        {
                                          "id": 13935,
                                          "name": "amount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13859,
                                          "src": "3359:6:42",
                                          "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"
                                          }
                                        ],
                                        "expression": {
                                          "id": 13927,
                                          "name": "token",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13903,
                                          "src": "3313:5:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        "id": 13929,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "safeTransferFrom",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 5274,
                                        "src": "3313:22:42",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5095_$",
                                          "typeString": "function (contract IERC20,address,address,uint256)"
                                        }
                                      },
                                      "id": 13936,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3313:53:42",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 13937,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3313:53:42"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "id": 13941,
                        "nodeType": "IfStatement",
                        "src": "2093:1298:42",
                        "trueBody": {
                          "id": 13901,
                          "nodeType": "Block",
                          "src": "2112:593:42",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13877,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "UnaryOperation",
                                    "operator": "!",
                                    "prefix": true,
                                    "src": "2135:20:42",
                                    "subExpression": {
                                      "id": 13876,
                                      "name": "fromInternalBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13863,
                                      "src": "2136:19:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 13878,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2157:6:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 13879,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "INVALID_ETH_INTERNAL_BALANCE",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 603,
                                    "src": "2157:35:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13875,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2126:8:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 13880,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2126:67:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13881,
                              "nodeType": "ExpressionStatement",
                              "src": "2126:67:42"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 13889,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "expression": {
                                        "arguments": [
                                          {
                                            "id": 13885,
                                            "name": "this",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": -28,
                                            "src": "2597:4:42",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_contract$_AssetTransfersHandler_$14087",
                                              "typeString": "contract AssetTransfersHandler"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_contract$_AssetTransfersHandler_$14087",
                                              "typeString": "contract AssetTransfersHandler"
                                            }
                                          ],
                                          "id": 13884,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "2589:7:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_address_$",
                                            "typeString": "type(address)"
                                          },
                                          "typeName": {
                                            "id": 13883,
                                            "name": "address",
                                            "nodeType": "ElementaryTypeName",
                                            "src": "2589:7:42",
                                            "typeDescriptions": {}
                                          }
                                        },
                                        "id": 13886,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "2589:13:42",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_address_payable",
                                          "typeString": "address payable"
                                        }
                                      },
                                      "id": 13887,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "balance",
                                      "nodeType": "MemberAccess",
                                      "src": "2589:21:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">=",
                                    "rightExpression": {
                                      "id": 13888,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13859,
                                      "src": "2614:6:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "2589:31:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 13890,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2622:6:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 13891,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "INSUFFICIENT_ETH",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 609,
                                    "src": "2622:23:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13882,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2580:8:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 13892,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2580:66:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13893,
                              "nodeType": "ExpressionStatement",
                              "src": "2580:66:42"
                            },
                            {
                              "expression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "expression": {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "id": 13894,
                                        "name": "_WETH",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 167,
                                        "src": "2660:5:42",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IWETH_$21281_$",
                                          "typeString": "function () view returns (contract IWETH)"
                                        }
                                      },
                                      "id": 13895,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "2660:7:42",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IWETH_$21281",
                                        "typeString": "contract IWETH"
                                      }
                                    },
                                    "id": 13896,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "deposit",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 21275,
                                    "src": "2660:15:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_payable$__$returns$__$",
                                      "typeString": "function () payable external"
                                    }
                                  },
                                  "id": 13898,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "names": [
                                    "value"
                                  ],
                                  "nodeType": "FunctionCallOptions",
                                  "options": [
                                    {
                                      "id": 13897,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13859,
                                      "src": "2684:6:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "src": "2660:32:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_payable$__$returns$__$value",
                                    "typeString": "function () payable external"
                                  }
                                },
                                "id": 13899,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2660:34:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13900,
                              "nodeType": "ExpressionStatement",
                              "src": "2660:34:42"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13855,
                    "nodeType": "StructuredDocumentation",
                    "src": "1228:650:42",
                    "text": " @dev Receives `amount` of `asset` from `sender`. If `fromInternalBalance` is true, it first withdraws as much\n as possible from Internal Balance, then transfers any remaining amount.\n If `asset` is ETH, `fromInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\n will be wrapped into WETH.\n WARNING: this function does not check that the contract caller has actually supplied any ETH - it is up to the\n caller of this function to check that this is true to prevent the Vault from using its own ETH (though the Vault\n typically doesn't hold any)."
                  },
                  "id": 13943,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_receiveAsset",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13864,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13857,
                        "mutability": "mutable",
                        "name": "asset",
                        "nodeType": "VariableDeclaration",
                        "scope": 13943,
                        "src": "1915:12:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        },
                        "typeName": {
                          "id": 13856,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "1915:6:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13859,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 13943,
                        "src": "1937:14:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13858,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1937:7:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13861,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 13943,
                        "src": "1961:14:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 13860,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1961:7:42",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13863,
                        "mutability": "mutable",
                        "name": "fromInternalBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 13943,
                        "src": "1985:24:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 13862,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "1985:4:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1905:110:42"
                  },
                  "returnParameters": {
                    "id": 13865,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2025:0:42"
                  },
                  "scope": 14087,
                  "src": "1883:1514:42",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 14009,
                    "nodeType": "Block",
                    "src": "3915:938:42",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 13957,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 13955,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13948,
                            "src": "3929:6:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 13956,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3939:1:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3929:11:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 13960,
                        "nodeType": "IfStatement",
                        "src": "3925:48:42",
                        "trueBody": {
                          "id": 13959,
                          "nodeType": "Block",
                          "src": "3942:31:42",
                          "statements": [
                            {
                              "functionReturnParameters": 13954,
                              "id": 13958,
                              "nodeType": "Return",
                              "src": "3956:7:42"
                            }
                          ]
                        }
                      },
                      {
                        "condition": {
                          "arguments": [
                            {
                              "id": 13962,
                              "name": "asset",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 13946,
                              "src": "3994:5:42",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            ],
                            "id": 13961,
                            "name": "_isETH",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 183,
                            "src": "3987:6:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_bool_$",
                              "typeString": "function (contract IAsset) pure returns (bool)"
                            }
                          },
                          "id": 13963,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3987:13:42",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 14007,
                          "nodeType": "Block",
                          "src": "4596:251:42",
                          "statements": [
                            {
                              "assignments": [
                                13985
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 13985,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 14007,
                                  "src": "4610:12:42",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 13984,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "4610:6:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 13989,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 13987,
                                    "name": "asset",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13946,
                                    "src": "4635:5:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  ],
                                  "id": 13986,
                                  "name": "_asIERC20",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 265,
                                  "src": "4625:9:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IAsset) pure returns (contract IERC20)"
                                  }
                                },
                                "id": 13988,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4625:16:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "4610:31:42"
                            },
                            {
                              "condition": {
                                "id": 13990,
                                "name": "toInternalBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13952,
                                "src": "4659:17:42",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 14005,
                                "nodeType": "Block",
                                "src": "4767:70:42",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 14001,
                                          "name": "recipient",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13950,
                                          "src": "4804:9:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address_payable",
                                            "typeString": "address payable"
                                          }
                                        },
                                        {
                                          "id": 14002,
                                          "name": "amount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13948,
                                          "src": "4815:6:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_address_payable",
                                            "typeString": "address payable"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "id": 13998,
                                          "name": "token",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13985,
                                          "src": "4785:5:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        "id": 14000,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "safeTransfer",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 5246,
                                        "src": "4785:18:42",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5095_$",
                                          "typeString": "function (contract IERC20,address,uint256)"
                                        }
                                      },
                                      "id": 14003,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "4785:37:42",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 14004,
                                    "nodeType": "ExpressionStatement",
                                    "src": "4785:37:42"
                                  }
                                ]
                              },
                              "id": 14006,
                              "nodeType": "IfStatement",
                              "src": "4655:182:42",
                              "trueBody": {
                                "id": 13997,
                                "nodeType": "Block",
                                "src": "4678:83:42",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 13992,
                                          "name": "recipient",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13950,
                                          "src": "4721:9:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address_payable",
                                            "typeString": "address payable"
                                          }
                                        },
                                        {
                                          "id": 13993,
                                          "name": "token",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13985,
                                          "src": "4732:5:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        {
                                          "id": 13994,
                                          "name": "amount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 13948,
                                          "src": "4739:6:42",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_address_payable",
                                            "typeString": "address payable"
                                          },
                                          {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 13991,
                                        "name": "_increaseInternalBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14073,
                                        "src": "4696:24:42",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                          "typeString": "function (address,contract IERC20,uint256)"
                                        }
                                      },
                                      "id": 13995,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "4696:50:42",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 13996,
                                    "nodeType": "ExpressionStatement",
                                    "src": "4696:50:42"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "id": 14008,
                        "nodeType": "IfStatement",
                        "src": "3983:864:42",
                        "trueBody": {
                          "id": 13983,
                          "nodeType": "Block",
                          "src": "4002:588:42",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13966,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "UnaryOperation",
                                    "operator": "!",
                                    "prefix": true,
                                    "src": "4176:18:42",
                                    "subExpression": {
                                      "id": 13965,
                                      "name": "toInternalBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13952,
                                      "src": "4177:17:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 13967,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "4196:6:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 13968,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "INVALID_ETH_INTERNAL_BALANCE",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 603,
                                    "src": "4196:35:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 13964,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "4167:8:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 13969,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4167:65:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13970,
                              "nodeType": "ExpressionStatement",
                              "src": "4167:65:42"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13974,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13948,
                                    "src": "4465:6:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "id": 13971,
                                      "name": "_WETH",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 167,
                                      "src": "4448:5:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IWETH_$21281_$",
                                        "typeString": "function () view returns (contract IWETH)"
                                      }
                                    },
                                    "id": 13972,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "4448:7:42",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IWETH_$21281",
                                      "typeString": "contract IWETH"
                                    }
                                  },
                                  "id": 13973,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "withdraw",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21280,
                                  "src": "4448:16:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                                    "typeString": "function (uint256) external"
                                  }
                                },
                                "id": 13975,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4448:24:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13976,
                              "nodeType": "ExpressionStatement",
                              "src": "4448:24:42"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 13980,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13948,
                                    "src": "4572:6:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 13977,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 13950,
                                    "src": "4552:9:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  "id": 13979,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sendValue",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3687,
                                  "src": "4552:19:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$",
                                    "typeString": "function (address payable,uint256)"
                                  }
                                },
                                "id": 13981,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4552:27:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 13982,
                              "nodeType": "ExpressionStatement",
                              "src": "4552:27:42"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 13944,
                    "nodeType": "StructuredDocumentation",
                    "src": "3403:359:42",
                    "text": " @dev Sends `amount` of `asset` to `recipient`. If `toInternalBalance` is true, the asset is deposited as Internal\n Balance instead of being transferred.\n If `asset` is ETH, `toInternalBalance` must be false (as ETH cannot be held as internal balance), and the funds\n are instead sent directly after unwrapping WETH."
                  },
                  "id": 14010,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_sendAsset",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 13953,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 13946,
                        "mutability": "mutable",
                        "name": "asset",
                        "nodeType": "VariableDeclaration",
                        "scope": 14010,
                        "src": "3796:12:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        },
                        "typeName": {
                          "id": 13945,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "3796:6:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13948,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 14010,
                        "src": "3818:14:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 13947,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3818:7:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13950,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 14010,
                        "src": "3842:25:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 13949,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3842:15:42",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 13952,
                        "mutability": "mutable",
                        "name": "toInternalBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 14010,
                        "src": "3877:22:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 13951,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3877:4:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3786:119:42"
                  },
                  "returnParameters": {
                    "id": 13954,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3915:0:42"
                  },
                  "scope": 14087,
                  "src": "3767:1086:42",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 14045,
                    "nodeType": "Block",
                    "src": "5467:203:42",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 14020,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 14017,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -15,
                                  "src": "5486:3:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 14018,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "value",
                                "nodeType": "MemberAccess",
                                "src": "5486:9:42",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "id": 14019,
                                "name": "amountUsed",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14013,
                                "src": "5499:10:42",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5486:23:42",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 14021,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5511:6:42",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 14022,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INSUFFICIENT_ETH",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 609,
                              "src": "5511:23:42",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 14016,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5477:8:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 14023,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5477:58:42",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14024,
                        "nodeType": "ExpressionStatement",
                        "src": "5477:58:42"
                      },
                      {
                        "assignments": [
                          14026
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14026,
                            "mutability": "mutable",
                            "name": "excess",
                            "nodeType": "VariableDeclaration",
                            "scope": 14045,
                            "src": "5546:14:42",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 14025,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5546:7:42",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14031,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14030,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 14027,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "5563:3:42",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 14028,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "value",
                            "nodeType": "MemberAccess",
                            "src": "5563:9:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "id": 14029,
                            "name": "amountUsed",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14013,
                            "src": "5575:10:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5563:22:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5546:39:42"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14034,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14032,
                            "name": "excess",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14026,
                            "src": "5599:6:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 14033,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5608:1:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5599:10:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 14044,
                        "nodeType": "IfStatement",
                        "src": "5595:69:42",
                        "trueBody": {
                          "id": 14043,
                          "nodeType": "Block",
                          "src": "5611:53:42",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 14040,
                                    "name": "excess",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14026,
                                    "src": "5646:6:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "expression": {
                                      "id": 14035,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "5625:3:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 14038,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "src": "5625:10:42",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  "id": 14039,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sendValue",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3687,
                                  "src": "5625:20:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$",
                                    "typeString": "function (address payable,uint256)"
                                  }
                                },
                                "id": 14041,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5625:28:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14042,
                              "nodeType": "ExpressionStatement",
                              "src": "5625:28:42"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14011,
                    "nodeType": "StructuredDocumentation",
                    "src": "4859:545:42",
                    "text": " @dev Returns excess ETH back to the contract caller, assuming `amountUsed` has been spent. Reverts\n if the caller sent less ETH than `amountUsed`.\n Because the caller might not know exactly how much ETH a Vault action will require, they may send extra.\n Note that this excess value is returned *to the contract caller* (msg.sender). If caller and e.g. swap sender are\n not the same (because the caller is a relayer for the sender), then it is up to the caller to manage this\n returned ETH."
                  },
                  "id": 14046,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_handleRemainingEth",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14014,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14013,
                        "mutability": "mutable",
                        "name": "amountUsed",
                        "nodeType": "VariableDeclaration",
                        "scope": 14046,
                        "src": "5438:18:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14012,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5438:7:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5437:20:42"
                  },
                  "returnParameters": {
                    "id": 14015,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5467:0:42"
                  },
                  "scope": 14087,
                  "src": "5409:261:42",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 14063,
                    "nodeType": "Block",
                    "src": "6363:78:42",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 14058,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 14051,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -15,
                                  "src": "6382:3:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 14052,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "6382:10:42",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "id": 14055,
                                      "name": "_WETH",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 167,
                                      "src": "6404:5:42",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IWETH_$21281_$",
                                        "typeString": "function () view returns (contract IWETH)"
                                      }
                                    },
                                    "id": 14056,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "6404:7:42",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IWETH_$21281",
                                      "typeString": "contract IWETH"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IWETH_$21281",
                                      "typeString": "contract IWETH"
                                    }
                                  ],
                                  "id": 14054,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6396:7:42",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 14053,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6396:7:42",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 14057,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "6396:16:42",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "6382:30:42",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 14059,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6414:6:42",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 14060,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "ETH_TRANSFER",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 615,
                              "src": "6414:19:42",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 14050,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6373:8:42",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 14061,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6373:61:42",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14062,
                        "nodeType": "ExpressionStatement",
                        "src": "6373:61:42"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14047,
                    "nodeType": "StructuredDocumentation",
                    "src": "5676:655:42",
                    "text": " @dev Enables the Vault to receive ETH. This is required for it to be able to unwrap WETH, which sends ETH to the\n caller.\n Any ETH sent to the Vault outside of the WETH unwrapping mechanism would be forever locked inside the Vault, so\n we prevent that from happening. Other mechanisms used to send ETH to the Vault (such as being the recipient of an\n ETH swap, Pool exit or withdrawal, contract selfdestruction, or receiving the block mining reward) will result in\n locked funds, but are not otherwise a security or soundness issue. This check only exists as an attempt to\n prevent user error."
                  },
                  "id": 14064,
                  "implemented": true,
                  "kind": "receive",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14048,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6343:2:42"
                  },
                  "returnParameters": {
                    "id": 14049,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6363:0:42"
                  },
                  "scope": 14087,
                  "src": "6336:105:42",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "id": 14073,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_increaseInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14071,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14066,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 14073,
                        "src": "6760:15:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14065,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6760:7:42",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14068,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 14073,
                        "src": "6785:12:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 14067,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6785:6:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14070,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 14073,
                        "src": "6807:14:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14069,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6807:7:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6750:77:42"
                  },
                  "returnParameters": {
                    "id": 14072,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6844:0:42"
                  },
                  "scope": 14087,
                  "src": "6717:128:42",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                },
                {
                  "id": 14086,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_decreaseInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14082,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14075,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 14086,
                        "src": "6894:15:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14074,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6894:7:42",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14077,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 14086,
                        "src": "6919:12:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 14076,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6919:6:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14079,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 14086,
                        "src": "6941:14:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14078,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6941:7:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14081,
                        "mutability": "mutable",
                        "name": "capped",
                        "nodeType": "VariableDeclaration",
                        "scope": 14086,
                        "src": "6965:11:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 14080,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "6965:4:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6884:98:42"
                  },
                  "returnParameters": {
                    "id": 14085,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14084,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 14086,
                        "src": "7009:7:42",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14083,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7009:7:42",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7008:9:42"
                  },
                  "scope": 14087,
                  "src": "6851:167:42",
                  "stateMutability": "nonpayable",
                  "virtual": true,
                  "visibility": "internal"
                }
              ],
              "scope": 14088,
              "src": "1094:5926:42"
            }
          ],
          "src": "688:6333:42"
        },
        "id": 42
      },
      "src.sol/amm/vault/Authorizer.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/Authorizer.sol",
          "exportedSymbols": {
            "Authorizer": [
              14272
            ]
          },
          "id": 14273,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 14089,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:43"
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAuthorizer.sol",
              "file": "./interfaces/IAuthorizer.sol",
              "id": 14090,
              "nodeType": "ImportDirective",
              "scope": 14273,
              "sourceUnit": 20661,
              "src": "713:38:43",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/AccessControl.sol",
              "file": "../lib/openzeppelin/AccessControl.sol",
              "id": 14091,
              "nodeType": "ImportDirective",
              "scope": 14273,
              "sourceUnit": 3631,
              "src": "752:47:43",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../lib/helpers/InputHelpers.sol",
              "id": 14092,
              "nodeType": "ImportDirective",
              "scope": 14273,
              "sourceUnit": 1043,
              "src": "800:41:43",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 14094,
                    "name": "AccessControl",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3630,
                    "src": "1355:13:43",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_AccessControl_$3630",
                      "typeString": "contract AccessControl"
                    }
                  },
                  "id": 14095,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1355:13:43"
                },
                {
                  "baseName": {
                    "id": 14096,
                    "name": "IAuthorizer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20660,
                    "src": "1370:11:43",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                      "typeString": "contract IAuthorizer"
                    }
                  },
                  "id": 14097,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1370:11:43"
                }
              ],
              "contractDependencies": [
                3630,
                20660
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 14093,
                "nodeType": "StructuredDocumentation",
                "src": "843:488:43",
                "text": " @dev Basic Authorizer implementation, based on OpenZeppelin's Access Control.\n Users are allowed to perform actions if they have the role with the same identifier. In this sense, roles are not\n being truly used as such, since they each map to a single action identifier.\n This temporary implementation is expected to be replaced soon after launch by a more sophisticated one, able to\n manage permissions across multiple contracts and to natively handle timelocks."
              },
              "fullyImplemented": true,
              "id": 14272,
              "linearizedBaseContracts": [
                14272,
                20660,
                3630
              ],
              "name": "Authorizer",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 14107,
                    "nodeType": "Block",
                    "src": "1415:54:43",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 14103,
                              "name": "DEFAULT_ADMIN_ROLE",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3370,
                              "src": "1436:18:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 14104,
                              "name": "admin",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14099,
                              "src": "1456:5:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 14102,
                            "name": "_setupRole",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3556,
                            "src": "1425:10:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                              "typeString": "function (bytes32,address)"
                            }
                          },
                          "id": 14105,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1425:37:43",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14106,
                        "nodeType": "ExpressionStatement",
                        "src": "1425:37:43"
                      }
                    ]
                  },
                  "id": 14108,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14100,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14099,
                        "mutability": "mutable",
                        "name": "admin",
                        "nodeType": "VariableDeclaration",
                        "scope": 14108,
                        "src": "1400:13:43",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14098,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1400:7:43",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1399:15:43"
                  },
                  "returnParameters": {
                    "id": 14101,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1415:0:43"
                  },
                  "scope": 14272,
                  "src": "1388:81:43",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    20659
                  ],
                  "body": {
                    "id": 14126,
                    "nodeType": "Block",
                    "src": "1605:129:43",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 14122,
                              "name": "actionId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14110,
                              "src": "1709:8:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 14123,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14112,
                              "src": "1719:7:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "id": 14120,
                              "name": "AccessControl",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3630,
                              "src": "1687:13:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_AccessControl_$3630_$",
                                "typeString": "type(contract AccessControl)"
                              }
                            },
                            "id": 14121,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "hasRole",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3416,
                            "src": "1687:21:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$",
                              "typeString": "function (bytes32,address) view returns (bool)"
                            }
                          },
                          "id": 14124,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1687:40:43",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 14119,
                        "id": 14125,
                        "nodeType": "Return",
                        "src": "1680:47:43"
                      }
                    ]
                  },
                  "functionSelector": "9be2a884",
                  "id": 14127,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "canPerform",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 14116,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1581:8:43"
                  },
                  "parameters": {
                    "id": 14115,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14110,
                        "mutability": "mutable",
                        "name": "actionId",
                        "nodeType": "VariableDeclaration",
                        "scope": 14127,
                        "src": "1504:16:43",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 14109,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1504:7:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14112,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 14127,
                        "src": "1530:15:43",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14111,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1530:7:43",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14114,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 14127,
                        "src": "1555:7:43",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14113,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1555:7:43",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1494:74:43"
                  },
                  "returnParameters": {
                    "id": 14119,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14118,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 14127,
                        "src": "1599:4:43",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 14117,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "1599:4:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1598:6:43"
                  },
                  "scope": 14272,
                  "src": "1475:259:43",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 14156,
                    "nodeType": "Block",
                    "src": "1881:112:43",
                    "statements": [
                      {
                        "body": {
                          "id": 14154,
                          "nodeType": "Block",
                          "src": "1934:53:43",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 14148,
                                      "name": "roles",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14131,
                                      "src": "1958:5:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    },
                                    "id": 14150,
                                    "indexExpression": {
                                      "id": 14149,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14137,
                                      "src": "1964:1:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "1958:8:43",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 14151,
                                    "name": "account",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14133,
                                    "src": "1968:7:43",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 14147,
                                  "name": "grantRole",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3492,
                                  "src": "1948:9:43",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                                    "typeString": "function (bytes32,address)"
                                  }
                                },
                                "id": 14152,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1948:28:43",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14153,
                              "nodeType": "ExpressionStatement",
                              "src": "1948:28:43"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14143,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14140,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14137,
                            "src": "1911:1:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 14141,
                              "name": "roles",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14131,
                              "src": "1915:5:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 14142,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "1915:12:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1911:16:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 14155,
                        "initializationExpression": {
                          "assignments": [
                            14137
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 14137,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 14155,
                              "src": "1896:9:43",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 14136,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1896:7:43",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 14139,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 14138,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1908:1:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "1896:13:43"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 14145,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "1929:3:43",
                            "subExpression": {
                              "id": 14144,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14137,
                              "src": "1929:1:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14146,
                          "nodeType": "ExpressionStatement",
                          "src": "1929:3:43"
                        },
                        "nodeType": "ForStatement",
                        "src": "1891:96:43"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14128,
                    "nodeType": "StructuredDocumentation",
                    "src": "1740:66:43",
                    "text": " @dev Grants multiple roles to a single account."
                  },
                  "functionSelector": "fcd7627e",
                  "id": 14157,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "grantRoles",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14134,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14131,
                        "mutability": "mutable",
                        "name": "roles",
                        "nodeType": "VariableDeclaration",
                        "scope": 14157,
                        "src": "1831:22:43",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14129,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "1831:7:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 14130,
                          "nodeType": "ArrayTypeName",
                          "src": "1831:9:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14133,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 14157,
                        "src": "1855:15:43",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14132,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1855:7:43",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1830:41:43"
                  },
                  "returnParameters": {
                    "id": 14135,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1881:0:43"
                  },
                  "scope": 14272,
                  "src": "1811:182:43",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 14198,
                    "nodeType": "Block",
                    "src": "2149:192:43",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14170,
                                "name": "roles",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14161,
                                "src": "2195:5:43",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                  "typeString": "bytes32[] memory"
                                }
                              },
                              "id": 14171,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "2195:12:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 14172,
                                "name": "accounts",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14164,
                                "src": "2209:8:43",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                  "typeString": "address[] memory"
                                }
                              },
                              "id": 14173,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "2209:15:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 14167,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "2159:12:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 14169,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "2159:35:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 14174,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2159:66:43",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14175,
                        "nodeType": "ExpressionStatement",
                        "src": "2159:66:43"
                      },
                      {
                        "body": {
                          "id": 14196,
                          "nodeType": "Block",
                          "src": "2278:57:43",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 14188,
                                      "name": "roles",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14161,
                                      "src": "2302:5:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    },
                                    "id": 14190,
                                    "indexExpression": {
                                      "id": 14189,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14177,
                                      "src": "2308:1:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2302:8:43",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 14191,
                                      "name": "accounts",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14164,
                                      "src": "2312:8:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                        "typeString": "address[] memory"
                                      }
                                    },
                                    "id": 14193,
                                    "indexExpression": {
                                      "id": 14192,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14177,
                                      "src": "2321:1:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2312:11:43",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 14187,
                                  "name": "grantRole",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3492,
                                  "src": "2292:9:43",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                                    "typeString": "function (bytes32,address)"
                                  }
                                },
                                "id": 14194,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2292:32:43",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14195,
                              "nodeType": "ExpressionStatement",
                              "src": "2292:32:43"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14183,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14180,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14177,
                            "src": "2255:1:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 14181,
                              "name": "roles",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14161,
                              "src": "2259:5:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 14182,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2259:12:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2255:16:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 14197,
                        "initializationExpression": {
                          "assignments": [
                            14177
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 14177,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 14197,
                              "src": "2240:9:43",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 14176,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2240:7:43",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 14179,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 14178,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2252:1:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2240:13:43"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 14185,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2273:3:43",
                            "subExpression": {
                              "id": 14184,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14177,
                              "src": "2273:1:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14186,
                          "nodeType": "ExpressionStatement",
                          "src": "2273:3:43"
                        },
                        "nodeType": "ForStatement",
                        "src": "2235:100:43"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14158,
                    "nodeType": "StructuredDocumentation",
                    "src": "1999:59:43",
                    "text": " @dev Grants roles to a list of accounts."
                  },
                  "functionSelector": "a73cb2ab",
                  "id": 14199,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "grantRolesToMany",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14165,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14161,
                        "mutability": "mutable",
                        "name": "roles",
                        "nodeType": "VariableDeclaration",
                        "scope": 14199,
                        "src": "2089:22:43",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14159,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "2089:7:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 14160,
                          "nodeType": "ArrayTypeName",
                          "src": "2089:9:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14164,
                        "mutability": "mutable",
                        "name": "accounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 14199,
                        "src": "2113:25:43",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                          "typeString": "address[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14162,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "2113:7:43",
                            "stateMutability": "nonpayable",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 14163,
                          "nodeType": "ArrayTypeName",
                          "src": "2113:9:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                            "typeString": "address[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2088:51:43"
                  },
                  "returnParameters": {
                    "id": 14166,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2149:0:43"
                  },
                  "scope": 14272,
                  "src": "2063:278:43",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 14228,
                    "nodeType": "Block",
                    "src": "2492:113:43",
                    "statements": [
                      {
                        "body": {
                          "id": 14226,
                          "nodeType": "Block",
                          "src": "2545:54:43",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 14220,
                                      "name": "roles",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14203,
                                      "src": "2570:5:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    },
                                    "id": 14222,
                                    "indexExpression": {
                                      "id": 14221,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14209,
                                      "src": "2576:1:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2570:8:43",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 14223,
                                    "name": "account",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14205,
                                    "src": "2580:7:43",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 14219,
                                  "name": "revokeRole",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3519,
                                  "src": "2559:10:43",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                                    "typeString": "function (bytes32,address)"
                                  }
                                },
                                "id": 14224,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2559:29:43",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14225,
                              "nodeType": "ExpressionStatement",
                              "src": "2559:29:43"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14215,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14212,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14209,
                            "src": "2522:1:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 14213,
                              "name": "roles",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14203,
                              "src": "2526:5:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 14214,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2526:12:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2522:16:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 14227,
                        "initializationExpression": {
                          "assignments": [
                            14209
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 14209,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 14227,
                              "src": "2507:9:43",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 14208,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2507:7:43",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 14211,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 14210,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2519:1:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2507:13:43"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 14217,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2540:3:43",
                            "subExpression": {
                              "id": 14216,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14209,
                              "src": "2540:1:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14218,
                          "nodeType": "ExpressionStatement",
                          "src": "2540:3:43"
                        },
                        "nodeType": "ForStatement",
                        "src": "2502:97:43"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14200,
                    "nodeType": "StructuredDocumentation",
                    "src": "2347:69:43",
                    "text": " @dev Revokes multiple roles from a single account."
                  },
                  "functionSelector": "988360a3",
                  "id": 14229,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "revokeRoles",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14206,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14203,
                        "mutability": "mutable",
                        "name": "roles",
                        "nodeType": "VariableDeclaration",
                        "scope": 14229,
                        "src": "2442:22:43",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14201,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "2442:7:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 14202,
                          "nodeType": "ArrayTypeName",
                          "src": "2442:9:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14205,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 14229,
                        "src": "2466:15:43",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14204,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2466:7:43",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2441:41:43"
                  },
                  "returnParameters": {
                    "id": 14207,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2492:0:43"
                  },
                  "scope": 14272,
                  "src": "2421:184:43",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 14270,
                    "nodeType": "Block",
                    "src": "2767:193:43",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14242,
                                "name": "roles",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14233,
                                "src": "2813:5:43",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                  "typeString": "bytes32[] memory"
                                }
                              },
                              "id": 14243,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "2813:12:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 14244,
                                "name": "accounts",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14236,
                                "src": "2827:8:43",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                  "typeString": "address[] memory"
                                }
                              },
                              "id": 14245,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "2827:15:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 14239,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "2777:12:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 14241,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "2777:35:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 14246,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2777:66:43",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14247,
                        "nodeType": "ExpressionStatement",
                        "src": "2777:66:43"
                      },
                      {
                        "body": {
                          "id": 14268,
                          "nodeType": "Block",
                          "src": "2896:58:43",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 14260,
                                      "name": "roles",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14233,
                                      "src": "2921:5:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    },
                                    "id": 14262,
                                    "indexExpression": {
                                      "id": 14261,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14249,
                                      "src": "2927:1:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2921:8:43",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 14263,
                                      "name": "accounts",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14236,
                                      "src": "2931:8:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                        "typeString": "address[] memory"
                                      }
                                    },
                                    "id": 14265,
                                    "indexExpression": {
                                      "id": 14264,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14249,
                                      "src": "2940:1:43",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2931:11:43",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 14259,
                                  "name": "revokeRole",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3519,
                                  "src": "2910:10:43",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
                                    "typeString": "function (bytes32,address)"
                                  }
                                },
                                "id": 14266,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2910:33:43",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14267,
                              "nodeType": "ExpressionStatement",
                              "src": "2910:33:43"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14255,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14252,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14249,
                            "src": "2873:1:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 14253,
                              "name": "roles",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14233,
                              "src": "2877:5:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 14254,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2877:12:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2873:16:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 14269,
                        "initializationExpression": {
                          "assignments": [
                            14249
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 14249,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 14269,
                              "src": "2858:9:43",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 14248,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2858:7:43",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 14251,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 14250,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2870:1:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2858:13:43"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 14257,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2891:3:43",
                            "subExpression": {
                              "id": 14256,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14249,
                              "src": "2891:1:43",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14258,
                          "nodeType": "ExpressionStatement",
                          "src": "2891:3:43"
                        },
                        "nodeType": "ForStatement",
                        "src": "2853:101:43"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14230,
                    "nodeType": "StructuredDocumentation",
                    "src": "2611:62:43",
                    "text": " @dev Revokes roles from a list of accounts."
                  },
                  "functionSelector": "18b2cde9",
                  "id": 14271,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "revokeRolesFromMany",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14237,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14233,
                        "mutability": "mutable",
                        "name": "roles",
                        "nodeType": "VariableDeclaration",
                        "scope": 14271,
                        "src": "2707:22:43",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14231,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "2707:7:43",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 14232,
                          "nodeType": "ArrayTypeName",
                          "src": "2707:9:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14236,
                        "mutability": "mutable",
                        "name": "accounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 14271,
                        "src": "2731:25:43",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                          "typeString": "address[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14234,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "2731:7:43",
                            "stateMutability": "nonpayable",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 14235,
                          "nodeType": "ArrayTypeName",
                          "src": "2731:9:43",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                            "typeString": "address[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2706:51:43"
                  },
                  "returnParameters": {
                    "id": 14238,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2767:0:43"
                  },
                  "scope": 14272,
                  "src": "2678:282:43",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 14273,
              "src": "1332:1630:43"
            }
          ],
          "src": "688:2275:43"
        },
        "id": 43
      },
      "src.sol/amm/vault/Fees.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/Fees.sol",
          "exportedSymbols": {
            "Fees": [
              14372
            ]
          },
          "id": 14373,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 14274,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:44"
            },
            {
              "id": 14275,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:44"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/FixedPoint.sol",
              "file": "../lib/math/FixedPoint.sol",
              "id": 14276,
              "nodeType": "ImportDirective",
              "scope": 14373,
              "sourceUnit": 1816,
              "src": "747:36:44",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 14277,
              "nodeType": "ImportDirective",
              "scope": 14373,
              "sourceUnit": 656,
              "src": "784:43:44",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 14278,
              "nodeType": "ImportDirective",
              "scope": 14373,
              "sourceUnit": 5096,
              "src": "828:40:44",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 14279,
              "nodeType": "ImportDirective",
              "scope": 14373,
              "sourceUnit": 5188,
              "src": "869:49:44",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
              "file": "../lib/openzeppelin/SafeERC20.sol",
              "id": 14280,
              "nodeType": "ImportDirective",
              "scope": 14373,
              "sourceUnit": 5312,
              "src": "919:43:44",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/ProtocolFeesCollector.sol",
              "file": "./ProtocolFeesCollector.sol",
              "id": 14281,
              "nodeType": "ImportDirective",
              "scope": 14373,
              "sourceUnit": 16288,
              "src": "964:37:44",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/VaultAuthorization.sol",
              "file": "./VaultAuthorization.sol",
              "id": 14282,
              "nodeType": "ImportDirective",
              "scope": 14373,
              "sourceUnit": 18419,
              "src": "1002:34:44",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "./interfaces/IVault.sol",
              "id": 14283,
              "nodeType": "ImportDirective",
              "scope": 14373,
              "sourceUnit": 21267,
              "src": "1037:33:44",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 14285,
                    "name": "IVault",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21266,
                    "src": "1246:6:44",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IVault_$21266",
                      "typeString": "contract IVault"
                    }
                  },
                  "id": 14286,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1246:6:44"
                }
              ],
              "contractDependencies": [
                16287,
                20822,
                21266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 14284,
                "nodeType": "StructuredDocumentation",
                "src": "1072:147:44",
                "text": " @dev To reduce the bytecode size of the Vault, most of the protocol fee logic is not here, but in the\n ProtocolFeesCollector contract."
              },
              "fullyImplemented": false,
              "id": 14372,
              "linearizedBaseContracts": [
                14372,
                21266,
                20822
              ],
              "name": "Fees",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 14289,
                  "libraryName": {
                    "id": 14287,
                    "name": "SafeERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5311,
                    "src": "1265:9:44",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeERC20_$5311",
                      "typeString": "library SafeERC20"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1259:27:44",
                  "typeName": {
                    "id": 14288,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "1279:6:44",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 14291,
                  "mutability": "immutable",
                  "name": "_protocolFeesCollector",
                  "nodeType": "VariableDeclaration",
                  "scope": 14372,
                  "src": "1292:62:44",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                    "typeString": "contract ProtocolFeesCollector"
                  },
                  "typeName": {
                    "id": 14290,
                    "name": "ProtocolFeesCollector",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 16287,
                    "src": "1292:21:44",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                      "typeString": "contract ProtocolFeesCollector"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 14303,
                    "nodeType": "Block",
                    "src": "1375:81:44",
                    "statements": [
                      {
                        "expression": {
                          "id": 14301,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 14294,
                            "name": "_protocolFeesCollector",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14291,
                            "src": "1385:22:44",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                              "typeString": "contract ProtocolFeesCollector"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "id": 14298,
                                    "name": "this",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": -28,
                                    "src": "1443:4:44",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Fees_$14372",
                                      "typeString": "contract Fees"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_Fees_$14372",
                                      "typeString": "contract Fees"
                                    }
                                  ],
                                  "id": 14297,
                                  "name": "IVault",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 21266,
                                  "src": "1436:6:44",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_IVault_$21266_$",
                                    "typeString": "type(contract IVault)"
                                  }
                                },
                                "id": 14299,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1436:12:44",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IVault_$21266",
                                  "typeString": "contract IVault"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_IVault_$21266",
                                  "typeString": "contract IVault"
                                }
                              ],
                              "id": 14296,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "1410:25:44",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_IVault_$21266_$returns$_t_contract$_ProtocolFeesCollector_$16287_$",
                                "typeString": "function (contract IVault) returns (contract ProtocolFeesCollector)"
                              },
                              "typeName": {
                                "id": 14295,
                                "name": "ProtocolFeesCollector",
                                "nodeType": "UserDefinedTypeName",
                                "referencedDeclaration": 16287,
                                "src": "1414:21:44",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                  "typeString": "contract ProtocolFeesCollector"
                                }
                              }
                            },
                            "id": 14300,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1410:39:44",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                              "typeString": "contract ProtocolFeesCollector"
                            }
                          },
                          "src": "1385:64:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                            "typeString": "contract ProtocolFeesCollector"
                          }
                        },
                        "id": 14302,
                        "nodeType": "ExpressionStatement",
                        "src": "1385:64:44"
                      }
                    ]
                  },
                  "id": 14304,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14292,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1372:2:44"
                  },
                  "returnParameters": {
                    "id": 14293,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1375:0:44"
                  },
                  "scope": 14372,
                  "src": "1361:95:44",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    21253
                  ],
                  "body": {
                    "id": 14312,
                    "nodeType": "Block",
                    "src": "1551:46:44",
                    "statements": [
                      {
                        "expression": {
                          "id": 14310,
                          "name": "_protocolFeesCollector",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 14291,
                          "src": "1568:22:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                            "typeString": "contract ProtocolFeesCollector"
                          }
                        },
                        "functionReturnParameters": 14309,
                        "id": 14311,
                        "nodeType": "Return",
                        "src": "1561:29:44"
                      }
                    ]
                  },
                  "functionSelector": "d2946c2b",
                  "id": 14313,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getProtocolFeesCollector",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 14306,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1510:8:44"
                  },
                  "parameters": {
                    "id": 14305,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1495:2:44"
                  },
                  "returnParameters": {
                    "id": 14309,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14308,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 14313,
                        "src": "1528:21:44",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                          "typeString": "contract ProtocolFeesCollector"
                        },
                        "typeName": {
                          "id": 14307,
                          "name": "ProtocolFeesCollector",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 16287,
                          "src": "1528:21:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                            "typeString": "contract ProtocolFeesCollector"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1527:23:44"
                  },
                  "scope": 14372,
                  "src": "1462:135:44",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 14324,
                    "nodeType": "Block",
                    "src": "1746:73:44",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 14319,
                                "name": "getProtocolFeesCollector",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14313,
                                "src": "1763:24:44",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_ProtocolFeesCollector_$16287_$",
                                  "typeString": "function () view returns (contract ProtocolFeesCollector)"
                                }
                              },
                              "id": 14320,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1763:26:44",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                "typeString": "contract ProtocolFeesCollector"
                              }
                            },
                            "id": 14321,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getSwapFeePercentage",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 16191,
                            "src": "1763:47:44",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                              "typeString": "function () view external returns (uint256)"
                            }
                          },
                          "id": 14322,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1763:49:44",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 14318,
                        "id": 14323,
                        "nodeType": "Return",
                        "src": "1756:56:44"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14314,
                    "nodeType": "StructuredDocumentation",
                    "src": "1603:65:44",
                    "text": " @dev Returns the protocol swap fee percentage."
                  },
                  "id": 14325,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getProtocolSwapFeePercentage",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14315,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1711:2:44"
                  },
                  "returnParameters": {
                    "id": 14318,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14317,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 14325,
                        "src": "1737:7:44",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14316,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1737:7:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1736:9:44"
                  },
                  "scope": 14372,
                  "src": "1673:146:44",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 14346,
                    "nodeType": "Block",
                    "src": "2011:319:44",
                    "statements": [
                      {
                        "assignments": [
                          14334
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14334,
                            "mutability": "mutable",
                            "name": "percentage",
                            "nodeType": "VariableDeclaration",
                            "scope": 14346,
                            "src": "2195:18:44",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 14333,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2195:7:44",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14339,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 14335,
                                "name": "getProtocolFeesCollector",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14313,
                                "src": "2216:24:44",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_ProtocolFeesCollector_$16287_$",
                                  "typeString": "function () view returns (contract ProtocolFeesCollector)"
                                }
                              },
                              "id": 14336,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2216:26:44",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                "typeString": "contract ProtocolFeesCollector"
                              }
                            },
                            "id": 14337,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getFlashLoanFeePercentage",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 16199,
                            "src": "2216:52:44",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                              "typeString": "function () view external returns (uint256)"
                            }
                          },
                          "id": 14338,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2216:54:44",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2195:75:44"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 14342,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14328,
                              "src": "2304:6:44",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 14343,
                              "name": "percentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14334,
                              "src": "2312:10:44",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 14340,
                              "name": "FixedPoint",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1815,
                              "src": "2287:10:44",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1815_$",
                                "typeString": "type(library FixedPoint)"
                              }
                            },
                            "id": 14341,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulUp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1620,
                            "src": "2287:16:44",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 14344,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2287:36:44",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 14332,
                        "id": 14345,
                        "nodeType": "Return",
                        "src": "2280:43:44"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14326,
                    "nodeType": "StructuredDocumentation",
                    "src": "1825:95:44",
                    "text": " @dev Returns the protocol fee amount to charge for a flash loan of `amount`."
                  },
                  "id": 14347,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_calculateFlashLoanFeeAmount",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14329,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14328,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 14347,
                        "src": "1963:14:44",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14327,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1963:7:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1962:16:44"
                  },
                  "returnParameters": {
                    "id": 14332,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14331,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 14347,
                        "src": "2002:7:44",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14330,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2002:7:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2001:9:44"
                  },
                  "scope": 14372,
                  "src": "1925:405:44",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 14370,
                    "nodeType": "Block",
                    "src": "2392:120:44",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14356,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14354,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14351,
                            "src": "2406:6:44",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 14355,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2415:1:44",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "2406:10:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 14369,
                        "nodeType": "IfStatement",
                        "src": "2402:104:44",
                        "trueBody": {
                          "id": 14368,
                          "nodeType": "Block",
                          "src": "2418:88:44",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "arguments": [],
                                        "expression": {
                                          "argumentTypes": [],
                                          "id": 14362,
                                          "name": "getProtocolFeesCollector",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 14313,
                                          "src": "2459:24:44",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_ProtocolFeesCollector_$16287_$",
                                            "typeString": "function () view returns (contract ProtocolFeesCollector)"
                                          }
                                        },
                                        "id": 14363,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "2459:26:44",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                          "typeString": "contract ProtocolFeesCollector"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                          "typeString": "contract ProtocolFeesCollector"
                                        }
                                      ],
                                      "id": 14361,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "2451:7:44",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 14360,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "2451:7:44",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 14364,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2451:35:44",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 14365,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14351,
                                    "src": "2488:6:44",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 14357,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14349,
                                    "src": "2432:5:44",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 14359,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "safeTransfer",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 5246,
                                  "src": "2432:18:44",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IERC20,address,uint256)"
                                  }
                                },
                                "id": 14366,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2432:63:44",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14367,
                              "nodeType": "ExpressionStatement",
                              "src": "2432:63:44"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 14371,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_payFee",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14352,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14349,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 14371,
                        "src": "2353:12:44",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 14348,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "2353:6:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14351,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 14371,
                        "src": "2367:14:44",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 14350,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2367:7:44",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2352:30:44"
                  },
                  "returnParameters": {
                    "id": 14353,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2392:0:44"
                  },
                  "scope": 14372,
                  "src": "2336:176:44",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 14373,
              "src": "1220:1294:44"
            }
          ],
          "src": "688:1827:44"
        },
        "id": 44
      },
      "src.sol/amm/vault/FlashLoans.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/FlashLoans.sol",
          "exportedSymbols": {
            "FlashLoans": [
              14608
            ]
          },
          "id": 14609,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 14374,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "845:23:45"
            },
            {
              "id": 14375,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "869:33:45"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 14376,
              "nodeType": "ImportDirective",
              "scope": 14609,
              "sourceUnit": 656,
              "src": "904:43:45",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 14377,
              "nodeType": "ImportDirective",
              "scope": 14609,
              "sourceUnit": 5096,
              "src": "948:40:45",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 14378,
              "nodeType": "ImportDirective",
              "scope": 14609,
              "sourceUnit": 5188,
              "src": "989:49:45",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
              "file": "../lib/openzeppelin/SafeERC20.sol",
              "id": 14379,
              "nodeType": "ImportDirective",
              "scope": 14609,
              "sourceUnit": 5312,
              "src": "1039:43:45",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/Fees.sol",
              "file": "./Fees.sol",
              "id": 14380,
              "nodeType": "ImportDirective",
              "scope": 14609,
              "sourceUnit": 14373,
              "src": "1084:20:45",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol",
              "file": "./interfaces/IFlashLoanRecipient.sol",
              "id": 14381,
              "nodeType": "ImportDirective",
              "scope": 14609,
              "sourceUnit": 20739,
              "src": "1105:46:45",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 14383,
                    "name": "Fees",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 14372,
                    "src": "1369:4:45",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Fees_$14372",
                      "typeString": "contract Fees"
                    }
                  },
                  "id": 14384,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1369:4:45"
                },
                {
                  "baseName": {
                    "id": 14385,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "1375:15:45",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 14386,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1375:15:45"
                },
                {
                  "baseName": {
                    "id": 14387,
                    "name": "TemporarilyPausable",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1473,
                    "src": "1392:19:45",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_TemporarilyPausable_$1473",
                      "typeString": "contract TemporarilyPausable"
                    }
                  },
                  "id": 14388,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1392:19:45"
                }
              ],
              "contractDependencies": [
                1473,
                5187,
                14372,
                20822,
                21266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 14382,
                "nodeType": "StructuredDocumentation",
                "src": "1153:183:45",
                "text": " @dev Handles Flash Loans through the Vault. Calls the `receiveFlashLoan` hook on the flash loan recipient\n contract, which implements the `IFlashLoanRecipient` interface."
              },
              "fullyImplemented": false,
              "id": 14608,
              "linearizedBaseContracts": [
                14608,
                1473,
                5187,
                14372,
                21266,
                20822
              ],
              "name": "FlashLoans",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 14391,
                  "libraryName": {
                    "id": 14389,
                    "name": "SafeERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5311,
                    "src": "1424:9:45",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeERC20_$5311",
                      "typeString": "library SafeERC20"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1418:27:45",
                  "typeName": {
                    "id": 14390,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "1438:6:45",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  }
                },
                {
                  "baseFunctions": [
                    21214
                  ],
                  "body": {
                    "id": 14606,
                    "nodeType": "Block",
                    "src": "1657:1846:45",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14412,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14396,
                                "src": "1703:6:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 14413,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "1703:13:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 14414,
                                "name": "amounts",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14399,
                                "src": "1718:7:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 14415,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "1718:14:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 14409,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "1667:12:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 14411,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "1667:35:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 14416,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1667:66:45",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14417,
                        "nodeType": "ExpressionStatement",
                        "src": "1667:66:45"
                      },
                      {
                        "assignments": [
                          14422
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14422,
                            "mutability": "mutable",
                            "name": "feeAmounts",
                            "nodeType": "VariableDeclaration",
                            "scope": 14606,
                            "src": "1744:27:45",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14420,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1744:7:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14421,
                              "nodeType": "ArrayTypeName",
                              "src": "1744:9:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14429,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14426,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14396,
                                "src": "1788:6:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 14427,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "1788:13:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 14425,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "1774:13:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14423,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1778:7:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14424,
                              "nodeType": "ArrayTypeName",
                              "src": "1778:9:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 14428,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1774:28:45",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1744:58:45"
                      },
                      {
                        "assignments": [
                          14434
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14434,
                            "mutability": "mutable",
                            "name": "preLoanBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 14606,
                            "src": "1812:32:45",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14432,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1812:7:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14433,
                              "nodeType": "ArrayTypeName",
                              "src": "1812:9:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14441,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14438,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14396,
                                "src": "1861:6:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 14439,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "1861:13:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 14437,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "1847:13:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14435,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1851:7:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14436,
                              "nodeType": "ArrayTypeName",
                              "src": "1851:9:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 14440,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1847:28:45",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1812:63:45"
                      },
                      {
                        "assignments": [
                          14443
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14443,
                            "mutability": "mutable",
                            "name": "previousToken",
                            "nodeType": "VariableDeclaration",
                            "scope": 14606,
                            "src": "1983:20:45",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 14442,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "1983:6:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14447,
                        "initialValue": {
                          "arguments": [
                            {
                              "hexValue": "30",
                              "id": 14445,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2013:1:45",
                              "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": 14444,
                            "name": "IERC20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5095,
                            "src": "2006:6:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                              "typeString": "type(contract IERC20)"
                            }
                          },
                          "id": 14446,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2006:9:45",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1983:32:45"
                      },
                      {
                        "body": {
                          "id": 14531,
                          "nodeType": "Block",
                          "src": "2070:521:45",
                          "statements": [
                            {
                              "assignments": [
                                14460
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 14460,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 14531,
                                  "src": "2084:12:45",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 14459,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "2084:6:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 14464,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 14461,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14396,
                                  "src": "2099:6:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 14463,
                                "indexExpression": {
                                  "id": 14462,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14449,
                                  "src": "2106:1:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "2099:9:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2084:24:45"
                            },
                            {
                              "assignments": [
                                14466
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 14466,
                                  "mutability": "mutable",
                                  "name": "amount",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 14531,
                                  "src": "2122:14:45",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 14465,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2122:7:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 14470,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 14467,
                                  "name": "amounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14399,
                                  "src": "2139:7:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 14469,
                                "indexExpression": {
                                  "id": 14468,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14449,
                                  "src": "2147:1:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "2139:10:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2122:27:45"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    "id": 14474,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 14472,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14460,
                                      "src": "2173:5:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">",
                                    "rightExpression": {
                                      "id": 14473,
                                      "name": "previousToken",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14443,
                                      "src": "2181:13:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "src": "2173:21:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "condition": {
                                      "commonType": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      "id": 14479,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 14475,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14460,
                                        "src": "2196:5:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "==",
                                      "rightExpression": {
                                        "arguments": [
                                          {
                                            "hexValue": "30",
                                            "id": 14477,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "kind": "number",
                                            "lValueRequested": false,
                                            "nodeType": "Literal",
                                            "src": "2212:1:45",
                                            "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": 14476,
                                          "name": "IERC20",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 5095,
                                          "src": "2205:6:45",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                            "typeString": "type(contract IERC20)"
                                          }
                                        },
                                        "id": 14478,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "2205:9:45",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "src": "2196:18:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "falseExpression": {
                                      "expression": {
                                        "id": 14482,
                                        "name": "Errors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 655,
                                        "src": "2237:6:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                          "typeString": "type(library Errors)"
                                        }
                                      },
                                      "id": 14483,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "UNSORTED_TOKENS",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 408,
                                      "src": "2237:22:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 14484,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "Conditional",
                                    "src": "2196:63:45",
                                    "trueExpression": {
                                      "expression": {
                                        "id": 14480,
                                        "name": "Errors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 655,
                                        "src": "2217:6:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                          "typeString": "type(library Errors)"
                                        }
                                      },
                                      "id": 14481,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "ZERO_TOKEN",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 414,
                                      "src": "2217:17:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 14471,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2164:8:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 14485,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2164:96:45",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14486,
                              "nodeType": "ExpressionStatement",
                              "src": "2164:96:45"
                            },
                            {
                              "expression": {
                                "id": 14489,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 14487,
                                  "name": "previousToken",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14443,
                                  "src": "2274:13:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 14488,
                                  "name": "token",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14460,
                                  "src": "2290:5:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "2274:21:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 14490,
                              "nodeType": "ExpressionStatement",
                              "src": "2274:21:45"
                            },
                            {
                              "expression": {
                                "id": 14501,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 14491,
                                    "name": "preLoanBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14434,
                                    "src": "2310:15:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 14493,
                                  "indexExpression": {
                                    "id": 14492,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14449,
                                    "src": "2326:1:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "2310:18:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "id": 14498,
                                          "name": "this",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": -28,
                                          "src": "2355:4:45",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_FlashLoans_$14608",
                                            "typeString": "contract FlashLoans"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_contract$_FlashLoans_$14608",
                                            "typeString": "contract FlashLoans"
                                          }
                                        ],
                                        "id": 14497,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "2347:7:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_address_$",
                                          "typeString": "type(address)"
                                        },
                                        "typeName": {
                                          "id": 14496,
                                          "name": "address",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "2347:7:45",
                                          "typeDescriptions": {}
                                        }
                                      },
                                      "id": 14499,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "2347:13:45",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    ],
                                    "expression": {
                                      "id": 14494,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14460,
                                      "src": "2331:5:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "id": 14495,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "balanceOf",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5034,
                                    "src": "2331:15:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                      "typeString": "function (address) view external returns (uint256)"
                                    }
                                  },
                                  "id": 14500,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2331:30:45",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2310:51:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14502,
                              "nodeType": "ExpressionStatement",
                              "src": "2310:51:45"
                            },
                            {
                              "expression": {
                                "id": 14509,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 14503,
                                    "name": "feeAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14422,
                                    "src": "2375:10:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 14505,
                                  "indexExpression": {
                                    "id": 14504,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14449,
                                    "src": "2386:1:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "2375:13:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 14507,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14466,
                                      "src": "2420:6:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 14506,
                                    "name": "_calculateFlashLoanFeeAmount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14347,
                                    "src": "2391:28:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256) view returns (uint256)"
                                    }
                                  },
                                  "id": 14508,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2391:36:45",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2375:52:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14510,
                              "nodeType": "ExpressionStatement",
                              "src": "2375:52:45"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 14516,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "baseExpression": {
                                        "id": 14512,
                                        "name": "preLoanBalances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14434,
                                        "src": "2451:15:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 14514,
                                      "indexExpression": {
                                        "id": 14513,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14449,
                                        "src": "2467:1:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "2451:18:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">=",
                                    "rightExpression": {
                                      "id": 14515,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14466,
                                      "src": "2473:6:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "2451:28:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 14517,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2481:6:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 14518,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "INSUFFICIENT_FLASH_LOAN_BALANCE",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 645,
                                    "src": "2481:38:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 14511,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2442:8:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 14519,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2442:78:45",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14520,
                              "nodeType": "ExpressionStatement",
                              "src": "2442:78:45"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "id": 14526,
                                        "name": "recipient",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14393,
                                        "src": "2561:9:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IFlashLoanRecipient_$20738",
                                          "typeString": "contract IFlashLoanRecipient"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_IFlashLoanRecipient_$20738",
                                          "typeString": "contract IFlashLoanRecipient"
                                        }
                                      ],
                                      "id": 14525,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "2553:7:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 14524,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "2553:7:45",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 14527,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2553:18:45",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 14528,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14466,
                                    "src": "2573:6:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 14521,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14460,
                                    "src": "2534:5:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 14523,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "safeTransfer",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 5246,
                                  "src": "2534:18:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IERC20,address,uint256)"
                                  }
                                },
                                "id": 14529,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2534:46:45",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14530,
                              "nodeType": "ExpressionStatement",
                              "src": "2534:46:45"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14455,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14452,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14449,
                            "src": "2046:1:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 14453,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14396,
                              "src": "2050:6:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 14454,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2050:13:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2046:17:45",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 14532,
                        "initializationExpression": {
                          "assignments": [
                            14449
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 14449,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 14532,
                              "src": "2031:9:45",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 14448,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2031:7:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 14451,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 14450,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2043:1:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2031:13:45"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 14457,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "2065:3:45",
                            "subExpression": {
                              "id": 14456,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14449,
                              "src": "2067:1:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14458,
                          "nodeType": "ExpressionStatement",
                          "src": "2065:3:45"
                        },
                        "nodeType": "ForStatement",
                        "src": "2026:565:45"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 14536,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14396,
                              "src": "2628:6:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            {
                              "id": 14537,
                              "name": "amounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14399,
                              "src": "2636:7:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 14538,
                              "name": "feeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14422,
                              "src": "2645:10:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            {
                              "id": 14539,
                              "name": "userData",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14401,
                              "src": "2657:8:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              },
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "expression": {
                              "id": 14533,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14393,
                              "src": "2601:9:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IFlashLoanRecipient_$20738",
                                "typeString": "contract IFlashLoanRecipient"
                              }
                            },
                            "id": 14535,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "receiveFlashLoan",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20737,
                            "src": "2601:26:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$",
                              "typeString": "function (contract IERC20[] memory,uint256[] memory,uint256[] memory,bytes memory) external"
                            }
                          },
                          "id": 14540,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2601:65:45",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14541,
                        "nodeType": "ExpressionStatement",
                        "src": "2601:65:45"
                      },
                      {
                        "body": {
                          "id": 14604,
                          "nodeType": "Block",
                          "src": "2721:776:45",
                          "statements": [
                            {
                              "assignments": [
                                14554
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 14554,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 14604,
                                  "src": "2735:12:45",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 14553,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "2735:6:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 14558,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 14555,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14396,
                                  "src": "2750:6:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 14557,
                                "indexExpression": {
                                  "id": 14556,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14543,
                                  "src": "2757:1:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "2750:9:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2735:24:45"
                            },
                            {
                              "assignments": [
                                14560
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 14560,
                                  "mutability": "mutable",
                                  "name": "preLoanBalance",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 14604,
                                  "src": "2773:22:45",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 14559,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2773:7:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 14564,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 14561,
                                  "name": "preLoanBalances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14434,
                                  "src": "2798:15:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 14563,
                                "indexExpression": {
                                  "id": 14562,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14543,
                                  "src": "2814:1:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "2798:18:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2773:43:45"
                            },
                            {
                              "assignments": [
                                14566
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 14566,
                                  "mutability": "mutable",
                                  "name": "postLoanBalance",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 14604,
                                  "src": "3049:23:45",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 14565,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3049:7:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 14574,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "id": 14571,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -28,
                                        "src": "3099:4:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_FlashLoans_$14608",
                                          "typeString": "contract FlashLoans"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_FlashLoans_$14608",
                                          "typeString": "contract FlashLoans"
                                        }
                                      ],
                                      "id": 14570,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "3091:7:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 14569,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "3091:7:45",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 14572,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "3091:13:45",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "id": 14567,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14554,
                                    "src": "3075:5:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 14568,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "balanceOf",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 5034,
                                  "src": "3075:15:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                    "typeString": "function (address) view external returns (uint256)"
                                  }
                                },
                                "id": 14573,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3075:30:45",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3049:56:45"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 14578,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 14576,
                                      "name": "postLoanBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14566,
                                      "src": "3128:15:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">=",
                                    "rightExpression": {
                                      "id": 14577,
                                      "name": "preLoanBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14560,
                                      "src": "3147:14:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3128:33:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 14579,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3163:6:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 14580,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "INVALID_POST_LOAN_BALANCE",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 606,
                                    "src": "3163:32:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 14575,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3119:8:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 14581,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3119:77:45",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14582,
                              "nodeType": "ExpressionStatement",
                              "src": "3119:77:45"
                            },
                            {
                              "assignments": [
                                14584
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 14584,
                                  "mutability": "mutable",
                                  "name": "receivedFees",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 14604,
                                  "src": "3298:20:45",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 14583,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3298:7:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 14588,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 14587,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 14585,
                                  "name": "postLoanBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14566,
                                  "src": "3321:15:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "id": 14586,
                                  "name": "preLoanBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14560,
                                  "src": "3339:14:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3321:32:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3298:55:45"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 14594,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 14590,
                                      "name": "receivedFees",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14584,
                                      "src": "3376:12:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">=",
                                    "rightExpression": {
                                      "baseExpression": {
                                        "id": 14591,
                                        "name": "feeAmounts",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14422,
                                        "src": "3392:10:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 14593,
                                      "indexExpression": {
                                        "id": 14592,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14543,
                                        "src": "3403:1:45",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "3392:13:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3376:29:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 14595,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3407:6:45",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 14596,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "INSUFFICIENT_FLASH_LOAN_FEES",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 654,
                                    "src": "3407:35:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 14589,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3367:8:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 14597,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3367:76:45",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14598,
                              "nodeType": "ExpressionStatement",
                              "src": "3367:76:45"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 14600,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14554,
                                    "src": "3466:5:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 14601,
                                    "name": "receivedFees",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14584,
                                    "src": "3473:12:45",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 14599,
                                  "name": "_payFee",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14371,
                                  "src": "3458:7:45",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                    "typeString": "function (contract IERC20,uint256)"
                                  }
                                },
                                "id": 14602,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3458:28:45",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14603,
                              "nodeType": "ExpressionStatement",
                              "src": "3458:28:45"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 14549,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14546,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14543,
                            "src": "2697:1:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 14547,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14396,
                              "src": "2701:6:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 14548,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2701:13:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2697:17:45",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 14605,
                        "initializationExpression": {
                          "assignments": [
                            14543
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 14543,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 14605,
                              "src": "2682:9:45",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 14542,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2682:7:45",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 14545,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 14544,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2694:1:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2682:13:45"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 14551,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "2716:3:45",
                            "subExpression": {
                              "id": 14550,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14543,
                              "src": "2718:1:45",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14552,
                          "nodeType": "ExpressionStatement",
                          "src": "2716:3:45"
                        },
                        "nodeType": "ForStatement",
                        "src": "2677:820:45"
                      }
                    ]
                  },
                  "functionSelector": "5c38449e",
                  "id": 14607,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 14405,
                      "modifierName": {
                        "id": 14404,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "1630:12:45",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1630:12:45"
                    },
                    {
                      "id": 14407,
                      "modifierName": {
                        "id": 14406,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "1643:13:45",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1643:13:45"
                    }
                  ],
                  "name": "flashLoan",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 14403,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1621:8:45"
                  },
                  "parameters": {
                    "id": 14402,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14393,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 14607,
                        "src": "1479:29:45",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IFlashLoanRecipient_$20738",
                          "typeString": "contract IFlashLoanRecipient"
                        },
                        "typeName": {
                          "id": 14392,
                          "name": "IFlashLoanRecipient",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20738,
                          "src": "1479:19:45",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IFlashLoanRecipient_$20738",
                            "typeString": "contract IFlashLoanRecipient"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14396,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 14607,
                        "src": "1518:22:45",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14394,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1518:6:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 14395,
                          "nodeType": "ArrayTypeName",
                          "src": "1518:8:45",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14399,
                        "mutability": "mutable",
                        "name": "amounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 14607,
                        "src": "1550:24:45",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14397,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1550:7:45",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14398,
                          "nodeType": "ArrayTypeName",
                          "src": "1550:9:45",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14401,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 14607,
                        "src": "1584:21:45",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 14400,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1584:5:45",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1469:142:45"
                  },
                  "returnParameters": {
                    "id": 14408,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1657:0:45"
                  },
                  "scope": 14608,
                  "src": "1451:2052:45",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 14609,
              "src": "1337:2168:45"
            }
          ],
          "src": "845:2661:45"
        },
        "id": 45
      },
      "src.sol/amm/vault/PoolBalances.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/PoolBalances.sol",
          "exportedSymbols": {
            "PoolBalances": [
              15340
            ]
          },
          "id": 15341,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 14610,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:46"
            },
            {
              "id": 14611,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:46"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../lib/math/Math.sol",
              "id": 14612,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 3351,
              "src": "747:30:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 14613,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 656,
              "src": "778:43:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../lib/helpers/InputHelpers.sol",
              "id": 14614,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 1043,
              "src": "822:41:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 14615,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 5096,
              "src": "864:40:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 14616,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 5188,
              "src": "905:49:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
              "file": "../lib/openzeppelin/SafeERC20.sol",
              "id": 14617,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 5312,
              "src": "955:43:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/Fees.sol",
              "file": "./Fees.sol",
              "id": 14618,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 14373,
              "src": "1000:20:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/PoolTokens.sol",
              "file": "./PoolTokens.sol",
              "id": 14619,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 16019,
              "src": "1021:26:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/UserBalance.sol",
              "file": "./UserBalance.sol",
              "id": 14620,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 18121,
              "src": "1048:27:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IBasePool.sol",
              "file": "./interfaces/IBasePool.sol",
              "id": 14621,
              "nodeType": "ImportDirective",
              "scope": 15341,
              "sourceUnit": 20720,
              "src": "1076:36:46",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 14623,
                    "name": "Fees",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 14372,
                    "src": "1543:4:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Fees_$14372",
                      "typeString": "contract Fees"
                    }
                  },
                  "id": 14624,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1543:4:46"
                },
                {
                  "baseName": {
                    "id": 14625,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "1549:15:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 14626,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1549:15:46"
                },
                {
                  "baseName": {
                    "id": 14627,
                    "name": "PoolTokens",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 16018,
                    "src": "1566:10:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_PoolTokens_$16018",
                      "typeString": "contract PoolTokens"
                    }
                  },
                  "id": 14628,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1566:10:46"
                },
                {
                  "baseName": {
                    "id": 14629,
                    "name": "UserBalance",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 18120,
                    "src": "1578:11:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_UserBalance_$18120",
                      "typeString": "contract UserBalance"
                    }
                  },
                  "id": 14630,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1578:11:46"
                }
              ],
              "contractDependencies": [
                266,
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                13834,
                14087,
                14372,
                15609,
                16018,
                18120,
                18418,
                19467,
                19917,
                20641,
                20822,
                21266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 14622,
                "nodeType": "StructuredDocumentation",
                "src": "1114:394:46",
                "text": " @dev Stores the Asset Managers (by Pool and token), and implements the top level Asset Manager and Pool interfaces,\n such as registering and deregistering tokens, joining and exiting Pools, and informational functions like `getPool`\n and `getPoolTokens`, delegating to specialization-specific functions as needed.\n `managePoolBalance` handles all Asset Manager interactions."
              },
              "fullyImplemented": false,
              "id": 15340,
              "linearizedBaseContracts": [
                15340,
                18120,
                16018,
                13834,
                20641,
                19917,
                15609,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                14087,
                19467,
                5187,
                14372,
                21266,
                20822,
                266
              ],
              "name": "PoolBalances",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 14633,
                  "libraryName": {
                    "id": 14631,
                    "name": "Math",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3350,
                    "src": "1602:4:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Math_$3350",
                      "typeString": "library Math"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1596:23:46",
                  "typeName": {
                    "id": 14632,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1611:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 14636,
                  "libraryName": {
                    "id": 14634,
                    "name": "SafeERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5311,
                    "src": "1630:9:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeERC20_$5311",
                      "typeString": "library SafeERC20"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1624:27:46",
                  "typeName": {
                    "id": 14635,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "1644:6:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  }
                },
                {
                  "id": 14639,
                  "libraryName": {
                    "id": 14637,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "1662:17:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1656:36:46",
                  "typeName": {
                    "id": 14638,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1684:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                },
                {
                  "id": 14643,
                  "libraryName": {
                    "id": 14640,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "1703:17:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1697:38:46",
                  "typeName": {
                    "baseType": {
                      "id": 14641,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1725:7:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "id": 14642,
                    "nodeType": "ArrayTypeName",
                    "src": "1725:9:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                      "typeString": "bytes32[]"
                    }
                  }
                },
                {
                  "baseFunctions": [
                    21045
                  ],
                  "body": {
                    "id": 14671,
                    "nodeType": "Block",
                    "src": "1920:383:46",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14658,
                                "name": "PoolBalanceChangeKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21098,
                                "src": "2202:21:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolBalanceChangeKind_$21098_$",
                                  "typeString": "type(enum IVault.PoolBalanceChangeKind)"
                                }
                              },
                              "id": 14659,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "JOIN",
                              "nodeType": "MemberAccess",
                              "src": "2202:26:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                "typeString": "enum IVault.PoolBalanceChangeKind"
                              }
                            },
                            {
                              "id": 14660,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14645,
                              "src": "2230:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 14661,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14647,
                              "src": "2238:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 14664,
                                  "name": "recipient",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14649,
                                  "src": "2254:9:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 14663,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2246:8:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_payable_$",
                                  "typeString": "type(address payable)"
                                },
                                "typeName": {
                                  "id": 14662,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2246:8:46",
                                  "stateMutability": "payable",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 14665,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2246:18:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 14667,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14651,
                                  "src": "2287:7:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_memory_ptr",
                                    "typeString": "struct IVault.JoinPoolRequest memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_memory_ptr",
                                    "typeString": "struct IVault.JoinPoolRequest memory"
                                  }
                                ],
                                "id": 14666,
                                "name": "_toPoolBalanceChange",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [
                                  14717,
                                  14727
                                ],
                                "referencedDeclaration": 14717,
                                "src": "2266:20:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_struct$_JoinPoolRequest_$21056_memory_ptr_$returns$_t_struct$_PoolBalanceChange_$14707_memory_ptr_$",
                                  "typeString": "function (struct IVault.JoinPoolRequest memory) pure returns (struct PoolBalances.PoolBalanceChange memory)"
                                }
                              },
                              "id": 14668,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2266:29:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                "typeString": "struct PoolBalances.PoolBalanceChange memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                "typeString": "enum IVault.PoolBalanceChangeKind"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                "typeString": "struct PoolBalances.PoolBalanceChange memory"
                              }
                            ],
                            "id": 14657,
                            "name": "_joinOrExit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14864,
                            "src": "2190:11:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_PoolBalanceChangeKind_$21098_$_t_bytes32_$_t_address_$_t_address_payable_$_t_struct$_PoolBalanceChange_$14707_memory_ptr_$returns$__$",
                              "typeString": "function (enum IVault.PoolBalanceChangeKind,bytes32,address,address payable,struct PoolBalances.PoolBalanceChange memory)"
                            }
                          },
                          "id": 14669,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2190:106:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14670,
                        "nodeType": "ExpressionStatement",
                        "src": "2190:106:46"
                      }
                    ]
                  },
                  "functionSelector": "b95cac28",
                  "id": 14672,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 14655,
                      "modifierName": {
                        "id": 14654,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "1906:13:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1906:13:46"
                    }
                  ],
                  "name": "joinPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 14653,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1897:8:46"
                  },
                  "parameters": {
                    "id": 14652,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14645,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 14672,
                        "src": "1768:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 14644,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1768:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14647,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 14672,
                        "src": "1792:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14646,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1792:7:46",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14649,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 14672,
                        "src": "1816:17:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14648,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1816:7:46",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14651,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 14672,
                        "src": "1843:30:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_memory_ptr",
                          "typeString": "struct IVault.JoinPoolRequest"
                        },
                        "typeName": {
                          "id": 14650,
                          "name": "JoinPoolRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21056,
                          "src": "1843:15:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_storage_ptr",
                            "typeString": "struct IVault.JoinPoolRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1758:121:46"
                  },
                  "returnParameters": {
                    "id": 14656,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1920:0:46"
                  },
                  "scope": 15340,
                  "src": "1741:562:46",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    21068
                  ],
                  "body": {
                    "id": 14695,
                    "nodeType": "Block",
                    "src": "2474:219:46",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14685,
                                "name": "PoolBalanceChangeKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21098,
                                "src": "2601:21:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolBalanceChangeKind_$21098_$",
                                  "typeString": "type(enum IVault.PoolBalanceChangeKind)"
                                }
                              },
                              "id": 14686,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "EXIT",
                              "nodeType": "MemberAccess",
                              "src": "2601:26:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                "typeString": "enum IVault.PoolBalanceChangeKind"
                              }
                            },
                            {
                              "id": 14687,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14674,
                              "src": "2629:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 14688,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14676,
                              "src": "2637:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 14689,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14678,
                              "src": "2645:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 14691,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14680,
                                  "src": "2677:7:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_memory_ptr",
                                    "typeString": "struct IVault.ExitPoolRequest memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_memory_ptr",
                                    "typeString": "struct IVault.ExitPoolRequest memory"
                                  }
                                ],
                                "id": 14690,
                                "name": "_toPoolBalanceChange",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [
                                  14717,
                                  14727
                                ],
                                "referencedDeclaration": 14727,
                                "src": "2656:20:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_struct$_ExitPoolRequest_$21079_memory_ptr_$returns$_t_struct$_PoolBalanceChange_$14707_memory_ptr_$",
                                  "typeString": "function (struct IVault.ExitPoolRequest memory) pure returns (struct PoolBalances.PoolBalanceChange memory)"
                                }
                              },
                              "id": 14692,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2656:29:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                "typeString": "struct PoolBalances.PoolBalanceChange memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                "typeString": "enum IVault.PoolBalanceChangeKind"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                "typeString": "struct PoolBalances.PoolBalanceChange memory"
                              }
                            ],
                            "id": 14684,
                            "name": "_joinOrExit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14864,
                            "src": "2589:11:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_PoolBalanceChangeKind_$21098_$_t_bytes32_$_t_address_$_t_address_payable_$_t_struct$_PoolBalanceChange_$14707_memory_ptr_$returns$__$",
                              "typeString": "function (enum IVault.PoolBalanceChangeKind,bytes32,address,address payable,struct PoolBalances.PoolBalanceChange memory)"
                            }
                          },
                          "id": 14693,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2589:97:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14694,
                        "nodeType": "ExpressionStatement",
                        "src": "2589:97:46"
                      }
                    ]
                  },
                  "functionSelector": "8bdb3913",
                  "id": 14696,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exitPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 14682,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2465:8:46"
                  },
                  "parameters": {
                    "id": 14681,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14674,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 14696,
                        "src": "2336:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 14673,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2336:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14676,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 14696,
                        "src": "2360:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14675,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2360:7:46",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14678,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 14696,
                        "src": "2384:25:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 14677,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2384:15:46",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14680,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 14696,
                        "src": "2419:30:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_memory_ptr",
                          "typeString": "struct IVault.ExitPoolRequest"
                        },
                        "typeName": {
                          "id": 14679,
                          "name": "ExitPoolRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21079,
                          "src": "2419:15:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_storage_ptr",
                            "typeString": "struct IVault.ExitPoolRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2326:129:46"
                  },
                  "returnParameters": {
                    "id": 14683,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2474:0:46"
                  },
                  "scope": 15340,
                  "src": "2309:384:46",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "canonicalName": "PoolBalances.PoolBalanceChange",
                  "id": 14707,
                  "members": [
                    {
                      "constant": false,
                      "id": 14699,
                      "mutability": "mutable",
                      "name": "assets",
                      "nodeType": "VariableDeclaration",
                      "scope": 14707,
                      "src": "3023:15:46",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                        "typeString": "contract IAsset[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 14697,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "3023:6:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "id": 14698,
                        "nodeType": "ArrayTypeName",
                        "src": "3023:8:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                          "typeString": "contract IAsset[]"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 14702,
                      "mutability": "mutable",
                      "name": "limits",
                      "nodeType": "VariableDeclaration",
                      "scope": 14707,
                      "src": "3048:16:46",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                        "typeString": "uint256[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 14700,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3048:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 14701,
                        "nodeType": "ArrayTypeName",
                        "src": "3048:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                          "typeString": "uint256[]"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 14704,
                      "mutability": "mutable",
                      "name": "userData",
                      "nodeType": "VariableDeclaration",
                      "scope": 14707,
                      "src": "3074:14:46",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_storage_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 14703,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "3074:5:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 14706,
                      "mutability": "mutable",
                      "name": "useInternalBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 14707,
                      "src": "3098:23:46",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 14705,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "3098:4:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "PoolBalanceChange",
                  "nodeType": "StructDefinition",
                  "scope": 15340,
                  "src": "2988:140:46",
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 14716,
                    "nodeType": "Block",
                    "src": "3382:122:46",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "3457:41:46",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "3471:17:46",
                              "value": {
                                "name": "request",
                                "nodeType": "YulIdentifier",
                                "src": "3481:7:46"
                              },
                              "variableNames": [
                                {
                                  "name": "change",
                                  "nodeType": "YulIdentifier",
                                  "src": "3471:6:46"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 14713,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3471:6:46",
                            "valueSize": 1
                          },
                          {
                            "declaration": 14710,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3481:7:46",
                            "valueSize": 1
                          }
                        ],
                        "id": 14715,
                        "nodeType": "InlineAssembly",
                        "src": "3448:50:46"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14708,
                    "nodeType": "StructuredDocumentation",
                    "src": "3134:98:46",
                    "text": " @dev Converts a JoinPoolRequest into a PoolBalanceChange, with no runtime cost."
                  },
                  "id": 14717,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_toPoolBalanceChange",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14711,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14710,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 14717,
                        "src": "3267:30:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_memory_ptr",
                          "typeString": "struct IVault.JoinPoolRequest"
                        },
                        "typeName": {
                          "id": 14709,
                          "name": "JoinPoolRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21056,
                          "src": "3267:15:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_storage_ptr",
                            "typeString": "struct IVault.JoinPoolRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3266:32:46"
                  },
                  "returnParameters": {
                    "id": 14714,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14713,
                        "mutability": "mutable",
                        "name": "change",
                        "nodeType": "VariableDeclaration",
                        "scope": 14717,
                        "src": "3345:31:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                          "typeString": "struct PoolBalances.PoolBalanceChange"
                        },
                        "typeName": {
                          "id": 14712,
                          "name": "PoolBalanceChange",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 14707,
                          "src": "3345:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_storage_ptr",
                            "typeString": "struct PoolBalances.PoolBalanceChange"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3344:33:46"
                  },
                  "scope": 15340,
                  "src": "3237:267:46",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 14726,
                    "nodeType": "Block",
                    "src": "3759:122:46",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "3834:41:46",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "3848:17:46",
                              "value": {
                                "name": "request",
                                "nodeType": "YulIdentifier",
                                "src": "3858:7:46"
                              },
                              "variableNames": [
                                {
                                  "name": "change",
                                  "nodeType": "YulIdentifier",
                                  "src": "3848:6:46"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 14723,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3848:6:46",
                            "valueSize": 1
                          },
                          {
                            "declaration": 14720,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3858:7:46",
                            "valueSize": 1
                          }
                        ],
                        "id": 14725,
                        "nodeType": "InlineAssembly",
                        "src": "3825:50:46"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14718,
                    "nodeType": "StructuredDocumentation",
                    "src": "3510:99:46",
                    "text": " @dev Converts an ExitPoolRequest into a PoolBalanceChange, with no runtime cost."
                  },
                  "id": 14727,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_toPoolBalanceChange",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14721,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14720,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 14727,
                        "src": "3644:30:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_memory_ptr",
                          "typeString": "struct IVault.ExitPoolRequest"
                        },
                        "typeName": {
                          "id": 14719,
                          "name": "ExitPoolRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21079,
                          "src": "3644:15:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_storage_ptr",
                            "typeString": "struct IVault.ExitPoolRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3643:32:46"
                  },
                  "returnParameters": {
                    "id": 14724,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14723,
                        "mutability": "mutable",
                        "name": "change",
                        "nodeType": "VariableDeclaration",
                        "scope": 14727,
                        "src": "3722:31:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                          "typeString": "struct PoolBalances.PoolBalanceChange"
                        },
                        "typeName": {
                          "id": 14722,
                          "name": "PoolBalanceChange",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 14707,
                          "src": "3722:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_storage_ptr",
                            "typeString": "struct PoolBalances.PoolBalanceChange"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3721:33:46"
                  },
                  "scope": 15340,
                  "src": "3614:267:46",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 14863,
                    "nodeType": "Block",
                    "src": "4234:2099:46",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "expression": {
                                  "id": 14752,
                                  "name": "change",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14738,
                                  "src": "4569:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                    "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                  }
                                },
                                "id": 14753,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "assets",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 14699,
                                "src": "4569:13:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                  "typeString": "contract IAsset[] memory"
                                }
                              },
                              "id": 14754,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "4569:20:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "expression": {
                                  "id": 14755,
                                  "name": "change",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14738,
                                  "src": "4591:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                    "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                  }
                                },
                                "id": 14756,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "limits",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 14702,
                                "src": "4591:13:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 14757,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "4591:20:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 14749,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "4533:12:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 14751,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "4533:35:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 14758,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4533:79:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14759,
                        "nodeType": "ExpressionStatement",
                        "src": "4533:79:46"
                      },
                      {
                        "assignments": [
                          14763
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14763,
                            "mutability": "mutable",
                            "name": "tokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 14863,
                            "src": "4777:22:46",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14761,
                                "name": "IERC20",
                                "nodeType": "UserDefinedTypeName",
                                "referencedDeclaration": 5095,
                                "src": "4777:6:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 14762,
                              "nodeType": "ArrayTypeName",
                              "src": "4777:8:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                "typeString": "contract IERC20[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14768,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14765,
                                "name": "change",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14738,
                                "src": "4821:6:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                  "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                }
                              },
                              "id": 14766,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assets",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 14699,
                              "src": "4821:13:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            ],
                            "id": 14764,
                            "name": "_translateToIERC20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              202,
                              249
                            ],
                            "referencedDeclaration": 249,
                            "src": "4802:18:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$",
                              "typeString": "function (contract IAsset[] memory) view returns (contract IERC20[] memory)"
                            }
                          },
                          "id": 14767,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4802:33:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4777:58:46"
                      },
                      {
                        "assignments": [
                          14773
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14773,
                            "mutability": "mutable",
                            "name": "balances",
                            "nodeType": "VariableDeclaration",
                            "scope": 14863,
                            "src": "4845:25:46",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14771,
                                "name": "bytes32",
                                "nodeType": "ElementaryTypeName",
                                "src": "4845:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 14772,
                              "nodeType": "ArrayTypeName",
                              "src": "4845:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                "typeString": "bytes32[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14778,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 14775,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14732,
                              "src": "4903:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 14776,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14763,
                              "src": "4911:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            ],
                            "id": 14774,
                            "name": "_validateTokensAndGetBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15284,
                            "src": "4873:29:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                              "typeString": "function (bytes32,contract IERC20[] memory) view returns (bytes32[] memory)"
                            }
                          },
                          "id": 14777,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4873:45:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                            "typeString": "bytes32[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4845:73:46"
                      },
                      {
                        "assignments": [
                          14783,
                          14786,
                          14789
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14783,
                            "mutability": "mutable",
                            "name": "finalBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 14863,
                            "src": "5115:30:46",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14781,
                                "name": "bytes32",
                                "nodeType": "ElementaryTypeName",
                                "src": "5115:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 14782,
                              "nodeType": "ArrayTypeName",
                              "src": "5115:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                "typeString": "bytes32[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 14786,
                            "mutability": "mutable",
                            "name": "amountsInOrOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 14863,
                            "src": "5159:31:46",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14784,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5159:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14785,
                              "nodeType": "ArrayTypeName",
                              "src": "5159:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 14789,
                            "mutability": "mutable",
                            "name": "paidProtocolSwapFeeAmounts",
                            "nodeType": "VariableDeclaration",
                            "scope": 14863,
                            "src": "5204:43:46",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14787,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5204:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14788,
                              "nodeType": "ArrayTypeName",
                              "src": "5204:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14798,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 14791,
                              "name": "kind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14730,
                              "src": "5283:4:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                "typeString": "enum IVault.PoolBalanceChangeKind"
                              }
                            },
                            {
                              "id": 14792,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14732,
                              "src": "5289:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 14793,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14734,
                              "src": "5297:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 14794,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14736,
                              "src": "5305:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 14795,
                              "name": "change",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14738,
                              "src": "5316:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                "typeString": "struct PoolBalances.PoolBalanceChange memory"
                              }
                            },
                            {
                              "id": 14796,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14773,
                              "src": "5324:8:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                "typeString": "enum IVault.PoolBalanceChangeKind"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                "typeString": "struct PoolBalances.PoolBalanceChange memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            ],
                            "id": 14790,
                            "name": "_callPoolBalanceChange",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14977,
                            "src": "5260:22:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_PoolBalanceChangeKind_$21098_$_t_bytes32_$_t_address_$_t_address_payable_$_t_struct$_PoolBalanceChange_$14707_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (enum IVault.PoolBalanceChangeKind,bytes32,address,address payable,struct PoolBalances.PoolBalanceChange memory,bytes32[] memory) returns (bytes32[] memory,uint256[] memory,uint256[] memory)"
                            }
                          },
                          "id": 14797,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5260:73:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                            "typeString": "tuple(bytes32[] memory,uint256[] memory,uint256[] memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5101:232:46"
                      },
                      {
                        "assignments": [
                          14800
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14800,
                            "mutability": "mutable",
                            "name": "specialization",
                            "nodeType": "VariableDeclaration",
                            "scope": 14863,
                            "src": "5406:33:46",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "typeName": {
                              "id": 14799,
                              "name": "PoolSpecialization",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20940,
                              "src": "5406:18:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14804,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 14802,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14732,
                              "src": "5465:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 14801,
                            "name": "_getPoolSpecialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15608,
                            "src": "5442:22:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 14803,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5442:30:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5406:66:46"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 14808,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14805,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14800,
                            "src": "5486:14:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 14806,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "5504:18:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 14807,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "5504:28:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "5486:46:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 14829,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 14826,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14800,
                              "src": "5663:14:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 14827,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "5681:18:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 14828,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "5681:36:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "5663:54:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 14842,
                            "nodeType": "Block",
                            "src": "5812:113:46",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 14838,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14732,
                                      "src": "5892:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 14839,
                                      "name": "finalBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14783,
                                      "src": "5900:13:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    ],
                                    "id": 14837,
                                    "name": "_setGeneralPoolBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19218,
                                    "src": "5868:23:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_array$_t_bytes32_$dyn_memory_ptr_$returns$__$",
                                      "typeString": "function (bytes32,bytes32[] memory)"
                                    }
                                  },
                                  "id": 14840,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5868:46:46",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 14841,
                                "nodeType": "ExpressionStatement",
                                "src": "5868:46:46"
                              }
                            ]
                          },
                          "id": 14843,
                          "nodeType": "IfStatement",
                          "src": "5659:266:46",
                          "trueBody": {
                            "id": 14836,
                            "nodeType": "Block",
                            "src": "5719:87:46",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 14831,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14732,
                                      "src": "5765:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 14832,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14763,
                                      "src": "5773:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    {
                                      "id": 14833,
                                      "name": "finalBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14783,
                                      "src": "5781:13:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    ],
                                    "id": 14830,
                                    "name": "_setMinimalSwapInfoPoolBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19652,
                                    "src": "5733:31:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20[] memory,bytes32[] memory)"
                                    }
                                  },
                                  "id": 14834,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5733:62:46",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 14835,
                                "nodeType": "ExpressionStatement",
                                "src": "5733:62:46"
                              }
                            ]
                          }
                        },
                        "id": 14844,
                        "nodeType": "IfStatement",
                        "src": "5482:443:46",
                        "trueBody": {
                          "id": 14825,
                          "nodeType": "Block",
                          "src": "5534:119:46",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 14810,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14732,
                                    "src": "5577:6:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 14811,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14763,
                                      "src": "5585:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 14813,
                                    "indexExpression": {
                                      "hexValue": "30",
                                      "id": 14812,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5592:1:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      "value": "0"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "5585:9:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 14814,
                                      "name": "finalBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14783,
                                      "src": "5596:13:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    },
                                    "id": 14816,
                                    "indexExpression": {
                                      "hexValue": "30",
                                      "id": 14815,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5610:1:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      "value": "0"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "5596:16:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 14817,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14763,
                                      "src": "5614:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 14819,
                                    "indexExpression": {
                                      "hexValue": "31",
                                      "id": 14818,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5621:1:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_1_by_1",
                                        "typeString": "int_const 1"
                                      },
                                      "value": "1"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "5614:9:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 14820,
                                      "name": "finalBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14783,
                                      "src": "5625:13:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    },
                                    "id": 14822,
                                    "indexExpression": {
                                      "hexValue": "31",
                                      "id": 14821,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5639:1:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_1_by_1",
                                        "typeString": "int_const 1"
                                      },
                                      "value": "1"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "5625:16:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 14809,
                                  "name": "_setTwoTokenPoolCashBalances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20095,
                                  "src": "5548:28:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_bytes32_$returns$__$",
                                    "typeString": "function (bytes32,contract IERC20,bytes32,contract IERC20,bytes32)"
                                  }
                                },
                                "id": 14823,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5548:94:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 14824,
                              "nodeType": "ExpressionStatement",
                              "src": "5548:94:46"
                            }
                          ]
                        }
                      },
                      {
                        "assignments": [
                          14846
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14846,
                            "mutability": "mutable",
                            "name": "positive",
                            "nodeType": "VariableDeclaration",
                            "scope": 14863,
                            "src": "5935:13:46",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 14845,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "5935:4:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14851,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                            "typeString": "enum IVault.PoolBalanceChangeKind"
                          },
                          "id": 14850,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 14847,
                            "name": "kind",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14730,
                            "src": "5951:4:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                              "typeString": "enum IVault.PoolBalanceChangeKind"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 14848,
                              "name": "PoolBalanceChangeKind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21098,
                              "src": "5959:21:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolBalanceChangeKind_$21098_$",
                                "typeString": "type(enum IVault.PoolBalanceChangeKind)"
                              }
                            },
                            "id": 14849,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "JOIN",
                            "nodeType": "MemberAccess",
                            "src": "5959:26:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                              "typeString": "enum IVault.PoolBalanceChangeKind"
                            }
                          },
                          "src": "5951:34:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5935:50:46"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 14853,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14732,
                              "src": "6077:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 14854,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14734,
                              "src": "6097:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 14855,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14763,
                              "src": "6117:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 14857,
                                  "name": "amountsInOrOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14786,
                                  "src": "6251:14:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                {
                                  "id": 14858,
                                  "name": "positive",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14846,
                                  "src": "6267:8:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "id": 14856,
                                "name": "_unsafeCastToInt256",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15339,
                                "src": "6231:19:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bool_$returns$_t_array$_t_int256_$dyn_memory_ptr_$",
                                  "typeString": "function (uint256[] memory,bool) pure returns (int256[] memory)"
                                }
                              },
                              "id": 14859,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6231:45:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                "typeString": "int256[] memory"
                              }
                            },
                            {
                              "id": 14860,
                              "name": "paidProtocolSwapFeeAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14789,
                              "src": "6290:26:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                "typeString": "int256[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            ],
                            "id": 14852,
                            "name": "PoolBalanceChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21095,
                            "src": "6045:18:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_int256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (bytes32,address,contract IERC20[] memory,int256[] memory,uint256[] memory)"
                            }
                          },
                          "id": 14861,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6045:281:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14862,
                        "nodeType": "EmitStatement",
                        "src": "6040:286:46"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14728,
                    "nodeType": "StructuredDocumentation",
                    "src": "3887:83:46",
                    "text": " @dev Implements both `joinPool` and `exitPool`, based on `kind`."
                  },
                  "id": 14864,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 14741,
                      "modifierName": {
                        "id": 14740,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "4170:12:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4170:12:46"
                    },
                    {
                      "arguments": [
                        {
                          "id": 14743,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 14732,
                          "src": "4202:6:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 14744,
                      "modifierName": {
                        "id": 14742,
                        "name": "withRegisteredPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15368,
                        "src": "4183:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_bytes32_$",
                          "typeString": "modifier (bytes32)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4183:26:46"
                    },
                    {
                      "arguments": [
                        {
                          "id": 14746,
                          "name": "sender",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 14734,
                          "src": "4226:6:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 14747,
                      "modifierName": {
                        "id": 14745,
                        "name": "authenticateFor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 18239,
                        "src": "4210:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_address_$",
                          "typeString": "modifier (address)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4210:23:46"
                    }
                  ],
                  "name": "_joinOrExit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14739,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14730,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 14864,
                        "src": "4005:26:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                          "typeString": "enum IVault.PoolBalanceChangeKind"
                        },
                        "typeName": {
                          "id": 14729,
                          "name": "PoolBalanceChangeKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21098,
                          "src": "4005:21:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                            "typeString": "enum IVault.PoolBalanceChangeKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14732,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 14864,
                        "src": "4041:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 14731,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4041:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14734,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 14864,
                        "src": "4065:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14733,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4065:7:46",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14736,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 14864,
                        "src": "4089:25:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 14735,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4089:15:46",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14738,
                        "mutability": "mutable",
                        "name": "change",
                        "nodeType": "VariableDeclaration",
                        "scope": 14864,
                        "src": "4124:31:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                          "typeString": "struct PoolBalances.PoolBalanceChange"
                        },
                        "typeName": {
                          "id": 14737,
                          "name": "PoolBalanceChange",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 14707,
                          "src": "4124:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_storage_ptr",
                            "typeString": "struct PoolBalances.PoolBalanceChange"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3995:166:46"
                  },
                  "returnParameters": {
                    "id": 14748,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4234:0:46"
                  },
                  "scope": 15340,
                  "src": "3975:2358:46",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 14976,
                    "nodeType": "Block",
                    "src": "6981:1331:46",
                    "statements": [
                      {
                        "assignments": [
                          14894,
                          14896
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14894,
                            "mutability": "mutable",
                            "name": "totalBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 14976,
                            "src": "6992:30:46",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 14892,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "6992:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 14893,
                              "nodeType": "ArrayTypeName",
                              "src": "6992:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 14896,
                            "mutability": "mutable",
                            "name": "lastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 14976,
                            "src": "7024:23:46",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 14895,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7024:7:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14900,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 14897,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14878,
                              "src": "7051:8:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 14898,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "totalsAndLastChangeBlock",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 18608,
                            "src": "7051:33:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_array$_t_bytes32_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$bound_to$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                              "typeString": "function (bytes32[] memory) pure returns (uint256[] memory,uint256)"
                            }
                          },
                          "id": 14899,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7051:35:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                            "typeString": "tuple(uint256[] memory,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6991:95:46"
                      },
                      {
                        "assignments": [
                          14902
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14902,
                            "mutability": "mutable",
                            "name": "pool",
                            "nodeType": "VariableDeclaration",
                            "scope": 14976,
                            "src": "7097:14:46",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IBasePool_$20719",
                              "typeString": "contract IBasePool"
                            },
                            "typeName": {
                              "id": 14901,
                              "name": "IBasePool",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20719,
                              "src": "7097:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IBasePool_$20719",
                                "typeString": "contract IBasePool"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 14908,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 14905,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14869,
                                  "src": "7140:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 14904,
                                "name": "_getPoolAddress",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15568,
                                "src": "7124:15:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_address_$",
                                  "typeString": "function (bytes32) pure returns (address)"
                                }
                              },
                              "id": 14906,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7124:23:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 14903,
                            "name": "IBasePool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20719,
                            "src": "7114:9:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IBasePool_$20719_$",
                              "typeString": "type(contract IBasePool)"
                            }
                          },
                          "id": 14907,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7114:34:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IBasePool_$20719",
                            "typeString": "contract IBasePool"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7097:51:46"
                      },
                      {
                        "expression": {
                          "id": 14941,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 14909,
                                "name": "amountsInOrOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14885,
                                "src": "7159:14:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 14910,
                                "name": "dueProtocolFeeAmounts",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14888,
                                "src": "7175:21:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              }
                            ],
                            "id": 14911,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "7158:39:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256[] memory,uint256[] memory)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                "typeString": "enum IVault.PoolBalanceChangeKind"
                              },
                              "id": 14915,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 14912,
                                "name": "kind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14867,
                                "src": "7200:4:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                  "typeString": "enum IVault.PoolBalanceChangeKind"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "expression": {
                                  "id": 14913,
                                  "name": "PoolBalanceChangeKind",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 21098,
                                  "src": "7208:21:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_PoolBalanceChangeKind_$21098_$",
                                    "typeString": "type(enum IVault.PoolBalanceChangeKind)"
                                  }
                                },
                                "id": 14914,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "JOIN",
                                "nodeType": "MemberAccess",
                                "src": "7208:26:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                  "typeString": "enum IVault.PoolBalanceChangeKind"
                                }
                              },
                              "src": "7200:34:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "id": 14930,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14869,
                                  "src": "7547:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 14931,
                                  "name": "sender",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14871,
                                  "src": "7571:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 14932,
                                  "name": "recipient",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14873,
                                  "src": "7595:9:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                },
                                {
                                  "id": 14933,
                                  "name": "totalBalances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14894,
                                  "src": "7622:13:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                {
                                  "id": 14934,
                                  "name": "lastChangeBlock",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14896,
                                  "src": "7653:15:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 14935,
                                    "name": "_getProtocolSwapFeePercentage",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14325,
                                    "src": "7686:29:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                      "typeString": "function () view returns (uint256)"
                                    }
                                  },
                                  "id": 14936,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "7686:31:46",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 14937,
                                    "name": "change",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14875,
                                    "src": "7735:6:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                      "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                    }
                                  },
                                  "id": 14938,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "userData",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 14704,
                                  "src": "7735:15:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                ],
                                "expression": {
                                  "id": 14928,
                                  "name": "pool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14902,
                                  "src": "7514:4:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IBasePool_$20719",
                                    "typeString": "contract IBasePool"
                                  }
                                },
                                "id": 14929,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "onExitPool",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20718,
                                "src": "7514:15:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) external returns (uint256[] memory,uint256[] memory)"
                                }
                              },
                              "id": 14939,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7514:250:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "tuple(uint256[] memory,uint256[] memory)"
                              }
                            },
                            "id": 14940,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "7200:564:46",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "id": 14918,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14869,
                                  "src": "7282:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 14919,
                                  "name": "sender",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14871,
                                  "src": "7306:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 14920,
                                  "name": "recipient",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14873,
                                  "src": "7330:9:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                },
                                {
                                  "id": 14921,
                                  "name": "totalBalances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14894,
                                  "src": "7357:13:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                {
                                  "id": 14922,
                                  "name": "lastChangeBlock",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14896,
                                  "src": "7388:15:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 14923,
                                    "name": "_getProtocolSwapFeePercentage",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14325,
                                    "src": "7421:29:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                      "typeString": "function () view returns (uint256)"
                                    }
                                  },
                                  "id": 14924,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "7421:31:46",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "expression": {
                                    "id": 14925,
                                    "name": "change",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14875,
                                    "src": "7470:6:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                      "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                    }
                                  },
                                  "id": 14926,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "userData",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 14704,
                                  "src": "7470:15:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                ],
                                "expression": {
                                  "id": 14916,
                                  "name": "pool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14902,
                                  "src": "7249:4:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IBasePool_$20719",
                                    "typeString": "contract IBasePool"
                                  }
                                },
                                "id": 14917,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "onJoinPool",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20693,
                                "src": "7249:15:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                  "typeString": "function (bytes32,address,address,uint256[] memory,uint256,uint256,bytes memory) external returns (uint256[] memory,uint256[] memory)"
                                }
                              },
                              "id": 14927,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7249:250:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "tuple(uint256[] memory,uint256[] memory)"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "tuple(uint256[] memory,uint256[] memory)"
                            }
                          },
                          "src": "7158:606:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14942,
                        "nodeType": "ExpressionStatement",
                        "src": "7158:606:46"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 14946,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14878,
                                "src": "7811:8:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                  "typeString": "bytes32[] memory"
                                }
                              },
                              "id": 14947,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "7811:15:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 14948,
                                "name": "amountsInOrOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14885,
                                "src": "7828:14:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 14949,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "7828:21:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 14950,
                                "name": "dueProtocolFeeAmounts",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14888,
                                "src": "7851:21:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              "id": 14951,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "7851:28:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 14943,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "7775:12:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 14945,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 954,
                            "src": "7775:35:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256,uint256) pure"
                            }
                          },
                          "id": 14952,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7775:105:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 14953,
                        "nodeType": "ExpressionStatement",
                        "src": "7775:105:46"
                      },
                      {
                        "expression": {
                          "id": 14974,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 14954,
                            "name": "finalBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14882,
                            "src": "8042:13:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                "typeString": "enum IVault.PoolBalanceChangeKind"
                              },
                              "id": 14958,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 14955,
                                "name": "kind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14867,
                                "src": "8058:4:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                  "typeString": "enum IVault.PoolBalanceChangeKind"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "expression": {
                                  "id": 14956,
                                  "name": "PoolBalanceChangeKind",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 21098,
                                  "src": "8066:21:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_enum$_PoolBalanceChangeKind_$21098_$",
                                    "typeString": "type(enum IVault.PoolBalanceChangeKind)"
                                  }
                                },
                                "id": 14957,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "JOIN",
                                "nodeType": "MemberAccess",
                                "src": "8066:26:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                                  "typeString": "enum IVault.PoolBalanceChangeKind"
                                }
                              },
                              "src": "8058:34:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "id": 14967,
                                  "name": "recipient",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14873,
                                  "src": "8238:9:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                },
                                {
                                  "id": 14968,
                                  "name": "change",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14875,
                                  "src": "8249:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                    "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                  }
                                },
                                {
                                  "id": 14969,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14878,
                                  "src": "8257:8:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                    "typeString": "bytes32[] memory"
                                  }
                                },
                                {
                                  "id": 14970,
                                  "name": "amountsInOrOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14885,
                                  "src": "8267:14:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                {
                                  "id": 14971,
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14888,
                                  "src": "8283:21:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  },
                                  {
                                    "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                    "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                    "typeString": "bytes32[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                ],
                                "id": 14966,
                                "name": "_processExitPoolTransfers",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15215,
                                "src": "8212:25:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_struct$_PoolBalanceChange_$14707_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                  "typeString": "function (address payable,struct PoolBalances.PoolBalanceChange memory,bytes32[] memory,uint256[] memory,uint256[] memory) returns (bytes32[] memory)"
                                }
                              },
                              "id": 14972,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8212:93:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 14973,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "8058:247:46",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "id": 14960,
                                  "name": "sender",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14871,
                                  "src": "8133:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                {
                                  "id": 14961,
                                  "name": "change",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14875,
                                  "src": "8141:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                    "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                  }
                                },
                                {
                                  "id": 14962,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14878,
                                  "src": "8149:8:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                    "typeString": "bytes32[] memory"
                                  }
                                },
                                {
                                  "id": 14963,
                                  "name": "amountsInOrOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14885,
                                  "src": "8159:14:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                {
                                  "id": 14964,
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14888,
                                  "src": "8175:21:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  {
                                    "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                    "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                    "typeString": "bytes32[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  },
                                  {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                ],
                                "id": 14959,
                                "name": "_processJoinPoolTransfers",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15112,
                                "src": "8107:25:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_struct$_PoolBalanceChange_$14707_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                  "typeString": "function (address,struct PoolBalances.PoolBalanceChange memory,bytes32[] memory,uint256[] memory,uint256[] memory) returns (bytes32[] memory)"
                                }
                              },
                              "id": 14965,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8107:90:46",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "src": "8042:263:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                            "typeString": "bytes32[] memory"
                          }
                        },
                        "id": 14975,
                        "nodeType": "ExpressionStatement",
                        "src": "8042:263:46"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14865,
                    "nodeType": "StructuredDocumentation",
                    "src": "6339:216:46",
                    "text": " @dev Calls the corresponding Pool hook to get the amounts in/out plus protocol fee amounts, and performs the\n associated token transfers and fee payments, returning the Pool's final balances."
                  },
                  "id": 14977,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_callPoolBalanceChange",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14879,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14867,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6601:26:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                          "typeString": "enum IVault.PoolBalanceChangeKind"
                        },
                        "typeName": {
                          "id": 14866,
                          "name": "PoolBalanceChangeKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21098,
                          "src": "6601:21:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolBalanceChangeKind_$21098",
                            "typeString": "enum IVault.PoolBalanceChangeKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14869,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6637:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 14868,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6637:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14871,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6661:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14870,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6661:7:46",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14873,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6685:25:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 14872,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6685:15:46",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14875,
                        "mutability": "mutable",
                        "name": "change",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6720:31:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                          "typeString": "struct PoolBalances.PoolBalanceChange"
                        },
                        "typeName": {
                          "id": 14874,
                          "name": "PoolBalanceChange",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 14707,
                          "src": "6720:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_storage_ptr",
                            "typeString": "struct PoolBalances.PoolBalanceChange"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14878,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6761:25:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14876,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "6761:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 14877,
                          "nodeType": "ArrayTypeName",
                          "src": "6761:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6591:201:46"
                  },
                  "returnParameters": {
                    "id": 14889,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14882,
                        "mutability": "mutable",
                        "name": "finalBalances",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6839:30:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14880,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "6839:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 14881,
                          "nodeType": "ArrayTypeName",
                          "src": "6839:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14885,
                        "mutability": "mutable",
                        "name": "amountsInOrOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6883:31:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14883,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "6883:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14884,
                          "nodeType": "ArrayTypeName",
                          "src": "6883:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14888,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 14977,
                        "src": "6928:38:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14886,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "6928:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14887,
                          "nodeType": "ArrayTypeName",
                          "src": "6928:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6825:151:46"
                  },
                  "scope": 15340,
                  "src": "6560:1752:46",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 15111,
                    "nodeType": "Block",
                    "src": "8900:1325:46",
                    "statements": [
                      {
                        "assignments": [
                          14998
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 14998,
                            "mutability": "mutable",
                            "name": "wrappedEth",
                            "nodeType": "VariableDeclaration",
                            "scope": 15111,
                            "src": "9020:18:46",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 14997,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9020:7:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15000,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 14999,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "9041:1:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9020:22:46"
                      },
                      {
                        "expression": {
                          "id": 15008,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15001,
                            "name": "finalBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14995,
                            "src": "9053:13:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 15005,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14985,
                                  "src": "9083:8:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                    "typeString": "bytes32[] memory"
                                  }
                                },
                                "id": 15006,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "9083:15:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 15004,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "9069:13:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (bytes32[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 15002,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "9073:7:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 15003,
                                "nodeType": "ArrayTypeName",
                                "src": "9073:9:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                  "typeString": "bytes32[]"
                                }
                              }
                            },
                            "id": 15007,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9069:30:46",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "src": "9053:46:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                            "typeString": "bytes32[] memory"
                          }
                        },
                        "id": 15009,
                        "nodeType": "ExpressionStatement",
                        "src": "9053:46:46"
                      },
                      {
                        "body": {
                          "id": 15105,
                          "nodeType": "Block",
                          "src": "9160:971:46",
                          "statements": [
                            {
                              "assignments": [
                                15023
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 15023,
                                  "mutability": "mutable",
                                  "name": "amountIn",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 15105,
                                  "src": "9174:16:46",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 15022,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "9174:7:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 15027,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 15024,
                                  "name": "amountsIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14988,
                                  "src": "9193:9:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 15026,
                                "indexExpression": {
                                  "id": 15025,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15011,
                                  "src": "9203:1:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "9193:12:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "9174:31:46"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 15034,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 15029,
                                      "name": "amountIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15023,
                                      "src": "9228:8:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "<=",
                                    "rightExpression": {
                                      "baseExpression": {
                                        "expression": {
                                          "id": 15030,
                                          "name": "change",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 14982,
                                          "src": "9240:6:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                            "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                          }
                                        },
                                        "id": 15031,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "limits",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 14702,
                                        "src": "9240:13:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 15033,
                                      "indexExpression": {
                                        "id": 15032,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15011,
                                        "src": "9254:1:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "9240:16:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9228:28:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 15035,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "9258:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 15036,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "JOIN_ABOVE_MAX",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 579,
                                    "src": "9258:21:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 15028,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "9219:8:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 15037,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9219:61:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15038,
                              "nodeType": "ExpressionStatement",
                              "src": "9219:61:46"
                            },
                            {
                              "assignments": [
                                15040
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 15040,
                                  "mutability": "mutable",
                                  "name": "asset",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 15105,
                                  "src": "9375:12:46",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  },
                                  "typeName": {
                                    "id": 15039,
                                    "name": "IAsset",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 20645,
                                    "src": "9375:6:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 15045,
                              "initialValue": {
                                "baseExpression": {
                                  "expression": {
                                    "id": 15041,
                                    "name": "change",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14982,
                                    "src": "9390:6:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                      "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                    }
                                  },
                                  "id": 15042,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "assets",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 14699,
                                  "src": "9390:13:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                    "typeString": "contract IAsset[] memory"
                                  }
                                },
                                "id": 15044,
                                "indexExpression": {
                                  "id": 15043,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15011,
                                  "src": "9404:1:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "9390:16:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "9375:31:46"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 15047,
                                    "name": "asset",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15040,
                                    "src": "9434:5:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  },
                                  {
                                    "id": 15048,
                                    "name": "amountIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15023,
                                    "src": "9441:8:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 15049,
                                    "name": "sender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14980,
                                    "src": "9451:6:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 15050,
                                      "name": "change",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 14982,
                                      "src": "9459:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                        "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                      }
                                    },
                                    "id": 15051,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "useInternalBalance",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 14706,
                                    "src": "9459:25:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  ],
                                  "id": 15046,
                                  "name": "_receiveAsset",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 13943,
                                  "src": "9420:13:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_$_t_bool_$returns$__$",
                                    "typeString": "function (contract IAsset,uint256,address,bool)"
                                  }
                                },
                                "id": 15052,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9420:65:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15053,
                              "nodeType": "ExpressionStatement",
                              "src": "9420:65:46"
                            },
                            {
                              "condition": {
                                "arguments": [
                                  {
                                    "id": 15055,
                                    "name": "asset",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15040,
                                    "src": "9511:5:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  ],
                                  "id": 15054,
                                  "name": "_isETH",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 183,
                                  "src": "9504:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_bool_$",
                                    "typeString": "function (contract IAsset) pure returns (bool)"
                                  }
                                },
                                "id": 15056,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9504:13:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 15065,
                              "nodeType": "IfStatement",
                              "src": "9500:89:46",
                              "trueBody": {
                                "id": 15064,
                                "nodeType": "Block",
                                "src": "9519:70:46",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 15062,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 15057,
                                        "name": "wrappedEth",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 14998,
                                        "src": "9537:10:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "arguments": [
                                          {
                                            "id": 15060,
                                            "name": "amountIn",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 15023,
                                            "src": "9565:8:46",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "expression": {
                                            "id": 15058,
                                            "name": "wrappedEth",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 14998,
                                            "src": "9550:10:46",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 15059,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "add",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 3115,
                                          "src": "9550:14:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                                          }
                                        },
                                        "id": 15061,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "9550:24:46",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "9537:37:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 15063,
                                    "nodeType": "ExpressionStatement",
                                    "src": "9537:37:46"
                                  }
                                ]
                              }
                            },
                            {
                              "assignments": [
                                15067
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 15067,
                                  "mutability": "mutable",
                                  "name": "feeAmount",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 15105,
                                  "src": "9603:17:46",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 15066,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "9603:7:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 15071,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 15068,
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14991,
                                  "src": "9623:21:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 15070,
                                "indexExpression": {
                                  "id": 15069,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15011,
                                  "src": "9645:1:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "9623:24:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "9603:44:46"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "id": 15074,
                                        "name": "asset",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15040,
                                        "src": "9688:5:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IAsset_$20645",
                                          "typeString": "contract IAsset"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_IAsset_$20645",
                                          "typeString": "contract IAsset"
                                        }
                                      ],
                                      "id": 15073,
                                      "name": "_translateToIERC20",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [
                                        202,
                                        249
                                      ],
                                      "referencedDeclaration": 202,
                                      "src": "9669:18:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                        "typeString": "function (contract IAsset) view returns (contract IERC20)"
                                      }
                                    },
                                    "id": 15075,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9669:25:46",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 15076,
                                    "name": "feeAmount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15067,
                                    "src": "9696:9:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 15072,
                                  "name": "_payFee",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14371,
                                  "src": "9661:7:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                    "typeString": "function (contract IERC20,uint256)"
                                  }
                                },
                                "id": 15077,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9661:45:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15078,
                              "nodeType": "ExpressionStatement",
                              "src": "9661:45:46"
                            },
                            {
                              "expression": {
                                "id": 15103,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 15079,
                                    "name": "finalBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 14995,
                                    "src": "9908:13:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                      "typeString": "bytes32[] memory"
                                    }
                                  },
                                  "id": 15081,
                                  "indexExpression": {
                                    "id": 15080,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15011,
                                    "src": "9922:1:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "9908:16:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "condition": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "id": 15084,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 15082,
                                          "name": "amountIn",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15023,
                                          "src": "9928:8:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": ">=",
                                        "rightExpression": {
                                          "id": 15083,
                                          "name": "feeAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15067,
                                          "src": "9940:9:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "src": "9928:21:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        }
                                      }
                                    ],
                                    "id": 15085,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "9927:23:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "falseExpression": {
                                    "arguments": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "id": 15100,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 15098,
                                          "name": "feeAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15067,
                                          "src": "10099:9:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "-",
                                        "rightExpression": {
                                          "id": 15099,
                                          "name": "amountIn",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15023,
                                          "src": "10111:8:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "src": "10099:20:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "baseExpression": {
                                          "id": 15094,
                                          "name": "balances",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 14985,
                                          "src": "10074:8:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                            "typeString": "bytes32[] memory"
                                          }
                                        },
                                        "id": 15096,
                                        "indexExpression": {
                                          "id": 15095,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15011,
                                          "src": "10083:1:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "10074:11:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      "id": 15097,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "decreaseCash",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 18763,
                                      "src": "10074:24:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes32_$",
                                        "typeString": "function (bytes32,uint256) view returns (bytes32)"
                                      }
                                    },
                                    "id": 15101,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "10074:46:46",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "id": 15102,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "Conditional",
                                  "src": "9927:193:46",
                                  "trueExpression": {
                                    "arguments": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "id": 15092,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "id": 15090,
                                          "name": "amountIn",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15023,
                                          "src": "10034:8:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "-",
                                        "rightExpression": {
                                          "id": 15091,
                                          "name": "feeAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15067,
                                          "src": "10045:9:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "src": "10034:20:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "baseExpression": {
                                          "id": 15086,
                                          "name": "balances",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 14985,
                                          "src": "10009:8:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                            "typeString": "bytes32[] memory"
                                          }
                                        },
                                        "id": 15088,
                                        "indexExpression": {
                                          "id": 15087,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15011,
                                          "src": "10018:1:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "10009:11:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      "id": 15089,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "increaseCash",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 18726,
                                      "src": "10009:24:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes32_$",
                                        "typeString": "function (bytes32,uint256) view returns (bytes32)"
                                      }
                                    },
                                    "id": 15093,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "10009:46:46",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "9908:212:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15104,
                              "nodeType": "ExpressionStatement",
                              "src": "9908:212:46"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15018,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15014,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15011,
                            "src": "9129:1:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "expression": {
                                "id": 15015,
                                "name": "change",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 14982,
                                "src": "9133:6:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                  "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                }
                              },
                              "id": 15016,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assets",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 14699,
                              "src": "9133:13:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            },
                            "id": 15017,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "9133:20:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "9129:24:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 15106,
                        "initializationExpression": {
                          "assignments": [
                            15011
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 15011,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 15106,
                              "src": "9114:9:46",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 15010,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "9114:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 15013,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 15012,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "9126:1:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "9114:13:46"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 15020,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "9155:3:46",
                            "subExpression": {
                              "id": 15019,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15011,
                              "src": "9157:1:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15021,
                          "nodeType": "ExpressionStatement",
                          "src": "9155:3:46"
                        },
                        "nodeType": "ForStatement",
                        "src": "9109:1022:46"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 15108,
                              "name": "wrappedEth",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14998,
                              "src": "10207:10:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 15107,
                            "name": "_handleRemainingEth",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14046,
                            "src": "10187:19:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 15109,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10187:31:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15110,
                        "nodeType": "ExpressionStatement",
                        "src": "10187:31:46"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 14978,
                    "nodeType": "StructuredDocumentation",
                    "src": "8318:303:46",
                    "text": " @dev Transfers `amountsIn` from `sender`, checking that they are within their accepted limits, and pays\n accumulated protocol swap fees.\n Returns the Pool's final balances, which are the current balances plus `amountsIn` minus accumulated protocol\n swap fees."
                  },
                  "id": 15112,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_processJoinPoolTransfers",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 14992,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14980,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 15112,
                        "src": "8670:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 14979,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8670:7:46",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14982,
                        "mutability": "mutable",
                        "name": "change",
                        "nodeType": "VariableDeclaration",
                        "scope": 15112,
                        "src": "8694:31:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                          "typeString": "struct PoolBalances.PoolBalanceChange"
                        },
                        "typeName": {
                          "id": 14981,
                          "name": "PoolBalanceChange",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 14707,
                          "src": "8694:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_storage_ptr",
                            "typeString": "struct PoolBalances.PoolBalanceChange"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14985,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 15112,
                        "src": "8735:25:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14983,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "8735:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 14984,
                          "nodeType": "ArrayTypeName",
                          "src": "8735:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14988,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 15112,
                        "src": "8770:26:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14986,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "8770:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14987,
                          "nodeType": "ArrayTypeName",
                          "src": "8770:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 14991,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 15112,
                        "src": "8806:38:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14989,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "8806:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 14990,
                          "nodeType": "ArrayTypeName",
                          "src": "8806:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8660:190:46"
                  },
                  "returnParameters": {
                    "id": 14996,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 14995,
                        "mutability": "mutable",
                        "name": "finalBalances",
                        "nodeType": "VariableDeclaration",
                        "scope": 15112,
                        "src": "8868:30:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 14993,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "8868:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 14994,
                          "nodeType": "ArrayTypeName",
                          "src": "8868:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8867:32:46"
                  },
                  "scope": 15340,
                  "src": "8626:1599:46",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 15214,
                    "nodeType": "Block",
                    "src": "10848:780:46",
                    "statements": [
                      {
                        "expression": {
                          "id": 15139,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15132,
                            "name": "finalBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15130,
                            "src": "10858:13:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 15136,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15120,
                                  "src": "10888:8:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                    "typeString": "bytes32[] memory"
                                  }
                                },
                                "id": 15137,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "10888:15:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 15135,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "10874:13:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (bytes32[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 15133,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "10878:7:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 15134,
                                "nodeType": "ArrayTypeName",
                                "src": "10878:9:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                  "typeString": "bytes32[]"
                                }
                              }
                            },
                            "id": 15138,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "10874:30:46",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "src": "10858:46:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                            "typeString": "bytes32[] memory"
                          }
                        },
                        "id": 15140,
                        "nodeType": "ExpressionStatement",
                        "src": "10858:46:46"
                      },
                      {
                        "body": {
                          "id": 15212,
                          "nodeType": "Block",
                          "src": "10965:657:46",
                          "statements": [
                            {
                              "assignments": [
                                15154
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 15154,
                                  "mutability": "mutable",
                                  "name": "amountOut",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 15212,
                                  "src": "10979:17:46",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 15153,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "10979:7:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 15158,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 15155,
                                  "name": "amountsOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15123,
                                  "src": "10999:10:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 15157,
                                "indexExpression": {
                                  "id": 15156,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15142,
                                  "src": "11010:1:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "10999:13:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "10979:33:46"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 15165,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 15160,
                                      "name": "amountOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15154,
                                      "src": "11035:9:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">=",
                                    "rightExpression": {
                                      "baseExpression": {
                                        "expression": {
                                          "id": 15161,
                                          "name": "change",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15117,
                                          "src": "11048:6:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                            "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                          }
                                        },
                                        "id": 15162,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "limits",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 14702,
                                        "src": "11048:13:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                          "typeString": "uint256[] memory"
                                        }
                                      },
                                      "id": 15164,
                                      "indexExpression": {
                                        "id": 15163,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15142,
                                        "src": "11062:1:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "11048:16:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "11035:29:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 15166,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "11066:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 15167,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "EXIT_BELOW_MIN",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 576,
                                    "src": "11066:21:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 15159,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "11026:8:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 15168,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11026:62:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15169,
                              "nodeType": "ExpressionStatement",
                              "src": "11026:62:46"
                            },
                            {
                              "assignments": [
                                15171
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 15171,
                                  "mutability": "mutable",
                                  "name": "asset",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 15212,
                                  "src": "11178:12:46",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  },
                                  "typeName": {
                                    "id": 15170,
                                    "name": "IAsset",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 20645,
                                    "src": "11178:6:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 15176,
                              "initialValue": {
                                "baseExpression": {
                                  "expression": {
                                    "id": 15172,
                                    "name": "change",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15117,
                                    "src": "11193:6:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                      "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                    }
                                  },
                                  "id": 15173,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "assets",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 14699,
                                  "src": "11193:13:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                    "typeString": "contract IAsset[] memory"
                                  }
                                },
                                "id": 15175,
                                "indexExpression": {
                                  "id": 15174,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15142,
                                  "src": "11207:1:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "11193:16:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "11178:31:46"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 15178,
                                    "name": "asset",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15171,
                                    "src": "11234:5:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  },
                                  {
                                    "id": 15179,
                                    "name": "amountOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15154,
                                    "src": "11241:9:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 15180,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15115,
                                    "src": "11252:9:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 15181,
                                      "name": "change",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15117,
                                      "src": "11263:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                        "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                      }
                                    },
                                    "id": 15182,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "useInternalBalance",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 14706,
                                    "src": "11263:25:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    },
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  ],
                                  "id": 15177,
                                  "name": "_sendAsset",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14010,
                                  "src": "11223:10:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_payable_$_t_bool_$returns$__$",
                                    "typeString": "function (contract IAsset,uint256,address payable,bool)"
                                  }
                                },
                                "id": 15183,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11223:66:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15184,
                              "nodeType": "ExpressionStatement",
                              "src": "11223:66:46"
                            },
                            {
                              "assignments": [
                                15186
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 15186,
                                  "mutability": "mutable",
                                  "name": "feeAmount",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 15212,
                                  "src": "11304:17:46",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 15185,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "11304:7:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 15190,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 15187,
                                  "name": "dueProtocolFeeAmounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15126,
                                  "src": "11324:21:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 15189,
                                "indexExpression": {
                                  "id": 15188,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15142,
                                  "src": "11346:1:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "11324:24:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "11304:44:46"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "id": 15193,
                                        "name": "asset",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15171,
                                        "src": "11389:5:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IAsset_$20645",
                                          "typeString": "contract IAsset"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_IAsset_$20645",
                                          "typeString": "contract IAsset"
                                        }
                                      ],
                                      "id": 15192,
                                      "name": "_translateToIERC20",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [
                                        202,
                                        249
                                      ],
                                      "referencedDeclaration": 202,
                                      "src": "11370:18:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                        "typeString": "function (contract IAsset) view returns (contract IERC20)"
                                      }
                                    },
                                    "id": 15194,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "11370:25:46",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 15195,
                                    "name": "feeAmount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15186,
                                    "src": "11397:9:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 15191,
                                  "name": "_payFee",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 14371,
                                  "src": "11362:7:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                                    "typeString": "function (contract IERC20,uint256)"
                                  }
                                },
                                "id": 15196,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11362:45:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15197,
                              "nodeType": "ExpressionStatement",
                              "src": "11362:45:46"
                            },
                            {
                              "expression": {
                                "id": 15210,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 15198,
                                    "name": "finalBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15130,
                                    "src": "11542:13:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                      "typeString": "bytes32[] memory"
                                    }
                                  },
                                  "id": 15200,
                                  "indexExpression": {
                                    "id": 15199,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15142,
                                    "src": "11556:1:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "11542:16:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "id": 15207,
                                          "name": "feeAmount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15186,
                                          "src": "11600:9:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "expression": {
                                          "id": 15205,
                                          "name": "amountOut",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15154,
                                          "src": "11586:9:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 15206,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "add",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 3115,
                                        "src": "11586:13:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                                        }
                                      },
                                      "id": 15208,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "11586:24:46",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 15201,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15120,
                                        "src": "11561:8:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                          "typeString": "bytes32[] memory"
                                        }
                                      },
                                      "id": 15203,
                                      "indexExpression": {
                                        "id": 15202,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15142,
                                        "src": "11570:1:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "11561:11:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "id": 15204,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "decreaseCash",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 18763,
                                    "src": "11561:24:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes32_$",
                                      "typeString": "function (bytes32,uint256) view returns (bytes32)"
                                    }
                                  },
                                  "id": 15209,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11561:50:46",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "11542:69:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15211,
                              "nodeType": "ExpressionStatement",
                              "src": "11542:69:46"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15149,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15145,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15142,
                            "src": "10934:1:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "expression": {
                                "id": 15146,
                                "name": "change",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15117,
                                "src": "10938:6:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                                  "typeString": "struct PoolBalances.PoolBalanceChange memory"
                                }
                              },
                              "id": 15147,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assets",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 14699,
                              "src": "10938:13:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            },
                            "id": 15148,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "10938:20:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "10934:24:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 15213,
                        "initializationExpression": {
                          "assignments": [
                            15142
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 15142,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 15213,
                              "src": "10919:9:46",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 15141,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "10919:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 15144,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 15143,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "10931:1:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "10919:13:46"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 15151,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "10960:3:46",
                            "subExpression": {
                              "id": 15150,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15142,
                              "src": "10962:1:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15152,
                          "nodeType": "ExpressionStatement",
                          "src": "10960:3:46"
                        },
                        "nodeType": "ForStatement",
                        "src": "10914:708:46"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15113,
                    "nodeType": "StructuredDocumentation",
                    "src": "10231:326:46",
                    "text": " @dev Transfers `amountsOut` to `recipient`, checking that they are within their accepted limits, and pays\n accumulated protocol swap fees from the Pool.\n Returns the Pool's final balances, which are the current `balances` minus `amountsOut` and fees paid\n (`dueProtocolFeeAmounts`)."
                  },
                  "id": 15215,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_processExitPoolTransfers",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15127,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15115,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 15215,
                        "src": "10606:25:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 15114,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "10606:15:46",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15117,
                        "mutability": "mutable",
                        "name": "change",
                        "nodeType": "VariableDeclaration",
                        "scope": 15215,
                        "src": "10641:31:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_memory_ptr",
                          "typeString": "struct PoolBalances.PoolBalanceChange"
                        },
                        "typeName": {
                          "id": 15116,
                          "name": "PoolBalanceChange",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 14707,
                          "src": "10641:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_PoolBalanceChange_$14707_storage_ptr",
                            "typeString": "struct PoolBalances.PoolBalanceChange"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15120,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 15215,
                        "src": "10682:25:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15118,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "10682:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 15119,
                          "nodeType": "ArrayTypeName",
                          "src": "10682:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15123,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 15215,
                        "src": "10717:27:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15121,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "10717:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15122,
                          "nodeType": "ArrayTypeName",
                          "src": "10717:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15126,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 15215,
                        "src": "10754:38:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15124,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "10754:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15125,
                          "nodeType": "ArrayTypeName",
                          "src": "10754:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10596:202:46"
                  },
                  "returnParameters": {
                    "id": 15131,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15130,
                        "mutability": "mutable",
                        "name": "finalBalances",
                        "nodeType": "VariableDeclaration",
                        "scope": 15215,
                        "src": "10816:30:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15128,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "10816:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 15129,
                          "nodeType": "ArrayTypeName",
                          "src": "10816:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10815:32:46"
                  },
                  "scope": 15340,
                  "src": "10562:1066:46",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 15283,
                    "nodeType": "Block",
                    "src": "12101:435:46",
                    "statements": [
                      {
                        "assignments": [
                          15230,
                          15233
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15230,
                            "mutability": "mutable",
                            "name": "actualTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 15283,
                            "src": "12112:28:46",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 15228,
                                "name": "IERC20",
                                "nodeType": "UserDefinedTypeName",
                                "referencedDeclaration": 5095,
                                "src": "12112:6:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 15229,
                              "nodeType": "ArrayTypeName",
                              "src": "12112:8:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                "typeString": "contract IERC20[]"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 15233,
                            "mutability": "mutable",
                            "name": "balances",
                            "nodeType": "VariableDeclaration",
                            "scope": 15283,
                            "src": "12142:25:46",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 15231,
                                "name": "bytes32",
                                "nodeType": "ElementaryTypeName",
                                "src": "12142:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15232,
                              "nodeType": "ArrayTypeName",
                              "src": "12142:9:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                "typeString": "bytes32[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15237,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 15235,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15218,
                              "src": "12186:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15234,
                            "name": "_getPoolTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16017,
                            "src": "12171:14:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                              "typeString": "function (bytes32) view returns (contract IERC20[] memory,bytes32[] memory)"
                            }
                          },
                          "id": 15236,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12171:22:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                            "typeString": "tuple(contract IERC20[] memory,bytes32[] memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12111:82:46"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 15241,
                                "name": "actualTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15230,
                                "src": "12239:12:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 15242,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "12239:19:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 15243,
                                "name": "expectedTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15221,
                                "src": "12260:14:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 15244,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "12260:21:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 15238,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "12203:12:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 15240,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "12203:35:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 15245,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12203:79:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15246,
                        "nodeType": "ExpressionStatement",
                        "src": "12203:79:46"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 15251,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 15248,
                                  "name": "actualTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15230,
                                  "src": "12301:12:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 15249,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "12301:19:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 15250,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "12323:1:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "12301:23:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 15252,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "12326:6:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 15253,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "POOL_NO_TOKENS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 642,
                              "src": "12326:21:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 15247,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "12292:8:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 15254,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12292:56:46",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15255,
                        "nodeType": "ExpressionStatement",
                        "src": "12292:56:46"
                      },
                      {
                        "body": {
                          "id": 15279,
                          "nodeType": "Block",
                          "src": "12409:95:46",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    "id": 15274,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "baseExpression": {
                                        "id": 15268,
                                        "name": "actualTokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15230,
                                        "src": "12432:12:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                          "typeString": "contract IERC20[] memory"
                                        }
                                      },
                                      "id": 15270,
                                      "indexExpression": {
                                        "id": 15269,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15257,
                                        "src": "12445:1:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "12432:15:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "baseExpression": {
                                        "id": 15271,
                                        "name": "expectedTokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15221,
                                        "src": "12451:14:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                          "typeString": "contract IERC20[] memory"
                                        }
                                      },
                                      "id": 15273,
                                      "indexExpression": {
                                        "id": 15272,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15257,
                                        "src": "12466:1:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "12451:17:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "src": "12432:36:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 15275,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "12470:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 15276,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKENS_MISMATCH",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 621,
                                    "src": "12470:22:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 15267,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "12423:8:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 15277,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "12423:70:46",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15278,
                              "nodeType": "ExpressionStatement",
                              "src": "12423:70:46"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15263,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15260,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15257,
                            "src": "12379:1:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 15261,
                              "name": "actualTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15230,
                              "src": "12383:12:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 15262,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "12383:19:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "12379:23:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 15280,
                        "initializationExpression": {
                          "assignments": [
                            15257
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 15257,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 15280,
                              "src": "12364:9:46",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 15256,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "12364:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 15259,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 15258,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "12376:1:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "12364:13:46"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 15265,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "12404:3:46",
                            "subExpression": {
                              "id": 15264,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15257,
                              "src": "12406:1:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15266,
                          "nodeType": "ExpressionStatement",
                          "src": "12404:3:46"
                        },
                        "nodeType": "ForStatement",
                        "src": "12359:145:46"
                      },
                      {
                        "expression": {
                          "id": 15281,
                          "name": "balances",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15233,
                          "src": "12521:8:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                            "typeString": "bytes32[] memory"
                          }
                        },
                        "functionReturnParameters": 15226,
                        "id": 15282,
                        "nodeType": "Return",
                        "src": "12514:15:46"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15216,
                    "nodeType": "StructuredDocumentation",
                    "src": "11634:307:46",
                    "text": " @dev Returns the total balance for `poolId`'s `expectedTokens`.\n `expectedTokens` must exactly equal the token array returned by `getPoolTokens`: both arrays must have the same\n length, elements and order. Additionally, the Pool must have at least one registered token."
                  },
                  "id": 15284,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_validateTokensAndGetBalances",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15222,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15218,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15284,
                        "src": "11985:14:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15217,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11985:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15221,
                        "mutability": "mutable",
                        "name": "expectedTokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 15284,
                        "src": "12001:30:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15219,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "12001:6:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 15220,
                          "nodeType": "ArrayTypeName",
                          "src": "12001:8:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11984:48:46"
                  },
                  "returnParameters": {
                    "id": 15226,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15225,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 15284,
                        "src": "12079:16:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15223,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "12079:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 15224,
                          "nodeType": "ArrayTypeName",
                          "src": "12079:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12078:18:46"
                  },
                  "scope": 15340,
                  "src": "11946:590:46",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 15338,
                    "nodeType": "Block",
                    "src": "12897:204:46",
                    "statements": [
                      {
                        "expression": {
                          "id": 15303,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15296,
                            "name": "signedValues",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15294,
                            "src": "12907:12:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                              "typeString": "int256[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 15300,
                                  "name": "values",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15288,
                                  "src": "12935:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                    "typeString": "uint256[] memory"
                                  }
                                },
                                "id": 15301,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "12935:13:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 15299,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "12922:12:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (int256[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 15297,
                                  "name": "int256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "12926:6:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "id": 15298,
                                "nodeType": "ArrayTypeName",
                                "src": "12926:8:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                                  "typeString": "int256[]"
                                }
                              }
                            },
                            "id": 15302,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "12922:27:46",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                              "typeString": "int256[] memory"
                            }
                          },
                          "src": "12907:42:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        },
                        "id": 15304,
                        "nodeType": "ExpressionStatement",
                        "src": "12907:42:46"
                      },
                      {
                        "body": {
                          "id": 15336,
                          "nodeType": "Block",
                          "src": "13003:92:46",
                          "statements": [
                            {
                              "expression": {
                                "id": 15334,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 15316,
                                    "name": "signedValues",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15294,
                                    "src": "13017:12:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                      "typeString": "int256[] memory"
                                    }
                                  },
                                  "id": 15318,
                                  "indexExpression": {
                                    "id": 15317,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15306,
                                    "src": "13030:1:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "13017:15:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "condition": {
                                    "id": 15319,
                                    "name": "positive",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15290,
                                    "src": "13035:8:46",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "falseExpression": {
                                    "id": 15332,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "UnaryOperation",
                                    "operator": "-",
                                    "prefix": true,
                                    "src": "13066:18:46",
                                    "subExpression": {
                                      "arguments": [
                                        {
                                          "baseExpression": {
                                            "id": 15328,
                                            "name": "values",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 15288,
                                            "src": "13074:6:46",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                              "typeString": "uint256[] memory"
                                            }
                                          },
                                          "id": 15330,
                                          "indexExpression": {
                                            "id": 15329,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 15306,
                                            "src": "13081:1:46",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "13074:9:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 15327,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "13067:6:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_int256_$",
                                          "typeString": "type(int256)"
                                        },
                                        "typeName": {
                                          "id": 15326,
                                          "name": "int256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "13067:6:46",
                                          "typeDescriptions": {}
                                        }
                                      },
                                      "id": 15331,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "13067:17:46",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "id": 15333,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "Conditional",
                                  "src": "13035:49:46",
                                  "trueExpression": {
                                    "arguments": [
                                      {
                                        "baseExpression": {
                                          "id": 15322,
                                          "name": "values",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15288,
                                          "src": "13053:6:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                            "typeString": "uint256[] memory"
                                          }
                                        },
                                        "id": 15324,
                                        "indexExpression": {
                                          "id": 15323,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 15306,
                                          "src": "13060:1:46",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "13053:9:46",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "id": 15321,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "13046:6:46",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_int256_$",
                                        "typeString": "type(int256)"
                                      },
                                      "typeName": {
                                        "id": 15320,
                                        "name": "int256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "13046:6:46",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 15325,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "13046:17:46",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "13017:67:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 15335,
                              "nodeType": "ExpressionStatement",
                              "src": "13017:67:46"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15312,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15309,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15306,
                            "src": "12979:1:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 15310,
                              "name": "values",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15288,
                              "src": "12983:6:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 15311,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "12983:13:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "12979:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 15337,
                        "initializationExpression": {
                          "assignments": [
                            15306
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 15306,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 15337,
                              "src": "12964:9:46",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 15305,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "12964:7:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 15308,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 15307,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "12976:1:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "12964:13:46"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 15314,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "12998:3:46",
                            "subExpression": {
                              "id": 15313,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15306,
                              "src": "12998:1:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15315,
                          "nodeType": "ExpressionStatement",
                          "src": "12998:3:46"
                        },
                        "nodeType": "ForStatement",
                        "src": "12959:136:46"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15285,
                    "nodeType": "StructuredDocumentation",
                    "src": "12542:201:46",
                    "text": " @dev Casts an array of uint256 to int256, setting the sign of the result according to the `positive` flag,\n without checking whether the values fit in the signed 256 bit range."
                  },
                  "id": 15339,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_unsafeCastToInt256",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15291,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15288,
                        "mutability": "mutable",
                        "name": "values",
                        "nodeType": "VariableDeclaration",
                        "scope": 15339,
                        "src": "12777:23:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15286,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12777:7:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15287,
                          "nodeType": "ArrayTypeName",
                          "src": "12777:9:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15290,
                        "mutability": "mutable",
                        "name": "positive",
                        "nodeType": "VariableDeclaration",
                        "scope": 15339,
                        "src": "12802:13:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 15289,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "12802:4:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12776:40:46"
                  },
                  "returnParameters": {
                    "id": 15295,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15294,
                        "mutability": "mutable",
                        "name": "signedValues",
                        "nodeType": "VariableDeclaration",
                        "scope": 15339,
                        "src": "12863:28:46",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15292,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "12863:6:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 15293,
                          "nodeType": "ArrayTypeName",
                          "src": "12863:8:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12862:30:46"
                  },
                  "scope": 15340,
                  "src": "12748:353:46",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 15341,
              "src": "1509:11594:46"
            }
          ],
          "src": "688:12416:46"
        },
        "id": 46
      },
      "src.sol/amm/vault/PoolRegistry.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/PoolRegistry.sol",
          "exportedSymbols": {
            "PoolRegistry": [
              15609
            ]
          },
          "id": 15610,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 15342,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:47"
            },
            {
              "id": 15343,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:47"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 15344,
              "nodeType": "ImportDirective",
              "scope": 15610,
              "sourceUnit": 656,
              "src": "747:43:47",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 15345,
              "nodeType": "ImportDirective",
              "scope": 15610,
              "sourceUnit": 5188,
              "src": "791:49:47",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/VaultAuthorization.sol",
              "file": "./VaultAuthorization.sol",
              "id": 15346,
              "nodeType": "ImportDirective",
              "scope": 15610,
              "sourceUnit": 18419,
              "src": "842:34:47",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 15348,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "1120:15:47",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 15349,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1120:15:47"
                },
                {
                  "baseName": {
                    "id": 15350,
                    "name": "VaultAuthorization",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 18418,
                    "src": "1137:18:47",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_VaultAuthorization_$18418",
                      "typeString": "contract VaultAuthorization"
                    }
                  },
                  "id": 15351,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1137:18:47"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                18418,
                20822,
                21266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 15347,
                "nodeType": "StructuredDocumentation",
                "src": "878:207:47",
                "text": " @dev Maintains the Pool ID data structure, implements Pool ID creation and registration, and defines useful modifiers\n and helper functions for ensuring correct behavior when working with Pools."
              },
              "fullyImplemented": false,
              "id": 15609,
              "linearizedBaseContracts": [
                15609,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                5187,
                21266,
                20822
              ],
              "name": "PoolRegistry",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": false,
                  "id": 15355,
                  "mutability": "mutable",
                  "name": "_isPoolRegistered",
                  "nodeType": "VariableDeclaration",
                  "scope": 15609,
                  "src": "1292:50:47",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
                    "typeString": "mapping(bytes32 => bool)"
                  },
                  "typeName": {
                    "id": 15354,
                    "keyType": {
                      "id": 15352,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1300:7:47",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1292:24:47",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
                      "typeString": "mapping(bytes32 => bool)"
                    },
                    "valueType": {
                      "id": 15353,
                      "name": "bool",
                      "nodeType": "ElementaryTypeName",
                      "src": "1311:4:47",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 15357,
                  "mutability": "mutable",
                  "name": "_nextPoolNonce",
                  "nodeType": "VariableDeclaration",
                  "scope": 15609,
                  "src": "1555:30:47",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 15356,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1555:7:47",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 15367,
                    "nodeType": "Block",
                    "src": "1722:57:47",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 15363,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15360,
                              "src": "1754:6:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15362,
                            "name": "_ensureRegisteredPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15394,
                            "src": "1732:21:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$",
                              "typeString": "function (bytes32) view"
                            }
                          },
                          "id": 15364,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1732:29:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15365,
                        "nodeType": "ExpressionStatement",
                        "src": "1732:29:47"
                      },
                      {
                        "id": 15366,
                        "nodeType": "PlaceholderStatement",
                        "src": "1771:1:47"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15358,
                    "nodeType": "StructuredDocumentation",
                    "src": "1592:81:47",
                    "text": " @dev Reverts unless `poolId` corresponds to a registered Pool."
                  },
                  "id": 15368,
                  "name": "withRegisteredPool",
                  "nodeType": "ModifierDefinition",
                  "parameters": {
                    "id": 15361,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15360,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15368,
                        "src": "1706:14:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15359,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1706:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1705:16:47"
                  },
                  "src": "1678:101:47",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 15378,
                    "nodeType": "Block",
                    "src": "1944:55:47",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 15374,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15371,
                              "src": "1974:6:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15373,
                            "name": "_ensurePoolIsSender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15416,
                            "src": "1954:19:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$",
                              "typeString": "function (bytes32) view"
                            }
                          },
                          "id": 15375,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1954:27:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15376,
                        "nodeType": "ExpressionStatement",
                        "src": "1954:27:47"
                      },
                      {
                        "id": 15377,
                        "nodeType": "PlaceholderStatement",
                        "src": "1991:1:47"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15369,
                    "nodeType": "StructuredDocumentation",
                    "src": "1785:120:47",
                    "text": " @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract."
                  },
                  "id": 15379,
                  "name": "onlyPool",
                  "nodeType": "ModifierDefinition",
                  "parameters": {
                    "id": 15372,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15371,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15379,
                        "src": "1928:14:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15370,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1928:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1927:16:47"
                  },
                  "src": "1910:89:47",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 15393,
                    "nodeType": "Block",
                    "src": "2152:76:47",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "baseExpression": {
                                "id": 15386,
                                "name": "_isPoolRegistered",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15355,
                                "src": "2171:17:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
                                  "typeString": "mapping(bytes32 => bool)"
                                }
                              },
                              "id": 15388,
                              "indexExpression": {
                                "id": 15387,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15382,
                                "src": "2189:6:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "2171:25:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 15389,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2198:6:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 15390,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INVALID_POOL_ID",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 561,
                              "src": "2198:22:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 15385,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2162:8:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 15391,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2162:59:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15392,
                        "nodeType": "ExpressionStatement",
                        "src": "2162:59:47"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15380,
                    "nodeType": "StructuredDocumentation",
                    "src": "2005:81:47",
                    "text": " @dev Reverts unless `poolId` corresponds to a registered Pool."
                  },
                  "id": 15394,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_ensureRegisteredPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15383,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15382,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15394,
                        "src": "2122:14:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15381,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2122:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2121:16:47"
                  },
                  "returnParameters": {
                    "id": 15384,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2152:0:47"
                  },
                  "scope": 15609,
                  "src": "2091:137:47",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 15415,
                    "nodeType": "Block",
                    "src": "2417:127:47",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 15401,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15397,
                              "src": "2449:6:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15400,
                            "name": "_ensureRegisteredPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15394,
                            "src": "2427:21:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$",
                              "typeString": "function (bytes32) view"
                            }
                          },
                          "id": 15402,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2427:29:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15403,
                        "nodeType": "ExpressionStatement",
                        "src": "2427:29:47"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "id": 15410,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 15405,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -15,
                                  "src": "2475:3:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 15406,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "src": "2475:10:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "id": 15408,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15397,
                                    "src": "2505:6:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 15407,
                                  "name": "_getPoolAddress",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15568,
                                  "src": "2489:15:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_address_$",
                                    "typeString": "function (bytes32) pure returns (address)"
                                  }
                                },
                                "id": 15409,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2489:23:47",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "src": "2475:37:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 15411,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2514:6:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 15412,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "CALLER_NOT_POOL",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 564,
                              "src": "2514:22:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 15404,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2466:8:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 15413,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2466:71:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15414,
                        "nodeType": "ExpressionStatement",
                        "src": "2466:71:47"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15395,
                    "nodeType": "StructuredDocumentation",
                    "src": "2234:120:47",
                    "text": " @dev Reverts unless `poolId` corresponds to a registered Pool, and the caller is the Pool's contract."
                  },
                  "id": 15416,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_ensurePoolIsSender",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15398,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15397,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15416,
                        "src": "2388:14:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15396,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2388:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2387:16:47"
                  },
                  "returnParameters": {
                    "id": 15399,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2417:0:47"
                  },
                  "scope": 15609,
                  "src": "2359:185:47",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "baseFunctions": [
                    20948
                  ],
                  "body": {
                    "id": 15465,
                    "nodeType": "Block",
                    "src": "2714:524:47",
                    "statements": [
                      {
                        "assignments": [
                          15429
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15429,
                            "mutability": "mutable",
                            "name": "poolId",
                            "nodeType": "VariableDeclaration",
                            "scope": 15465,
                            "src": "2902:14:47",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 15428,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "2902:7:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15439,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 15431,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "2929:3:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 15432,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "2929:10:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 15433,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15418,
                              "src": "2941:14:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 15436,
                                  "name": "_nextPoolNonce",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15357,
                                  "src": "2964:14:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 15435,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2957:6:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint80_$",
                                  "typeString": "type(uint80)"
                                },
                                "typeName": {
                                  "id": 15434,
                                  "name": "uint80",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2957:6:47",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 15437,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2957:22:47",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint80",
                                "typeString": "uint80"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              },
                              {
                                "typeIdentifier": "t_uint80",
                                "typeString": "uint80"
                              }
                            ],
                            "id": 15430,
                            "name": "_toPoolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15546,
                            "src": "2919:9:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_address_$_t_enum$_PoolSpecialization_$20940_$_t_uint80_$returns$_t_bytes32_$",
                              "typeString": "function (address,enum IVault.PoolSpecialization,uint80) pure returns (bytes32)"
                            }
                          },
                          "id": 15438,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2919:61:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2902:78:47"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 15444,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "UnaryOperation",
                              "operator": "!",
                              "prefix": true,
                              "src": "3000:26:47",
                              "subExpression": {
                                "baseExpression": {
                                  "id": 15441,
                                  "name": "_isPoolRegistered",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15355,
                                  "src": "3001:17:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
                                    "typeString": "mapping(bytes32 => bool)"
                                  }
                                },
                                "id": 15443,
                                "indexExpression": {
                                  "id": 15442,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15429,
                                  "src": "3019:6:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3001:25:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 15445,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3028:6:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 15446,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INVALID_POOL_ID",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 561,
                              "src": "3028:22:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 15440,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2991:8:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 15447,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2991:60:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15448,
                        "nodeType": "ExpressionStatement",
                        "src": "2991:60:47"
                      },
                      {
                        "expression": {
                          "id": 15453,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 15449,
                              "name": "_isPoolRegistered",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15355,
                              "src": "3108:17:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
                                "typeString": "mapping(bytes32 => bool)"
                              }
                            },
                            "id": 15451,
                            "indexExpression": {
                              "id": 15450,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15429,
                              "src": "3126:6:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "3108:25:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "hexValue": "74727565",
                            "id": 15452,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3136:4:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "true"
                          },
                          "src": "3108:32:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 15454,
                        "nodeType": "ExpressionStatement",
                        "src": "3108:32:47"
                      },
                      {
                        "expression": {
                          "id": 15457,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15455,
                            "name": "_nextPoolNonce",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15357,
                            "src": "3151:14:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "hexValue": "31",
                            "id": 15456,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3169:1:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "3151:19:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 15458,
                        "nodeType": "ExpressionStatement",
                        "src": "3151:19:47"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 15460,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15429,
                              "src": "3201:6:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15459,
                            "name": "PoolRegistered",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20953,
                            "src": "3186:14:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
                              "typeString": "function (bytes32)"
                            }
                          },
                          "id": 15461,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3186:22:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15462,
                        "nodeType": "EmitStatement",
                        "src": "3181:27:47"
                      },
                      {
                        "expression": {
                          "id": 15463,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15429,
                          "src": "3225:6:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 15427,
                        "id": 15464,
                        "nodeType": "Return",
                        "src": "3218:13:47"
                      }
                    ]
                  },
                  "functionSelector": "09b2760f",
                  "id": 15466,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 15422,
                      "modifierName": {
                        "id": 15421,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "2649:12:47",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2649:12:47"
                    },
                    {
                      "id": 15424,
                      "modifierName": {
                        "id": 15423,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "2670:13:47",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2670:13:47"
                    }
                  ],
                  "name": "registerPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 15420,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2632:8:47"
                  },
                  "parameters": {
                    "id": 15419,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15418,
                        "mutability": "mutable",
                        "name": "specialization",
                        "nodeType": "VariableDeclaration",
                        "scope": 15466,
                        "src": "2572:33:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 15417,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "2572:18:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2571:35:47"
                  },
                  "returnParameters": {
                    "id": 15427,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15426,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 15466,
                        "src": "2701:7:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15425,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2701:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2700:9:47"
                  },
                  "scope": 15609,
                  "src": "2550:688:47",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    20963
                  ],
                  "body": {
                    "id": 15487,
                    "nodeType": "Block",
                    "src": "3409:81:47",
                    "statements": [
                      {
                        "expression": {
                          "components": [
                            {
                              "arguments": [
                                {
                                  "id": 15480,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15468,
                                  "src": "3443:6:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 15479,
                                "name": "_getPoolAddress",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15568,
                                "src": "3427:15:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_address_$",
                                  "typeString": "function (bytes32) pure returns (address)"
                                }
                              },
                              "id": 15481,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3427:23:47",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 15483,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15468,
                                  "src": "3475:6:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 15482,
                                "name": "_getPoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15608,
                                "src": "3452:22:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 15484,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3452:30:47",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            }
                          ],
                          "id": 15485,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "3426:57:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_address_$_t_enum$_PoolSpecialization_$20940_$",
                            "typeString": "tuple(address,enum IVault.PoolSpecialization)"
                          }
                        },
                        "functionReturnParameters": 15478,
                        "id": 15486,
                        "nodeType": "Return",
                        "src": "3419:64:47"
                      }
                    ]
                  },
                  "functionSelector": "f6c00927",
                  "id": 15488,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 15472,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15468,
                          "src": "3351:6:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 15473,
                      "modifierName": {
                        "id": 15471,
                        "name": "withRegisteredPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15368,
                        "src": "3332:18:47",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_bytes32_$",
                          "typeString": "modifier (bytes32)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3332:26:47"
                    }
                  ],
                  "name": "getPool",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 15470,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3315:8:47"
                  },
                  "parameters": {
                    "id": 15469,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15468,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15488,
                        "src": "3261:14:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15467,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3261:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3260:16:47"
                  },
                  "returnParameters": {
                    "id": 15478,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15475,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 15488,
                        "src": "3376:7:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 15474,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3376:7:47",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15477,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 15488,
                        "src": "3385:18:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 15476,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "3385:18:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3375:29:47"
                  },
                  "scope": 15609,
                  "src": "3244:246:47",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 15545,
                    "nodeType": "Block",
                    "src": "4506:237:47",
                    "statements": [
                      {
                        "assignments": [
                          15501
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15501,
                            "mutability": "mutable",
                            "name": "serialized",
                            "nodeType": "VariableDeclaration",
                            "scope": 15545,
                            "src": "4516:18:47",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 15500,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "4516:7:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15502,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4516:18:47"
                      },
                      {
                        "expression": {
                          "id": 15511,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15503,
                            "name": "serialized",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15501,
                            "src": "4545:10:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "|=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "id": 15508,
                                    "name": "nonce",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15495,
                                    "src": "4575:5:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint80",
                                      "typeString": "uint80"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint80",
                                      "typeString": "uint80"
                                    }
                                  ],
                                  "id": 15507,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "4567:7:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": {
                                    "id": 15506,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4567:7:47",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 15509,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4567:14:47",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 15505,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4559:7:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_bytes32_$",
                                "typeString": "type(bytes32)"
                              },
                              "typeName": {
                                "id": 15504,
                                "name": "bytes32",
                                "nodeType": "ElementaryTypeName",
                                "src": "4559:7:47",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 15510,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4559:23:47",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4545:37:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 15512,
                        "nodeType": "ExpressionStatement",
                        "src": "4545:37:47"
                      },
                      {
                        "expression": {
                          "id": 15526,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15513,
                            "name": "serialized",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15501,
                            "src": "4592:10:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "|=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "id": 15525,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "id": 15518,
                                      "name": "specialization",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15493,
                                      "src": "4622:14:47",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                        "typeString": "enum IVault.PoolSpecialization"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                        "typeString": "enum IVault.PoolSpecialization"
                                      }
                                    ],
                                    "id": 15517,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "4614:7:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 15516,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "4614:7:47",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 15519,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4614:23:47",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 15515,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4606:7:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_bytes32_$",
                                  "typeString": "type(bytes32)"
                                },
                                "typeName": {
                                  "id": 15514,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4606:7:47",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 15520,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4606:32:47",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<<",
                            "rightExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_rational_80_by_1",
                                    "typeString": "int_const 80"
                                  },
                                  "id": 15523,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "hexValue": "3130",
                                    "id": 15521,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "4643:2:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_10_by_1",
                                      "typeString": "int_const 10"
                                    },
                                    "value": "10"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "hexValue": "38",
                                    "id": 15522,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "4648:1:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_8_by_1",
                                      "typeString": "int_const 8"
                                    },
                                    "value": "8"
                                  },
                                  "src": "4643:6:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_80_by_1",
                                    "typeString": "int_const 80"
                                  }
                                }
                              ],
                              "id": 15524,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "4642:8:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_80_by_1",
                                "typeString": "int_const 80"
                              }
                            },
                            "src": "4606:44:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4592:58:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 15527,
                        "nodeType": "ExpressionStatement",
                        "src": "4592:58:47"
                      },
                      {
                        "expression": {
                          "id": 15541,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15528,
                            "name": "serialized",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15501,
                            "src": "4660:10:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "|=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "id": 15540,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "id": 15533,
                                      "name": "pool",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15491,
                                      "src": "4690:4:47",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    ],
                                    "id": 15532,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "4682:7:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 15531,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "4682:7:47",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 15534,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4682:13:47",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 15530,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4674:7:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_bytes32_$",
                                  "typeString": "type(bytes32)"
                                },
                                "typeName": {
                                  "id": 15529,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4674:7:47",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 15535,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4674:22:47",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<<",
                            "rightExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_rational_96_by_1",
                                    "typeString": "int_const 96"
                                  },
                                  "id": 15538,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "hexValue": "3132",
                                    "id": 15536,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "4701:2:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_12_by_1",
                                      "typeString": "int_const 12"
                                    },
                                    "value": "12"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "*",
                                  "rightExpression": {
                                    "hexValue": "38",
                                    "id": 15537,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "4706:1:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_8_by_1",
                                      "typeString": "int_const 8"
                                    },
                                    "value": "8"
                                  },
                                  "src": "4701:6:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_96_by_1",
                                    "typeString": "int_const 96"
                                  }
                                }
                              ],
                              "id": 15539,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "4700:8:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_96_by_1",
                                "typeString": "int_const 96"
                              }
                            },
                            "src": "4674:34:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "4660:48:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 15542,
                        "nodeType": "ExpressionStatement",
                        "src": "4660:48:47"
                      },
                      {
                        "expression": {
                          "id": 15543,
                          "name": "serialized",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15501,
                          "src": "4726:10:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 15499,
                        "id": 15544,
                        "nodeType": "Return",
                        "src": "4719:17:47"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15489,
                    "nodeType": "StructuredDocumentation",
                    "src": "3496:861:47",
                    "text": " @dev Creates a Pool ID.\n These are deterministically created by packing the Pool's contract address and its specialization setting into\n the ID. This saves gas by making this data easily retrievable from a Pool ID with no storage accesses.\n Since a single contract can register multiple Pools, a unique nonce must be provided to ensure Pool IDs are\n unique.\n Pool IDs have the following layout:\n | 20 bytes pool contract address | 2 bytes specialization setting | 10 bytes nonce |\n MSB                                                                              LSB\n 2 bytes for the specialization setting is a bit overkill: there only three of them, which means two bits would\n suffice. However, there's nothing else of interest to store in this extra space."
                  },
                  "id": 15546,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_toPoolId",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15496,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15491,
                        "mutability": "mutable",
                        "name": "pool",
                        "nodeType": "VariableDeclaration",
                        "scope": 15546,
                        "src": "4390:12:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 15490,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4390:7:47",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15493,
                        "mutability": "mutable",
                        "name": "specialization",
                        "nodeType": "VariableDeclaration",
                        "scope": 15546,
                        "src": "4412:33:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 15492,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "4412:18:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15495,
                        "mutability": "mutable",
                        "name": "nonce",
                        "nodeType": "VariableDeclaration",
                        "scope": 15546,
                        "src": "4455:12:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint80",
                          "typeString": "uint80"
                        },
                        "typeName": {
                          "id": 15494,
                          "name": "uint80",
                          "nodeType": "ElementaryTypeName",
                          "src": "4455:6:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint80",
                            "typeString": "uint80"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4380:93:47"
                  },
                  "returnParameters": {
                    "id": 15499,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15498,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 15546,
                        "src": "4497:7:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15497,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4497:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4496:9:47"
                  },
                  "scope": 15609,
                  "src": "4362:381:47",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 15567,
                    "nodeType": "Block",
                    "src": "4999:241:47",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 15564,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "id": 15558,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15549,
                                    "src": "5213:6:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 15557,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "5205:7:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": {
                                    "id": 15556,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5205:7:47",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 15559,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5205:15:47",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">>",
                              "rightExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_rational_96_by_1",
                                      "typeString": "int_const 96"
                                    },
                                    "id": 15562,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "hexValue": "3132",
                                      "id": 15560,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5225:2:47",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_12_by_1",
                                        "typeString": "int_const 12"
                                      },
                                      "value": "12"
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "*",
                                    "rightExpression": {
                                      "hexValue": "38",
                                      "id": 15561,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "5230:1:47",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_8_by_1",
                                        "typeString": "int_const 8"
                                      },
                                      "value": "8"
                                    },
                                    "src": "5225:6:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_96_by_1",
                                      "typeString": "int_const 96"
                                    }
                                  }
                                ],
                                "id": 15563,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "5224:8:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_96_by_1",
                                  "typeString": "int_const 96"
                                }
                              },
                              "src": "5205:27:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 15555,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "5197:7:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 15554,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "5197:7:47",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 15565,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5197:36:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "functionReturnParameters": 15553,
                        "id": 15566,
                        "nodeType": "Return",
                        "src": "5190:43:47"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15547,
                    "nodeType": "StructuredDocumentation",
                    "src": "4749:172:47",
                    "text": " @dev Returns the address of a Pool's contract.\n Due to how Pool IDs are created, this is done with no storage accesses and costs little gas."
                  },
                  "id": 15568,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getPoolAddress",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15550,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15549,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15568,
                        "src": "4951:14:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15548,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4951:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4950:16:47"
                  },
                  "returnParameters": {
                    "id": 15553,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15552,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 15568,
                        "src": "4990:7:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 15551,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4990:7:47",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4989:9:47"
                  },
                  "scope": 15609,
                  "src": "4926:314:47",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 15607,
                    "nodeType": "Block",
                    "src": "5533:955:47",
                    "statements": [
                      {
                        "assignments": [
                          15577
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15577,
                            "mutability": "mutable",
                            "name": "value",
                            "nodeType": "VariableDeclaration",
                            "scope": 15607,
                            "src": "5651:13:47",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 15576,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5651:7:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15597,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15596,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "id": 15585,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 15580,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15571,
                                  "src": "5675:6:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">>",
                                "rightExpression": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_rational_80_by_1",
                                        "typeString": "int_const 80"
                                      },
                                      "id": 15583,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "hexValue": "3130",
                                        "id": 15581,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5686:2:47",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_10_by_1",
                                          "typeString": "int_const 10"
                                        },
                                        "value": "10"
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "*",
                                      "rightExpression": {
                                        "hexValue": "38",
                                        "id": 15582,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "5691:1:47",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_8_by_1",
                                          "typeString": "int_const 8"
                                        },
                                        "value": "8"
                                      },
                                      "src": "5686:6:47",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_80_by_1",
                                        "typeString": "int_const 80"
                                      }
                                    }
                                  ],
                                  "id": 15584,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "5685:8:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_80_by_1",
                                    "typeString": "int_const 80"
                                  }
                                },
                                "src": "5675:18:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 15579,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "5667:7:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": {
                                "id": 15578,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5667:7:47",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 15586,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5667:27:47",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&",
                          "rightExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_rational_65535_by_1",
                                  "typeString": "int_const 65535"
                                },
                                "id": 15594,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_rational_65536_by_1",
                                    "typeString": "int_const 65536"
                                  },
                                  "id": 15592,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "hexValue": "32",
                                    "id": 15587,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "5698:1:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_2_by_1",
                                      "typeString": "int_const 2"
                                    },
                                    "value": "2"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "**",
                                  "rightExpression": {
                                    "components": [
                                      {
                                        "commonType": {
                                          "typeIdentifier": "t_rational_16_by_1",
                                          "typeString": "int_const 16"
                                        },
                                        "id": 15590,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                          "hexValue": "32",
                                          "id": 15588,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "5702:1:47",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_rational_2_by_1",
                                            "typeString": "int_const 2"
                                          },
                                          "value": "2"
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "*",
                                        "rightExpression": {
                                          "hexValue": "38",
                                          "id": 15589,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "5706:1:47",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_rational_8_by_1",
                                            "typeString": "int_const 8"
                                          },
                                          "value": "8"
                                        },
                                        "src": "5702:5:47",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_16_by_1",
                                          "typeString": "int_const 16"
                                        }
                                      }
                                    ],
                                    "id": 15591,
                                    "isConstant": false,
                                    "isInlineArray": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "TupleExpression",
                                    "src": "5701:7:47",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_16_by_1",
                                      "typeString": "int_const 16"
                                    }
                                  },
                                  "src": "5698:10:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_65536_by_1",
                                    "typeString": "int_const 65536"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "hexValue": "31",
                                  "id": 15593,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "5711:1:47",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "5698:14:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_65535_by_1",
                                  "typeString": "int_const 65535"
                                }
                              }
                            ],
                            "id": 15595,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "5697:16:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_65535_by_1",
                              "typeString": "int_const 65535"
                            }
                          },
                          "src": "5667:46:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5651:62:47"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 15601,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 15599,
                                "name": "value",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15577,
                                "src": "6204:5:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "hexValue": "33",
                                "id": 15600,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "6212:1:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_3_by_1",
                                  "typeString": "int_const 3"
                                },
                                "value": "3"
                              },
                              "src": "6204:9:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 15602,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6215:6:47",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 15603,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INVALID_POOL_ID",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 561,
                              "src": "6215:22:47",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 15598,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6195:8:47",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 15604,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6195:43:47",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15605,
                        "nodeType": "ExpressionStatement",
                        "src": "6195:43:47"
                      },
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "6435:47:47",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "6449:23:47",
                              "value": {
                                "name": "value",
                                "nodeType": "YulIdentifier",
                                "src": "6467:5:47"
                              },
                              "variableNames": [
                                {
                                  "name": "specialization",
                                  "nodeType": "YulIdentifier",
                                  "src": "6449:14:47"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 15574,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6449:14:47",
                            "valueSize": 1
                          },
                          {
                            "declaration": 15577,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6467:5:47",
                            "valueSize": 1
                          }
                        ],
                        "id": 15606,
                        "nodeType": "InlineAssembly",
                        "src": "6426:56:47"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15569,
                    "nodeType": "StructuredDocumentation",
                    "src": "5246:176:47",
                    "text": " @dev Returns the specialization setting of a Pool.\n Due to how Pool IDs are created, this is done with no storage accesses and costs little gas."
                  },
                  "id": 15608,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getPoolSpecialization",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15572,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15571,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15608,
                        "src": "5459:14:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15570,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5459:7:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5458:16:47"
                  },
                  "returnParameters": {
                    "id": 15575,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15574,
                        "mutability": "mutable",
                        "name": "specialization",
                        "nodeType": "VariableDeclaration",
                        "scope": 15608,
                        "src": "5498:33:47",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 15573,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "5498:18:47",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5497:35:47"
                  },
                  "scope": 15609,
                  "src": "5427:1061:47",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 15610,
              "src": "1086:5404:47"
            }
          ],
          "src": "688:5803:47"
        },
        "id": 47
      },
      "src.sol/amm/vault/PoolTokens.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/PoolTokens.sol",
          "exportedSymbols": {
            "PoolTokens": [
              16018
            ]
          },
          "id": 16019,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 15611,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:48"
            },
            {
              "id": 15612,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:48"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 15613,
              "nodeType": "ImportDirective",
              "scope": 16019,
              "sourceUnit": 656,
              "src": "747:43:48",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 15614,
              "nodeType": "ImportDirective",
              "scope": 16019,
              "sourceUnit": 5188,
              "src": "791:49:48",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/AssetManagers.sol",
              "file": "./AssetManagers.sol",
              "id": 15615,
              "nodeType": "ImportDirective",
              "scope": 16019,
              "sourceUnit": 13835,
              "src": "842:29:48",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/PoolRegistry.sol",
              "file": "./PoolRegistry.sol",
              "id": 15616,
              "nodeType": "ImportDirective",
              "scope": 16019,
              "sourceUnit": 15610,
              "src": "872:28:48",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/BalanceAllocation.sol",
              "file": "./balances/BalanceAllocation.sol",
              "id": 15617,
              "nodeType": "ImportDirective",
              "scope": 16019,
              "sourceUnit": 19058,
              "src": "901:42:48",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 15618,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "977:15:48",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 15619,
                  "nodeType": "InheritanceSpecifier",
                  "src": "977:15:48"
                },
                {
                  "baseName": {
                    "id": 15620,
                    "name": "PoolRegistry",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 15609,
                    "src": "994:12:48",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_PoolRegistry_$15609",
                      "typeString": "contract PoolRegistry"
                    }
                  },
                  "id": 15621,
                  "nodeType": "InheritanceSpecifier",
                  "src": "994:12:48"
                },
                {
                  "baseName": {
                    "id": 15622,
                    "name": "AssetManagers",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 13834,
                    "src": "1008:13:48",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_AssetManagers_$13834",
                      "typeString": "contract AssetManagers"
                    }
                  },
                  "id": 15623,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1008:13:48"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                13834,
                15609,
                18418,
                19467,
                19917,
                20641,
                20822,
                21266
              ],
              "contractKind": "contract",
              "fullyImplemented": false,
              "id": 16018,
              "linearizedBaseContracts": [
                16018,
                13834,
                20641,
                19917,
                15609,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                19467,
                5187,
                21266,
                20822
              ],
              "name": "PoolTokens",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 15626,
                  "libraryName": {
                    "id": 15624,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "1034:17:48",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1028:36:48",
                  "typeName": {
                    "id": 15625,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1056:7:48",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                },
                {
                  "id": 15630,
                  "libraryName": {
                    "id": 15627,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "1075:17:48",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1069:38:48",
                  "typeName": {
                    "baseType": {
                      "id": 15628,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1097:7:48",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "id": 15629,
                    "nodeType": "ArrayTypeName",
                    "src": "1097:9:48",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                      "typeString": "bytes32[]"
                    }
                  }
                },
                {
                  "baseFunctions": [
                    20975
                  ],
                  "body": {
                    "id": 15751,
                    "nodeType": "Block",
                    "src": "1301:1000:48",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 15652,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15635,
                                "src": "1347:6:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              "id": 15653,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "1347:13:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 15654,
                                "name": "assetManagers",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15638,
                                "src": "1362:13:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                  "typeString": "address[] memory"
                                }
                              },
                              "id": 15655,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "1362:20:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 15649,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "1311:12:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 15651,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "1311:35:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 15656,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1311:72:48",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15657,
                        "nodeType": "ExpressionStatement",
                        "src": "1311:72:48"
                      },
                      {
                        "body": {
                          "id": 15695,
                          "nodeType": "Block",
                          "src": "1502:180:48",
                          "statements": [
                            {
                              "assignments": [
                                15670
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 15670,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 15695,
                                  "src": "1516:12:48",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 15669,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "1516:6:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 15674,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 15671,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15635,
                                  "src": "1531:6:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 15673,
                                "indexExpression": {
                                  "id": 15672,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15659,
                                  "src": "1538:1:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "1531:9:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "1516:24:48"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    "id": 15680,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 15676,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15670,
                                      "src": "1563:5:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "!=",
                                    "rightExpression": {
                                      "arguments": [
                                        {
                                          "hexValue": "30",
                                          "id": 15678,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "kind": "number",
                                          "lValueRequested": false,
                                          "nodeType": "Literal",
                                          "src": "1579:1:48",
                                          "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": 15677,
                                        "name": "IERC20",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 5095,
                                        "src": "1572:6:48",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                          "typeString": "type(contract IERC20)"
                                        }
                                      },
                                      "id": 15679,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "1572:9:48",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "src": "1563:18:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 15681,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "1583:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 15682,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "INVALID_TOKEN",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 474,
                                    "src": "1583:20:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 15675,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "1554:8:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 15683,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1554:50:48",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15684,
                              "nodeType": "ExpressionStatement",
                              "src": "1554:50:48"
                            },
                            {
                              "expression": {
                                "id": 15693,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 15685,
                                      "name": "_poolAssetManagers",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13417,
                                      "src": "1619:18:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_address_$_$",
                                        "typeString": "mapping(bytes32 => mapping(contract IERC20 => address))"
                                      }
                                    },
                                    "id": 15688,
                                    "indexExpression": {
                                      "id": 15686,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15632,
                                      "src": "1638:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "1619:26:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_address_$",
                                      "typeString": "mapping(contract IERC20 => address)"
                                    }
                                  },
                                  "id": 15689,
                                  "indexExpression": {
                                    "id": 15687,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15670,
                                    "src": "1646:5:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "1619:33:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "baseExpression": {
                                    "id": 15690,
                                    "name": "assetManagers",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15638,
                                    "src": "1655:13:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                      "typeString": "address[] memory"
                                    }
                                  },
                                  "id": 15692,
                                  "indexExpression": {
                                    "id": 15691,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15659,
                                    "src": "1669:1:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "1655:16:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "src": "1619:52:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "id": 15694,
                              "nodeType": "ExpressionStatement",
                              "src": "1619:52:48"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15665,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15662,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15659,
                            "src": "1478:1:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 15663,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15635,
                              "src": "1482:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 15664,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "1482:13:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1478:17:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 15696,
                        "initializationExpression": {
                          "assignments": [
                            15659
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 15659,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 15696,
                              "src": "1463:9:48",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 15658,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "1463:7:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 15661,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 15660,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1475:1:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "1463:13:48"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 15667,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "1497:3:48",
                            "subExpression": {
                              "id": 15666,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15659,
                              "src": "1499:1:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15668,
                          "nodeType": "ExpressionStatement",
                          "src": "1497:3:48"
                        },
                        "nodeType": "ForStatement",
                        "src": "1458:224:48"
                      },
                      {
                        "assignments": [
                          15698
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15698,
                            "mutability": "mutable",
                            "name": "specialization",
                            "nodeType": "VariableDeclaration",
                            "scope": 15751,
                            "src": "1692:33:48",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "typeName": {
                              "id": 15697,
                              "name": "PoolSpecialization",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20940,
                              "src": "1692:18:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15702,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 15700,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15632,
                              "src": "1751:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15699,
                            "name": "_getPoolSpecialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15608,
                            "src": "1728:22:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 15701,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1728:30:48",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1692:66:48"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 15706,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15703,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15698,
                            "src": "1772:14:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 15704,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "1790:18:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 15705,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "1790:28:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "1772:46:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 15730,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 15727,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15698,
                              "src": "1986:14:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 15728,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "2004:18:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 15729,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "2004:36:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "1986:54:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 15742,
                            "nodeType": "Block",
                            "src": "2123:109:48",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 15738,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15632,
                                      "src": "2206:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 15739,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15635,
                                      "src": "2214:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    ],
                                    "id": 15737,
                                    "name": "_registerGeneralPoolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19120,
                                    "src": "2179:26:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20[] memory)"
                                    }
                                  },
                                  "id": 15740,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2179:42:48",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 15741,
                                "nodeType": "ExpressionStatement",
                                "src": "2179:42:48"
                              }
                            ]
                          },
                          "id": 15743,
                          "nodeType": "IfStatement",
                          "src": "1982:250:48",
                          "trueBody": {
                            "id": 15736,
                            "nodeType": "Block",
                            "src": "2042:75:48",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 15732,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15632,
                                      "src": "2091:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 15733,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15635,
                                      "src": "2099:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    ],
                                    "id": 15731,
                                    "name": "_registerMinimalSwapInfoPoolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19542,
                                    "src": "2056:34:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20[] memory)"
                                    }
                                  },
                                  "id": 15734,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2056:50:48",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 15735,
                                "nodeType": "ExpressionStatement",
                                "src": "2056:50:48"
                              }
                            ]
                          }
                        },
                        "id": 15744,
                        "nodeType": "IfStatement",
                        "src": "1768:464:48",
                        "trueBody": {
                          "id": 15726,
                          "nodeType": "Block",
                          "src": "1820:156:48",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 15711,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "expression": {
                                        "id": 15708,
                                        "name": "tokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15635,
                                        "src": "1843:6:48",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                          "typeString": "contract IERC20[] memory"
                                        }
                                      },
                                      "id": 15709,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "length",
                                      "nodeType": "MemberAccess",
                                      "src": "1843:13:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "hexValue": "32",
                                      "id": 15710,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "1860:1:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_2_by_1",
                                        "typeString": "int_const 2"
                                      },
                                      "value": "2"
                                    },
                                    "src": "1843:18:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 15712,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "1863:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 15713,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKENS_LENGTH_MUST_BE_2",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 633,
                                    "src": "1863:30:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 15707,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "1834:8:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 15714,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1834:60:48",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15715,
                              "nodeType": "ExpressionStatement",
                              "src": "1834:60:48"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 15717,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15632,
                                    "src": "1936:6:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 15718,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15635,
                                      "src": "1944:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 15720,
                                    "indexExpression": {
                                      "hexValue": "30",
                                      "id": 15719,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "1951:1:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      "value": "0"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "1944:9:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 15721,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15635,
                                      "src": "1955:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 15723,
                                    "indexExpression": {
                                      "hexValue": "31",
                                      "id": 15722,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "1962:1:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_1_by_1",
                                        "typeString": "int_const 1"
                                      },
                                      "value": "1"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "1955:9:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  ],
                                  "id": 15716,
                                  "name": "_registerTwoTokenPoolTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20010,
                                  "src": "1908:27:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$__$",
                                    "typeString": "function (bytes32,contract IERC20,contract IERC20)"
                                  }
                                },
                                "id": 15724,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1908:57:48",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15725,
                              "nodeType": "ExpressionStatement",
                              "src": "1908:57:48"
                            }
                          ]
                        }
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 15746,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15632,
                              "src": "2264:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 15747,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15635,
                              "src": "2272:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            {
                              "id": 15748,
                              "name": "assetManagers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15638,
                              "src": "2280:13:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              },
                              {
                                "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                                "typeString": "address[] memory"
                              }
                            ],
                            "id": 15745,
                            "name": "TokensRegistered",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20986,
                            "src": "2247:16:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (bytes32,contract IERC20[] memory,address[] memory)"
                            }
                          },
                          "id": 15749,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2247:47:48",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15750,
                        "nodeType": "EmitStatement",
                        "src": "2242:52:48"
                      }
                    ]
                  },
                  "functionSelector": "66a9c7d2",
                  "id": 15752,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 15642,
                      "modifierName": {
                        "id": 15641,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "1257:12:48",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1257:12:48"
                    },
                    {
                      "id": 15644,
                      "modifierName": {
                        "id": 15643,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "1270:13:48",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1270:13:48"
                    },
                    {
                      "arguments": [
                        {
                          "id": 15646,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15632,
                          "src": "1293:6:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 15647,
                      "modifierName": {
                        "id": 15645,
                        "name": "onlyPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15379,
                        "src": "1284:8:48",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_bytes32_$",
                          "typeString": "modifier (bytes32)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "1284:16:48"
                    }
                  ],
                  "name": "registerTokens",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 15640,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "1248:8:48"
                  },
                  "parameters": {
                    "id": 15639,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15632,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15752,
                        "src": "1146:14:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15631,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "1146:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15635,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 15752,
                        "src": "1170:22:48",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15633,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1170:6:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 15634,
                          "nodeType": "ArrayTypeName",
                          "src": "1170:8:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15638,
                        "mutability": "mutable",
                        "name": "assetManagers",
                        "nodeType": "VariableDeclaration",
                        "scope": 15752,
                        "src": "1202:30:48",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                          "typeString": "address[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15636,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "1202:7:48",
                            "stateMutability": "nonpayable",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 15637,
                          "nodeType": "ArrayTypeName",
                          "src": "1202:9:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                            "typeString": "address[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1136:102:48"
                  },
                  "returnParameters": {
                    "id": 15648,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1301:0:48"
                  },
                  "scope": 16018,
                  "src": "1113:1188:48",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    20995
                  ],
                  "body": {
                    "id": 15843,
                    "nodeType": "Block",
                    "src": "2479:923:48",
                    "statements": [
                      {
                        "assignments": [
                          15769
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15769,
                            "mutability": "mutable",
                            "name": "specialization",
                            "nodeType": "VariableDeclaration",
                            "scope": 15843,
                            "src": "2489:33:48",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "typeName": {
                              "id": 15768,
                              "name": "PoolSpecialization",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20940,
                              "src": "2489:18:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15773,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 15771,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15754,
                              "src": "2548:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15770,
                            "name": "_getPoolSpecialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15608,
                            "src": "2525:22:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 15772,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2525:30:48",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2489:66:48"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 15777,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15774,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15769,
                            "src": "2569:14:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 15775,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "2587:18:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 15776,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "2587:28:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "2569:46:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 15801,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 15798,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15769,
                              "src": "2785:14:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 15799,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "2803:18:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 15800,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "2803:36:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "2785:54:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 15813,
                            "nodeType": "Block",
                            "src": "2924:111:48",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 15809,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15754,
                                      "src": "3009:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 15810,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15757,
                                      "src": "3017:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    ],
                                    "id": 15808,
                                    "name": "_deregisterGeneralPoolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19178,
                                    "src": "2980:28:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20[] memory)"
                                    }
                                  },
                                  "id": 15811,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2980:44:48",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 15812,
                                "nodeType": "ExpressionStatement",
                                "src": "2980:44:48"
                              }
                            ]
                          },
                          "id": 15814,
                          "nodeType": "IfStatement",
                          "src": "2781:254:48",
                          "trueBody": {
                            "id": 15807,
                            "nodeType": "Block",
                            "src": "2841:77:48",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 15803,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15754,
                                      "src": "2892:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 15804,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15757,
                                      "src": "2900:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    ],
                                    "id": 15802,
                                    "name": "_deregisterMinimalSwapInfoPoolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19614,
                                    "src": "2855:36:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$returns$__$",
                                      "typeString": "function (bytes32,contract IERC20[] memory)"
                                    }
                                  },
                                  "id": 15805,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2855:52:48",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 15806,
                                "nodeType": "ExpressionStatement",
                                "src": "2855:52:48"
                              }
                            ]
                          }
                        },
                        "id": 15815,
                        "nodeType": "IfStatement",
                        "src": "2565:470:48",
                        "trueBody": {
                          "id": 15797,
                          "nodeType": "Block",
                          "src": "2617:158:48",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 15782,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "expression": {
                                        "id": 15779,
                                        "name": "tokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15757,
                                        "src": "2640:6:48",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                          "typeString": "contract IERC20[] memory"
                                        }
                                      },
                                      "id": 15780,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "length",
                                      "nodeType": "MemberAccess",
                                      "src": "2640:13:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "==",
                                    "rightExpression": {
                                      "hexValue": "32",
                                      "id": 15781,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "2657:1:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_2_by_1",
                                        "typeString": "int_const 2"
                                      },
                                      "value": "2"
                                    },
                                    "src": "2640:18:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 15783,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2660:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 15784,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKENS_LENGTH_MUST_BE_2",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 633,
                                    "src": "2660:30:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 15778,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2631:8:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 15785,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2631:60:48",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15786,
                              "nodeType": "ExpressionStatement",
                              "src": "2631:60:48"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 15788,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15754,
                                    "src": "2735:6:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 15789,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15757,
                                      "src": "2743:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 15791,
                                    "indexExpression": {
                                      "hexValue": "30",
                                      "id": 15790,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "2750:1:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_0_by_1",
                                        "typeString": "int_const 0"
                                      },
                                      "value": "0"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2743:9:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 15792,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15757,
                                      "src": "2754:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 15794,
                                    "indexExpression": {
                                      "hexValue": "31",
                                      "id": 15793,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "2761:1:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_1_by_1",
                                        "typeString": "int_const 1"
                                      },
                                      "value": "1"
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2754:9:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  ],
                                  "id": 15787,
                                  "name": "_deregisterTwoTokenPoolTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20054,
                                  "src": "2705:29:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$__$",
                                    "typeString": "function (bytes32,contract IERC20,contract IERC20)"
                                  }
                                },
                                "id": 15795,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2705:59:48",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15796,
                              "nodeType": "ExpressionStatement",
                              "src": "2705:59:48"
                            }
                          ]
                        }
                      },
                      {
                        "body": {
                          "id": 15836,
                          "nodeType": "Block",
                          "src": "3277:69:48",
                          "statements": [
                            {
                              "expression": {
                                "id": 15834,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "delete",
                                "prefix": true,
                                "src": "3291:44:48",
                                "subExpression": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 15827,
                                      "name": "_poolAssetManagers",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 13417,
                                      "src": "3298:18:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_address_$_$",
                                        "typeString": "mapping(bytes32 => mapping(contract IERC20 => address))"
                                      }
                                    },
                                    "id": 15829,
                                    "indexExpression": {
                                      "id": 15828,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15754,
                                      "src": "3317:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "3298:26:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_address_$",
                                      "typeString": "mapping(contract IERC20 => address)"
                                    }
                                  },
                                  "id": 15833,
                                  "indexExpression": {
                                    "baseExpression": {
                                      "id": 15830,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15757,
                                      "src": "3325:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 15832,
                                    "indexExpression": {
                                      "id": 15831,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15817,
                                      "src": "3332:1:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "3325:9:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "3298:37:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 15835,
                              "nodeType": "ExpressionStatement",
                              "src": "3291:44:48"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 15823,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15820,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15817,
                            "src": "3253:1:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 15821,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15757,
                              "src": "3257:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 15822,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "3257:13:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3253:17:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 15837,
                        "initializationExpression": {
                          "assignments": [
                            15817
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 15817,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 15837,
                              "src": "3238:9:48",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 15816,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "3238:7:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 15819,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 15818,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3250:1:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "3238:13:48"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 15825,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "3272:3:48",
                            "subExpression": {
                              "id": 15824,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15817,
                              "src": "3274:1:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15826,
                          "nodeType": "ExpressionStatement",
                          "src": "3272:3:48"
                        },
                        "nodeType": "ForStatement",
                        "src": "3233:113:48"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 15839,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15754,
                              "src": "3380:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 15840,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15757,
                              "src": "3388:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            ],
                            "id": 15838,
                            "name": "TokensDeregistered",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21003,
                            "src": "3361:18:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$returns$__$",
                              "typeString": "function (bytes32,contract IERC20[] memory)"
                            }
                          },
                          "id": 15841,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3361:34:48",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15842,
                        "nodeType": "EmitStatement",
                        "src": "3356:39:48"
                      }
                    ]
                  },
                  "functionSelector": "7d3aeb96",
                  "id": 15844,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 15761,
                      "modifierName": {
                        "id": 15760,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "2415:12:48",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2415:12:48"
                    },
                    {
                      "id": 15763,
                      "modifierName": {
                        "id": 15762,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "2436:13:48",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2436:13:48"
                    },
                    {
                      "arguments": [
                        {
                          "id": 15765,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15754,
                          "src": "2467:6:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 15766,
                      "modifierName": {
                        "id": 15764,
                        "name": "onlyPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15379,
                        "src": "2458:8:48",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_bytes32_$",
                          "typeString": "modifier (bytes32)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2458:16:48"
                    }
                  ],
                  "name": "deregisterTokens",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 15759,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2398:8:48"
                  },
                  "parameters": {
                    "id": 15758,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15754,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15844,
                        "src": "2333:14:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15753,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2333:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15757,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 15844,
                        "src": "2349:22:48",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15755,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "2349:6:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 15756,
                          "nodeType": "ArrayTypeName",
                          "src": "2349:8:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2332:40:48"
                  },
                  "returnParameters": {
                    "id": 15767,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2479:0:48"
                  },
                  "scope": 16018,
                  "src": "2307:1095:48",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    21033
                  ],
                  "body": {
                    "id": 15883,
                    "nodeType": "Block",
                    "src": "3672:179:48",
                    "statements": [
                      {
                        "assignments": [
                          15865
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15865,
                            "mutability": "mutable",
                            "name": "rawBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 15883,
                            "src": "3682:28:48",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 15863,
                                "name": "bytes32",
                                "nodeType": "ElementaryTypeName",
                                "src": "3682:7:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15864,
                              "nodeType": "ArrayTypeName",
                              "src": "3682:9:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                "typeString": "bytes32[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15866,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3682:28:48"
                      },
                      {
                        "expression": {
                          "id": 15873,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 15867,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15854,
                                "src": "3721:6:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                  "typeString": "contract IERC20[] memory"
                                }
                              },
                              {
                                "id": 15868,
                                "name": "rawBalances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15865,
                                "src": "3729:11:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                  "typeString": "bytes32[] memory"
                                }
                              }
                            ],
                            "id": 15869,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "3720:21:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                              "typeString": "tuple(contract IERC20[] memory,bytes32[] memory)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 15871,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15846,
                                "src": "3759:6:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 15870,
                              "name": "_getPoolTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16017,
                              "src": "3744:14:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                "typeString": "function (bytes32) view returns (contract IERC20[] memory,bytes32[] memory)"
                              }
                            },
                            "id": 15872,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3744:22:48",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                              "typeString": "tuple(contract IERC20[] memory,bytes32[] memory)"
                            }
                          },
                          "src": "3720:46:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15874,
                        "nodeType": "ExpressionStatement",
                        "src": "3720:46:48"
                      },
                      {
                        "expression": {
                          "id": 15881,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 15875,
                                "name": "balances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15857,
                                "src": "3777:8:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 15876,
                                "name": "lastChangeBlock",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15859,
                                "src": "3787:15:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 15877,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "3776:27:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(uint256[] memory,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "id": 15878,
                                "name": "rawBalances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15865,
                                "src": "3806:11:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                  "typeString": "bytes32[] memory"
                                }
                              },
                              "id": 15879,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "totalsAndLastChangeBlock",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18608,
                              "src": "3806:36:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_array$_t_bytes32_$dyn_memory_ptr_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$bound_to$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                "typeString": "function (bytes32[] memory) pure returns (uint256[] memory,uint256)"
                              }
                            },
                            "id": 15880,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3806:38:48",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$",
                              "typeString": "tuple(uint256[] memory,uint256)"
                            }
                          },
                          "src": "3776:68:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 15882,
                        "nodeType": "ExpressionStatement",
                        "src": "3776:68:48"
                      }
                    ]
                  },
                  "functionSelector": "f94d4668",
                  "id": 15884,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 15850,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15846,
                          "src": "3521:6:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 15851,
                      "modifierName": {
                        "id": 15849,
                        "name": "withRegisteredPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15368,
                        "src": "3502:18:48",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_bytes32_$",
                          "typeString": "modifier (bytes32)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3502:26:48"
                    }
                  ],
                  "name": "getPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 15848,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3485:8:48"
                  },
                  "parameters": {
                    "id": 15847,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15846,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15884,
                        "src": "3431:14:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15845,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3431:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3430:16:48"
                  },
                  "returnParameters": {
                    "id": 15860,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15854,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 15884,
                        "src": "3559:22:48",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15852,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "3559:6:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 15853,
                          "nodeType": "ArrayTypeName",
                          "src": "3559:8:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15857,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 15884,
                        "src": "3595:25:48",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15855,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "3595:7:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 15856,
                          "nodeType": "ArrayTypeName",
                          "src": "3595:9:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15859,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 15884,
                        "src": "3634:23:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 15858,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3634:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3545:122:48"
                  },
                  "scope": 16018,
                  "src": "3408:443:48",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    21019
                  ],
                  "body": {
                    "id": 15972,
                    "nodeType": "Block",
                    "src": "4152:689:48",
                    "statements": [
                      {
                        "assignments": [
                          15904
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15904,
                            "mutability": "mutable",
                            "name": "balance",
                            "nodeType": "VariableDeclaration",
                            "scope": 15972,
                            "src": "4162:15:48",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 15903,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "4162:7:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15905,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4162:15:48"
                      },
                      {
                        "assignments": [
                          15907
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15907,
                            "mutability": "mutable",
                            "name": "specialization",
                            "nodeType": "VariableDeclaration",
                            "scope": 15972,
                            "src": "4187:33:48",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "typeName": {
                              "id": 15906,
                              "name": "PoolSpecialization",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20940,
                              "src": "4187:18:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15911,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 15909,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15886,
                              "src": "4246:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15908,
                            "name": "_getPoolSpecialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15608,
                            "src": "4223:22:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 15910,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4223:30:48",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4187:66:48"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 15915,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15912,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15907,
                            "src": "4268:14:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 15913,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "4286:18:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 15914,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "4286:28:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "4268:46:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 15927,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 15924,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15907,
                              "src": "4399:14:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 15925,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "4417:18:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 15926,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "4417:36:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "4399:54:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 15943,
                            "nodeType": "Block",
                            "src": "4541:114:48",
                            "statements": [
                              {
                                "expression": {
                                  "id": 15941,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 15936,
                                    "name": "balance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15904,
                                    "src": "4597:7:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "arguments": [
                                      {
                                        "id": 15938,
                                        "name": "poolId",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15886,
                                        "src": "4630:6:48",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      {
                                        "id": 15939,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15888,
                                        "src": "4638:5:48",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        },
                                        {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      ],
                                      "id": 15937,
                                      "name": "_getGeneralPoolBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19424,
                                      "src": "4607:22:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                                        "typeString": "function (bytes32,contract IERC20) view returns (bytes32)"
                                      }
                                    },
                                    "id": 15940,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "4607:37:48",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "src": "4597:47:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 15942,
                                "nodeType": "ExpressionStatement",
                                "src": "4597:47:48"
                              }
                            ]
                          },
                          "id": 15944,
                          "nodeType": "IfStatement",
                          "src": "4395:260:48",
                          "trueBody": {
                            "id": 15935,
                            "nodeType": "Block",
                            "src": "4455:80:48",
                            "statements": [
                              {
                                "expression": {
                                  "id": 15933,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 15928,
                                    "name": "balance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15904,
                                    "src": "4469:7:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "arguments": [
                                      {
                                        "id": 15930,
                                        "name": "poolId",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15886,
                                        "src": "4510:6:48",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      {
                                        "id": 15931,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 15888,
                                        "src": "4518:5:48",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        },
                                        {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      ],
                                      "id": 15929,
                                      "name": "_getMinimalSwapInfoPoolBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19889,
                                      "src": "4479:30:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                                        "typeString": "function (bytes32,contract IERC20) view returns (bytes32)"
                                      }
                                    },
                                    "id": 15932,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "4479:45:48",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "src": "4469:55:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 15934,
                                "nodeType": "ExpressionStatement",
                                "src": "4469:55:48"
                              }
                            ]
                          }
                        },
                        "id": 15945,
                        "nodeType": "IfStatement",
                        "src": "4264:391:48",
                        "trueBody": {
                          "id": 15923,
                          "nodeType": "Block",
                          "src": "4316:73:48",
                          "statements": [
                            {
                              "expression": {
                                "id": 15921,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 15916,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15904,
                                  "src": "4330:7:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 15918,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15886,
                                      "src": "4364:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 15919,
                                      "name": "token",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15888,
                                      "src": "4372:5:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    ],
                                    "id": 15917,
                                    "name": "_getTwoTokenPoolBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20461,
                                    "src": "4340:23:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                                      "typeString": "function (bytes32,contract IERC20) view returns (bytes32)"
                                    }
                                  },
                                  "id": 15920,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4340:38:48",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "4330:48:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15922,
                              "nodeType": "ExpressionStatement",
                              "src": "4330:48:48"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 15950,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15946,
                            "name": "cash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15895,
                            "src": "4665:4:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "id": 15947,
                                "name": "balance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15904,
                                "src": "4672:7:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15948,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "cash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18466,
                              "src": "4672:12:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                                "typeString": "function (bytes32) pure returns (uint256)"
                              }
                            },
                            "id": 15949,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4672:14:48",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4665:21:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 15951,
                        "nodeType": "ExpressionStatement",
                        "src": "4665:21:48"
                      },
                      {
                        "expression": {
                          "id": 15956,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15952,
                            "name": "managed",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15897,
                            "src": "4696:7:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "id": 15953,
                                "name": "balance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15904,
                                "src": "4706:7:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15954,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "managed",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18493,
                              "src": "4706:15:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                                "typeString": "function (bytes32) pure returns (uint256)"
                              }
                            },
                            "id": 15955,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4706:17:48",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4696:27:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 15957,
                        "nodeType": "ExpressionStatement",
                        "src": "4696:27:48"
                      },
                      {
                        "expression": {
                          "id": 15962,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15958,
                            "name": "lastChangeBlock",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15899,
                            "src": "4733:15:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "id": 15959,
                                "name": "balance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15904,
                                "src": "4751:7:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 15960,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "lastChangeBlock",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18520,
                              "src": "4751:23:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                                "typeString": "function (bytes32) pure returns (uint256)"
                              }
                            },
                            "id": 15961,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4751:25:48",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4733:43:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 15963,
                        "nodeType": "ExpressionStatement",
                        "src": "4733:43:48"
                      },
                      {
                        "expression": {
                          "id": 15970,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 15964,
                            "name": "assetManager",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15901,
                            "src": "4786:12:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "baseExpression": {
                              "baseExpression": {
                                "id": 15965,
                                "name": "_poolAssetManagers",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 13417,
                                "src": "4801:18:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_address_$_$",
                                  "typeString": "mapping(bytes32 => mapping(contract IERC20 => address))"
                                }
                              },
                              "id": 15967,
                              "indexExpression": {
                                "id": 15966,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 15886,
                                "src": "4820:6:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "4801:26:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_address_$",
                                "typeString": "mapping(contract IERC20 => address)"
                              }
                            },
                            "id": 15969,
                            "indexExpression": {
                              "id": 15968,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15888,
                              "src": "4828:5:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "4801:33:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "4786:48:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 15971,
                        "nodeType": "ExpressionStatement",
                        "src": "4786:48:48"
                      }
                    ]
                  },
                  "functionSelector": "b05f8e48",
                  "id": 15973,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 15892,
                          "name": "poolId",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 15886,
                          "src": "3987:6:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 15893,
                      "modifierName": {
                        "id": 15891,
                        "name": "withRegisteredPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 15368,
                        "src": "3968:18:48",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_bytes32_$",
                          "typeString": "modifier (bytes32)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3968:26:48"
                    }
                  ],
                  "name": "getPoolTokenInfo",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 15890,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3951:8:48"
                  },
                  "parameters": {
                    "id": 15889,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15886,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 15973,
                        "src": "3883:14:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15885,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3883:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15888,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 15973,
                        "src": "3899:12:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 15887,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "3899:6:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3882:30:48"
                  },
                  "returnParameters": {
                    "id": 15902,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15895,
                        "mutability": "mutable",
                        "name": "cash",
                        "nodeType": "VariableDeclaration",
                        "scope": 15973,
                        "src": "4025:12:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 15894,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4025:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15897,
                        "mutability": "mutable",
                        "name": "managed",
                        "nodeType": "VariableDeclaration",
                        "scope": 15973,
                        "src": "4051:15:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 15896,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4051:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15899,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 15973,
                        "src": "4080:23:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 15898,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4080:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15901,
                        "mutability": "mutable",
                        "name": "assetManager",
                        "nodeType": "VariableDeclaration",
                        "scope": 15973,
                        "src": "4117:20:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 15900,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4117:7:48",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4011:136:48"
                  },
                  "scope": 16018,
                  "src": "3857:984:48",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 16016,
                    "nodeType": "Block",
                    "src": "5065:450:48",
                    "statements": [
                      {
                        "assignments": [
                          15986
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 15986,
                            "mutability": "mutable",
                            "name": "specialization",
                            "nodeType": "VariableDeclaration",
                            "scope": 16016,
                            "src": "5075:33:48",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "typeName": {
                              "id": 15985,
                              "name": "PoolSpecialization",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20940,
                              "src": "5075:18:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 15990,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 15988,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15976,
                              "src": "5134:6:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 15987,
                            "name": "_getPoolSpecialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15608,
                            "src": "5111:22:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 15989,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5111:30:48",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5075:66:48"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 15994,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 15991,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15986,
                            "src": "5155:14:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 15992,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "5173:18:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 15993,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "5173:28:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "5155:46:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 16003,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 16000,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 15986,
                              "src": "5275:14:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 16001,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "5293:18:48",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 16002,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "5293:36:48",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "5275:54:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 16013,
                            "nodeType": "Block",
                            "src": "5406:103:48",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 16010,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15976,
                                      "src": "5491:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 16009,
                                    "name": "_getGeneralPoolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19400,
                                    "src": "5469:21:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                      "typeString": "function (bytes32) view returns (contract IERC20[] memory,bytes32[] memory)"
                                    }
                                  },
                                  "id": 16011,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5469:29:48",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                    "typeString": "tuple(contract IERC20[] memory,bytes32[] memory)"
                                  }
                                },
                                "functionReturnParameters": 15984,
                                "id": 16012,
                                "nodeType": "Return",
                                "src": "5462:36:48"
                              }
                            ]
                          },
                          "id": 16014,
                          "nodeType": "IfStatement",
                          "src": "5271:238:48",
                          "trueBody": {
                            "id": 16008,
                            "nodeType": "Block",
                            "src": "5331:69:48",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 16005,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 15976,
                                      "src": "5382:6:48",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 16004,
                                    "name": "_getMinimalSwapInfoPoolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19839,
                                    "src": "5352:29:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                      "typeString": "function (bytes32) view returns (contract IERC20[] memory,bytes32[] memory)"
                                    }
                                  },
                                  "id": 16006,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5352:37:48",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                    "typeString": "tuple(contract IERC20[] memory,bytes32[] memory)"
                                  }
                                },
                                "functionReturnParameters": 15984,
                                "id": 16007,
                                "nodeType": "Return",
                                "src": "5345:44:48"
                              }
                            ]
                          }
                        },
                        "id": 16015,
                        "nodeType": "IfStatement",
                        "src": "5151:358:48",
                        "trueBody": {
                          "id": 15999,
                          "nodeType": "Block",
                          "src": "5203:62:48",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 15996,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 15976,
                                    "src": "5247:6:48",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 15995,
                                  "name": "_getTwoTokenPoolTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20345,
                                  "src": "5224:22:48",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                    "typeString": "function (bytes32) view returns (contract IERC20[] memory,bytes32[] memory)"
                                  }
                                },
                                "id": 15997,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5224:30:48",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                  "typeString": "tuple(contract IERC20[] memory,bytes32[] memory)"
                                }
                              },
                              "functionReturnParameters": 15984,
                              "id": 15998,
                              "nodeType": "Return",
                              "src": "5217:37:48"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 15974,
                    "nodeType": "StructuredDocumentation",
                    "src": "4847:99:48",
                    "text": " @dev Returns all of `poolId`'s registered tokens, along with their raw balances."
                  },
                  "id": 16017,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 15977,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15976,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 16017,
                        "src": "4975:14:48",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 15975,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4975:7:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4974:16:48"
                  },
                  "returnParameters": {
                    "id": 15984,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 15980,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 16017,
                        "src": "5014:22:48",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15978,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "5014:6:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 15979,
                          "nodeType": "ArrayTypeName",
                          "src": "5014:8:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 15983,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 16017,
                        "src": "5038:25:48",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 15981,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "5038:7:48",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 15982,
                          "nodeType": "ArrayTypeName",
                          "src": "5038:9:48",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5013:51:48"
                  },
                  "scope": 16018,
                  "src": "4951:564:48",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 16019,
              "src": "945:4572:48"
            }
          ],
          "src": "688:4830:48"
        },
        "id": 48
      },
      "src.sol/amm/vault/ProtocolFeesCollector.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/ProtocolFeesCollector.sol",
          "exportedSymbols": {
            "ProtocolFeesCollector": [
              16287
            ]
          },
          "id": 16288,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 16020,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:49"
            },
            {
              "id": 16021,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:49"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 16022,
              "nodeType": "ImportDirective",
              "scope": 16288,
              "sourceUnit": 5096,
              "src": "747:40:49",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../lib/helpers/InputHelpers.sol",
              "id": 16023,
              "nodeType": "ImportDirective",
              "scope": 16288,
              "sourceUnit": 1043,
              "src": "788:41:49",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/Authentication.sol",
              "file": "../lib/helpers/Authentication.sol",
              "id": 16024,
              "nodeType": "ImportDirective",
              "scope": 16288,
              "sourceUnit": 344,
              "src": "830:43:49",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 16025,
              "nodeType": "ImportDirective",
              "scope": 16288,
              "sourceUnit": 5188,
              "src": "874:49:49",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
              "file": "../lib/openzeppelin/SafeERC20.sol",
              "id": 16026,
              "nodeType": "ImportDirective",
              "scope": 16288,
              "sourceUnit": 5312,
              "src": "924:43:49",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "./interfaces/IVault.sol",
              "id": 16027,
              "nodeType": "ImportDirective",
              "scope": 16288,
              "sourceUnit": 21267,
              "src": "969:33:49",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAuthorizer.sol",
              "file": "./interfaces/IAuthorizer.sol",
              "id": 16028,
              "nodeType": "ImportDirective",
              "scope": 16288,
              "sourceUnit": 20661,
              "src": "1003:38:49",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 16030,
                    "name": "Authentication",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 343,
                    "src": "1528:14:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Authentication_$343",
                      "typeString": "contract Authentication"
                    }
                  },
                  "id": 16031,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1528:14:49"
                },
                {
                  "baseName": {
                    "id": 16032,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "1544:15:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 16033,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1544:15:49"
                }
              ],
              "contractDependencies": [
                343,
                911,
                5187
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 16029,
                "nodeType": "StructuredDocumentation",
                "src": "1043:450:49",
                "text": " @dev This an auxiliary contract to the Vault, deployed by it during construction. It offloads some of the tasks the\n Vault performs to reduce its overall bytecode size.\n The current values for all protocol fee percentages are stored here, and any tokens charged as protocol fees are\n sent to this contract, where they may be withdrawn by authorized entities. All authorization tasks are delegated\n to the Vault's own authorizer."
              },
              "fullyImplemented": true,
              "id": 16287,
              "linearizedBaseContracts": [
                16287,
                5187,
                343,
                911
              ],
              "name": "ProtocolFeesCollector",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 16036,
                  "libraryName": {
                    "id": 16034,
                    "name": "SafeERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5311,
                    "src": "1572:9:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeERC20_$5311",
                      "typeString": "library SafeERC20"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1566:27:49",
                  "typeName": {
                    "id": 16035,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "1586:6:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  }
                },
                {
                  "constant": true,
                  "id": 16039,
                  "mutability": "constant",
                  "name": "_MAX_PROTOCOL_SWAP_FEE_PERCENTAGE",
                  "nodeType": "VariableDeclaration",
                  "scope": 16287,
                  "src": "1665:66:49",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 16037,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1665:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "3530653136",
                    "id": 16038,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1726:5:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_500000000000000000_by_1",
                      "typeString": "int_const 500000000000000000"
                    },
                    "value": "50e16"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 16042,
                  "mutability": "constant",
                  "name": "_MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE",
                  "nodeType": "VariableDeclaration",
                  "scope": 16287,
                  "src": "1744:71:49",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 16040,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1744:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": {
                    "hexValue": "31653136",
                    "id": 16041,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1811:4:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_10000000000000000_by_1",
                      "typeString": "int_const 10000000000000000"
                    },
                    "value": "1e16"
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "functionSelector": "fbfa77cf",
                  "id": 16044,
                  "mutability": "immutable",
                  "name": "vault",
                  "nodeType": "VariableDeclaration",
                  "scope": 16287,
                  "src": "1828:29:49",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IVault_$21266",
                    "typeString": "contract IVault"
                  },
                  "typeName": {
                    "id": 16043,
                    "name": "IVault",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21266,
                    "src": "1828:6:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IVault_$21266",
                      "typeString": "contract IVault"
                    }
                  },
                  "visibility": "public"
                },
                {
                  "constant": false,
                  "id": 16046,
                  "mutability": "mutable",
                  "name": "_swapFeePercentage",
                  "nodeType": "VariableDeclaration",
                  "scope": 16287,
                  "src": "2200:34:49",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 16045,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2200:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 16048,
                  "mutability": "mutable",
                  "name": "_flashLoanFeePercentage",
                  "nodeType": "VariableDeclaration",
                  "scope": 16287,
                  "src": "2344:39:49",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 16047,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2344:7:49",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "anonymous": false,
                  "id": 16052,
                  "name": "SwapFeePercentageChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 16051,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16050,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "newSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 16052,
                        "src": "2421:28:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16049,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2421:7:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2420:30:49"
                  },
                  "src": "2390:61:49"
                },
                {
                  "anonymous": false,
                  "id": 16056,
                  "name": "FlashLoanFeePercentageChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 16055,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16054,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "newFlashLoanFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 16056,
                        "src": "2492:33:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16053,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2492:7:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2491:35:49"
                  },
                  "src": "2456:71:49"
                },
                {
                  "body": {
                    "id": 16077,
                    "nodeType": "Block",
                    "src": "2754:31:49",
                    "statements": [
                      {
                        "expression": {
                          "id": 16075,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 16073,
                            "name": "vault",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16044,
                            "src": "2764:5:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IVault_$21266",
                              "typeString": "contract IVault"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 16074,
                            "name": "_vault",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16058,
                            "src": "2772:6:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IVault_$21266",
                              "typeString": "contract IVault"
                            }
                          },
                          "src": "2764:14:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "id": 16076,
                        "nodeType": "ExpressionStatement",
                        "src": "2764:14:49"
                      }
                    ]
                  },
                  "id": 16078,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "id": 16067,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -28,
                                      "src": "2741:4:49",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                        "typeString": "contract ProtocolFeesCollector"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                        "typeString": "contract ProtocolFeesCollector"
                                      }
                                    ],
                                    "id": 16066,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2733:7:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": {
                                      "id": 16065,
                                      "name": "address",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2733:7:49",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 16068,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2733:13:49",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 16064,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2725:7:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": {
                                  "id": 16063,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2725:7:49",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 16069,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2725:22:49",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16062,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "2717:7:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_bytes32_$",
                              "typeString": "type(bytes32)"
                            },
                            "typeName": {
                              "id": 16061,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "2717:7:49",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 16070,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2717:31:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 16071,
                      "modifierName": {
                        "id": 16060,
                        "name": "Authentication",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 343,
                        "src": "2702:14:49",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Authentication_$343_$",
                          "typeString": "type(contract Authentication)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2702:47:49"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16059,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16058,
                        "mutability": "mutable",
                        "name": "_vault",
                        "nodeType": "VariableDeclaration",
                        "scope": 16078,
                        "src": "2545:13:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IVault_$21266",
                          "typeString": "contract IVault"
                        },
                        "typeName": {
                          "id": 16057,
                          "name": "IVault",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21266,
                          "src": "2545:6:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IVault_$21266",
                            "typeString": "contract IVault"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2544:15:49"
                  },
                  "returnParameters": {
                    "id": 16072,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2754:0:49"
                  },
                  "scope": 16287,
                  "src": "2533:252:49",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "body": {
                    "id": 16134,
                    "nodeType": "Block",
                    "src": "2960:278:49",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 16096,
                                "name": "tokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16081,
                                "src": "3006:6:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_calldata_ptr",
                                  "typeString": "contract IERC20[] calldata"
                                }
                              },
                              "id": 16097,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "3006:13:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 16098,
                                "name": "amounts",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16084,
                                "src": "3021:7:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                                  "typeString": "uint256[] calldata"
                                }
                              },
                              "id": 16099,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "3021:14:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 16093,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "2970:12:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 16095,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "2970:35:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 16100,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2970:66:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16101,
                        "nodeType": "ExpressionStatement",
                        "src": "2970:66:49"
                      },
                      {
                        "body": {
                          "id": 16132,
                          "nodeType": "Block",
                          "src": "3091:141:49",
                          "statements": [
                            {
                              "assignments": [
                                16114
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16114,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16132,
                                  "src": "3105:12:49",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 16113,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "3105:6:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16118,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 16115,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16081,
                                  "src": "3120:6:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_calldata_ptr",
                                    "typeString": "contract IERC20[] calldata"
                                  }
                                },
                                "id": 16117,
                                "indexExpression": {
                                  "id": 16116,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16103,
                                  "src": "3127:1:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3120:9:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3105:24:49"
                            },
                            {
                              "assignments": [
                                16120
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16120,
                                  "mutability": "mutable",
                                  "name": "amount",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16132,
                                  "src": "3143:14:49",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 16119,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3143:7:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16124,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 16121,
                                  "name": "amounts",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16084,
                                  "src": "3160:7:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                                    "typeString": "uint256[] calldata"
                                  }
                                },
                                "id": 16123,
                                "indexExpression": {
                                  "id": 16122,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16103,
                                  "src": "3168:1:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3160:10:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3143:27:49"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 16128,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16086,
                                    "src": "3203:9:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 16129,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16120,
                                    "src": "3214:6:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 16125,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16114,
                                    "src": "3184:5:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 16127,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "safeTransfer",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 5246,
                                  "src": "3184:18:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IERC20,address,uint256)"
                                  }
                                },
                                "id": 16130,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3184:37:49",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 16131,
                              "nodeType": "ExpressionStatement",
                              "src": "3184:37:49"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 16109,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 16106,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16103,
                            "src": "3067:1:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 16107,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16081,
                              "src": "3071:6:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_calldata_ptr",
                                "typeString": "contract IERC20[] calldata"
                              }
                            },
                            "id": 16108,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "3071:13:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3067:17:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 16133,
                        "initializationExpression": {
                          "assignments": [
                            16103
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 16103,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 16133,
                              "src": "3052:9:49",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 16102,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "3052:7:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 16105,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 16104,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3064:1:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "3052:13:49"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 16111,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "3086:3:49",
                            "subExpression": {
                              "id": 16110,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16103,
                              "src": "3088:1:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 16112,
                          "nodeType": "ExpressionStatement",
                          "src": "3086:3:49"
                        },
                        "nodeType": "ForStatement",
                        "src": "3047:185:49"
                      }
                    ]
                  },
                  "functionSelector": "6daefab6",
                  "id": 16135,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 16089,
                      "modifierName": {
                        "id": 16088,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "2934:12:49",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2934:12:49"
                    },
                    {
                      "id": 16091,
                      "modifierName": {
                        "id": 16090,
                        "name": "authenticate",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 294,
                        "src": "2947:12:49",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2947:12:49"
                    }
                  ],
                  "name": "withdrawCollectedFees",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16087,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16081,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 16135,
                        "src": "2831:24:49",
                        "stateVariable": false,
                        "storageLocation": "calldata",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_calldata_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16079,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "2831:6:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 16080,
                          "nodeType": "ArrayTypeName",
                          "src": "2831:8:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16084,
                        "mutability": "mutable",
                        "name": "amounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 16135,
                        "src": "2865:26:49",
                        "stateVariable": false,
                        "storageLocation": "calldata",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16082,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2865:7:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 16083,
                          "nodeType": "ArrayTypeName",
                          "src": "2865:9:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16086,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 16135,
                        "src": "2901:17:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 16085,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2901:7:49",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2821:103:49"
                  },
                  "returnParameters": {
                    "id": 16092,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2960:0:49"
                  },
                  "scope": 16287,
                  "src": "2791:447:49",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 16158,
                    "nodeType": "Block",
                    "src": "3326:233:49",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 16145,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 16143,
                                "name": "newSwapFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16137,
                                "src": "3345:20:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 16144,
                                "name": "_MAX_PROTOCOL_SWAP_FEE_PERCENTAGE",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16039,
                                "src": "3369:33:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "3345:57:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 16146,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3404:6:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 16147,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SWAP_FEE_PERCENTAGE_TOO_HIGH",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 648,
                              "src": "3404:35:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16142,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "3336:8:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 16148,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3336:104:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16149,
                        "nodeType": "ExpressionStatement",
                        "src": "3336:104:49"
                      },
                      {
                        "expression": {
                          "id": 16152,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 16150,
                            "name": "_swapFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16046,
                            "src": "3450:18:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 16151,
                            "name": "newSwapFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16137,
                            "src": "3471:20:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3450:41:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 16153,
                        "nodeType": "ExpressionStatement",
                        "src": "3450:41:49"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 16155,
                              "name": "newSwapFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16137,
                              "src": "3531:20:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16154,
                            "name": "SwapFeePercentageChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16052,
                            "src": "3506:24:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 16156,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3506:46:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16157,
                        "nodeType": "EmitStatement",
                        "src": "3501:51:49"
                      }
                    ]
                  },
                  "functionSelector": "38e9922e",
                  "id": 16159,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 16140,
                      "modifierName": {
                        "id": 16139,
                        "name": "authenticate",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 294,
                        "src": "3313:12:49",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3313:12:49"
                    }
                  ],
                  "name": "setSwapFeePercentage",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16138,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16137,
                        "mutability": "mutable",
                        "name": "newSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 16159,
                        "src": "3274:28:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16136,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3274:7:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3273:30:49"
                  },
                  "returnParameters": {
                    "id": 16141,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3326:0:49"
                  },
                  "scope": 16287,
                  "src": "3244:315:49",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 16182,
                    "nodeType": "Block",
                    "src": "3657:304:49",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 16169,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 16167,
                                "name": "newFlashLoanFeePercentage",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16161,
                                "src": "3689:25:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 16168,
                                "name": "_MAX_PROTOCOL_FLASH_LOAN_FEE_PERCENTAGE",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16042,
                                "src": "3718:39:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "3689:68:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 16170,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3771:6:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 16171,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 651,
                              "src": "3771:41:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16166,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "3667:8:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 16172,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3667:155:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16173,
                        "nodeType": "ExpressionStatement",
                        "src": "3667:155:49"
                      },
                      {
                        "expression": {
                          "id": 16176,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 16174,
                            "name": "_flashLoanFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16048,
                            "src": "3832:23:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 16175,
                            "name": "newFlashLoanFeePercentage",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16161,
                            "src": "3858:25:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3832:51:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 16177,
                        "nodeType": "ExpressionStatement",
                        "src": "3832:51:49"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 16179,
                              "name": "newFlashLoanFeePercentage",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16161,
                              "src": "3928:25:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16178,
                            "name": "FlashLoanFeePercentageChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16056,
                            "src": "3898:29:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 16180,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3898:56:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16181,
                        "nodeType": "EmitStatement",
                        "src": "3893:61:49"
                      }
                    ]
                  },
                  "functionSelector": "6b6b9f69",
                  "id": 16183,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 16164,
                      "modifierName": {
                        "id": 16163,
                        "name": "authenticate",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 294,
                        "src": "3644:12:49",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3644:12:49"
                    }
                  ],
                  "name": "setFlashLoanFeePercentage",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16162,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16161,
                        "mutability": "mutable",
                        "name": "newFlashLoanFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 16183,
                        "src": "3600:33:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16160,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3600:7:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3599:35:49"
                  },
                  "returnParameters": {
                    "id": 16165,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3657:0:49"
                  },
                  "scope": 16287,
                  "src": "3565:396:49",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 16190,
                    "nodeType": "Block",
                    "src": "4031:42:49",
                    "statements": [
                      {
                        "expression": {
                          "id": 16188,
                          "name": "_swapFeePercentage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16046,
                          "src": "4048:18:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 16187,
                        "id": 16189,
                        "nodeType": "Return",
                        "src": "4041:25:49"
                      }
                    ]
                  },
                  "functionSelector": "55c67628",
                  "id": 16191,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getSwapFeePercentage",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16184,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3996:2:49"
                  },
                  "returnParameters": {
                    "id": 16187,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16186,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 16191,
                        "src": "4022:7:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16185,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4022:7:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4021:9:49"
                  },
                  "scope": 16287,
                  "src": "3967:106:49",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 16198,
                    "nodeType": "Block",
                    "src": "4148:47:49",
                    "statements": [
                      {
                        "expression": {
                          "id": 16196,
                          "name": "_flashLoanFeePercentage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16048,
                          "src": "4165:23:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 16195,
                        "id": 16197,
                        "nodeType": "Return",
                        "src": "4158:30:49"
                      }
                    ]
                  },
                  "functionSelector": "d877845c",
                  "id": 16199,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getFlashLoanFeePercentage",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16192,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4113:2:49"
                  },
                  "returnParameters": {
                    "id": 16195,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16194,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 16199,
                        "src": "4139:7:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16193,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4139:7:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4138:9:49"
                  },
                  "scope": 16287,
                  "src": "4079:116:49",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 16244,
                    "nodeType": "Block",
                    "src": "4309:186:49",
                    "statements": [
                      {
                        "expression": {
                          "id": 16215,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 16208,
                            "name": "feeAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16206,
                            "src": "4319:10:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 16212,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16202,
                                  "src": "4346:6:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 16213,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "4346:13:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 16211,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "4332:13:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (uint256[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 16209,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4336:7:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 16210,
                                "nodeType": "ArrayTypeName",
                                "src": "4336:9:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                  "typeString": "uint256[]"
                                }
                              }
                            },
                            "id": 16214,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4332:28:49",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "src": "4319:41:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "id": 16216,
                        "nodeType": "ExpressionStatement",
                        "src": "4319:41:49"
                      },
                      {
                        "body": {
                          "id": 16242,
                          "nodeType": "Block",
                          "src": "4414:75:49",
                          "statements": [
                            {
                              "expression": {
                                "id": 16240,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 16228,
                                    "name": "feeAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16206,
                                    "src": "4428:10:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 16230,
                                  "indexExpression": {
                                    "id": 16229,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16218,
                                    "src": "4439:1:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "4428:13:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "id": 16237,
                                          "name": "this",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": -28,
                                          "src": "4472:4:49",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                            "typeString": "contract ProtocolFeesCollector"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                            "typeString": "contract ProtocolFeesCollector"
                                          }
                                        ],
                                        "id": 16236,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "4464:7:49",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_address_$",
                                          "typeString": "type(address)"
                                        },
                                        "typeName": {
                                          "id": 16235,
                                          "name": "address",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "4464:7:49",
                                          "typeDescriptions": {}
                                        }
                                      },
                                      "id": 16238,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "4464:13:49",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 16231,
                                        "name": "tokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16202,
                                        "src": "4444:6:49",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                          "typeString": "contract IERC20[] memory"
                                        }
                                      },
                                      "id": 16233,
                                      "indexExpression": {
                                        "id": 16232,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16218,
                                        "src": "4451:1:49",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "4444:9:49",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "id": 16234,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "balanceOf",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5034,
                                    "src": "4444:19:49",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                      "typeString": "function (address) view external returns (uint256)"
                                    }
                                  },
                                  "id": 16239,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4444:34:49",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4428:50:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 16241,
                              "nodeType": "ExpressionStatement",
                              "src": "4428:50:49"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 16224,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 16221,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16218,
                            "src": "4390:1:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 16222,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16202,
                              "src": "4394:6:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 16223,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "4394:13:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4390:17:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 16243,
                        "initializationExpression": {
                          "assignments": [
                            16218
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 16218,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 16243,
                              "src": "4375:9:49",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 16217,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4375:7:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 16220,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 16219,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4387:1:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "4375:13:49"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 16226,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "4409:3:49",
                            "subExpression": {
                              "id": 16225,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16218,
                              "src": "4411:1:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 16227,
                          "nodeType": "ExpressionStatement",
                          "src": "4409:3:49"
                        },
                        "nodeType": "ForStatement",
                        "src": "4370:119:49"
                      }
                    ]
                  },
                  "functionSelector": "e42abf35",
                  "id": 16245,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getCollectedFeeAmounts",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16203,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16202,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 16245,
                        "src": "4233:22:49",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16200,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "4233:6:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 16201,
                          "nodeType": "ArrayTypeName",
                          "src": "4233:8:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4232:24:49"
                  },
                  "returnParameters": {
                    "id": 16207,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16206,
                        "mutability": "mutable",
                        "name": "feeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 16245,
                        "src": "4280:27:49",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16204,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4280:7:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 16205,
                          "nodeType": "ArrayTypeName",
                          "src": "4280:9:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4279:29:49"
                  },
                  "scope": 16287,
                  "src": "4201:294:49",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 16253,
                    "nodeType": "Block",
                    "src": "4562:40:49",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 16250,
                            "name": "_getAuthorizer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16286,
                            "src": "4579:14:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IAuthorizer_$20660_$",
                              "typeString": "function () view returns (contract IAuthorizer)"
                            }
                          },
                          "id": 16251,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4579:16:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "functionReturnParameters": 16249,
                        "id": 16252,
                        "nodeType": "Return",
                        "src": "4572:23:49"
                      }
                    ]
                  },
                  "functionSelector": "aaabadc5",
                  "id": 16254,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16246,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4523:2:49"
                  },
                  "returnParameters": {
                    "id": 16249,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16248,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 16254,
                        "src": "4549:11:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 16247,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "4549:11:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4548:13:49"
                  },
                  "scope": 16287,
                  "src": "4501:101:49",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    342
                  ],
                  "body": {
                    "id": 16275,
                    "nodeType": "Block",
                    "src": "4702:85:49",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 16267,
                              "name": "actionId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16256,
                              "src": "4747:8:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 16268,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16258,
                              "src": "4757:7:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 16271,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -28,
                                  "src": "4774:4:49",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                    "typeString": "contract ProtocolFeesCollector"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                                    "typeString": "contract ProtocolFeesCollector"
                                  }
                                ],
                                "id": 16270,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4766:7:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 16269,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4766:7:49",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 16272,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4766:13:49",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 16264,
                                "name": "_getAuthorizer",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16286,
                                "src": "4719:14:49",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IAuthorizer_$20660_$",
                                  "typeString": "function () view returns (contract IAuthorizer)"
                                }
                              },
                              "id": 16265,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4719:16:49",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                                "typeString": "contract IAuthorizer"
                              }
                            },
                            "id": 16266,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "canPerform",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20659,
                            "src": "4719:27:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_address_$_t_address_$returns$_t_bool_$",
                              "typeString": "function (bytes32,address,address) view external returns (bool)"
                            }
                          },
                          "id": 16273,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4719:61:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 16263,
                        "id": 16274,
                        "nodeType": "Return",
                        "src": "4712:68:49"
                      }
                    ]
                  },
                  "id": 16276,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_canPerform",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 16260,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4678:8:49"
                  },
                  "parameters": {
                    "id": 16259,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16256,
                        "mutability": "mutable",
                        "name": "actionId",
                        "nodeType": "VariableDeclaration",
                        "scope": 16276,
                        "src": "4629:16:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 16255,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4629:7:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16258,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 16276,
                        "src": "4647:15:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 16257,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4647:7:49",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4628:35:49"
                  },
                  "returnParameters": {
                    "id": 16263,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16262,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 16276,
                        "src": "4696:4:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 16261,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4696:4:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4695:6:49"
                  },
                  "scope": 16287,
                  "src": "4608:179:49",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 16285,
                    "nodeType": "Block",
                    "src": "4855:45:49",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 16281,
                              "name": "vault",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16044,
                              "src": "4872:5:49",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IVault_$21266",
                                "typeString": "contract IVault"
                              }
                            },
                            "id": 16282,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getAuthorizer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20841,
                            "src": "4872:19:49",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IAuthorizer_$20660_$",
                              "typeString": "function () view external returns (contract IAuthorizer)"
                            }
                          },
                          "id": 16283,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4872:21:49",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "functionReturnParameters": 16280,
                        "id": 16284,
                        "nodeType": "Return",
                        "src": "4865:28:49"
                      }
                    ]
                  },
                  "id": 16286,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16277,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4816:2:49"
                  },
                  "returnParameters": {
                    "id": 16280,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16279,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 16286,
                        "src": "4842:11:49",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 16278,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "4842:11:49",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4841:13:49"
                  },
                  "scope": 16287,
                  "src": "4793:107:49",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 16288,
              "src": "1494:3408:49"
            }
          ],
          "src": "688:4215:49"
        },
        "id": 49
      },
      "src.sol/amm/vault/Swaps.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/Swaps.sol",
          "exportedSymbols": {
            "Swaps": [
              17569
            ]
          },
          "id": 17570,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 16289,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:50"
            },
            {
              "id": 16290,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:50"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../lib/math/Math.sol",
              "id": 16291,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 3351,
              "src": "747:30:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 16292,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 656,
              "src": "778:43:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/InputHelpers.sol",
              "file": "../lib/helpers/InputHelpers.sol",
              "id": 16293,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 1043,
              "src": "822:41:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/EnumerableMap.sol",
              "file": "../lib/openzeppelin/EnumerableMap.sol",
              "id": 16294,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 4811,
              "src": "864:47:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/EnumerableSet.sol",
              "file": "../lib/openzeppelin/EnumerableSet.sol",
              "id": 16295,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 5018,
              "src": "912:47:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 16296,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 5096,
              "src": "960:40:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 16297,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 5188,
              "src": "1001:49:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeCast.sol",
              "file": "../lib/openzeppelin/SafeCast.sol",
              "id": 16298,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 5217,
              "src": "1051:42:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
              "file": "../lib/openzeppelin/SafeERC20.sol",
              "id": 16299,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 5312,
              "src": "1094:43:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/PoolBalances.sol",
              "file": "./PoolBalances.sol",
              "id": 16300,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 15341,
              "src": "1139:28:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IPoolSwapStructs.sol",
              "file": "./interfaces/IPoolSwapStructs.sol",
              "id": 16301,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 20805,
              "src": "1168:43:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IGeneralPool.sol",
              "file": "./interfaces/IGeneralPool.sol",
              "id": 16302,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 20761,
              "src": "1212:39:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol",
              "file": "./interfaces/IMinimalSwapInfoPool.sol",
              "id": 16303,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 20780,
              "src": "1252:47:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/BalanceAllocation.sol",
              "file": "./balances/BalanceAllocation.sol",
              "id": 16304,
              "nodeType": "ImportDirective",
              "scope": 17570,
              "sourceUnit": 19058,
              "src": "1300:42:50",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 16306,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "2075:15:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 16307,
                  "nodeType": "InheritanceSpecifier",
                  "src": "2075:15:50"
                },
                {
                  "baseName": {
                    "id": 16308,
                    "name": "PoolBalances",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 15340,
                    "src": "2092:12:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_PoolBalances_$15340",
                      "typeString": "contract PoolBalances"
                    }
                  },
                  "id": 16309,
                  "nodeType": "InheritanceSpecifier",
                  "src": "2092:12:50"
                }
              ],
              "contractDependencies": [
                266,
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                13834,
                14087,
                14372,
                15340,
                15609,
                16018,
                18120,
                18418,
                19467,
                19917,
                20641,
                20822,
                21266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 16305,
                "nodeType": "StructuredDocumentation",
                "src": "1344:703:50",
                "text": " Implements the Vault's high-level swap functionality.\n Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. They need not trust the Pool\n contracts to do this: all security checks are made by the Vault.\n The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\n In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\n and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\n More complex swaps, such as one 'token in' to multiple tokens out can be achieved by batching together\n individual swaps."
              },
              "fullyImplemented": false,
              "id": 17569,
              "linearizedBaseContracts": [
                17569,
                15340,
                18120,
                16018,
                13834,
                20641,
                19917,
                15609,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                14087,
                19467,
                5187,
                14372,
                21266,
                20822,
                266
              ],
              "name": "Swaps",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 16312,
                  "libraryName": {
                    "id": 16310,
                    "name": "SafeERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5311,
                    "src": "2117:9:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeERC20_$5311",
                      "typeString": "library SafeERC20"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2111:27:50",
                  "typeName": {
                    "id": 16311,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "2131:6:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  }
                },
                {
                  "id": 16315,
                  "libraryName": {
                    "id": 16313,
                    "name": "EnumerableSet",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5017,
                    "src": "2149:13:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_EnumerableSet_$5017",
                      "typeString": "library EnumerableSet"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2143:49:50",
                  "typeName": {
                    "id": 16314,
                    "name": "EnumerableSet.AddressSet",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4822,
                    "src": "2167:24:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                      "typeString": "struct EnumerableSet.AddressSet"
                    }
                  }
                },
                {
                  "id": 16318,
                  "libraryName": {
                    "id": 16316,
                    "name": "EnumerableMap",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4810,
                    "src": "2203:13:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_EnumerableMap_$4810",
                      "typeString": "library EnumerableMap"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2197:57:50",
                  "typeName": {
                    "id": 16317,
                    "name": "EnumerableMap.IERC20ToBytes32Map",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4479,
                    "src": "2221:32:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                    }
                  }
                },
                {
                  "id": 16321,
                  "libraryName": {
                    "id": 16319,
                    "name": "Math",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3350,
                    "src": "2266:4:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Math_$3350",
                      "typeString": "library Math"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2260:22:50",
                  "typeName": {
                    "id": 16320,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2275:6:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  }
                },
                {
                  "id": 16324,
                  "libraryName": {
                    "id": 16322,
                    "name": "Math",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3350,
                    "src": "2293:4:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Math_$3350",
                      "typeString": "library Math"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2287:23:50",
                  "typeName": {
                    "id": 16323,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2302:7:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 16327,
                  "libraryName": {
                    "id": 16325,
                    "name": "SafeCast",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5216,
                    "src": "2321:8:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeCast_$5216",
                      "typeString": "library SafeCast"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2315:27:50",
                  "typeName": {
                    "id": 16326,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2334:7:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 16330,
                  "libraryName": {
                    "id": 16328,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "2353:17:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2347:36:50",
                  "typeName": {
                    "id": 16329,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2375:7:50",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                },
                {
                  "baseFunctions": [
                    21115
                  ],
                  "body": {
                    "id": 16513,
                    "nodeType": "Block",
                    "src": "2711:1822:50",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 16356,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 16353,
                                  "name": "block",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -4,
                                  "src": "2882:5:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_block",
                                    "typeString": "block"
                                  }
                                },
                                "id": 16354,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "timestamp",
                                "nodeType": "MemberAccess",
                                "src": "2882:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 16355,
                                "name": "deadline",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16338,
                                "src": "2901:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "2882:27:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 16357,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "2911:6:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 16358,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SWAP_DEADLINE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 585,
                              "src": "2911:20:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16352,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "2873:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 16359,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2873:59:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16360,
                        "nodeType": "ExpressionStatement",
                        "src": "2873:59:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 16365,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 16362,
                                  "name": "singleSwap",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16332,
                                  "src": "3109:10:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                    "typeString": "struct IVault.SingleSwap memory"
                                  }
                                },
                                "id": 16363,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "amount",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 21125,
                                "src": "3109:17:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">",
                              "rightExpression": {
                                "hexValue": "30",
                                "id": 16364,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3129:1:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "3109:21:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 16366,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3132:6:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 16367,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "UNKNOWN_AMOUNT_IN_FIRST_SWAP",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 591,
                              "src": "3132:35:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16361,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "3100:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 16368,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3100:68:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16369,
                        "nodeType": "ExpressionStatement",
                        "src": "3100:68:50"
                      },
                      {
                        "assignments": [
                          16371
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16371,
                            "mutability": "mutable",
                            "name": "tokenIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 16513,
                            "src": "3179:14:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 16370,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "3179:6:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16376,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 16373,
                                "name": "singleSwap",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16332,
                                "src": "3215:10:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                  "typeString": "struct IVault.SingleSwap memory"
                                }
                              },
                              "id": 16374,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assetIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21121,
                              "src": "3215:18:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            ],
                            "id": 16372,
                            "name": "_translateToIERC20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              202,
                              249
                            ],
                            "referencedDeclaration": 202,
                            "src": "3196:18:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                              "typeString": "function (contract IAsset) view returns (contract IERC20)"
                            }
                          },
                          "id": 16375,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3196:38:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3179:55:50"
                      },
                      {
                        "assignments": [
                          16378
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16378,
                            "mutability": "mutable",
                            "name": "tokenOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 16513,
                            "src": "3244:15:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 16377,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "3244:6:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16383,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 16380,
                                "name": "singleSwap",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16332,
                                "src": "3281:10:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                  "typeString": "struct IVault.SingleSwap memory"
                                }
                              },
                              "id": 16381,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assetOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21123,
                              "src": "3281:19:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            ],
                            "id": 16379,
                            "name": "_translateToIERC20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              202,
                              249
                            ],
                            "referencedDeclaration": 202,
                            "src": "3262:18:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                              "typeString": "function (contract IAsset) view returns (contract IERC20)"
                            }
                          },
                          "id": 16382,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3262:39:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3244:57:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              "id": 16387,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 16385,
                                "name": "tokenIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16371,
                                "src": "3320:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "id": 16386,
                                "name": "tokenOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16378,
                                "src": "3331:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "src": "3320:19:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 16388,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "3341:6:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 16389,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "CANNOT_SWAP_SAME_TOKEN",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 588,
                              "src": "3341:29:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16384,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "3311:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 16390,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3311:60:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16391,
                        "nodeType": "ExpressionStatement",
                        "src": "3311:60:50"
                      },
                      {
                        "assignments": [
                          16395
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16395,
                            "mutability": "mutable",
                            "name": "poolRequest",
                            "nodeType": "VariableDeclaration",
                            "scope": 16513,
                            "src": "3475:47:50",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                              "typeString": "struct IPoolSwapStructs.SwapRequest"
                            },
                            "typeName": {
                              "id": 16394,
                              "name": "IPoolSwapStructs.SwapRequest",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20803,
                              "src": "3475:28:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16396,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3475:47:50"
                      },
                      {
                        "expression": {
                          "id": 16402,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 16397,
                              "name": "poolRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16395,
                              "src": "3532:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 16399,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "poolId",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20794,
                            "src": "3532:18:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 16400,
                              "name": "singleSwap",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16332,
                              "src": "3553:10:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                "typeString": "struct IVault.SingleSwap memory"
                              }
                            },
                            "id": 16401,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "poolId",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21117,
                            "src": "3553:17:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "3532:38:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 16403,
                        "nodeType": "ExpressionStatement",
                        "src": "3532:38:50"
                      },
                      {
                        "expression": {
                          "id": 16409,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 16404,
                              "name": "poolRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16395,
                              "src": "3580:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 16406,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "kind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20786,
                            "src": "3580:16:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 16407,
                              "name": "singleSwap",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16332,
                              "src": "3599:10:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                "typeString": "struct IVault.SingleSwap memory"
                              }
                            },
                            "id": 16408,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "kind",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21119,
                            "src": "3599:15:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            }
                          },
                          "src": "3580:34:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "id": 16410,
                        "nodeType": "ExpressionStatement",
                        "src": "3580:34:50"
                      },
                      {
                        "expression": {
                          "id": 16415,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 16411,
                              "name": "poolRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16395,
                              "src": "3624:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 16413,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "tokenIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20788,
                            "src": "3624:19:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 16414,
                            "name": "tokenIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16371,
                            "src": "3646:7:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "3624:29:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 16416,
                        "nodeType": "ExpressionStatement",
                        "src": "3624:29:50"
                      },
                      {
                        "expression": {
                          "id": 16421,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 16417,
                              "name": "poolRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16395,
                              "src": "3663:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 16419,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "tokenOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20790,
                            "src": "3663:20:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 16420,
                            "name": "tokenOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16378,
                            "src": "3686:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "3663:31:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 16422,
                        "nodeType": "ExpressionStatement",
                        "src": "3663:31:50"
                      },
                      {
                        "expression": {
                          "id": 16428,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 16423,
                              "name": "poolRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16395,
                              "src": "3704:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 16425,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "amount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20792,
                            "src": "3704:18:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 16426,
                              "name": "singleSwap",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16332,
                              "src": "3725:10:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                "typeString": "struct IVault.SingleSwap memory"
                              }
                            },
                            "id": 16427,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "amount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21125,
                            "src": "3725:17:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3704:38:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 16429,
                        "nodeType": "ExpressionStatement",
                        "src": "3704:38:50"
                      },
                      {
                        "expression": {
                          "id": 16435,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 16430,
                              "name": "poolRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16395,
                              "src": "3752:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 16432,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "userData",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20802,
                            "src": "3752:20:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 16433,
                              "name": "singleSwap",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16332,
                              "src": "3775:10:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                "typeString": "struct IVault.SingleSwap memory"
                              }
                            },
                            "id": 16434,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "userData",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21127,
                            "src": "3775:19:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "src": "3752:42:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 16436,
                        "nodeType": "ExpressionStatement",
                        "src": "3752:42:50"
                      },
                      {
                        "expression": {
                          "id": 16442,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 16437,
                              "name": "poolRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16395,
                              "src": "3804:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 16439,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "from",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20798,
                            "src": "3804:16:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 16440,
                              "name": "funds",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16334,
                              "src": "3823:5:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                "typeString": "struct IVault.FundManagement memory"
                              }
                            },
                            "id": 16441,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21176,
                            "src": "3823:12:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "3804:31:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 16443,
                        "nodeType": "ExpressionStatement",
                        "src": "3804:31:50"
                      },
                      {
                        "expression": {
                          "id": 16449,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 16444,
                              "name": "poolRequest",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16395,
                              "src": "3845:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 16446,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "to",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20800,
                            "src": "3845:14:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 16447,
                              "name": "funds",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16334,
                              "src": "3862:5:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                "typeString": "struct IVault.FundManagement memory"
                              }
                            },
                            "id": 16448,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "recipient",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21180,
                            "src": "3862:15:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "src": "3845:32:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 16450,
                        "nodeType": "ExpressionStatement",
                        "src": "3845:32:50"
                      },
                      {
                        "assignments": [
                          16452
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16452,
                            "mutability": "mutable",
                            "name": "amountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 16513,
                            "src": "3948:16:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 16451,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3948:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16453,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3948:16:50"
                      },
                      {
                        "assignments": [
                          16455
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16455,
                            "mutability": "mutable",
                            "name": "amountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 16513,
                            "src": "3974:17:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 16454,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3974:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16456,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3974:17:50"
                      },
                      {
                        "expression": {
                          "id": 16464,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 16457,
                                "name": "amountCalculated",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16350,
                                "src": "4003:16:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 16458,
                                "name": "amountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16452,
                                "src": "4021:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 16459,
                                "name": "amountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16455,
                                "src": "4031:9:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 16460,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "4002:39:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(uint256,uint256,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 16462,
                                "name": "poolRequest",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16395,
                                "src": "4058:11:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              ],
                              "id": 16461,
                              "name": "_swapWithPool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17088,
                              "src": "4044:13:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$returns$_t_uint256_$_t_uint256_$_t_uint256_$",
                                "typeString": "function (struct IPoolSwapStructs.SwapRequest memory) returns (uint256,uint256,uint256)"
                              }
                            },
                            "id": 16463,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4044:26:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(uint256,uint256,uint256)"
                            }
                          },
                          "src": "4002:68:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16465,
                        "nodeType": "ExpressionStatement",
                        "src": "4002:68:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_enum$_SwapKind_$21101",
                                  "typeString": "enum IVault.SwapKind"
                                },
                                "id": 16471,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 16467,
                                    "name": "singleSwap",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16332,
                                    "src": "4089:10:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                      "typeString": "struct IVault.SingleSwap memory"
                                    }
                                  },
                                  "id": 16468,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "kind",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21119,
                                  "src": "4089:15:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_SwapKind_$21101",
                                    "typeString": "enum IVault.SwapKind"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "expression": {
                                    "id": 16469,
                                    "name": "SwapKind",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 21101,
                                    "src": "4108:8:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_SwapKind_$21101_$",
                                      "typeString": "type(enum IVault.SwapKind)"
                                    }
                                  },
                                  "id": 16470,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "GIVEN_IN",
                                  "nodeType": "MemberAccess",
                                  "src": "4108:17:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_SwapKind_$21101",
                                    "typeString": "enum IVault.SwapKind"
                                  }
                                },
                                "src": "4089:36:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 16477,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 16475,
                                  "name": "amountIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16452,
                                  "src": "4149:8:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<=",
                                "rightExpression": {
                                  "id": 16476,
                                  "name": "limit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16336,
                                  "src": "4161:5:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4149:17:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 16478,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "Conditional",
                              "src": "4089:77:50",
                              "trueExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 16474,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 16472,
                                  "name": "amountOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16455,
                                  "src": "4128:9:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">=",
                                "rightExpression": {
                                  "id": 16473,
                                  "name": "limit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16336,
                                  "src": "4141:5:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4128:18:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 16479,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4168:6:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 16480,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SWAP_LIMIT",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 582,
                              "src": "4168:17:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16466,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4080:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 16481,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4080:106:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16482,
                        "nodeType": "ExpressionStatement",
                        "src": "4080:106:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 16484,
                                "name": "singleSwap",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16332,
                                "src": "4211:10:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                  "typeString": "struct IVault.SingleSwap memory"
                                }
                              },
                              "id": 16485,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assetIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21121,
                              "src": "4211:18:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            },
                            {
                              "id": 16486,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16452,
                              "src": "4231:8:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 16487,
                                "name": "funds",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16334,
                                "src": "4241:5:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                  "typeString": "struct IVault.FundManagement memory"
                                }
                              },
                              "id": 16488,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21176,
                              "src": "4241:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "expression": {
                                "id": 16489,
                                "name": "funds",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16334,
                                "src": "4255:5:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                  "typeString": "struct IVault.FundManagement memory"
                                }
                              },
                              "id": 16490,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "fromInternalBalance",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21178,
                              "src": "4255:25:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 16483,
                            "name": "_receiveAsset",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13943,
                            "src": "4197:13:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_$_t_bool_$returns$__$",
                              "typeString": "function (contract IAsset,uint256,address,bool)"
                            }
                          },
                          "id": 16491,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4197:84:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16492,
                        "nodeType": "ExpressionStatement",
                        "src": "4197:84:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 16494,
                                "name": "singleSwap",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16332,
                                "src": "4302:10:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                  "typeString": "struct IVault.SingleSwap memory"
                                }
                              },
                              "id": 16495,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "assetOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21123,
                              "src": "4302:19:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            },
                            {
                              "id": 16496,
                              "name": "amountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16455,
                              "src": "4323:9:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 16497,
                                "name": "funds",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16334,
                                "src": "4334:5:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                  "typeString": "struct IVault.FundManagement memory"
                                }
                              },
                              "id": 16498,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "recipient",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21180,
                              "src": "4334:15:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "expression": {
                                "id": 16499,
                                "name": "funds",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16334,
                                "src": "4351:5:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                  "typeString": "struct IVault.FundManagement memory"
                                }
                              },
                              "id": 16500,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "toInternalBalance",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21182,
                              "src": "4351:23:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 16493,
                            "name": "_sendAsset",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14010,
                            "src": "4291:10:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_payable_$_t_bool_$returns$__$",
                              "typeString": "function (contract IAsset,uint256,address payable,bool)"
                            }
                          },
                          "id": 16501,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4291:84:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16502,
                        "nodeType": "ExpressionStatement",
                        "src": "4291:84:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "condition": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 16505,
                                      "name": "singleSwap",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16332,
                                      "src": "4491:10:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                                        "typeString": "struct IVault.SingleSwap memory"
                                      }
                                    },
                                    "id": 16506,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "assetIn",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 21121,
                                    "src": "4491:18:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  ],
                                  "id": 16504,
                                  "name": "_isETH",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 183,
                                  "src": "4484:6:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_bool_$",
                                    "typeString": "function (contract IAsset) pure returns (bool)"
                                  }
                                },
                                "id": 16507,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4484:26:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseExpression": {
                                "hexValue": "30",
                                "id": 16509,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "4524:1:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "id": 16510,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "Conditional",
                              "src": "4484:41:50",
                              "trueExpression": {
                                "id": 16508,
                                "name": "amountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16452,
                                "src": "4513:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16503,
                            "name": "_handleRemainingEth",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14046,
                            "src": "4464:19:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 16511,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4464:62:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16512,
                        "nodeType": "ExpressionStatement",
                        "src": "4464:62:50"
                      }
                    ]
                  },
                  "functionSelector": "52bbbe29",
                  "id": 16514,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 16342,
                      "modifierName": {
                        "id": 16341,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "2591:12:50",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2591:12:50"
                    },
                    {
                      "id": 16344,
                      "modifierName": {
                        "id": 16343,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "2612:13:50",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2612:13:50"
                    },
                    {
                      "arguments": [
                        {
                          "expression": {
                            "id": 16346,
                            "name": "funds",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16334,
                            "src": "2650:5:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                              "typeString": "struct IVault.FundManagement memory"
                            }
                          },
                          "id": 16347,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 21176,
                          "src": "2650:12:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 16348,
                      "modifierName": {
                        "id": 16345,
                        "name": "authenticateFor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 18239,
                        "src": "2634:15:50",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_address_$",
                          "typeString": "modifier (address)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2634:29:50"
                    }
                  ],
                  "name": "swap",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 16340,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2574:8:50"
                  },
                  "parameters": {
                    "id": 16339,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16332,
                        "mutability": "mutable",
                        "name": "singleSwap",
                        "nodeType": "VariableDeclaration",
                        "scope": 16514,
                        "src": "2412:28:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                          "typeString": "struct IVault.SingleSwap"
                        },
                        "typeName": {
                          "id": 16331,
                          "name": "SingleSwap",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21128,
                          "src": "2412:10:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SingleSwap_$21128_storage_ptr",
                            "typeString": "struct IVault.SingleSwap"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16334,
                        "mutability": "mutable",
                        "name": "funds",
                        "nodeType": "VariableDeclaration",
                        "scope": 16514,
                        "src": "2450:27:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                          "typeString": "struct IVault.FundManagement"
                        },
                        "typeName": {
                          "id": 16333,
                          "name": "FundManagement",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21183,
                          "src": "2450:14:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_FundManagement_$21183_storage_ptr",
                            "typeString": "struct IVault.FundManagement"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16336,
                        "mutability": "mutable",
                        "name": "limit",
                        "nodeType": "VariableDeclaration",
                        "scope": 16514,
                        "src": "2487:13:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16335,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2487:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16338,
                        "mutability": "mutable",
                        "name": "deadline",
                        "nodeType": "VariableDeclaration",
                        "scope": 16514,
                        "src": "2510:16:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16337,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2510:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2402:130:50"
                  },
                  "returnParameters": {
                    "id": 16351,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16350,
                        "mutability": "mutable",
                        "name": "amountCalculated",
                        "nodeType": "VariableDeclaration",
                        "scope": 16514,
                        "src": "2681:24:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16349,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2681:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2680:26:50"
                  },
                  "scope": 17569,
                  "src": "2389:2144:50",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    21150
                  ],
                  "body": {
                    "id": 16669,
                    "nodeType": "Block",
                    "src": "4933:1431:50",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 16548,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 16545,
                                  "name": "block",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -4,
                                  "src": "5104:5:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_block",
                                    "typeString": "block"
                                  }
                                },
                                "id": 16546,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "timestamp",
                                "nodeType": "MemberAccess",
                                "src": "5104:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<=",
                              "rightExpression": {
                                "id": 16547,
                                "name": "deadline",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16529,
                                "src": "5123:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5104:27:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 16549,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5133:6:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 16550,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "SWAP_DEADLINE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 585,
                              "src": "5133:20:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16544,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5095:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 16551,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5095:59:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16552,
                        "nodeType": "ExpressionStatement",
                        "src": "5095:59:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 16556,
                                "name": "assets",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16522,
                                "src": "5201:6:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                  "typeString": "contract IAsset[] memory"
                                }
                              },
                              "id": 16557,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "5201:13:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "expression": {
                                "id": 16558,
                                "name": "limits",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16527,
                                "src": "5216:6:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                  "typeString": "int256[] memory"
                                }
                              },
                              "id": 16559,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "src": "5216:13:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 16553,
                              "name": "InputHelpers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1042,
                              "src": "5165:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_InputHelpers_$1042_$",
                                "typeString": "type(library InputHelpers)"
                              }
                            },
                            "id": 16555,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "ensureInputLengthMatch",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 932,
                            "src": "5165:35:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256) pure"
                            }
                          },
                          "id": 16560,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5165:65:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16561,
                        "nodeType": "ExpressionStatement",
                        "src": "5165:65:50"
                      },
                      {
                        "expression": {
                          "id": 16569,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 16562,
                            "name": "assetDeltas",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16542,
                            "src": "5346:11:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                              "typeString": "int256[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 16564,
                                "name": "swaps",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16519,
                                "src": "5375:5:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                                  "typeString": "struct IVault.BatchSwapStep memory[] memory"
                                }
                              },
                              {
                                "id": 16565,
                                "name": "assets",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16522,
                                "src": "5382:6:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                  "typeString": "contract IAsset[] memory"
                                }
                              },
                              {
                                "id": 16566,
                                "name": "funds",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16524,
                                "src": "5390:5:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                  "typeString": "struct IVault.FundManagement memory"
                                }
                              },
                              {
                                "id": 16567,
                                "name": "kind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16516,
                                "src": "5397:4:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_SwapKind_$21101",
                                  "typeString": "enum IVault.SwapKind"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                                  "typeString": "struct IVault.BatchSwapStep memory[] memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                  "typeString": "contract IAsset[] memory"
                                },
                                {
                                  "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                  "typeString": "struct IVault.FundManagement memory"
                                },
                                {
                                  "typeIdentifier": "t_enum$_SwapKind_$21101",
                                  "typeString": "enum IVault.SwapKind"
                                }
                              ],
                              "id": 16563,
                              "name": "_swapWithPools",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16998,
                              "src": "5360:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr_$_t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr_$_t_struct$_FundManagement_$21183_memory_ptr_$_t_enum$_SwapKind_$21101_$returns$_t_array$_t_int256_$dyn_memory_ptr_$",
                                "typeString": "function (struct IVault.BatchSwapStep memory[] memory,contract IAsset[] memory,struct IVault.FundManagement memory,enum IVault.SwapKind) returns (int256[] memory)"
                              }
                            },
                            "id": 16568,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5360:42:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                              "typeString": "int256[] memory"
                            }
                          },
                          "src": "5346:56:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        },
                        "id": 16570,
                        "nodeType": "ExpressionStatement",
                        "src": "5346:56:50"
                      },
                      {
                        "assignments": [
                          16572
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16572,
                            "mutability": "mutable",
                            "name": "wrappedEth",
                            "nodeType": "VariableDeclaration",
                            "scope": 16669,
                            "src": "5568:18:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 16571,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5568:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16574,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 16573,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "5589:1:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5568:22:50"
                      },
                      {
                        "body": {
                          "id": 16663,
                          "nodeType": "Block",
                          "src": "5644:626:50",
                          "statements": [
                            {
                              "assignments": [
                                16587
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16587,
                                  "mutability": "mutable",
                                  "name": "asset",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16663,
                                  "src": "5658:12:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  },
                                  "typeName": {
                                    "id": 16586,
                                    "name": "IAsset",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 20645,
                                    "src": "5658:6:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16591,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 16588,
                                  "name": "assets",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16522,
                                  "src": "5673:6:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                    "typeString": "contract IAsset[] memory"
                                  }
                                },
                                "id": 16590,
                                "indexExpression": {
                                  "id": 16589,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16576,
                                  "src": "5680:1:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "5673:9:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                  "typeString": "contract IAsset"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "5658:24:50"
                            },
                            {
                              "assignments": [
                                16593
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16593,
                                  "mutability": "mutable",
                                  "name": "delta",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16663,
                                  "src": "5696:12:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "typeName": {
                                    "id": 16592,
                                    "name": "int256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5696:6:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16597,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 16594,
                                  "name": "assetDeltas",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16542,
                                  "src": "5711:11:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                    "typeString": "int256[] memory"
                                  }
                                },
                                "id": 16596,
                                "indexExpression": {
                                  "id": 16595,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16576,
                                  "src": "5723:1:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "5711:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "5696:29:50"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    },
                                    "id": 16603,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 16599,
                                      "name": "delta",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16593,
                                      "src": "5748:5:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "<=",
                                    "rightExpression": {
                                      "baseExpression": {
                                        "id": 16600,
                                        "name": "limits",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16527,
                                        "src": "5757:6:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                          "typeString": "int256[] memory"
                                        }
                                      },
                                      "id": 16602,
                                      "indexExpression": {
                                        "id": 16601,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16576,
                                        "src": "5764:1:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "5757:9:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "src": "5748:18:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 16604,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "5768:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 16605,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "SWAP_LIMIT",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 582,
                                    "src": "5768:17:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 16598,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "5739:8:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 16606,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5739:47:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 16607,
                              "nodeType": "ExpressionStatement",
                              "src": "5739:47:50"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 16610,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 16608,
                                  "name": "delta",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16593,
                                  "src": "5805:5:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">",
                                "rightExpression": {
                                  "hexValue": "30",
                                  "id": 16609,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "5813:1:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "5805:9:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "condition": {
                                  "commonType": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  },
                                  "id": 16642,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 16640,
                                    "name": "delta",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16593,
                                    "src": "6099:5:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "<",
                                  "rightExpression": {
                                    "hexValue": "30",
                                    "id": 16641,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "6107:1:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    },
                                    "value": "0"
                                  },
                                  "src": "6099:9:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "id": 16661,
                                "nodeType": "IfStatement",
                                "src": "6095:165:50",
                                "trueBody": {
                                  "id": 16660,
                                  "nodeType": "Block",
                                  "src": "6110:150:50",
                                  "statements": [
                                    {
                                      "assignments": [
                                        16644
                                      ],
                                      "declarations": [
                                        {
                                          "constant": false,
                                          "id": 16644,
                                          "mutability": "mutable",
                                          "name": "toSend",
                                          "nodeType": "VariableDeclaration",
                                          "scope": 16660,
                                          "src": "6128:14:50",
                                          "stateVariable": false,
                                          "storageLocation": "default",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          "typeName": {
                                            "id": 16643,
                                            "name": "uint256",
                                            "nodeType": "ElementaryTypeName",
                                            "src": "6128:7:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "visibility": "internal"
                                        }
                                      ],
                                      "id": 16650,
                                      "initialValue": {
                                        "arguments": [
                                          {
                                            "id": 16648,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "UnaryOperation",
                                            "operator": "-",
                                            "prefix": true,
                                            "src": "6153:6:50",
                                            "subExpression": {
                                              "id": 16647,
                                              "name": "delta",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 16593,
                                              "src": "6154:5:50",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              }
                                            },
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          ],
                                          "id": 16646,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "6145:7:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint256_$",
                                            "typeString": "type(uint256)"
                                          },
                                          "typeName": {
                                            "id": 16645,
                                            "name": "uint256",
                                            "nodeType": "ElementaryTypeName",
                                            "src": "6145:7:50",
                                            "typeDescriptions": {}
                                          }
                                        },
                                        "id": 16649,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "6145:15:50",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "VariableDeclarationStatement",
                                      "src": "6128:32:50"
                                    },
                                    {
                                      "expression": {
                                        "arguments": [
                                          {
                                            "id": 16652,
                                            "name": "asset",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 16587,
                                            "src": "6189:5:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_contract$_IAsset_$20645",
                                              "typeString": "contract IAsset"
                                            }
                                          },
                                          {
                                            "id": 16653,
                                            "name": "toSend",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 16644,
                                            "src": "6196:6:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          {
                                            "expression": {
                                              "id": 16654,
                                              "name": "funds",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 16524,
                                              "src": "6204:5:50",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                                "typeString": "struct IVault.FundManagement memory"
                                              }
                                            },
                                            "id": 16655,
                                            "isConstant": false,
                                            "isLValue": true,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "recipient",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 21180,
                                            "src": "6204:15:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_address_payable",
                                              "typeString": "address payable"
                                            }
                                          },
                                          {
                                            "expression": {
                                              "id": 16656,
                                              "name": "funds",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 16524,
                                              "src": "6221:5:50",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                                "typeString": "struct IVault.FundManagement memory"
                                              }
                                            },
                                            "id": 16657,
                                            "isConstant": false,
                                            "isLValue": true,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "toInternalBalance",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 21182,
                                            "src": "6221:23:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_contract$_IAsset_$20645",
                                              "typeString": "contract IAsset"
                                            },
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            {
                                              "typeIdentifier": "t_address_payable",
                                              "typeString": "address payable"
                                            },
                                            {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            }
                                          ],
                                          "id": 16651,
                                          "name": "_sendAsset",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 14010,
                                          "src": "6178:10:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_payable_$_t_bool_$returns$__$",
                                            "typeString": "function (contract IAsset,uint256,address payable,bool)"
                                          }
                                        },
                                        "id": 16658,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "6178:67:50",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_tuple$__$",
                                          "typeString": "tuple()"
                                        }
                                      },
                                      "id": 16659,
                                      "nodeType": "ExpressionStatement",
                                      "src": "6178:67:50"
                                    }
                                  ]
                                }
                              },
                              "id": 16662,
                              "nodeType": "IfStatement",
                              "src": "5801:459:50",
                              "trueBody": {
                                "id": 16639,
                                "nodeType": "Block",
                                "src": "5816:273:50",
                                "statements": [
                                  {
                                    "assignments": [
                                      16612
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 16612,
                                        "mutability": "mutable",
                                        "name": "toReceive",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 16639,
                                        "src": "5834:17:50",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        "typeName": {
                                          "id": 16611,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "5834:7:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 16617,
                                    "initialValue": {
                                      "arguments": [
                                        {
                                          "id": 16615,
                                          "name": "delta",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16593,
                                          "src": "5862:5:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_int256",
                                            "typeString": "int256"
                                          }
                                        ],
                                        "id": 16614,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "5854:7:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        },
                                        "typeName": {
                                          "id": 16613,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "5854:7:50",
                                          "typeDescriptions": {}
                                        }
                                      },
                                      "id": 16616,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5854:14:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "5834:34:50"
                                  },
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 16619,
                                          "name": "asset",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16587,
                                          "src": "5900:5:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IAsset_$20645",
                                            "typeString": "contract IAsset"
                                          }
                                        },
                                        {
                                          "id": 16620,
                                          "name": "toReceive",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16612,
                                          "src": "5907:9:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        {
                                          "expression": {
                                            "id": 16621,
                                            "name": "funds",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 16524,
                                            "src": "5918:5:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                              "typeString": "struct IVault.FundManagement memory"
                                            }
                                          },
                                          "id": 16622,
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "sender",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 21176,
                                          "src": "5918:12:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          }
                                        },
                                        {
                                          "expression": {
                                            "id": 16623,
                                            "name": "funds",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 16524,
                                            "src": "5932:5:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                              "typeString": "struct IVault.FundManagement memory"
                                            }
                                          },
                                          "id": 16624,
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "fromInternalBalance",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 21178,
                                          "src": "5932:25:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_contract$_IAsset_$20645",
                                            "typeString": "contract IAsset"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          },
                                          {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        ],
                                        "id": 16618,
                                        "name": "_receiveAsset",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 13943,
                                        "src": "5886:13:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_$_t_bool_$returns$__$",
                                          "typeString": "function (contract IAsset,uint256,address,bool)"
                                        }
                                      },
                                      "id": 16625,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5886:72:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 16626,
                                    "nodeType": "ExpressionStatement",
                                    "src": "5886:72:50"
                                  },
                                  {
                                    "condition": {
                                      "arguments": [
                                        {
                                          "id": 16628,
                                          "name": "asset",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16587,
                                          "src": "5988:5:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IAsset_$20645",
                                            "typeString": "contract IAsset"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_contract$_IAsset_$20645",
                                            "typeString": "contract IAsset"
                                          }
                                        ],
                                        "id": 16627,
                                        "name": "_isETH",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 183,
                                        "src": "5981:6:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_bool_$",
                                          "typeString": "function (contract IAsset) pure returns (bool)"
                                        }
                                      },
                                      "id": 16629,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5981:13:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "id": 16638,
                                    "nodeType": "IfStatement",
                                    "src": "5977:98:50",
                                    "trueBody": {
                                      "id": 16637,
                                      "nodeType": "Block",
                                      "src": "5996:79:50",
                                      "statements": [
                                        {
                                          "expression": {
                                            "id": 16635,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftHandSide": {
                                              "id": 16630,
                                              "name": "wrappedEth",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 16572,
                                              "src": "6018:10:50",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "nodeType": "Assignment",
                                            "operator": "=",
                                            "rightHandSide": {
                                              "arguments": [
                                                {
                                                  "id": 16633,
                                                  "name": "toReceive",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 16612,
                                                  "src": "6046:9:50",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                ],
                                                "expression": {
                                                  "id": 16631,
                                                  "name": "wrappedEth",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 16572,
                                                  "src": "6031:10:50",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "id": 16632,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "add",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 3115,
                                                "src": "6031:14:50",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                }
                                              },
                                              "id": 16634,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "6031:25:50",
                                              "tryCall": false,
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            },
                                            "src": "6018:38:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "id": 16636,
                                          "nodeType": "ExpressionStatement",
                                          "src": "6018:38:50"
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 16582,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 16579,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16576,
                            "src": "5620:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 16580,
                              "name": "assets",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16522,
                              "src": "5624:6:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                "typeString": "contract IAsset[] memory"
                              }
                            },
                            "id": 16581,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "5624:13:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5620:17:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 16664,
                        "initializationExpression": {
                          "assignments": [
                            16576
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 16576,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 16664,
                              "src": "5605:9:50",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 16575,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5605:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 16578,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 16577,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5617:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "5605:13:50"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 16584,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "5639:3:50",
                            "subExpression": {
                              "id": 16583,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16576,
                              "src": "5641:1:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 16585,
                          "nodeType": "ExpressionStatement",
                          "src": "5639:3:50"
                        },
                        "nodeType": "ForStatement",
                        "src": "5600:670:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 16666,
                              "name": "wrappedEth",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16572,
                              "src": "6346:10:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 16665,
                            "name": "_handleRemainingEth",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14046,
                            "src": "6326:19:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 16667,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6326:31:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 16668,
                        "nodeType": "ExpressionStatement",
                        "src": "6326:31:50"
                      }
                    ]
                  },
                  "functionSelector": "945bcec9",
                  "id": 16670,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 16533,
                      "modifierName": {
                        "id": 16532,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "4810:12:50",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4810:12:50"
                    },
                    {
                      "id": 16535,
                      "modifierName": {
                        "id": 16534,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "4831:13:50",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4831:13:50"
                    },
                    {
                      "arguments": [
                        {
                          "expression": {
                            "id": 16537,
                            "name": "funds",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16524,
                            "src": "4869:5:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                              "typeString": "struct IVault.FundManagement memory"
                            }
                          },
                          "id": 16538,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 21176,
                          "src": "4869:12:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 16539,
                      "modifierName": {
                        "id": 16536,
                        "name": "authenticateFor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 18239,
                        "src": "4853:15:50",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_address_$",
                          "typeString": "modifier (address)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4853:29:50"
                    }
                  ],
                  "name": "batchSwap",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 16531,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4793:8:50"
                  },
                  "parameters": {
                    "id": 16530,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16516,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 16670,
                        "src": "4567:13:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        },
                        "typeName": {
                          "id": 16515,
                          "name": "SwapKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21101,
                          "src": "4567:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16519,
                        "mutability": "mutable",
                        "name": "swaps",
                        "nodeType": "VariableDeclaration",
                        "scope": 16670,
                        "src": "4590:28:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.BatchSwapStep[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16517,
                            "name": "BatchSwapStep",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 21161,
                            "src": "4590:13:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_BatchSwapStep_$21161_storage_ptr",
                              "typeString": "struct IVault.BatchSwapStep"
                            }
                          },
                          "id": 16518,
                          "nodeType": "ArrayTypeName",
                          "src": "4590:15:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.BatchSwapStep[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16522,
                        "mutability": "mutable",
                        "name": "assets",
                        "nodeType": "VariableDeclaration",
                        "scope": 16670,
                        "src": "4628:22:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                          "typeString": "contract IAsset[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16520,
                            "name": "IAsset",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20645,
                            "src": "4628:6:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAsset_$20645",
                              "typeString": "contract IAsset"
                            }
                          },
                          "id": 16521,
                          "nodeType": "ArrayTypeName",
                          "src": "4628:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                            "typeString": "contract IAsset[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16524,
                        "mutability": "mutable",
                        "name": "funds",
                        "nodeType": "VariableDeclaration",
                        "scope": 16670,
                        "src": "4660:27:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                          "typeString": "struct IVault.FundManagement"
                        },
                        "typeName": {
                          "id": 16523,
                          "name": "FundManagement",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21183,
                          "src": "4660:14:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_FundManagement_$21183_storage_ptr",
                            "typeString": "struct IVault.FundManagement"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16527,
                        "mutability": "mutable",
                        "name": "limits",
                        "nodeType": "VariableDeclaration",
                        "scope": 16670,
                        "src": "4697:22:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16525,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4697:6:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 16526,
                          "nodeType": "ArrayTypeName",
                          "src": "4697:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16529,
                        "mutability": "mutable",
                        "name": "deadline",
                        "nodeType": "VariableDeclaration",
                        "scope": 16670,
                        "src": "4729:16:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16528,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4729:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4557:194:50"
                  },
                  "returnParameters": {
                    "id": 16543,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16542,
                        "mutability": "mutable",
                        "name": "assetDeltas",
                        "nodeType": "VariableDeclaration",
                        "scope": 16670,
                        "src": "4900:27:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16540,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4900:6:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 16541,
                          "nodeType": "ArrayTypeName",
                          "src": "4900:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4899:29:50"
                  },
                  "scope": 17569,
                  "src": "4539:1825:50",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 16690,
                    "nodeType": "Block",
                    "src": "6905:70:50",
                    "statements": [
                      {
                        "expression": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            },
                            "id": 16685,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 16682,
                              "name": "kind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16673,
                              "src": "6922:4:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 16683,
                                "name": "SwapKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21101,
                                "src": "6930:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_SwapKind_$21101_$",
                                  "typeString": "type(enum IVault.SwapKind)"
                                }
                              },
                              "id": 16684,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "GIVEN_IN",
                              "nodeType": "MemberAccess",
                              "src": "6930:17:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              }
                            },
                            "src": "6922:25:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "id": 16687,
                            "name": "tokenOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16677,
                            "src": "6960:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 16688,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "6922:46:50",
                          "trueExpression": {
                            "id": 16686,
                            "name": "tokenIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16675,
                            "src": "6950:7:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "functionReturnParameters": 16681,
                        "id": 16689,
                        "nodeType": "Return",
                        "src": "6915:53:50"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 16671,
                    "nodeType": "StructuredDocumentation",
                    "src": "6605:166:50",
                    "text": " @dev Given the two swap tokens and the swap kind, returns which one is the 'given' token (the token whose\n amount is supplied by the caller)."
                  },
                  "id": 16691,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_tokenGiven",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16678,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16673,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 16691,
                        "src": "6806:13:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        },
                        "typeName": {
                          "id": 16672,
                          "name": "SwapKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21101,
                          "src": "6806:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16675,
                        "mutability": "mutable",
                        "name": "tokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 16691,
                        "src": "6829:14:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 16674,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6829:6:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16677,
                        "mutability": "mutable",
                        "name": "tokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 16691,
                        "src": "6853:15:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 16676,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6853:6:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6796:78:50"
                  },
                  "returnParameters": {
                    "id": 16681,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16680,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 16691,
                        "src": "6897:6:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 16679,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6897:6:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6896:8:50"
                  },
                  "scope": 17569,
                  "src": "6776:199:50",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 16711,
                    "nodeType": "Block",
                    "src": "7291:70:50",
                    "statements": [
                      {
                        "expression": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            },
                            "id": 16706,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 16703,
                              "name": "kind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16694,
                              "src": "7308:4:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 16704,
                                "name": "SwapKind",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 21101,
                                "src": "7316:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_SwapKind_$21101_$",
                                  "typeString": "type(enum IVault.SwapKind)"
                                }
                              },
                              "id": 16705,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "GIVEN_IN",
                              "nodeType": "MemberAccess",
                              "src": "7316:17:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              }
                            },
                            "src": "7308:25:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "id": 16708,
                            "name": "tokenIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16696,
                            "src": "7347:7:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 16709,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "7308:46:50",
                          "trueExpression": {
                            "id": 16707,
                            "name": "tokenOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16698,
                            "src": "7336:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "functionReturnParameters": 16702,
                        "id": 16710,
                        "nodeType": "Return",
                        "src": "7301:53:50"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 16692,
                    "nodeType": "StructuredDocumentation",
                    "src": "6981:171:50",
                    "text": " @dev Given the two swap tokens and the swap kind, returns which one is the 'calculated' token (the token whose\n amount is calculated by the Pool)."
                  },
                  "id": 16712,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_tokenCalculated",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16699,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16694,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 16712,
                        "src": "7192:13:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        },
                        "typeName": {
                          "id": 16693,
                          "name": "SwapKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21101,
                          "src": "7192:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16696,
                        "mutability": "mutable",
                        "name": "tokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 16712,
                        "src": "7215:14:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 16695,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7215:6:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16698,
                        "mutability": "mutable",
                        "name": "tokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 16712,
                        "src": "7239:15:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 16697,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7239:6:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7182:78:50"
                  },
                  "returnParameters": {
                    "id": 16702,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16701,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 16712,
                        "src": "7283:6:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 16700,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7283:6:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7282:8:50"
                  },
                  "scope": 17569,
                  "src": "7157:204:50",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 16749,
                    "nodeType": "Block",
                    "src": "7676:247:50",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          },
                          "id": 16729,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 16726,
                            "name": "kind",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16715,
                            "src": "7690:4:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 16727,
                              "name": "SwapKind",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 21101,
                              "src": "7698:8:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_SwapKind_$21101_$",
                                "typeString": "type(enum IVault.SwapKind)"
                              }
                            },
                            "id": 16728,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "GIVEN_IN",
                            "nodeType": "MemberAccess",
                            "src": "7698:17:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                              "typeString": "enum IVault.SwapKind"
                            }
                          },
                          "src": "7690:25:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 16747,
                          "nodeType": "Block",
                          "src": "7803:114:50",
                          "statements": [
                            {
                              "expression": {
                                "id": 16745,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "components": [
                                    {
                                      "id": 16739,
                                      "name": "amountIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16722,
                                      "src": "7852:8:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 16740,
                                      "name": "amountOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16724,
                                      "src": "7862:9:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 16741,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "TupleExpression",
                                  "src": "7851:21:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                                    "typeString": "tuple(uint256,uint256)"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "components": [
                                    {
                                      "id": 16742,
                                      "name": "amountCalculated",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16719,
                                      "src": "7876:16:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 16743,
                                      "name": "amountGiven",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16717,
                                      "src": "7894:11:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 16744,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "7875:31:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                                    "typeString": "tuple(uint256,uint256)"
                                  }
                                },
                                "src": "7851:55:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 16746,
                              "nodeType": "ExpressionStatement",
                              "src": "7851:55:50"
                            }
                          ]
                        },
                        "id": 16748,
                        "nodeType": "IfStatement",
                        "src": "7686:231:50",
                        "trueBody": {
                          "id": 16738,
                          "nodeType": "Block",
                          "src": "7717:80:50",
                          "statements": [
                            {
                              "expression": {
                                "id": 16736,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "components": [
                                    {
                                      "id": 16730,
                                      "name": "amountIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16722,
                                      "src": "7732:8:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 16731,
                                      "name": "amountOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16724,
                                      "src": "7742:9:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 16732,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "TupleExpression",
                                  "src": "7731:21:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                                    "typeString": "tuple(uint256,uint256)"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "components": [
                                    {
                                      "id": 16733,
                                      "name": "amountGiven",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16717,
                                      "src": "7756:11:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 16734,
                                      "name": "amountCalculated",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16719,
                                      "src": "7769:16:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 16735,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "7755:31:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                                    "typeString": "tuple(uint256,uint256)"
                                  }
                                },
                                "src": "7731:55:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 16737,
                              "nodeType": "ExpressionStatement",
                              "src": "7731:55:50"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 16713,
                    "nodeType": "StructuredDocumentation",
                    "src": "7367:132:50",
                    "text": " @dev Returns an ordered pair (amountIn, amountOut) given the 'given' and 'calculated' amounts, and the swap kind."
                  },
                  "id": 16750,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getAmounts",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16720,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16715,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 16750,
                        "src": "7534:13:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        },
                        "typeName": {
                          "id": 16714,
                          "name": "SwapKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21101,
                          "src": "7534:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16717,
                        "mutability": "mutable",
                        "name": "amountGiven",
                        "nodeType": "VariableDeclaration",
                        "scope": 16750,
                        "src": "7557:19:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16716,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7557:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16719,
                        "mutability": "mutable",
                        "name": "amountCalculated",
                        "nodeType": "VariableDeclaration",
                        "scope": 16750,
                        "src": "7586:24:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16718,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7586:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7524:92:50"
                  },
                  "returnParameters": {
                    "id": 16725,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16722,
                        "mutability": "mutable",
                        "name": "amountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 16750,
                        "src": "7639:16:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16721,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7639:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16724,
                        "mutability": "mutable",
                        "name": "amountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 16750,
                        "src": "7657:17:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 16723,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7657:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7638:37:50"
                  },
                  "scope": 17569,
                  "src": "7504:419:50",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 16997,
                    "nodeType": "Block",
                    "src": "8438:2944:50",
                    "statements": [
                      {
                        "expression": {
                          "id": 16774,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 16767,
                            "name": "assetDeltas",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16765,
                            "src": "8448:11:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                              "typeString": "int256[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 16771,
                                  "name": "assets",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16757,
                                  "src": "8475:6:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                    "typeString": "contract IAsset[] memory"
                                  }
                                },
                                "id": 16772,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "8475:13:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 16770,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "8462:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (int256[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 16768,
                                  "name": "int256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "8466:6:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "id": 16769,
                                "nodeType": "ArrayTypeName",
                                "src": "8466:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                                  "typeString": "int256[]"
                                }
                              }
                            },
                            "id": 16773,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8462:27:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                              "typeString": "int256[] memory"
                            }
                          },
                          "src": "8448:41:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        },
                        "id": 16775,
                        "nodeType": "ExpressionStatement",
                        "src": "8448:41:50"
                      },
                      {
                        "assignments": [
                          16777
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16777,
                            "mutability": "mutable",
                            "name": "batchSwapStep",
                            "nodeType": "VariableDeclaration",
                            "scope": 16997,
                            "src": "8667:34:50",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                              "typeString": "struct IVault.BatchSwapStep"
                            },
                            "typeName": {
                              "id": 16776,
                              "name": "BatchSwapStep",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 21161,
                              "src": "8667:13:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_BatchSwapStep_$21161_storage_ptr",
                                "typeString": "struct IVault.BatchSwapStep"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16778,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8667:34:50"
                      },
                      {
                        "assignments": [
                          16782
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16782,
                            "mutability": "mutable",
                            "name": "poolRequest",
                            "nodeType": "VariableDeclaration",
                            "scope": 16997,
                            "src": "8711:47:50",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                              "typeString": "struct IPoolSwapStructs.SwapRequest"
                            },
                            "typeName": {
                              "id": 16781,
                              "name": "IPoolSwapStructs.SwapRequest",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20803,
                              "src": "8711:28:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16783,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8711:47:50"
                      },
                      {
                        "assignments": [
                          16785
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16785,
                            "mutability": "mutable",
                            "name": "previousTokenCalculated",
                            "nodeType": "VariableDeclaration",
                            "scope": 16997,
                            "src": "8868:30:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 16784,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "8868:6:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16786,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8868:30:50"
                      },
                      {
                        "assignments": [
                          16788
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 16788,
                            "mutability": "mutable",
                            "name": "previousAmountCalculated",
                            "nodeType": "VariableDeclaration",
                            "scope": 16997,
                            "src": "8908:32:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 16787,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8908:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 16789,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8908:32:50"
                      },
                      {
                        "body": {
                          "id": 16995,
                          "nodeType": "Block",
                          "src": "8994:2382:50",
                          "statements": [
                            {
                              "expression": {
                                "id": 16805,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 16801,
                                  "name": "batchSwapStep",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16777,
                                  "src": "9008:13:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                    "typeString": "struct IVault.BatchSwapStep memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "baseExpression": {
                                    "id": 16802,
                                    "name": "swaps",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16754,
                                    "src": "9024:5:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                                      "typeString": "struct IVault.BatchSwapStep memory[] memory"
                                    }
                                  },
                                  "id": 16804,
                                  "indexExpression": {
                                    "id": 16803,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16791,
                                    "src": "9030:1:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "9024:8:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                    "typeString": "struct IVault.BatchSwapStep memory"
                                  }
                                },
                                "src": "9008:24:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                  "typeString": "struct IVault.BatchSwapStep memory"
                                }
                              },
                              "id": 16806,
                              "nodeType": "ExpressionStatement",
                              "src": "9008:24:50"
                            },
                            {
                              "assignments": [
                                16808
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16808,
                                  "mutability": "mutable",
                                  "name": "withinBounds",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16995,
                                  "src": "9047:17:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "typeName": {
                                    "id": 16807,
                                    "name": "bool",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "9047:4:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16820,
                              "initialValue": {
                                "commonType": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "id": 16819,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 16813,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "expression": {
                                      "id": 16809,
                                      "name": "batchSwapStep",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16777,
                                      "src": "9067:13:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                        "typeString": "struct IVault.BatchSwapStep memory"
                                      }
                                    },
                                    "id": 16810,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "assetInIndex",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 21154,
                                    "src": "9067:26:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "<",
                                  "rightExpression": {
                                    "expression": {
                                      "id": 16811,
                                      "name": "assets",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16757,
                                      "src": "9096:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                        "typeString": "contract IAsset[] memory"
                                      }
                                    },
                                    "id": 16812,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "length",
                                    "nodeType": "MemberAccess",
                                    "src": "9096:13:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "9067:42:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "&&",
                                "rightExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 16818,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "expression": {
                                      "id": 16814,
                                      "name": "batchSwapStep",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16777,
                                      "src": "9129:13:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                        "typeString": "struct IVault.BatchSwapStep memory"
                                      }
                                    },
                                    "id": 16815,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "assetOutIndex",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 21156,
                                    "src": "9129:27:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "<",
                                  "rightExpression": {
                                    "expression": {
                                      "id": 16816,
                                      "name": "assets",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16757,
                                      "src": "9159:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                        "typeString": "contract IAsset[] memory"
                                      }
                                    },
                                    "id": 16817,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "length",
                                    "nodeType": "MemberAccess",
                                    "src": "9159:13:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "9129:43:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "src": "9067:105:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "9047:125:50"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 16822,
                                    "name": "withinBounds",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16808,
                                    "src": "9195:12:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 16823,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "9209:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 16824,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "OUT_OF_BOUNDS",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 402,
                                    "src": "9209:20:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 16821,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "9186:8:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 16825,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9186:44:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 16826,
                              "nodeType": "ExpressionStatement",
                              "src": "9186:44:50"
                            },
                            {
                              "assignments": [
                                16828
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16828,
                                  "mutability": "mutable",
                                  "name": "tokenIn",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16995,
                                  "src": "9245:14:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 16827,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "9245:6:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16835,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 16830,
                                      "name": "assets",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16757,
                                      "src": "9281:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                        "typeString": "contract IAsset[] memory"
                                      }
                                    },
                                    "id": 16833,
                                    "indexExpression": {
                                      "expression": {
                                        "id": 16831,
                                        "name": "batchSwapStep",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16777,
                                        "src": "9288:13:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                          "typeString": "struct IVault.BatchSwapStep memory"
                                        }
                                      },
                                      "id": 16832,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "assetInIndex",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 21154,
                                      "src": "9288:26:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "9281:34:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  ],
                                  "id": 16829,
                                  "name": "_translateToIERC20",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [
                                    202,
                                    249
                                  ],
                                  "referencedDeclaration": 202,
                                  "src": "9262:18:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IAsset) view returns (contract IERC20)"
                                  }
                                },
                                "id": 16834,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9262:54:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "9245:71:50"
                            },
                            {
                              "assignments": [
                                16837
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16837,
                                  "mutability": "mutable",
                                  "name": "tokenOut",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16995,
                                  "src": "9330:15:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 16836,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "9330:6:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16844,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 16839,
                                      "name": "assets",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16757,
                                      "src": "9367:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                        "typeString": "contract IAsset[] memory"
                                      }
                                    },
                                    "id": 16842,
                                    "indexExpression": {
                                      "expression": {
                                        "id": 16840,
                                        "name": "batchSwapStep",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16777,
                                        "src": "9374:13:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                          "typeString": "struct IVault.BatchSwapStep memory"
                                        }
                                      },
                                      "id": 16841,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "assetOutIndex",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 21156,
                                      "src": "9374:27:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "9367:35:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  ],
                                  "id": 16838,
                                  "name": "_translateToIERC20",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [
                                    202,
                                    249
                                  ],
                                  "referencedDeclaration": 202,
                                  "src": "9348:18:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IAsset) view returns (contract IERC20)"
                                  }
                                },
                                "id": 16843,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9348:55:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "9330:73:50"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    "id": 16848,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 16846,
                                      "name": "tokenIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16828,
                                      "src": "9426:7:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "!=",
                                    "rightExpression": {
                                      "id": 16847,
                                      "name": "tokenOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16837,
                                      "src": "9437:8:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    "src": "9426:19:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 16849,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "9447:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 16850,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "CANNOT_SWAP_SAME_TOKEN",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 588,
                                    "src": "9447:29:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 16845,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "9417:8:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 16851,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9417:60:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 16852,
                              "nodeType": "ExpressionStatement",
                              "src": "9417:60:50"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 16856,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 16853,
                                    "name": "batchSwapStep",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16777,
                                    "src": "9545:13:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                      "typeString": "struct IVault.BatchSwapStep memory"
                                    }
                                  },
                                  "id": 16854,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "amount",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21158,
                                  "src": "9545:20:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "hexValue": "30",
                                  "id": 16855,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "9569:1:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "9545:25:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 16888,
                              "nodeType": "IfStatement",
                              "src": "9541:720:50",
                              "trueBody": {
                                "id": 16887,
                                "nodeType": "Block",
                                "src": "9572:689:50",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "commonType": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          "id": 16860,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "leftExpression": {
                                            "id": 16858,
                                            "name": "i",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 16791,
                                            "src": "9948:1:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "nodeType": "BinaryOperation",
                                          "operator": ">",
                                          "rightExpression": {
                                            "hexValue": "30",
                                            "id": 16859,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "kind": "number",
                                            "lValueRequested": false,
                                            "nodeType": "Literal",
                                            "src": "9952:1:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_rational_0_by_1",
                                              "typeString": "int_const 0"
                                            },
                                            "value": "0"
                                          },
                                          "src": "9948:5:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        },
                                        {
                                          "expression": {
                                            "id": 16861,
                                            "name": "Errors",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 655,
                                            "src": "9955:6:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                              "typeString": "type(library Errors)"
                                            }
                                          },
                                          "id": 16862,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "UNKNOWN_AMOUNT_IN_FIRST_SWAP",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 591,
                                          "src": "9955:35:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 16857,
                                        "name": "_require",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 361,
                                        "src": "9939:8:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                          "typeString": "function (bool,uint256) pure"
                                        }
                                      },
                                      "id": 16863,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "9939:52:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 16864,
                                    "nodeType": "ExpressionStatement",
                                    "src": "9939:52:50"
                                  },
                                  {
                                    "assignments": [
                                      16866
                                    ],
                                    "declarations": [
                                      {
                                        "constant": false,
                                        "id": 16866,
                                        "mutability": "mutable",
                                        "name": "usingPreviousToken",
                                        "nodeType": "VariableDeclaration",
                                        "scope": 16887,
                                        "src": "10009:23:50",
                                        "stateVariable": false,
                                        "storageLocation": "default",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        },
                                        "typeName": {
                                          "id": 16865,
                                          "name": "bool",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "10009:4:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        },
                                        "visibility": "internal"
                                      }
                                    ],
                                    "id": 16874,
                                    "initialValue": {
                                      "commonType": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      "id": 16873,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 16867,
                                        "name": "previousTokenCalculated",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16785,
                                        "src": "10035:23:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "==",
                                      "rightExpression": {
                                        "arguments": [
                                          {
                                            "id": 16869,
                                            "name": "kind",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 16761,
                                            "src": "10074:4:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                                              "typeString": "enum IVault.SwapKind"
                                            }
                                          },
                                          {
                                            "id": 16870,
                                            "name": "tokenIn",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 16828,
                                            "src": "10080:7:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_contract$_IERC20_$5095",
                                              "typeString": "contract IERC20"
                                            }
                                          },
                                          {
                                            "id": 16871,
                                            "name": "tokenOut",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 16837,
                                            "src": "10089:8:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_contract$_IERC20_$5095",
                                              "typeString": "contract IERC20"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_enum$_SwapKind_$21101",
                                              "typeString": "enum IVault.SwapKind"
                                            },
                                            {
                                              "typeIdentifier": "t_contract$_IERC20_$5095",
                                              "typeString": "contract IERC20"
                                            },
                                            {
                                              "typeIdentifier": "t_contract$_IERC20_$5095",
                                              "typeString": "contract IERC20"
                                            }
                                          ],
                                          "id": 16868,
                                          "name": "_tokenGiven",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16691,
                                          "src": "10062:11:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_internal_pure$_t_enum$_SwapKind_$21101_$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$_t_contract$_IERC20_$5095_$",
                                            "typeString": "function (enum IVault.SwapKind,contract IERC20,contract IERC20) pure returns (contract IERC20)"
                                          }
                                        },
                                        "id": 16872,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "10062:36:50",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      },
                                      "src": "10035:63:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "10009:89:50"
                                  },
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 16876,
                                          "name": "usingPreviousToken",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16866,
                                          "src": "10125:18:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        },
                                        {
                                          "expression": {
                                            "id": 16877,
                                            "name": "Errors",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 655,
                                            "src": "10145:6:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                              "typeString": "type(library Errors)"
                                            }
                                          },
                                          "id": 16878,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "MALCONSTRUCTED_MULTIHOP_SWAP",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 594,
                                          "src": "10145:35:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 16875,
                                        "name": "_require",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 361,
                                        "src": "10116:8:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                          "typeString": "function (bool,uint256) pure"
                                        }
                                      },
                                      "id": 16879,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "10116:65:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 16880,
                                    "nodeType": "ExpressionStatement",
                                    "src": "10116:65:50"
                                  },
                                  {
                                    "expression": {
                                      "id": 16885,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "expression": {
                                          "id": 16881,
                                          "name": "batchSwapStep",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16777,
                                          "src": "10199:13:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                            "typeString": "struct IVault.BatchSwapStep memory"
                                          }
                                        },
                                        "id": 16883,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": true,
                                        "memberName": "amount",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 21158,
                                        "src": "10199:20:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "id": 16884,
                                        "name": "previousAmountCalculated",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16788,
                                        "src": "10222:24:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "src": "10199:47:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 16886,
                                    "nodeType": "ExpressionStatement",
                                    "src": "10199:47:50"
                                  }
                                ]
                              }
                            },
                            {
                              "expression": {
                                "id": 16894,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 16889,
                                    "name": "poolRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16782,
                                    "src": "10371:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 16891,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "poolId",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20794,
                                  "src": "10371:18:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "expression": {
                                    "id": 16892,
                                    "name": "batchSwapStep",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16777,
                                    "src": "10392:13:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                      "typeString": "struct IVault.BatchSwapStep memory"
                                    }
                                  },
                                  "id": 16893,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "poolId",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21152,
                                  "src": "10392:20:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "10371:41:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 16895,
                              "nodeType": "ExpressionStatement",
                              "src": "10371:41:50"
                            },
                            {
                              "expression": {
                                "id": 16900,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 16896,
                                    "name": "poolRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16782,
                                    "src": "10426:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 16898,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "kind",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20786,
                                  "src": "10426:16:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_SwapKind_$21101",
                                    "typeString": "enum IVault.SwapKind"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 16899,
                                  "name": "kind",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16761,
                                  "src": "10445:4:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_SwapKind_$21101",
                                    "typeString": "enum IVault.SwapKind"
                                  }
                                },
                                "src": "10426:23:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_SwapKind_$21101",
                                  "typeString": "enum IVault.SwapKind"
                                }
                              },
                              "id": 16901,
                              "nodeType": "ExpressionStatement",
                              "src": "10426:23:50"
                            },
                            {
                              "expression": {
                                "id": 16906,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 16902,
                                    "name": "poolRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16782,
                                    "src": "10463:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 16904,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "tokenIn",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20788,
                                  "src": "10463:19:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 16905,
                                  "name": "tokenIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16828,
                                  "src": "10485:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "10463:29:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 16907,
                              "nodeType": "ExpressionStatement",
                              "src": "10463:29:50"
                            },
                            {
                              "expression": {
                                "id": 16912,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 16908,
                                    "name": "poolRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16782,
                                    "src": "10506:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 16910,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "tokenOut",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20790,
                                  "src": "10506:20:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 16911,
                                  "name": "tokenOut",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16837,
                                  "src": "10529:8:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "10506:31:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 16913,
                              "nodeType": "ExpressionStatement",
                              "src": "10506:31:50"
                            },
                            {
                              "expression": {
                                "id": 16919,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 16914,
                                    "name": "poolRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16782,
                                    "src": "10551:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 16916,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "amount",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20792,
                                  "src": "10551:18:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "expression": {
                                    "id": 16917,
                                    "name": "batchSwapStep",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16777,
                                    "src": "10572:13:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                      "typeString": "struct IVault.BatchSwapStep memory"
                                    }
                                  },
                                  "id": 16918,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "amount",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21158,
                                  "src": "10572:20:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "10551:41:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 16920,
                              "nodeType": "ExpressionStatement",
                              "src": "10551:41:50"
                            },
                            {
                              "expression": {
                                "id": 16926,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 16921,
                                    "name": "poolRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16782,
                                    "src": "10606:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 16923,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "userData",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20802,
                                  "src": "10606:20:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "expression": {
                                    "id": 16924,
                                    "name": "batchSwapStep",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16777,
                                    "src": "10629:13:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                      "typeString": "struct IVault.BatchSwapStep memory"
                                    }
                                  },
                                  "id": 16925,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "userData",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21160,
                                  "src": "10629:22:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes_memory_ptr",
                                    "typeString": "bytes memory"
                                  }
                                },
                                "src": "10606:45:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              },
                              "id": 16927,
                              "nodeType": "ExpressionStatement",
                              "src": "10606:45:50"
                            },
                            {
                              "expression": {
                                "id": 16933,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 16928,
                                    "name": "poolRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16782,
                                    "src": "10665:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 16930,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "from",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20798,
                                  "src": "10665:16:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "expression": {
                                    "id": 16931,
                                    "name": "funds",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16759,
                                    "src": "10684:5:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                      "typeString": "struct IVault.FundManagement memory"
                                    }
                                  },
                                  "id": 16932,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "sender",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21176,
                                  "src": "10684:12:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "src": "10665:31:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "id": 16934,
                              "nodeType": "ExpressionStatement",
                              "src": "10665:31:50"
                            },
                            {
                              "expression": {
                                "id": 16940,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 16935,
                                    "name": "poolRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16782,
                                    "src": "10710:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 16937,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "to",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20800,
                                  "src": "10710:14:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "expression": {
                                    "id": 16938,
                                    "name": "funds",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16759,
                                    "src": "10727:5:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                      "typeString": "struct IVault.FundManagement memory"
                                    }
                                  },
                                  "id": 16939,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "recipient",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 21180,
                                  "src": "10727:15:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  }
                                },
                                "src": "10710:32:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "id": 16941,
                              "nodeType": "ExpressionStatement",
                              "src": "10710:32:50"
                            },
                            {
                              "assignments": [
                                16943
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16943,
                                  "mutability": "mutable",
                                  "name": "amountIn",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16995,
                                  "src": "10820:16:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 16942,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "10820:7:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16944,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "10820:16:50"
                            },
                            {
                              "assignments": [
                                16946
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 16946,
                                  "mutability": "mutable",
                                  "name": "amountOut",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 16995,
                                  "src": "10850:17:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 16945,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "10850:7:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 16947,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "10850:17:50"
                            },
                            {
                              "expression": {
                                "id": 16955,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "components": [
                                    {
                                      "id": 16948,
                                      "name": "previousAmountCalculated",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16788,
                                      "src": "10882:24:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 16949,
                                      "name": "amountIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16943,
                                      "src": "10908:8:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 16950,
                                      "name": "amountOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16946,
                                      "src": "10918:9:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 16951,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "TupleExpression",
                                  "src": "10881:47:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                                    "typeString": "tuple(uint256,uint256,uint256)"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 16953,
                                      "name": "poolRequest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16782,
                                      "src": "10945:11:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                        "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                        "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                      }
                                    ],
                                    "id": 16952,
                                    "name": "_swapWithPool",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17088,
                                    "src": "10931:13:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$returns$_t_uint256_$_t_uint256_$_t_uint256_$",
                                      "typeString": "function (struct IPoolSwapStructs.SwapRequest memory) returns (uint256,uint256,uint256)"
                                    }
                                  },
                                  "id": 16954,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "10931:26:50",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                                    "typeString": "tuple(uint256,uint256,uint256)"
                                  }
                                },
                                "src": "10881:76:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 16956,
                              "nodeType": "ExpressionStatement",
                              "src": "10881:76:50"
                            },
                            {
                              "expression": {
                                "id": 16963,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 16957,
                                  "name": "previousTokenCalculated",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16785,
                                  "src": "10972:23:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 16959,
                                      "name": "kind",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16761,
                                      "src": "11015:4:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_SwapKind_$21101",
                                        "typeString": "enum IVault.SwapKind"
                                      }
                                    },
                                    {
                                      "id": 16960,
                                      "name": "tokenIn",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16828,
                                      "src": "11021:7:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "id": 16961,
                                      "name": "tokenOut",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16837,
                                      "src": "11030:8:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_enum$_SwapKind_$21101",
                                        "typeString": "enum IVault.SwapKind"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    ],
                                    "id": 16958,
                                    "name": "_tokenCalculated",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16712,
                                    "src": "10998:16:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_enum$_SwapKind_$21101_$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$_t_contract$_IERC20_$5095_$",
                                      "typeString": "function (enum IVault.SwapKind,contract IERC20,contract IERC20) pure returns (contract IERC20)"
                                    }
                                  },
                                  "id": 16962,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "10998:41:50",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "10972:67:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 16964,
                              "nodeType": "ExpressionStatement",
                              "src": "10972:67:50"
                            },
                            {
                              "expression": {
                                "id": 16978,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 16965,
                                    "name": "assetDeltas",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16765,
                                    "src": "11106:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                      "typeString": "int256[] memory"
                                    }
                                  },
                                  "id": 16968,
                                  "indexExpression": {
                                    "expression": {
                                      "id": 16966,
                                      "name": "batchSwapStep",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16777,
                                      "src": "11118:13:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                        "typeString": "struct IVault.BatchSwapStep memory"
                                      }
                                    },
                                    "id": 16967,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "assetInIndex",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 21154,
                                    "src": "11118:26:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "11106:39:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "expression": {
                                          "id": 16974,
                                          "name": "amountIn",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16943,
                                          "src": "11192:8:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 16975,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "toInt256",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 5215,
                                        "src": "11192:17:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_int256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256) pure returns (int256)"
                                        }
                                      },
                                      "id": 16976,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "11192:19:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 16969,
                                        "name": "assetDeltas",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16765,
                                        "src": "11148:11:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                          "typeString": "int256[] memory"
                                        }
                                      },
                                      "id": 16972,
                                      "indexExpression": {
                                        "expression": {
                                          "id": 16970,
                                          "name": "batchSwapStep",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16777,
                                          "src": "11160:13:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                            "typeString": "struct IVault.BatchSwapStep memory"
                                          }
                                        },
                                        "id": 16971,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "assetInIndex",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 21154,
                                        "src": "11160:26:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "11148:39:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "id": 16973,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3156,
                                    "src": "11148:43:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                                      "typeString": "function (int256,int256) pure returns (int256)"
                                    }
                                  },
                                  "id": 16977,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11148:64:50",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "11106:106:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 16979,
                              "nodeType": "ExpressionStatement",
                              "src": "11106:106:50"
                            },
                            {
                              "expression": {
                                "id": 16993,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 16980,
                                    "name": "assetDeltas",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 16765,
                                    "src": "11226:11:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                      "typeString": "int256[] memory"
                                    }
                                  },
                                  "id": 16983,
                                  "indexExpression": {
                                    "expression": {
                                      "id": 16981,
                                      "name": "batchSwapStep",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 16777,
                                      "src": "11238:13:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                        "typeString": "struct IVault.BatchSwapStep memory"
                                      }
                                    },
                                    "id": 16982,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "assetOutIndex",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 21156,
                                    "src": "11238:27:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "11226:40:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "expression": {
                                          "id": 16989,
                                          "name": "amountOut",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16946,
                                          "src": "11331:9:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "id": 16990,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "toInt256",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 5215,
                                        "src": "11331:18:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_int256_$bound_to$_t_uint256_$",
                                          "typeString": "function (uint256) pure returns (int256)"
                                        }
                                      },
                                      "id": 16991,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "11331:20:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    ],
                                    "expression": {
                                      "baseExpression": {
                                        "id": 16984,
                                        "name": "assetDeltas",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 16765,
                                        "src": "11269:11:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                          "typeString": "int256[] memory"
                                        }
                                      },
                                      "id": 16987,
                                      "indexExpression": {
                                        "expression": {
                                          "id": 16985,
                                          "name": "batchSwapStep",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 16777,
                                          "src": "11281:13:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_struct$_BatchSwapStep_$21161_memory_ptr",
                                            "typeString": "struct IVault.BatchSwapStep memory"
                                          }
                                        },
                                        "id": 16986,
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "assetOutIndex",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 21156,
                                        "src": "11281:27:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "11269:40:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "id": 16988,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sub",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3224,
                                    "src": "11269:44:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                                      "typeString": "function (int256,int256) pure returns (int256)"
                                    }
                                  },
                                  "id": 16992,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "11269:96:50",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "11226:139:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 16994,
                              "nodeType": "ExpressionStatement",
                              "src": "11226:139:50"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 16797,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 16794,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16791,
                            "src": "8971:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 16795,
                              "name": "swaps",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16754,
                              "src": "8975:5:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                                "typeString": "struct IVault.BatchSwapStep memory[] memory"
                              }
                            },
                            "id": 16796,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "8975:12:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8971:16:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 16996,
                        "initializationExpression": {
                          "assignments": [
                            16791
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 16791,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 16996,
                              "src": "8956:9:50",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 16790,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "8956:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 16793,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 16792,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "8968:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "8956:13:50"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 16799,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "8989:3:50",
                            "subExpression": {
                              "id": 16798,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16791,
                              "src": "8991:1:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 16800,
                          "nodeType": "ExpressionStatement",
                          "src": "8989:3:50"
                        },
                        "nodeType": "ForStatement",
                        "src": "8951:2425:50"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 16751,
                    "nodeType": "StructuredDocumentation",
                    "src": "7929:298:50",
                    "text": " @dev Performs all `swaps`, calling swap hooks on the Pool contracts and updating their balances. Does not cause\n any transfer of tokens - instead it returns the net Vault token deltas: positive if the Vault should receive\n tokens, and negative if it should send them."
                  },
                  "id": 16998,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_swapWithPools",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 16762,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16754,
                        "mutability": "mutable",
                        "name": "swaps",
                        "nodeType": "VariableDeclaration",
                        "scope": 16998,
                        "src": "8265:28:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.BatchSwapStep[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16752,
                            "name": "BatchSwapStep",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 21161,
                            "src": "8265:13:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_BatchSwapStep_$21161_storage_ptr",
                              "typeString": "struct IVault.BatchSwapStep"
                            }
                          },
                          "id": 16753,
                          "nodeType": "ArrayTypeName",
                          "src": "8265:15:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.BatchSwapStep[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16757,
                        "mutability": "mutable",
                        "name": "assets",
                        "nodeType": "VariableDeclaration",
                        "scope": 16998,
                        "src": "8303:22:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                          "typeString": "contract IAsset[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16755,
                            "name": "IAsset",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20645,
                            "src": "8303:6:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAsset_$20645",
                              "typeString": "contract IAsset"
                            }
                          },
                          "id": 16756,
                          "nodeType": "ArrayTypeName",
                          "src": "8303:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                            "typeString": "contract IAsset[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16759,
                        "mutability": "mutable",
                        "name": "funds",
                        "nodeType": "VariableDeclaration",
                        "scope": 16998,
                        "src": "8335:27:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                          "typeString": "struct IVault.FundManagement"
                        },
                        "typeName": {
                          "id": 16758,
                          "name": "FundManagement",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21183,
                          "src": "8335:14:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_FundManagement_$21183_storage_ptr",
                            "typeString": "struct IVault.FundManagement"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 16761,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 16998,
                        "src": "8372:13:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        },
                        "typeName": {
                          "id": 16760,
                          "name": "SwapKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21101,
                          "src": "8372:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8255:136:50"
                  },
                  "returnParameters": {
                    "id": 16766,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 16765,
                        "mutability": "mutable",
                        "name": "assetDeltas",
                        "nodeType": "VariableDeclaration",
                        "scope": 16998,
                        "src": "8409:27:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 16763,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "8409:6:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 16764,
                          "nodeType": "ArrayTypeName",
                          "src": "8409:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8408:29:50"
                  },
                  "scope": 17569,
                  "src": "8232:3150:50",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 17087,
                    "nodeType": "Block",
                    "src": "11899:917:50",
                    "statements": [
                      {
                        "assignments": [
                          17011
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17011,
                            "mutability": "mutable",
                            "name": "pool",
                            "nodeType": "VariableDeclaration",
                            "scope": 17087,
                            "src": "11984:12:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 17010,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "11984:7:50",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17016,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17013,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17001,
                                "src": "12015:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17014,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "poolId",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20794,
                              "src": "12015:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 17012,
                            "name": "_getPoolAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15568,
                            "src": "11999:15:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_address_$",
                              "typeString": "function (bytes32) pure returns (address)"
                            }
                          },
                          "id": 17015,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11999:31:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11984:46:50"
                      },
                      {
                        "assignments": [
                          17018
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17018,
                            "mutability": "mutable",
                            "name": "specialization",
                            "nodeType": "VariableDeclaration",
                            "scope": 17087,
                            "src": "12040:33:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "typeName": {
                              "id": 17017,
                              "name": "PoolSpecialization",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 20940,
                              "src": "12040:18:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17023,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17020,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17001,
                                "src": "12099:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17021,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "poolId",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20794,
                              "src": "12099:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 17019,
                            "name": "_getPoolSpecialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 15608,
                            "src": "12076:22:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_enum$_PoolSpecialization_$20940_$",
                              "typeString": "function (bytes32) pure returns (enum IVault.PoolSpecialization)"
                            }
                          },
                          "id": 17022,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12076:38:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12040:74:50"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          },
                          "id": 17027,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 17024,
                            "name": "specialization",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17018,
                            "src": "12129:14:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "expression": {
                              "id": 17025,
                              "name": "PoolSpecialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20940,
                              "src": "12147:18:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                "typeString": "type(enum IVault.PoolSpecialization)"
                              }
                            },
                            "id": 17026,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "TWO_TOKEN",
                            "nodeType": "MemberAccess",
                            "src": "12147:28:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            }
                          },
                          "src": "12129:46:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                              "typeString": "enum IVault.PoolSpecialization"
                            },
                            "id": 17041,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 17038,
                              "name": "specialization",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17018,
                              "src": "12299:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "expression": {
                                "id": 17039,
                                "name": "PoolSpecialization",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20940,
                                "src": "12317:18:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_PoolSpecialization_$20940_$",
                                  "typeString": "type(enum IVault.PoolSpecialization)"
                                }
                              },
                              "id": 17040,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "MINIMAL_SWAP_INFO",
                              "nodeType": "MemberAccess",
                              "src": "12317:36:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                                "typeString": "enum IVault.PoolSpecialization"
                              }
                            },
                            "src": "12299:54:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 17061,
                            "nodeType": "Block",
                            "src": "12480:145:50",
                            "statements": [
                              {
                                "expression": {
                                  "id": 17059,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 17052,
                                    "name": "amountCalculated",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17004,
                                    "src": "12536:16:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "arguments": [
                                      {
                                        "id": 17054,
                                        "name": "request",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17001,
                                        "src": "12586:7:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                          "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                        }
                                      },
                                      {
                                        "arguments": [
                                          {
                                            "id": 17056,
                                            "name": "pool",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 17011,
                                            "src": "12608:4:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_address",
                                              "typeString": "address"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_address",
                                              "typeString": "address"
                                            }
                                          ],
                                          "id": 17055,
                                          "name": "IGeneralPool",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 20760,
                                          "src": "12595:12:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_contract$_IGeneralPool_$20760_$",
                                            "typeString": "type(contract IGeneralPool)"
                                          }
                                        },
                                        "id": 17057,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "12595:18:50",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IGeneralPool_$20760",
                                          "typeString": "contract IGeneralPool"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                          "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                        },
                                        {
                                          "typeIdentifier": "t_contract$_IGeneralPool_$20760",
                                          "typeString": "contract IGeneralPool"
                                        }
                                      ],
                                      "id": 17053,
                                      "name": "_processGeneralPoolSwapRequest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17515,
                                      "src": "12555:30:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_contract$_IGeneralPool_$20760_$returns$_t_uint256_$",
                                        "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,contract IGeneralPool) returns (uint256)"
                                      }
                                    },
                                    "id": 17058,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "12555:59:50",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "12536:78:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 17060,
                                "nodeType": "ExpressionStatement",
                                "src": "12536:78:50"
                              }
                            ]
                          },
                          "id": 17062,
                          "nodeType": "IfStatement",
                          "src": "12295:330:50",
                          "trueBody": {
                            "id": 17051,
                            "nodeType": "Block",
                            "src": "12355:119:50",
                            "statements": [
                              {
                                "expression": {
                                  "id": 17049,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftHandSide": {
                                    "id": 17042,
                                    "name": "amountCalculated",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17004,
                                    "src": "12369:16:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "Assignment",
                                  "operator": "=",
                                  "rightHandSide": {
                                    "arguments": [
                                      {
                                        "id": 17044,
                                        "name": "request",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17001,
                                        "src": "12427:7:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                          "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                        }
                                      },
                                      {
                                        "arguments": [
                                          {
                                            "id": 17046,
                                            "name": "pool",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 17011,
                                            "src": "12457:4:50",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_address",
                                              "typeString": "address"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_address",
                                              "typeString": "address"
                                            }
                                          ],
                                          "id": 17045,
                                          "name": "IMinimalSwapInfoPool",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 20779,
                                          "src": "12436:20:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_contract$_IMinimalSwapInfoPool_$20779_$",
                                            "typeString": "type(contract IMinimalSwapInfoPool)"
                                          }
                                        },
                                        "id": 17047,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "12436:26:50",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                          "typeString": "contract IMinimalSwapInfoPool"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                          "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                        },
                                        {
                                          "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                          "typeString": "contract IMinimalSwapInfoPool"
                                        }
                                      ],
                                      "id": 17043,
                                      "name": "_processMinimalSwapInfoPoolSwapRequest",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17236,
                                      "src": "12388:38:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_contract$_IMinimalSwapInfoPool_$20779_$returns$_t_uint256_$",
                                        "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,contract IMinimalSwapInfoPool) returns (uint256)"
                                      }
                                    },
                                    "id": 17048,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "12388:75:50",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "12369:94:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 17050,
                                "nodeType": "ExpressionStatement",
                                "src": "12369:94:50"
                              }
                            ]
                          }
                        },
                        "id": 17063,
                        "nodeType": "IfStatement",
                        "src": "12125:500:50",
                        "trueBody": {
                          "id": 17037,
                          "nodeType": "Block",
                          "src": "12177:112:50",
                          "statements": [
                            {
                              "expression": {
                                "id": 17035,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 17028,
                                  "name": "amountCalculated",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17004,
                                  "src": "12191:16:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 17030,
                                      "name": "request",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17001,
                                      "src": "12242:7:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                        "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                      }
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "id": 17032,
                                          "name": "pool",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 17011,
                                          "src": "12272:4:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          }
                                        ],
                                        "id": 17031,
                                        "name": "IMinimalSwapInfoPool",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 20779,
                                        "src": "12251:20:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_contract$_IMinimalSwapInfoPool_$20779_$",
                                          "typeString": "type(contract IMinimalSwapInfoPool)"
                                        }
                                      },
                                      "id": 17033,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "12251:26:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                        "typeString": "contract IMinimalSwapInfoPool"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                        "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                        "typeString": "contract IMinimalSwapInfoPool"
                                      }
                                    ],
                                    "id": 17029,
                                    "name": "_processTwoTokenPoolSwapRequest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17176,
                                    "src": "12210:31:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_contract$_IMinimalSwapInfoPool_$20779_$returns$_t_uint256_$",
                                      "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,contract IMinimalSwapInfoPool) returns (uint256)"
                                    }
                                  },
                                  "id": 17034,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "12210:68:50",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "12191:87:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 17036,
                              "nodeType": "ExpressionStatement",
                              "src": "12191:87:50"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 17074,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 17064,
                                "name": "amountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17006,
                                "src": "12636:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 17065,
                                "name": "amountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17008,
                                "src": "12646:9:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 17066,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "12635:21:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(uint256,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 17068,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17001,
                                  "src": "12671:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 17069,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "kind",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20786,
                                "src": "12671:12:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_enum$_SwapKind_$21101",
                                  "typeString": "enum IVault.SwapKind"
                                }
                              },
                              {
                                "expression": {
                                  "id": 17070,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17001,
                                  "src": "12685:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 17071,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "amount",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20792,
                                "src": "12685:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 17072,
                                "name": "amountCalculated",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17004,
                                "src": "12701:16:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_enum$_SwapKind_$21101",
                                  "typeString": "enum IVault.SwapKind"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 17067,
                              "name": "_getAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 16750,
                              "src": "12659:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_enum$_SwapKind_$21101_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
                                "typeString": "function (enum IVault.SwapKind,uint256,uint256) pure returns (uint256,uint256)"
                              }
                            },
                            "id": 17073,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "12659:59:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                              "typeString": "tuple(uint256,uint256)"
                            }
                          },
                          "src": "12635:83:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17075,
                        "nodeType": "ExpressionStatement",
                        "src": "12635:83:50"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17077,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17001,
                                "src": "12738:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17078,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "poolId",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20794,
                              "src": "12738:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "expression": {
                                "id": 17079,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17001,
                                "src": "12754:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17080,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20788,
                              "src": "12754:15:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 17081,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17001,
                                "src": "12771:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17082,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20790,
                              "src": "12771:16:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 17083,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17006,
                              "src": "12789:8:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 17084,
                              "name": "amountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17008,
                              "src": "12799:9:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 17076,
                            "name": "Swap",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 21174,
                            "src": "12733:4:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (bytes32,contract IERC20,contract IERC20,uint256,uint256)"
                            }
                          },
                          "id": 17085,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12733:76:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17086,
                        "nodeType": "EmitStatement",
                        "src": "12728:81:50"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 16999,
                    "nodeType": "StructuredDocumentation",
                    "src": "11388:292:50",
                    "text": " @dev Performs a swap according to the parameters specified in `request`, calling the Pool's contract hook and\n updating the Pool's balance.\n Returns the amount of tokens going into or out of the Vault as a result of this swap, depending on the swap kind."
                  },
                  "id": 17088,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_swapWithPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17002,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17001,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 17088,
                        "src": "11708:43:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 17000,
                          "name": "IPoolSwapStructs.SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "11708:28:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11707:45:50"
                  },
                  "returnParameters": {
                    "id": 17009,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17004,
                        "mutability": "mutable",
                        "name": "amountCalculated",
                        "nodeType": "VariableDeclaration",
                        "scope": 17088,
                        "src": "11799:24:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17003,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11799:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17006,
                        "mutability": "mutable",
                        "name": "amountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 17088,
                        "src": "11837:16:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17005,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11837:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17008,
                        "mutability": "mutable",
                        "name": "amountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 17088,
                        "src": "11867:17:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17007,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11867:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11785:109:50"
                  },
                  "scope": 17569,
                  "src": "11685:1131:50",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 17175,
                    "nodeType": "Block",
                    "src": "12998:1673:50",
                    "statements": [
                      {
                        "assignments": [
                          17098,
                          17100,
                          17102
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17098,
                            "mutability": "mutable",
                            "name": "tokenABalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17175,
                            "src": "13223:21:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 17097,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "13223:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 17100,
                            "mutability": "mutable",
                            "name": "tokenBBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17175,
                            "src": "13258:21:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 17099,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "13258:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 17102,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 17175,
                            "src": "13293:41:50",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                            },
                            "typeName": {
                              "id": 17101,
                              "name": "TwoTokenPoolBalances",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19934,
                              "src": "13293:20:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17111,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17104,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17090,
                                "src": "13378:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17105,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "poolId",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20794,
                              "src": "13378:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "expression": {
                                "id": 17106,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17090,
                                "src": "13394:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17107,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20788,
                              "src": "13394:15:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 17108,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17090,
                                "src": "13411:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17109,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20790,
                              "src": "13411:16:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 17103,
                            "name": "_getTwoTokenPoolSharedBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20563,
                            "src": "13347:30:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$",
                              "typeString": "function (bytes32,contract IERC20,contract IERC20) view returns (bytes32,bytes32,struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer)"
                            }
                          },
                          "id": 17110,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13347:81:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_bytes32_$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$",
                            "typeString": "tuple(bytes32,bytes32,struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13209:219:50"
                      },
                      {
                        "assignments": [
                          17113
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17113,
                            "mutability": "mutable",
                            "name": "tokenInBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17175,
                            "src": "13539:22:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 17112,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "13539:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17114,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13539:22:50"
                      },
                      {
                        "assignments": [
                          17116
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17116,
                            "mutability": "mutable",
                            "name": "tokenOutBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17175,
                            "src": "13571:23:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 17115,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "13571:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17117,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13571:23:50"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          },
                          "id": 17122,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 17118,
                              "name": "request",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17090,
                              "src": "13683:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 17119,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "tokenIn",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20788,
                            "src": "13683:15:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 17120,
                              "name": "request",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17090,
                              "src": "13701:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 17121,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "tokenOut",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20790,
                            "src": "13701:16:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "13683:34:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 17140,
                          "nodeType": "Block",
                          "src": "13858:133:50",
                          "statements": [
                            {
                              "expression": {
                                "id": 17134,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 17132,
                                  "name": "tokenOutBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17116,
                                  "src": "13905:15:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 17133,
                                  "name": "tokenABalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17098,
                                  "src": "13923:13:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "13905:31:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 17135,
                              "nodeType": "ExpressionStatement",
                              "src": "13905:31:50"
                            },
                            {
                              "expression": {
                                "id": 17138,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 17136,
                                  "name": "tokenInBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17113,
                                  "src": "13950:14:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 17137,
                                  "name": "tokenBBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17100,
                                  "src": "13967:13:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "13950:30:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 17139,
                              "nodeType": "ExpressionStatement",
                              "src": "13950:30:50"
                            }
                          ]
                        },
                        "id": 17141,
                        "nodeType": "IfStatement",
                        "src": "13679:312:50",
                        "trueBody": {
                          "id": 17131,
                          "nodeType": "Block",
                          "src": "13719:133:50",
                          "statements": [
                            {
                              "expression": {
                                "id": 17125,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 17123,
                                  "name": "tokenInBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17113,
                                  "src": "13766:14:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 17124,
                                  "name": "tokenABalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17098,
                                  "src": "13783:13:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "13766:30:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 17126,
                              "nodeType": "ExpressionStatement",
                              "src": "13766:30:50"
                            },
                            {
                              "expression": {
                                "id": 17129,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 17127,
                                  "name": "tokenOutBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17116,
                                  "src": "13810:15:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 17128,
                                  "name": "tokenBBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17100,
                                  "src": "13828:13:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "13810:31:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 17130,
                              "nodeType": "ExpressionStatement",
                              "src": "13810:31:50"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 17152,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 17142,
                                "name": "tokenInBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17113,
                                "src": "14113:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 17143,
                                "name": "tokenOutBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17116,
                                "src": "14129:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 17144,
                                "name": "amountCalculated",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17095,
                                "src": "14146:16:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 17145,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "14112:51:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_bytes32_$_t_bytes32_$_t_uint256_$",
                              "typeString": "tuple(bytes32,bytes32,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17147,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17090,
                                "src": "14214:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              {
                                "id": 17148,
                                "name": "pool",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17092,
                                "src": "14235:4:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                  "typeString": "contract IMinimalSwapInfoPool"
                                }
                              },
                              {
                                "id": 17149,
                                "name": "tokenInBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17113,
                                "src": "14253:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 17150,
                                "name": "tokenOutBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17116,
                                "src": "14281:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                },
                                {
                                  "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                  "typeString": "contract IMinimalSwapInfoPool"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 17146,
                              "name": "_callMinimalSwapInfoPoolOnSwapHook",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17316,
                              "src": "14166:34:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_contract$_IMinimalSwapInfoPool_$20779_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$_t_bytes32_$_t_uint256_$",
                                "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,contract IMinimalSwapInfoPool,bytes32,bytes32) returns (bytes32,bytes32,uint256)"
                              }
                            },
                            "id": 17151,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "14166:140:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_bytes32_$_t_bytes32_$_t_uint256_$",
                              "typeString": "tuple(bytes32,bytes32,uint256)"
                            }
                          },
                          "src": "14112:194:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17153,
                        "nodeType": "ExpressionStatement",
                        "src": "14112:194:50"
                      },
                      {
                        "expression": {
                          "id": 17173,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 17154,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17102,
                              "src": "14406:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                              }
                            },
                            "id": 17156,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "sharedCash",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19931,
                            "src": "14406:23:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "condition": {
                              "commonType": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              "id": 17161,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 17157,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17090,
                                  "src": "14432:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 17158,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "tokenIn",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20788,
                                "src": "14432:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "expression": {
                                  "id": 17159,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17090,
                                  "src": "14450:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 17160,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "tokenOut",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20790,
                                "src": "14450:16:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "src": "14432:34:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "arguments": [
                                {
                                  "id": 17169,
                                  "name": "tokenOutBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17116,
                                  "src": "14611:15:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 17170,
                                  "name": "tokenInBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17113,
                                  "src": "14628:14:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "expression": {
                                  "id": 17167,
                                  "name": "BalanceAllocation",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19057,
                                  "src": "14580:17:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                    "typeString": "type(library BalanceAllocation)"
                                  }
                                },
                                "id": 17168,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "toSharedCash",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 19007,
                                "src": "14580:30:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                                }
                              },
                              "id": 17171,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "14580:63:50",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "id": 17172,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "14432:211:50",
                            "trueExpression": {
                              "arguments": [
                                {
                                  "id": 17164,
                                  "name": "tokenInBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17113,
                                  "src": "14512:14:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                {
                                  "id": 17165,
                                  "name": "tokenOutBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17116,
                                  "src": "14528:15:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "expression": {
                                  "id": 17162,
                                  "name": "BalanceAllocation",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19057,
                                  "src": "14481:17:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                    "typeString": "type(library BalanceAllocation)"
                                  }
                                },
                                "id": 17163,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "toSharedCash",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 19007,
                                "src": "14481:30:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                  "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                                }
                              },
                              "id": 17166,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "14481:63:50",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "14406:237:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 17174,
                        "nodeType": "ExpressionStatement",
                        "src": "14406:237:50"
                      }
                    ]
                  },
                  "id": 17176,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_processTwoTokenPoolSwapRequest",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17093,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17090,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 17176,
                        "src": "12863:43:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 17089,
                          "name": "IPoolSwapStructs.SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "12863:28:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17092,
                        "mutability": "mutable",
                        "name": "pool",
                        "nodeType": "VariableDeclaration",
                        "scope": 17176,
                        "src": "12908:25:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                          "typeString": "contract IMinimalSwapInfoPool"
                        },
                        "typeName": {
                          "id": 17091,
                          "name": "IMinimalSwapInfoPool",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20779,
                          "src": "12908:20:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                            "typeString": "contract IMinimalSwapInfoPool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12862:72:50"
                  },
                  "returnParameters": {
                    "id": 17096,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17095,
                        "mutability": "mutable",
                        "name": "amountCalculated",
                        "nodeType": "VariableDeclaration",
                        "scope": 17176,
                        "src": "12968:24:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17094,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "12968:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12967:26:50"
                  },
                  "scope": 17569,
                  "src": "12822:1849:50",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 17235,
                    "nodeType": "Block",
                    "src": "14862:702:50",
                    "statements": [
                      {
                        "assignments": [
                          17186
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17186,
                            "mutability": "mutable",
                            "name": "tokenInBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17235,
                            "src": "14872:22:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 17185,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "14872:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17193,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17188,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17178,
                                "src": "14928:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17189,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "poolId",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20794,
                              "src": "14928:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "expression": {
                                "id": 17190,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17178,
                                "src": "14944:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17191,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20788,
                              "src": "14944:15:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 17187,
                            "name": "_getMinimalSwapInfoPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19889,
                            "src": "14897:30:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                              "typeString": "function (bytes32,contract IERC20) view returns (bytes32)"
                            }
                          },
                          "id": 17192,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14897:63:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14872:88:50"
                      },
                      {
                        "assignments": [
                          17195
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17195,
                            "mutability": "mutable",
                            "name": "tokenOutBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17235,
                            "src": "14970:23:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 17194,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "14970:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17202,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17197,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17178,
                                "src": "15027:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17198,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "poolId",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20794,
                              "src": "15027:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "expression": {
                                "id": 17199,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17178,
                                "src": "15043:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17200,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20790,
                              "src": "15043:16:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 17196,
                            "name": "_getMinimalSwapInfoPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19889,
                            "src": "14996:30:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                              "typeString": "function (bytes32,contract IERC20) view returns (bytes32)"
                            }
                          },
                          "id": 17201,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14996:64:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14970:90:50"
                      },
                      {
                        "expression": {
                          "id": 17213,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "components": [
                              {
                                "id": 17203,
                                "name": "tokenInBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17186,
                                "src": "15183:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 17204,
                                "name": "tokenOutBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17195,
                                "src": "15199:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 17205,
                                "name": "amountCalculated",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17183,
                                "src": "15216:16:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 17206,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "TupleExpression",
                            "src": "15182:51:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_bytes32_$_t_bytes32_$_t_uint256_$",
                              "typeString": "tuple(bytes32,bytes32,uint256)"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17208,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17178,
                                "src": "15284:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              {
                                "id": 17209,
                                "name": "pool",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17180,
                                "src": "15305:4:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                  "typeString": "contract IMinimalSwapInfoPool"
                                }
                              },
                              {
                                "id": 17210,
                                "name": "tokenInBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17186,
                                "src": "15323:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 17211,
                                "name": "tokenOutBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17195,
                                "src": "15351:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                },
                                {
                                  "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                  "typeString": "contract IMinimalSwapInfoPool"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 17207,
                              "name": "_callMinimalSwapInfoPoolOnSwapHook",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17316,
                              "src": "15236:34:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_contract$_IMinimalSwapInfoPool_$20779_$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$_t_bytes32_$_t_uint256_$",
                                "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,contract IMinimalSwapInfoPool,bytes32,bytes32) returns (bytes32,bytes32,uint256)"
                              }
                            },
                            "id": 17212,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "15236:140:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_bytes32_$_t_bytes32_$_t_uint256_$",
                              "typeString": "tuple(bytes32,bytes32,uint256)"
                            }
                          },
                          "src": "15182:194:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17214,
                        "nodeType": "ExpressionStatement",
                        "src": "15182:194:50"
                      },
                      {
                        "expression": {
                          "id": 17223,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "baseExpression": {
                                "id": 17215,
                                "name": "_minimalSwapInfoPoolsBalances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19489,
                                "src": "15387:29:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                                  "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                                }
                              },
                              "id": 17220,
                              "indexExpression": {
                                "expression": {
                                  "id": 17216,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17178,
                                  "src": "15417:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 17217,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "poolId",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20794,
                                "src": "15417:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "15387:45:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                "typeString": "mapping(contract IERC20 => bytes32)"
                              }
                            },
                            "id": 17221,
                            "indexExpression": {
                              "expression": {
                                "id": 17218,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17178,
                                "src": "15433:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17219,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20788,
                              "src": "15433:15:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "15387:62:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 17222,
                            "name": "tokenInBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17186,
                            "src": "15452:14:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "15387:79:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 17224,
                        "nodeType": "ExpressionStatement",
                        "src": "15387:79:50"
                      },
                      {
                        "expression": {
                          "id": 17233,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "baseExpression": {
                                "id": 17225,
                                "name": "_minimalSwapInfoPoolsBalances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19489,
                                "src": "15476:29:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                                  "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                                }
                              },
                              "id": 17230,
                              "indexExpression": {
                                "expression": {
                                  "id": 17226,
                                  "name": "request",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17178,
                                  "src": "15506:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                    "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                  }
                                },
                                "id": 17227,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "poolId",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 20794,
                                "src": "15506:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "15476:45:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                "typeString": "mapping(contract IERC20 => bytes32)"
                              }
                            },
                            "id": 17231,
                            "indexExpression": {
                              "expression": {
                                "id": 17228,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17178,
                                "src": "15522:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17229,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20790,
                              "src": "15522:16:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "15476:63:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 17232,
                            "name": "tokenOutBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17195,
                            "src": "15542:15:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "15476:81:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 17234,
                        "nodeType": "ExpressionStatement",
                        "src": "15476:81:50"
                      }
                    ]
                  },
                  "id": 17236,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_processMinimalSwapInfoPoolSwapRequest",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17181,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17178,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 17236,
                        "src": "14734:43:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 17177,
                          "name": "IPoolSwapStructs.SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "14734:28:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17180,
                        "mutability": "mutable",
                        "name": "pool",
                        "nodeType": "VariableDeclaration",
                        "scope": 17236,
                        "src": "14787:25:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                          "typeString": "contract IMinimalSwapInfoPool"
                        },
                        "typeName": {
                          "id": 17179,
                          "name": "IMinimalSwapInfoPool",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20779,
                          "src": "14787:20:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                            "typeString": "contract IMinimalSwapInfoPool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14724:94:50"
                  },
                  "returnParameters": {
                    "id": 17184,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17183,
                        "mutability": "mutable",
                        "name": "amountCalculated",
                        "nodeType": "VariableDeclaration",
                        "scope": 17236,
                        "src": "14836:24:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17182,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14836:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14835:26:50"
                  },
                  "scope": 17569,
                  "src": "14677:887:50",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 17315,
                    "nodeType": "Block",
                    "src": "16096:679:50",
                    "statements": [
                      {
                        "assignments": [
                          17255
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17255,
                            "mutability": "mutable",
                            "name": "tokenInTotal",
                            "nodeType": "VariableDeclaration",
                            "scope": 17315,
                            "src": "16106:20:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17254,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16106:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17259,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 17256,
                              "name": "tokenInBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17243,
                              "src": "16129:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "id": 17257,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "total",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 18441,
                            "src": "16129:20:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                              "typeString": "function (bytes32) pure returns (uint256)"
                            }
                          },
                          "id": 17258,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16129:22:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16106:45:50"
                      },
                      {
                        "assignments": [
                          17261
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17261,
                            "mutability": "mutable",
                            "name": "tokenOutTotal",
                            "nodeType": "VariableDeclaration",
                            "scope": 17315,
                            "src": "16161:21:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17260,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16161:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17265,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 17262,
                              "name": "tokenOutBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17245,
                              "src": "16185:15:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "id": 17263,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "total",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 18441,
                            "src": "16185:21:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                              "typeString": "function (bytes32) pure returns (uint256)"
                            }
                          },
                          "id": 17264,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16185:23:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16161:47:50"
                      },
                      {
                        "expression": {
                          "id": 17278,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 17266,
                              "name": "request",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17239,
                              "src": "16218:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 17268,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "lastChangeBlock",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20796,
                            "src": "16218:23:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 17271,
                                    "name": "tokenInBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17243,
                                    "src": "16253:14:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "id": 17272,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "lastChangeBlock",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 18520,
                                  "src": "16253:30:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                                    "typeString": "function (bytes32) pure returns (uint256)"
                                  }
                                },
                                "id": 17273,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "16253:32:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 17274,
                                    "name": "tokenOutBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17245,
                                    "src": "16287:15:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "id": 17275,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "lastChangeBlock",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 18520,
                                  "src": "16287:31:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                                    "typeString": "function (bytes32) pure returns (uint256)"
                                  }
                                },
                                "id": 17276,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "16287:33:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 17269,
                                "name": "Math",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3350,
                                "src": "16244:4:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                  "typeString": "type(library Math)"
                                }
                              },
                              "id": 17270,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "max",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3242,
                              "src": "16244:8:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 17277,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "16244:77:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "16218:103:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17279,
                        "nodeType": "ExpressionStatement",
                        "src": "16218:103:50"
                      },
                      {
                        "expression": {
                          "id": 17287,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17280,
                            "name": "amountCalculated",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17252,
                            "src": "16453:16:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17283,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17239,
                                "src": "16484:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              {
                                "id": 17284,
                                "name": "tokenInTotal",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17255,
                                "src": "16493:12:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 17285,
                                "name": "tokenOutTotal",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17261,
                                "src": "16507:13:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 17281,
                                "name": "pool",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17241,
                                "src": "16472:4:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                                  "typeString": "contract IMinimalSwapInfoPool"
                                }
                              },
                              "id": 17282,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "onSwap",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20778,
                              "src": "16472:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,uint256,uint256) external returns (uint256)"
                              }
                            },
                            "id": 17286,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "16472:49:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "16453:68:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17288,
                        "nodeType": "ExpressionStatement",
                        "src": "16453:68:50"
                      },
                      {
                        "assignments": [
                          17290,
                          17292
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17290,
                            "mutability": "mutable",
                            "name": "amountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 17315,
                            "src": "16532:16:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17289,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16532:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 17292,
                            "mutability": "mutable",
                            "name": "amountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 17315,
                            "src": "16550:17:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17291,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "16550:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17300,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17294,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17239,
                                "src": "16583:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17295,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "kind",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20786,
                              "src": "16583:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              }
                            },
                            {
                              "expression": {
                                "id": 17296,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17239,
                                "src": "16597:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17297,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "amount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20792,
                              "src": "16597:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 17298,
                              "name": "amountCalculated",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17252,
                              "src": "16613:16:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 17293,
                            "name": "_getAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16750,
                            "src": "16571:11:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_enum$_SwapKind_$21101_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
                              "typeString": "function (enum IVault.SwapKind,uint256,uint256) pure returns (uint256,uint256)"
                            }
                          },
                          "id": 17299,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16571:59:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                            "typeString": "tuple(uint256,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16531:99:50"
                      },
                      {
                        "expression": {
                          "id": 17306,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17301,
                            "name": "newTokenInBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17248,
                            "src": "16641:17:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17304,
                                "name": "amountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17290,
                                "src": "16689:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 17302,
                                "name": "tokenInBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17243,
                                "src": "16661:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 17303,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "increaseCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18726,
                              "src": "16661:27:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              }
                            },
                            "id": 17305,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "16661:37:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "16641:57:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 17307,
                        "nodeType": "ExpressionStatement",
                        "src": "16641:57:50"
                      },
                      {
                        "expression": {
                          "id": 17313,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17308,
                            "name": "newTokenOutBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17250,
                            "src": "16708:18:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17311,
                                "name": "amountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17292,
                                "src": "16758:9:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 17309,
                                "name": "tokenOutBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17245,
                                "src": "16729:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 17310,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "decreaseCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18763,
                              "src": "16729:28:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              }
                            },
                            "id": 17312,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "16729:39:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "16708:60:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 17314,
                        "nodeType": "ExpressionStatement",
                        "src": "16708:60:50"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 17237,
                    "nodeType": "StructuredDocumentation",
                    "src": "15570:153:50",
                    "text": " @dev Calls the onSwap hook for a Pool that implements IMinimalSwapInfoPool: both Minimal Swap Info and Two Token\n Pools do this."
                  },
                  "id": 17316,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_callMinimalSwapInfoPoolOnSwapHook",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17246,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17239,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 17316,
                        "src": "15781:43:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 17238,
                          "name": "IPoolSwapStructs.SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "15781:28:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17241,
                        "mutability": "mutable",
                        "name": "pool",
                        "nodeType": "VariableDeclaration",
                        "scope": 17316,
                        "src": "15834:25:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                          "typeString": "contract IMinimalSwapInfoPool"
                        },
                        "typeName": {
                          "id": 17240,
                          "name": "IMinimalSwapInfoPool",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20779,
                          "src": "15834:20:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IMinimalSwapInfoPool_$20779",
                            "typeString": "contract IMinimalSwapInfoPool"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17243,
                        "mutability": "mutable",
                        "name": "tokenInBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 17316,
                        "src": "15869:22:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 17242,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "15869:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17245,
                        "mutability": "mutable",
                        "name": "tokenOutBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 17316,
                        "src": "15901:23:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 17244,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "15901:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15771:159:50"
                  },
                  "returnParameters": {
                    "id": 17253,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17248,
                        "mutability": "mutable",
                        "name": "newTokenInBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 17316,
                        "src": "15978:25:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 17247,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "15978:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17250,
                        "mutability": "mutable",
                        "name": "newTokenOutBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 17316,
                        "src": "16017:26:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 17249,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "16017:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17252,
                        "mutability": "mutable",
                        "name": "amountCalculated",
                        "nodeType": "VariableDeclaration",
                        "scope": 17316,
                        "src": "16057:24:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17251,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16057:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15964:127:50"
                  },
                  "scope": 17569,
                  "src": "15728:1047:50",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 17514,
                    "nodeType": "Block",
                    "src": "16948:2573:50",
                    "statements": [
                      {
                        "assignments": [
                          17326
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17326,
                            "mutability": "mutable",
                            "name": "tokenInBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "16958:22:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 17325,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "16958:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17327,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16958:22:50"
                      },
                      {
                        "assignments": [
                          17329
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17329,
                            "mutability": "mutable",
                            "name": "tokenOutBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "16990:23:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 17328,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "16990:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17330,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "16990:23:50"
                      },
                      {
                        "assignments": [
                          17334
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17334,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "17142:53:50",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                            },
                            "typeName": {
                              "id": 17333,
                              "name": "EnumerableMap.IERC20ToBytes32Map",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4479,
                              "src": "17142:32:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17339,
                        "initialValue": {
                          "baseExpression": {
                            "id": 17335,
                            "name": "_generalPoolsBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19073,
                            "src": "17198:21:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map storage ref)"
                            }
                          },
                          "id": 17338,
                          "indexExpression": {
                            "expression": {
                              "id": 17336,
                              "name": "request",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17318,
                              "src": "17220:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 17337,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "poolId",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20794,
                            "src": "17220:14:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "17198:37:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17142:93:50"
                      },
                      {
                        "assignments": [
                          17341
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17341,
                            "mutability": "mutable",
                            "name": "indexIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "17245:15:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17340,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17245:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17347,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17344,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17318,
                                "src": "17294:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17345,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenIn",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20788,
                              "src": "17294:15:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "expression": {
                              "id": 17342,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17334,
                              "src": "17263:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 17343,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "unchecked_indexOf",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4809,
                            "src": "17263:30:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$returns$_t_uint256_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20) view returns (uint256)"
                            }
                          },
                          "id": 17346,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17263:47:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17245:65:50"
                      },
                      {
                        "assignments": [
                          17349
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17349,
                            "mutability": "mutable",
                            "name": "indexOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "17320:16:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17348,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17320:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17355,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17352,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17318,
                                "src": "17370:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17353,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "tokenOut",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20790,
                              "src": "17370:16:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "expression": {
                              "id": 17350,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17334,
                              "src": "17339:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 17351,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "unchecked_indexOf",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4809,
                            "src": "17339:30:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$returns$_t_uint256_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20) view returns (uint256)"
                            }
                          },
                          "id": 17354,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17339:48:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17320:67:50"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 17362,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 17358,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 17356,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17341,
                              "src": "17402:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "hexValue": "30",
                              "id": 17357,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "17413:1:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "src": "17402:12:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "||",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 17361,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 17359,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17349,
                              "src": "17418:8:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "hexValue": "30",
                              "id": 17360,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "17430:1:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "src": "17418:13:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "17402:29:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 17374,
                        "nodeType": "IfStatement",
                        "src": "17398:311:50",
                        "trueBody": {
                          "id": 17373,
                          "nodeType": "Block",
                          "src": "17433:276:50",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 17364,
                                      "name": "request",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17318,
                                      "src": "17633:7:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                        "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                      }
                                    },
                                    "id": 17365,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "poolId",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 20794,
                                    "src": "17633:14:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 17363,
                                  "name": "_ensureRegisteredPool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15394,
                                  "src": "17611:21:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$",
                                    "typeString": "function (bytes32) view"
                                  }
                                },
                                "id": 17366,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "17611:37:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 17367,
                              "nodeType": "ExpressionStatement",
                              "src": "17611:37:50"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 17369,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "17670:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 17370,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKEN_NOT_REGISTERED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 624,
                                    "src": "17670:27:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 17368,
                                  "name": "_revert",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 369,
                                  "src": "17662:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                                    "typeString": "function (uint256) pure"
                                  }
                                },
                                "id": 17371,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "17662:36:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 17372,
                              "nodeType": "ExpressionStatement",
                              "src": "17662:36:50"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 17377,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17375,
                            "name": "indexIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17341,
                            "src": "17868:7:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "-=",
                          "rightHandSide": {
                            "hexValue": "31",
                            "id": 17376,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "17879:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "17868:12:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17378,
                        "nodeType": "ExpressionStatement",
                        "src": "17868:12:50"
                      },
                      {
                        "expression": {
                          "id": 17381,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17379,
                            "name": "indexOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17349,
                            "src": "17890:8:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "-=",
                          "rightHandSide": {
                            "hexValue": "31",
                            "id": 17380,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "17902:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "17890:13:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17382,
                        "nodeType": "ExpressionStatement",
                        "src": "17890:13:50"
                      },
                      {
                        "assignments": [
                          17384
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17384,
                            "mutability": "mutable",
                            "name": "tokenAmount",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "17914:19:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17383,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "17914:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17388,
                        "initialValue": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "id": 17385,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17334,
                              "src": "17936:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 17386,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4689,
                            "src": "17936:19:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer) view returns (uint256)"
                            }
                          },
                          "id": 17387,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "17936:21:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17914:43:50"
                      },
                      {
                        "assignments": [
                          17393
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17393,
                            "mutability": "mutable",
                            "name": "currentBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "17967:32:50",
                            "stateVariable": false,
                            "storageLocation": "memory",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[]"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 17391,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "17967:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 17392,
                              "nodeType": "ArrayTypeName",
                              "src": "17967:9:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17399,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 17397,
                              "name": "tokenAmount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17384,
                              "src": "18016:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 17396,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "NewExpression",
                            "src": "18002:13:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                              "typeString": "function (uint256) pure returns (uint256[] memory)"
                            },
                            "typeName": {
                              "baseType": {
                                "id": 17394,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "18006:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 17395,
                              "nodeType": "ArrayTypeName",
                              "src": "18006:9:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                "typeString": "uint256[]"
                              }
                            }
                          },
                          "id": 17398,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18002:26:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "17967:61:50"
                      },
                      {
                        "expression": {
                          "id": 17404,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 17400,
                              "name": "request",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17318,
                              "src": "18039:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                              }
                            },
                            "id": 17402,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "lastChangeBlock",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20796,
                            "src": "18039:23:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "hexValue": "30",
                            "id": 17403,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "18065:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "18039:27:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17405,
                        "nodeType": "ExpressionStatement",
                        "src": "18039:27:50"
                      },
                      {
                        "body": {
                          "id": 17462,
                          "nodeType": "Block",
                          "src": "18118:621:50",
                          "statements": [
                            {
                              "assignments": [
                                17417
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 17417,
                                  "mutability": "mutable",
                                  "name": "balance",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 17462,
                                  "src": "18354:15:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "typeName": {
                                    "id": 17416,
                                    "name": "bytes32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "18354:7:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 17422,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 17420,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17407,
                                    "src": "18403:1:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 17418,
                                    "name": "poolBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17334,
                                    "src": "18372:12:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 17419,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "unchecked_valueAt",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4759,
                                  "src": "18372:30:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                                    "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256) view returns (bytes32)"
                                  }
                                },
                                "id": 17421,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "18372:33:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "18354:51:50"
                            },
                            {
                              "expression": {
                                "id": 17429,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 17423,
                                    "name": "currentBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17393,
                                    "src": "18420:15:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 17425,
                                  "indexExpression": {
                                    "id": 17424,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17407,
                                    "src": "18436:1:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "18420:18:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "expression": {
                                      "id": 17426,
                                      "name": "balance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17417,
                                      "src": "18441:7:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "id": 17427,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "total",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 18441,
                                    "src": "18441:13:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                                      "typeString": "function (bytes32) pure returns (uint256)"
                                    }
                                  },
                                  "id": 17428,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "18441:15:50",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "18420:36:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 17430,
                              "nodeType": "ExpressionStatement",
                              "src": "18420:36:50"
                            },
                            {
                              "expression": {
                                "id": 17442,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "expression": {
                                    "id": 17431,
                                    "name": "request",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17318,
                                    "src": "18470:7:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                      "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                    }
                                  },
                                  "id": 17433,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "lastChangeBlock",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 20796,
                                  "src": "18470:23:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "expression": {
                                        "id": 17436,
                                        "name": "request",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17318,
                                        "src": "18505:7:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                          "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                        }
                                      },
                                      "id": 17437,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "lastChangeBlock",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 20796,
                                      "src": "18505:23:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "expression": {
                                          "id": 17438,
                                          "name": "balance",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 17417,
                                          "src": "18530:7:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        },
                                        "id": 17439,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "lastChangeBlock",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": 18520,
                                        "src": "18530:23:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$bound_to$_t_bytes32_$",
                                          "typeString": "function (bytes32) pure returns (uint256)"
                                        }
                                      },
                                      "id": 17440,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "18530:25:50",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 17434,
                                      "name": "Math",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3350,
                                      "src": "18496:4:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                        "typeString": "type(library Math)"
                                      }
                                    },
                                    "id": 17435,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "max",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3242,
                                    "src": "18496:8:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 17441,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "18496:60:50",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "18470:86:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 17443,
                              "nodeType": "ExpressionStatement",
                              "src": "18470:86:50"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 17446,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 17444,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17407,
                                  "src": "18575:1:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "id": 17445,
                                  "name": "indexIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17341,
                                  "src": "18580:7:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "18575:12:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "condition": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 17454,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 17452,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17407,
                                    "src": "18656:1:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "==",
                                  "rightExpression": {
                                    "id": 17453,
                                    "name": "indexOut",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17349,
                                    "src": "18661:8:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "18656:13:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "id": 17460,
                                "nodeType": "IfStatement",
                                "src": "18652:77:50",
                                "trueBody": {
                                  "id": 17459,
                                  "nodeType": "Block",
                                  "src": "18671:58:50",
                                  "statements": [
                                    {
                                      "expression": {
                                        "id": 17457,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftHandSide": {
                                          "id": 17455,
                                          "name": "tokenOutBalance",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 17329,
                                          "src": "18689:15:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        },
                                        "nodeType": "Assignment",
                                        "operator": "=",
                                        "rightHandSide": {
                                          "id": 17456,
                                          "name": "balance",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 17417,
                                          "src": "18707:7:50",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        },
                                        "src": "18689:25:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      "id": 17458,
                                      "nodeType": "ExpressionStatement",
                                      "src": "18689:25:50"
                                    }
                                  ]
                                }
                              },
                              "id": 17461,
                              "nodeType": "IfStatement",
                              "src": "18571:158:50",
                              "trueBody": {
                                "id": 17451,
                                "nodeType": "Block",
                                "src": "18589:57:50",
                                "statements": [
                                  {
                                    "expression": {
                                      "id": 17449,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 17447,
                                        "name": "tokenInBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17326,
                                        "src": "18607:14:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "id": 17448,
                                        "name": "balance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17417,
                                        "src": "18624:7:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      "src": "18607:24:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "id": 17450,
                                    "nodeType": "ExpressionStatement",
                                    "src": "18607:24:50"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 17412,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 17410,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17407,
                            "src": "18096:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "id": 17411,
                            "name": "tokenAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17384,
                            "src": "18100:11:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "18096:15:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 17463,
                        "initializationExpression": {
                          "assignments": [
                            17407
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 17407,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 17463,
                              "src": "18081:9:50",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 17406,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "18081:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 17409,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 17408,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "18093:1:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "18081:13:50"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 17414,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "18113:3:50",
                            "subExpression": {
                              "id": 17413,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17407,
                              "src": "18113:1:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 17415,
                          "nodeType": "ExpressionStatement",
                          "src": "18113:3:50"
                        },
                        "nodeType": "ForStatement",
                        "src": "18076:663:50"
                      },
                      {
                        "expression": {
                          "id": 17472,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17464,
                            "name": "amountCalculated",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17323,
                            "src": "18869:16:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17467,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17318,
                                "src": "18900:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              {
                                "id": 17468,
                                "name": "currentBalances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17393,
                                "src": "18909:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                }
                              },
                              {
                                "id": 17469,
                                "name": "indexIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17341,
                                "src": "18926:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 17470,
                                "name": "indexOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17349,
                                "src": "18935:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                },
                                {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                  "typeString": "uint256[] memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 17465,
                                "name": "pool",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17320,
                                "src": "18888:4:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IGeneralPool_$20760",
                                  "typeString": "contract IGeneralPool"
                                }
                              },
                              "id": 17466,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "onSwap",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20759,
                              "src": "18888:11:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_struct$_SwapRequest_$20803_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (struct IPoolSwapStructs.SwapRequest memory,uint256[] memory,uint256,uint256) external returns (uint256)"
                              }
                            },
                            "id": 17471,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "18888:56:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "18869:75:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17473,
                        "nodeType": "ExpressionStatement",
                        "src": "18869:75:50"
                      },
                      {
                        "assignments": [
                          17475,
                          17477
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17475,
                            "mutability": "mutable",
                            "name": "amountIn",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "18955:16:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17474,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18955:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 17477,
                            "mutability": "mutable",
                            "name": "amountOut",
                            "nodeType": "VariableDeclaration",
                            "scope": 17514,
                            "src": "18973:17:50",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17476,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "18973:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17485,
                        "initialValue": {
                          "arguments": [
                            {
                              "expression": {
                                "id": 17479,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17318,
                                "src": "19006:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17480,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "kind",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20786,
                              "src": "19006:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              }
                            },
                            {
                              "expression": {
                                "id": 17481,
                                "name": "request",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17318,
                                "src": "19020:7:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                                  "typeString": "struct IPoolSwapStructs.SwapRequest memory"
                                }
                              },
                              "id": 17482,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "amount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20792,
                              "src": "19020:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 17483,
                              "name": "amountCalculated",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17323,
                              "src": "19036:16:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_enum$_SwapKind_$21101",
                                "typeString": "enum IVault.SwapKind"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 17478,
                            "name": "_getAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 16750,
                            "src": "18994:11:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_enum$_SwapKind_$21101_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
                              "typeString": "function (enum IVault.SwapKind,uint256,uint256) pure returns (uint256,uint256)"
                            }
                          },
                          "id": 17484,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "18994:59:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                            "typeString": "tuple(uint256,uint256)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "18954:99:50"
                      },
                      {
                        "expression": {
                          "id": 17491,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17486,
                            "name": "tokenInBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17326,
                            "src": "19063:14:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17489,
                                "name": "amountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17475,
                                "src": "19108:8:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 17487,
                                "name": "tokenInBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17326,
                                "src": "19080:14:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 17488,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "increaseCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18726,
                              "src": "19080:27:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              }
                            },
                            "id": 17490,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "19080:37:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "19063:54:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 17492,
                        "nodeType": "ExpressionStatement",
                        "src": "19063:54:50"
                      },
                      {
                        "expression": {
                          "id": 17498,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17493,
                            "name": "tokenOutBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17329,
                            "src": "19127:15:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17496,
                                "name": "amountOut",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17477,
                                "src": "19174:9:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 17494,
                                "name": "tokenOutBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17329,
                                "src": "19145:15:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 17495,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "decreaseCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18763,
                              "src": "19145:28:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              }
                            },
                            "id": 17497,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "19145:39:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "19127:57:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 17499,
                        "nodeType": "ExpressionStatement",
                        "src": "19127:57:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17503,
                              "name": "indexIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17341,
                              "src": "19425:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 17504,
                              "name": "tokenInBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17326,
                              "src": "19434:14:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 17500,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17334,
                              "src": "19396:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 17502,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "unchecked_setAt",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4574,
                            "src": "19396:28:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_uint256_$_t_bytes32_$returns$__$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256,bytes32)"
                            }
                          },
                          "id": 17505,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19396:53:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17506,
                        "nodeType": "ExpressionStatement",
                        "src": "19396:53:50"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17510,
                              "name": "indexOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17349,
                              "src": "19488:8:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 17511,
                              "name": "tokenOutBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17329,
                              "src": "19498:15:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 17507,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17334,
                              "src": "19459:12:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 17509,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "unchecked_setAt",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4574,
                            "src": "19459:28:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_uint256_$_t_bytes32_$returns$__$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256,bytes32)"
                            }
                          },
                          "id": 17512,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "19459:55:50",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17513,
                        "nodeType": "ExpressionStatement",
                        "src": "19459:55:50"
                      }
                    ]
                  },
                  "id": 17515,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_processGeneralPoolSwapRequest",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17321,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17318,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 17515,
                        "src": "16821:43:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 17317,
                          "name": "IPoolSwapStructs.SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "16821:28:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17320,
                        "mutability": "mutable",
                        "name": "pool",
                        "nodeType": "VariableDeclaration",
                        "scope": 17515,
                        "src": "16866:17:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IGeneralPool_$20760",
                          "typeString": "contract IGeneralPool"
                        },
                        "typeName": {
                          "id": 17319,
                          "name": "IGeneralPool",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20760,
                          "src": "16866:12:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IGeneralPool_$20760",
                            "typeString": "contract IGeneralPool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16820:64:50"
                  },
                  "returnParameters": {
                    "id": 17324,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17323,
                        "mutability": "mutable",
                        "name": "amountCalculated",
                        "nodeType": "VariableDeclaration",
                        "scope": 17515,
                        "src": "16918:24:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17322,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16918:7:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16917:26:50"
                  },
                  "scope": 17569,
                  "src": "16781:2740:50",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "baseFunctions": [
                    21200
                  ],
                  "body": {
                    "id": 17567,
                    "nodeType": "Block",
                    "src": "19838:5526:50",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          },
                          "id": 17538,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 17532,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "20944:3:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 17533,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "src": "20944:10:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "arguments": [
                              {
                                "id": 17536,
                                "name": "this",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -28,
                                "src": "20966:4:50",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Swaps_$17569",
                                  "typeString": "contract Swaps"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_Swaps_$17569",
                                  "typeString": "contract Swaps"
                                }
                              ],
                              "id": 17535,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "20958:7:50",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": {
                                "id": 17534,
                                "name": "address",
                                "nodeType": "ElementaryTypeName",
                                "src": "20958:7:50",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 17537,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "20958:13:50",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "src": "20944:27:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 17565,
                          "nodeType": "Block",
                          "src": "24034:1324:50",
                          "statements": [
                            {
                              "assignments": [
                                17556
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 17556,
                                  "mutability": "mutable",
                                  "name": "deltas",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 17565,
                                  "src": "24048:22:50",
                                  "stateVariable": false,
                                  "storageLocation": "memory",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                    "typeString": "int256[]"
                                  },
                                  "typeName": {
                                    "baseType": {
                                      "id": 17554,
                                      "name": "int256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "24048:6:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "id": 17555,
                                    "nodeType": "ArrayTypeName",
                                    "src": "24048:8:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                                      "typeString": "int256[]"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 17563,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 17558,
                                    "name": "swaps",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17520,
                                    "src": "24088:5:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                                      "typeString": "struct IVault.BatchSwapStep memory[] memory"
                                    }
                                  },
                                  {
                                    "id": 17559,
                                    "name": "assets",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17523,
                                    "src": "24095:6:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                      "typeString": "contract IAsset[] memory"
                                    }
                                  },
                                  {
                                    "id": 17560,
                                    "name": "funds",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17525,
                                    "src": "24103:5:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                      "typeString": "struct IVault.FundManagement memory"
                                    }
                                  },
                                  {
                                    "id": 17561,
                                    "name": "kind",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17517,
                                    "src": "24110:4:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_enum$_SwapKind_$21101",
                                      "typeString": "enum IVault.SwapKind"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                                      "typeString": "struct IVault.BatchSwapStep memory[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                                      "typeString": "contract IAsset[] memory"
                                    },
                                    {
                                      "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                                      "typeString": "struct IVault.FundManagement memory"
                                    },
                                    {
                                      "typeIdentifier": "t_enum$_SwapKind_$21101",
                                      "typeString": "enum IVault.SwapKind"
                                    }
                                  ],
                                  "id": 17557,
                                  "name": "_swapWithPools",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 16998,
                                  "src": "24073:14:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr_$_t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr_$_t_struct$_FundManagement_$21183_memory_ptr_$_t_enum$_SwapKind_$21101_$returns$_t_array$_t_int256_$dyn_memory_ptr_$",
                                    "typeString": "function (struct IVault.BatchSwapStep memory[] memory,contract IAsset[] memory,struct IVault.FundManagement memory,enum IVault.SwapKind) returns (int256[] memory)"
                                  }
                                },
                                "id": 17562,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "24073:42:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                  "typeString": "int256[] memory"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "24048:67:50"
                            },
                            {
                              "AST": {
                                "nodeType": "YulBlock",
                                "src": "24199:1149:50",
                                "statements": [
                                  {
                                    "nodeType": "YulVariableDeclaration",
                                    "src": "24509:34:50",
                                    "value": {
                                      "arguments": [
                                        {
                                          "arguments": [
                                            {
                                              "name": "deltas",
                                              "nodeType": "YulIdentifier",
                                              "src": "24531:6:50"
                                            }
                                          ],
                                          "functionName": {
                                            "name": "mload",
                                            "nodeType": "YulIdentifier",
                                            "src": "24525:5:50"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "24525:13:50"
                                        },
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "24540:2:50",
                                          "type": "",
                                          "value": "32"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mul",
                                        "nodeType": "YulIdentifier",
                                        "src": "24521:3:50"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "24521:22:50"
                                    },
                                    "variables": [
                                      {
                                        "name": "size",
                                        "nodeType": "YulTypedName",
                                        "src": "24513:4:50",
                                        "type": ""
                                      }
                                    ]
                                  },
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "arguments": [
                                            {
                                              "name": "deltas",
                                              "nodeType": "YulIdentifier",
                                              "src": "24987:6:50"
                                            },
                                            {
                                              "kind": "number",
                                              "nodeType": "YulLiteral",
                                              "src": "24995:4:50",
                                              "type": "",
                                              "value": "0x20"
                                            }
                                          ],
                                          "functionName": {
                                            "name": "sub",
                                            "nodeType": "YulIdentifier",
                                            "src": "24983:3:50"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "24983:17:50"
                                        },
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "25002:66:50",
                                          "type": "",
                                          "value": "0x00000000000000000000000000000000000000000000000000000000fa61cc12"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mstore",
                                        "nodeType": "YulIdentifier",
                                        "src": "24976:6:50"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "24976:93:50"
                                    },
                                    "nodeType": "YulExpressionStatement",
                                    "src": "24976:93:50"
                                  },
                                  {
                                    "nodeType": "YulVariableDeclaration",
                                    "src": "25086:30:50",
                                    "value": {
                                      "arguments": [
                                        {
                                          "name": "deltas",
                                          "nodeType": "YulIdentifier",
                                          "src": "25103:6:50"
                                        },
                                        {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "25111:4:50",
                                          "type": "",
                                          "value": "0x04"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "sub",
                                        "nodeType": "YulIdentifier",
                                        "src": "25099:3:50"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "25099:17:50"
                                    },
                                    "variables": [
                                      {
                                        "name": "start",
                                        "nodeType": "YulTypedName",
                                        "src": "25090:5:50",
                                        "type": ""
                                      }
                                    ]
                                  },
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "name": "start",
                                          "nodeType": "YulIdentifier",
                                          "src": "25313:5:50"
                                        },
                                        {
                                          "arguments": [
                                            {
                                              "name": "size",
                                              "nodeType": "YulIdentifier",
                                              "src": "25324:4:50"
                                            },
                                            {
                                              "kind": "number",
                                              "nodeType": "YulLiteral",
                                              "src": "25330:2:50",
                                              "type": "",
                                              "value": "36"
                                            }
                                          ],
                                          "functionName": {
                                            "name": "add",
                                            "nodeType": "YulIdentifier",
                                            "src": "25320:3:50"
                                          },
                                          "nodeType": "YulFunctionCall",
                                          "src": "25320:13:50"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "revert",
                                        "nodeType": "YulIdentifier",
                                        "src": "25306:6:50"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "25306:28:50"
                                    },
                                    "nodeType": "YulExpressionStatement",
                                    "src": "25306:28:50"
                                  }
                                ]
                              },
                              "evmVersion": "istanbul",
                              "externalReferences": [
                                {
                                  "declaration": 17556,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "24531:6:50",
                                  "valueSize": 1
                                },
                                {
                                  "declaration": 17556,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "24987:6:50",
                                  "valueSize": 1
                                },
                                {
                                  "declaration": 17556,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "25103:6:50",
                                  "valueSize": 1
                                }
                              ],
                              "id": 17564,
                              "nodeType": "InlineAssembly",
                              "src": "24190:1158:50"
                            }
                          ]
                        },
                        "id": 17566,
                        "nodeType": "IfStatement",
                        "src": "20940:4418:50",
                        "trueBody": {
                          "id": 17551,
                          "nodeType": "Block",
                          "src": "20973:3055:50",
                          "statements": [
                            {
                              "assignments": [
                                17540,
                                null
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 17540,
                                  "mutability": "mutable",
                                  "name": "success",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 17551,
                                  "src": "21240:12:50",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "typeName": {
                                    "id": 17539,
                                    "name": "bool",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "21240:4:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "visibility": "internal"
                                },
                                null
                              ],
                              "id": 17549,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 17546,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -15,
                                      "src": "21277:3:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 17547,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "data",
                                    "nodeType": "MemberAccess",
                                    "src": "21277:8:50",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes_calldata_ptr",
                                      "typeString": "bytes calldata"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes_calldata_ptr",
                                      "typeString": "bytes calldata"
                                    }
                                  ],
                                  "expression": {
                                    "arguments": [
                                      {
                                        "id": 17543,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -28,
                                        "src": "21266:4:50",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_Swaps_$17569",
                                          "typeString": "contract Swaps"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_Swaps_$17569",
                                          "typeString": "contract Swaps"
                                        }
                                      ],
                                      "id": 17542,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "21258:7:50",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 17541,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "21258:7:50",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 17544,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "21258:13:50",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  "id": 17545,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "call",
                                  "nodeType": "MemberAccess",
                                  "src": "21258:18:50",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
                                    "typeString": "function (bytes memory) payable returns (bool,bytes memory)"
                                  }
                                },
                                "id": 17548,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "21258:28:50",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                                  "typeString": "tuple(bool,bytes memory)"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "21239:47:50"
                            },
                            {
                              "AST": {
                                "nodeType": "YulBlock",
                                "src": "21370:2648:50",
                                "statements": [
                                  {
                                    "cases": [
                                      {
                                        "body": {
                                          "nodeType": "YulBlock",
                                          "src": "21537:2276:50",
                                          "statements": [
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "22000:1:50",
                                                    "type": "",
                                                    "value": "0"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "22003:1:50",
                                                    "type": "",
                                                    "value": "0"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "22006:4:50",
                                                    "type": "",
                                                    "value": "0x04"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "returndatacopy",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "21985:14:50"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "21985:26:50"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "21985:26:50"
                                            },
                                            {
                                              "nodeType": "YulVariableDeclaration",
                                              "src": "22036:94:50",
                                              "value": {
                                                "arguments": [
                                                  {
                                                    "arguments": [
                                                      {
                                                        "kind": "number",
                                                        "nodeType": "YulLiteral",
                                                        "src": "22059:1:50",
                                                        "type": "",
                                                        "value": "0"
                                                      }
                                                    ],
                                                    "functionName": {
                                                      "name": "mload",
                                                      "nodeType": "YulIdentifier",
                                                      "src": "22053:5:50"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "22053:8:50"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "22063:66:50",
                                                    "type": "",
                                                    "value": "0xffffffff00000000000000000000000000000000000000000000000000000000"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "and",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "22049:3:50"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "22049:81:50"
                                              },
                                              "variables": [
                                                {
                                                  "name": "error",
                                                  "nodeType": "YulTypedName",
                                                  "src": "22040:5:50",
                                                  "type": ""
                                                }
                                              ]
                                            },
                                            {
                                              "body": {
                                                "nodeType": "YulBlock",
                                                "src": "22363:150:50",
                                                "statements": [
                                                  {
                                                    "expression": {
                                                      "arguments": [
                                                        {
                                                          "kind": "number",
                                                          "nodeType": "YulLiteral",
                                                          "src": "22408:1:50",
                                                          "type": "",
                                                          "value": "0"
                                                        },
                                                        {
                                                          "kind": "number",
                                                          "nodeType": "YulLiteral",
                                                          "src": "22411:1:50",
                                                          "type": "",
                                                          "value": "0"
                                                        },
                                                        {
                                                          "arguments": [],
                                                          "functionName": {
                                                            "name": "returndatasize",
                                                            "nodeType": "YulIdentifier",
                                                            "src": "22414:14:50"
                                                          },
                                                          "nodeType": "YulFunctionCall",
                                                          "src": "22414:16:50"
                                                        }
                                                      ],
                                                      "functionName": {
                                                        "name": "returndatacopy",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "22393:14:50"
                                                      },
                                                      "nodeType": "YulFunctionCall",
                                                      "src": "22393:38:50"
                                                    },
                                                    "nodeType": "YulExpressionStatement",
                                                    "src": "22393:38:50"
                                                  },
                                                  {
                                                    "expression": {
                                                      "arguments": [
                                                        {
                                                          "kind": "number",
                                                          "nodeType": "YulLiteral",
                                                          "src": "22467:1:50",
                                                          "type": "",
                                                          "value": "0"
                                                        },
                                                        {
                                                          "arguments": [],
                                                          "functionName": {
                                                            "name": "returndatasize",
                                                            "nodeType": "YulIdentifier",
                                                            "src": "22470:14:50"
                                                          },
                                                          "nodeType": "YulFunctionCall",
                                                          "src": "22470:16:50"
                                                        }
                                                      ],
                                                      "functionName": {
                                                        "name": "revert",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "22460:6:50"
                                                      },
                                                      "nodeType": "YulFunctionCall",
                                                      "src": "22460:27:50"
                                                    },
                                                    "nodeType": "YulExpressionStatement",
                                                    "src": "22460:27:50"
                                                  }
                                                ]
                                              },
                                              "condition": {
                                                "arguments": [
                                                  {
                                                    "arguments": [
                                                      {
                                                        "name": "error",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "22284:5:50"
                                                      },
                                                      {
                                                        "kind": "number",
                                                        "nodeType": "YulLiteral",
                                                        "src": "22291:66:50",
                                                        "type": "",
                                                        "value": "0xfa61cc1200000000000000000000000000000000000000000000000000000000"
                                                      }
                                                    ],
                                                    "functionName": {
                                                      "name": "eq",
                                                      "nodeType": "YulIdentifier",
                                                      "src": "22281:2:50"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "22281:77:50"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "22360:1:50",
                                                    "type": "",
                                                    "value": "0"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "eq",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "22278:2:50"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "22278:84:50"
                                              },
                                              "nodeType": "YulIf",
                                              "src": "22275:2:50"
                                            },
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "23117:1:50",
                                                    "type": "",
                                                    "value": "0"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "23120:2:50",
                                                    "type": "",
                                                    "value": "32"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "mstore",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "23110:6:50"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "23110:13:50"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "23110:13:50"
                                            },
                                            {
                                              "nodeType": "YulVariableDeclaration",
                                              "src": "23450:39:50",
                                              "value": {
                                                "arguments": [
                                                  {
                                                    "arguments": [],
                                                    "functionName": {
                                                      "name": "returndatasize",
                                                      "nodeType": "YulIdentifier",
                                                      "src": "23466:14:50"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "23466:16:50"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "23484:4:50",
                                                    "type": "",
                                                    "value": "0x04"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "sub",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "23462:3:50"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "23462:27:50"
                                              },
                                              "variables": [
                                                {
                                                  "name": "size",
                                                  "nodeType": "YulTypedName",
                                                  "src": "23454:4:50",
                                                  "type": ""
                                                }
                                              ]
                                            },
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "23529:4:50",
                                                    "type": "",
                                                    "value": "0x20"
                                                  },
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "23535:4:50",
                                                    "type": "",
                                                    "value": "0x04"
                                                  },
                                                  {
                                                    "name": "size",
                                                    "nodeType": "YulIdentifier",
                                                    "src": "23541:4:50"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "returndatacopy",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "23514:14:50"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "23514:32:50"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "23514:32:50"
                                            },
                                            {
                                              "expression": {
                                                "arguments": [
                                                  {
                                                    "kind": "number",
                                                    "nodeType": "YulLiteral",
                                                    "src": "23774:1:50",
                                                    "type": "",
                                                    "value": "0"
                                                  },
                                                  {
                                                    "arguments": [
                                                      {
                                                        "name": "size",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "23781:4:50"
                                                      },
                                                      {
                                                        "kind": "number",
                                                        "nodeType": "YulLiteral",
                                                        "src": "23787:2:50",
                                                        "type": "",
                                                        "value": "32"
                                                      }
                                                    ],
                                                    "functionName": {
                                                      "name": "add",
                                                      "nodeType": "YulIdentifier",
                                                      "src": "23777:3:50"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "23777:13:50"
                                                  }
                                                ],
                                                "functionName": {
                                                  "name": "return",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "23767:6:50"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "23767:24:50"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "23767:24:50"
                                            }
                                          ]
                                        },
                                        "nodeType": "YulCase",
                                        "src": "21530:2283:50",
                                        "value": {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "21535:1:50",
                                          "type": "",
                                          "value": "0"
                                        }
                                      },
                                      {
                                        "body": {
                                          "nodeType": "YulBlock",
                                          "src": "23842:162:50",
                                          "statements": [
                                            {
                                              "expression": {
                                                "arguments": [],
                                                "functionName": {
                                                  "name": "invalid",
                                                  "nodeType": "YulIdentifier",
                                                  "src": "23973:7:50"
                                                },
                                                "nodeType": "YulFunctionCall",
                                                "src": "23973:9:50"
                                              },
                                              "nodeType": "YulExpressionStatement",
                                              "src": "23973:9:50"
                                            }
                                          ]
                                        },
                                        "nodeType": "YulCase",
                                        "src": "23834:170:50",
                                        "value": "default"
                                      }
                                    ],
                                    "expression": {
                                      "name": "success",
                                      "nodeType": "YulIdentifier",
                                      "src": "21502:7:50"
                                    },
                                    "nodeType": "YulSwitch",
                                    "src": "21495:2509:50"
                                  }
                                ]
                              },
                              "evmVersion": "istanbul",
                              "externalReferences": [
                                {
                                  "declaration": 17540,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "21502:7:50",
                                  "valueSize": 1
                                }
                              ],
                              "id": 17550,
                              "nodeType": "InlineAssembly",
                              "src": "21361:2657:50"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "functionSelector": "f84d066e",
                  "id": 17568,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "queryBatchSwap",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 17527,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "19803:8:50"
                  },
                  "parameters": {
                    "id": 17526,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17517,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 17568,
                        "src": "19667:13:50",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        },
                        "typeName": {
                          "id": 17516,
                          "name": "SwapKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21101,
                          "src": "19667:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17520,
                        "mutability": "mutable",
                        "name": "swaps",
                        "nodeType": "VariableDeclaration",
                        "scope": 17568,
                        "src": "19690:28:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.BatchSwapStep[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 17518,
                            "name": "BatchSwapStep",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 21161,
                            "src": "19690:13:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_BatchSwapStep_$21161_storage_ptr",
                              "typeString": "struct IVault.BatchSwapStep"
                            }
                          },
                          "id": 17519,
                          "nodeType": "ArrayTypeName",
                          "src": "19690:15:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.BatchSwapStep[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17523,
                        "mutability": "mutable",
                        "name": "assets",
                        "nodeType": "VariableDeclaration",
                        "scope": 17568,
                        "src": "19728:22:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                          "typeString": "contract IAsset[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 17521,
                            "name": "IAsset",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20645,
                            "src": "19728:6:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAsset_$20645",
                              "typeString": "contract IAsset"
                            }
                          },
                          "id": 17522,
                          "nodeType": "ArrayTypeName",
                          "src": "19728:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                            "typeString": "contract IAsset[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17525,
                        "mutability": "mutable",
                        "name": "funds",
                        "nodeType": "VariableDeclaration",
                        "scope": 17568,
                        "src": "19760:27:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                          "typeString": "struct IVault.FundManagement"
                        },
                        "typeName": {
                          "id": 17524,
                          "name": "FundManagement",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21183,
                          "src": "19760:14:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_FundManagement_$21183_storage_ptr",
                            "typeString": "struct IVault.FundManagement"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19657:136:50"
                  },
                  "returnParameters": {
                    "id": 17531,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17530,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 17568,
                        "src": "19821:15:50",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 17528,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "19821:6:50",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 17529,
                          "nodeType": "ArrayTypeName",
                          "src": "19821:8:50",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "19820:17:50"
                  },
                  "scope": 17569,
                  "src": "19634:5730:50",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 17570,
              "src": "2048:23318:50"
            }
          ],
          "src": "688:24679:50"
        },
        "id": 50
      },
      "src.sol/amm/vault/UserBalance.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/UserBalance.sol",
          "exportedSymbols": {
            "UserBalance": [
              18120
            ]
          },
          "id": 18121,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 17571,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:51"
            },
            {
              "id": 17572,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:51"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 17573,
              "nodeType": "ImportDirective",
              "scope": 18121,
              "sourceUnit": 656,
              "src": "747:43:51",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../lib/math/Math.sol",
              "id": 17574,
              "nodeType": "ImportDirective",
              "scope": 18121,
              "sourceUnit": 3351,
              "src": "791:30:51",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../lib/openzeppelin/IERC20.sol",
              "id": 17575,
              "nodeType": "ImportDirective",
              "scope": 18121,
              "sourceUnit": 5096,
              "src": "822:40:51",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 17576,
              "nodeType": "ImportDirective",
              "scope": 18121,
              "sourceUnit": 5188,
              "src": "863:49:51",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeCast.sol",
              "file": "../lib/openzeppelin/SafeCast.sol",
              "id": 17577,
              "nodeType": "ImportDirective",
              "scope": 18121,
              "sourceUnit": 5217,
              "src": "913:42:51",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/SafeERC20.sol",
              "file": "../lib/openzeppelin/SafeERC20.sol",
              "id": 17578,
              "nodeType": "ImportDirective",
              "scope": 18121,
              "sourceUnit": 5312,
              "src": "956:43:51",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/AssetTransfersHandler.sol",
              "file": "./AssetTransfersHandler.sol",
              "id": 17579,
              "nodeType": "ImportDirective",
              "scope": 18121,
              "sourceUnit": 14088,
              "src": "1001:37:51",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/VaultAuthorization.sol",
              "file": "./VaultAuthorization.sol",
              "id": 17580,
              "nodeType": "ImportDirective",
              "scope": 18121,
              "sourceUnit": 18419,
              "src": "1039:34:51",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 17582,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "1871:15:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 17583,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1871:15:51"
                },
                {
                  "baseName": {
                    "id": 17584,
                    "name": "AssetTransfersHandler",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 14087,
                    "src": "1888:21:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_AssetTransfersHandler_$14087",
                      "typeString": "contract AssetTransfersHandler"
                    }
                  },
                  "id": 17585,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1888:21:51"
                },
                {
                  "baseName": {
                    "id": 17586,
                    "name": "VaultAuthorization",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 18418,
                    "src": "1911:18:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_VaultAuthorization_$18418",
                      "typeString": "contract VaultAuthorization"
                    }
                  },
                  "id": 17587,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1911:18:51"
                }
              ],
              "contractDependencies": [
                266,
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                14087,
                18418,
                20822,
                21266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 17581,
                "nodeType": "StructuredDocumentation",
                "src": "1075:762:51",
                "text": " Implement User Balance interactions, which combine Internal Balance and using the Vault's ERC20 allowance.\n Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\n transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\n when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\n gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\n Internal Balance management features batching, which means a single contract call can be used to perform multiple\n operations of different kinds, with different senders and recipients, at once."
              },
              "fullyImplemented": false,
              "id": 18120,
              "linearizedBaseContracts": [
                18120,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                14087,
                5187,
                21266,
                20822,
                266
              ],
              "name": "UserBalance",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 17590,
                  "libraryName": {
                    "id": 17588,
                    "name": "Math",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3350,
                    "src": "1942:4:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Math_$3350",
                      "typeString": "library Math"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1936:23:51",
                  "typeName": {
                    "id": 17589,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1951:7:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 17593,
                  "libraryName": {
                    "id": 17591,
                    "name": "SafeCast",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5216,
                    "src": "1970:8:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeCast_$5216",
                      "typeString": "library SafeCast"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1964:27:51",
                  "typeName": {
                    "id": 17592,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1983:7:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "id": 17596,
                  "libraryName": {
                    "id": 17594,
                    "name": "SafeERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5311,
                    "src": "2002:9:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SafeERC20_$5311",
                      "typeString": "library SafeERC20"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1996:27:51",
                  "typeName": {
                    "id": 17595,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "2016:6:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 17602,
                  "mutability": "mutable",
                  "name": "_internalTokenBalance",
                  "nodeType": "VariableDeclaration",
                  "scope": 18120,
                  "src": "2087:76:51",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$_$",
                    "typeString": "mapping(address => mapping(contract IERC20 => uint256))"
                  },
                  "typeName": {
                    "id": 17601,
                    "keyType": {
                      "id": 17597,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "2095:7:51",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "2087:46:51",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$_$",
                      "typeString": "mapping(address => mapping(contract IERC20 => uint256))"
                    },
                    "valueType": {
                      "id": 17600,
                      "keyType": {
                        "id": 17598,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "2114:6:51",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "nodeType": "Mapping",
                      "src": "2106:26:51",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                        "typeString": "mapping(contract IERC20 => uint256)"
                      },
                      "valueType": {
                        "id": 17599,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2124:7:51",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "baseFunctions": [
                    20893
                  ],
                  "body": {
                    "id": 17647,
                    "nodeType": "Block",
                    "src": "2331:184:51",
                    "statements": [
                      {
                        "expression": {
                          "id": 17621,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17614,
                            "name": "balances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17612,
                            "src": "2341:8:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 17618,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17607,
                                  "src": "2366:6:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 17619,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "2366:13:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 17617,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "2352:13:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (uint256[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 17615,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2356:7:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 17616,
                                "nodeType": "ArrayTypeName",
                                "src": "2356:9:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                  "typeString": "uint256[]"
                                }
                              }
                            },
                            "id": 17620,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2352:28:51",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "src": "2341:39:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "id": 17622,
                        "nodeType": "ExpressionStatement",
                        "src": "2341:39:51"
                      },
                      {
                        "body": {
                          "id": 17645,
                          "nodeType": "Block",
                          "src": "2434:75:51",
                          "statements": [
                            {
                              "expression": {
                                "id": 17643,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 17634,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17612,
                                    "src": "2448:8:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 17636,
                                  "indexExpression": {
                                    "id": 17635,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17624,
                                    "src": "2457:1:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "2448:11:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 17638,
                                      "name": "user",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17604,
                                      "src": "2482:4:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    {
                                      "baseExpression": {
                                        "id": 17639,
                                        "name": "tokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17607,
                                        "src": "2488:6:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                          "typeString": "contract IERC20[] memory"
                                        }
                                      },
                                      "id": 17641,
                                      "indexExpression": {
                                        "id": 17640,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17624,
                                        "src": "2495:1:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "2488:9:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    ],
                                    "id": 17637,
                                    "name": "_getInternalBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18054,
                                    "src": "2462:19:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_address_$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                                      "typeString": "function (address,contract IERC20) view returns (uint256)"
                                    }
                                  },
                                  "id": 17642,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2462:36:51",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2448:50:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 17644,
                              "nodeType": "ExpressionStatement",
                              "src": "2448:50:51"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 17630,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 17627,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17624,
                            "src": "2410:1:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 17628,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17607,
                              "src": "2414:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 17629,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2414:13:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2410:17:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 17646,
                        "initializationExpression": {
                          "assignments": [
                            17624
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 17624,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 17646,
                              "src": "2395:9:51",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 17623,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2395:7:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 17626,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 17625,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2407:1:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2395:13:51"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 17632,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2429:3:51",
                            "subExpression": {
                              "id": 17631,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17624,
                              "src": "2429:1:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 17633,
                          "nodeType": "ExpressionStatement",
                          "src": "2429:3:51"
                        },
                        "nodeType": "ForStatement",
                        "src": "2390:119:51"
                      }
                    ]
                  },
                  "functionSelector": "0f5a6efa",
                  "id": 17648,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 17609,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2274:8:51"
                  },
                  "parameters": {
                    "id": 17608,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17604,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 17648,
                        "src": "2198:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17603,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2198:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17607,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 17648,
                        "src": "2212:22:51",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 17605,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "2212:6:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 17606,
                          "nodeType": "ArrayTypeName",
                          "src": "2212:8:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2197:38:51"
                  },
                  "returnParameters": {
                    "id": 17613,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17612,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 17648,
                        "src": "2300:25:51",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 17610,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2300:7:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 17611,
                          "nodeType": "ArrayTypeName",
                          "src": "2300:9:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2299:27:51"
                  },
                  "scope": 18120,
                  "src": "2170:345:51",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    20900
                  ],
                  "body": {
                    "id": 17803,
                    "nodeType": "Block",
                    "src": "2615:2477:51",
                    "statements": [
                      {
                        "assignments": [
                          17658
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17658,
                            "mutability": "mutable",
                            "name": "ethWrapped",
                            "nodeType": "VariableDeclaration",
                            "scope": 17803,
                            "src": "2735:18:51",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17657,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "2735:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17660,
                        "initialValue": {
                          "hexValue": "30",
                          "id": 17659,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2756:1:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2735:22:51"
                      },
                      {
                        "assignments": [
                          17662
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17662,
                            "mutability": "mutable",
                            "name": "checkedCallerIsRelayer",
                            "nodeType": "VariableDeclaration",
                            "scope": 17803,
                            "src": "2844:27:51",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 17661,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "2844:4:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17664,
                        "initialValue": {
                          "hexValue": "66616c7365",
                          "id": 17663,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2874:5:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2844:35:51"
                      },
                      {
                        "assignments": [
                          17666
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17666,
                            "mutability": "mutable",
                            "name": "checkedNotPaused",
                            "nodeType": "VariableDeclaration",
                            "scope": 17803,
                            "src": "2889:21:51",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 17665,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "2889:4:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17668,
                        "initialValue": {
                          "hexValue": "66616c7365",
                          "id": 17667,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2913:5:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "false"
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2889:29:51"
                      },
                      {
                        "body": {
                          "id": 17797,
                          "nodeType": "Block",
                          "src": "2970:2037:51",
                          "statements": [
                            {
                              "assignments": [
                                17681
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 17681,
                                  "mutability": "mutable",
                                  "name": "kind",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 17797,
                                  "src": "2984:22:51",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                    "typeString": "enum IVault.UserBalanceOpKind"
                                  },
                                  "typeName": {
                                    "id": 17680,
                                    "name": "UserBalanceOpKind",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 20916,
                                    "src": "2984:17:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                      "typeString": "enum IVault.UserBalanceOpKind"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 17682,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2984:22:51"
                            },
                            {
                              "assignments": [
                                17684
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 17684,
                                  "mutability": "mutable",
                                  "name": "asset",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 17797,
                                  "src": "3020:12:51",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  },
                                  "typeName": {
                                    "id": 17683,
                                    "name": "IAsset",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 20645,
                                    "src": "3020:6:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IAsset_$20645",
                                      "typeString": "contract IAsset"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 17685,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3020:12:51"
                            },
                            {
                              "assignments": [
                                17687
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 17687,
                                  "mutability": "mutable",
                                  "name": "amount",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 17797,
                                  "src": "3046:14:51",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "typeName": {
                                    "id": 17686,
                                    "name": "uint256",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3046:7:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 17688,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3046:14:51"
                            },
                            {
                              "assignments": [
                                17690
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 17690,
                                  "mutability": "mutable",
                                  "name": "sender",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 17797,
                                  "src": "3074:14:51",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  },
                                  "typeName": {
                                    "id": 17689,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3074:7:51",
                                    "stateMutability": "nonpayable",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 17691,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3074:14:51"
                            },
                            {
                              "assignments": [
                                17693
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 17693,
                                  "mutability": "mutable",
                                  "name": "recipient",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 17797,
                                  "src": "3102:25:51",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address_payable",
                                    "typeString": "address payable"
                                  },
                                  "typeName": {
                                    "id": 17692,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3102:15:51",
                                    "stateMutability": "payable",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 17694,
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3102:25:51"
                            },
                            {
                              "expression": {
                                "id": 17708,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "components": [
                                    {
                                      "id": 17695,
                                      "name": "kind",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17681,
                                      "src": "3262:4:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                        "typeString": "enum IVault.UserBalanceOpKind"
                                      }
                                    },
                                    {
                                      "id": 17696,
                                      "name": "asset",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17684,
                                      "src": "3268:5:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IAsset_$20645",
                                        "typeString": "contract IAsset"
                                      }
                                    },
                                    {
                                      "id": 17697,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17687,
                                      "src": "3275:6:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "id": 17698,
                                      "name": "sender",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17690,
                                      "src": "3283:6:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    {
                                      "id": 17699,
                                      "name": "recipient",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17693,
                                      "src": "3291:9:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address_payable",
                                        "typeString": "address payable"
                                      }
                                    },
                                    {
                                      "id": 17700,
                                      "name": "checkedCallerIsRelayer",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17662,
                                      "src": "3302:22:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    }
                                  ],
                                  "id": 17701,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "TupleExpression",
                                  "src": "3261:64:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_enum$_UserBalanceOpKind_$20916_$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_$_t_address_payable_$_t_bool_$",
                                    "typeString": "tuple(enum IVault.UserBalanceOpKind,contract IAsset,uint256,address,address payable,bool)"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "baseExpression": {
                                        "id": 17703,
                                        "name": "ops",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17651,
                                        "src": "3368:3:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_struct$_UserBalanceOp_$20911_memory_ptr_$dyn_memory_ptr",
                                          "typeString": "struct IVault.UserBalanceOp memory[] memory"
                                        }
                                      },
                                      "id": 17705,
                                      "indexExpression": {
                                        "id": 17704,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17670,
                                        "src": "3372:1:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "3368:6:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_UserBalanceOp_$20911_memory_ptr",
                                        "typeString": "struct IVault.UserBalanceOp memory"
                                      }
                                    },
                                    {
                                      "id": 17706,
                                      "name": "checkedCallerIsRelayer",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17662,
                                      "src": "3392:22:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_struct$_UserBalanceOp_$20911_memory_ptr",
                                        "typeString": "struct IVault.UserBalanceOp memory"
                                      },
                                      {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    ],
                                    "id": 17702,
                                    "name": "_validateUserBalanceOp",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18119,
                                    "src": "3328:22:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_struct$_UserBalanceOp_$20911_memory_ptr_$_t_bool_$returns$_t_enum$_UserBalanceOpKind_$20916_$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_$_t_address_payable_$_t_bool_$",
                                      "typeString": "function (struct IVault.UserBalanceOp memory,bool) view returns (enum IVault.UserBalanceOpKind,contract IAsset,uint256,address,address payable,bool)"
                                    }
                                  },
                                  "id": 17707,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3328:100:51",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_enum$_UserBalanceOpKind_$20916_$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_$_t_address_payable_$_t_bool_$",
                                    "typeString": "tuple(enum IVault.UserBalanceOpKind,contract IAsset,uint256,address,address payable,bool)"
                                  }
                                },
                                "src": "3261:167:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 17709,
                              "nodeType": "ExpressionStatement",
                              "src": "3261:167:51"
                            },
                            {
                              "condition": {
                                "commonType": {
                                  "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                  "typeString": "enum IVault.UserBalanceOpKind"
                                },
                                "id": 17713,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 17710,
                                  "name": "kind",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17681,
                                  "src": "3447:4:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                    "typeString": "enum IVault.UserBalanceOpKind"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "expression": {
                                    "id": 17711,
                                    "name": "UserBalanceOpKind",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20916,
                                    "src": "3455:17:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_enum$_UserBalanceOpKind_$20916_$",
                                      "typeString": "type(enum IVault.UserBalanceOpKind)"
                                    }
                                  },
                                  "id": 17712,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "WITHDRAW_INTERNAL",
                                  "nodeType": "MemberAccess",
                                  "src": "3455:35:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                    "typeString": "enum IVault.UserBalanceOpKind"
                                  }
                                },
                                "src": "3447:43:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 17795,
                                "nodeType": "Block",
                                "src": "3691:1306:51",
                                "statements": [
                                  {
                                    "condition": {
                                      "id": 17723,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "UnaryOperation",
                                      "operator": "!",
                                      "prefix": true,
                                      "src": "3938:17:51",
                                      "subExpression": {
                                        "id": 17722,
                                        "name": "checkedNotPaused",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17666,
                                        "src": "3939:16:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        }
                                      },
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "id": 17732,
                                    "nodeType": "IfStatement",
                                    "src": "3934:127:51",
                                    "trueBody": {
                                      "id": 17731,
                                      "nodeType": "Block",
                                      "src": "3957:104:51",
                                      "statements": [
                                        {
                                          "expression": {
                                            "arguments": [],
                                            "expression": {
                                              "argumentTypes": [],
                                              "id": 17724,
                                              "name": "_ensureNotPaused",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 1440,
                                              "src": "3979:16:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_view$__$returns$__$",
                                                "typeString": "function () view"
                                              }
                                            },
                                            "id": 17725,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "3979:18:51",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_tuple$__$",
                                              "typeString": "tuple()"
                                            }
                                          },
                                          "id": 17726,
                                          "nodeType": "ExpressionStatement",
                                          "src": "3979:18:51"
                                        },
                                        {
                                          "expression": {
                                            "id": 17729,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftHandSide": {
                                              "id": 17727,
                                              "name": "checkedNotPaused",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 17666,
                                              "src": "4019:16:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_bool",
                                                "typeString": "bool"
                                              }
                                            },
                                            "nodeType": "Assignment",
                                            "operator": "=",
                                            "rightHandSide": {
                                              "hexValue": "74727565",
                                              "id": 17728,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "kind": "bool",
                                              "lValueRequested": false,
                                              "nodeType": "Literal",
                                              "src": "4038:4:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_bool",
                                                "typeString": "bool"
                                              },
                                              "value": "true"
                                            },
                                            "src": "4019:23:51",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            }
                                          },
                                          "id": 17730,
                                          "nodeType": "ExpressionStatement",
                                          "src": "4019:23:51"
                                        }
                                      ]
                                    }
                                  },
                                  {
                                    "condition": {
                                      "commonType": {
                                        "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                        "typeString": "enum IVault.UserBalanceOpKind"
                                      },
                                      "id": 17736,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 17733,
                                        "name": "kind",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17681,
                                        "src": "4083:4:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                          "typeString": "enum IVault.UserBalanceOpKind"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "==",
                                      "rightExpression": {
                                        "expression": {
                                          "id": 17734,
                                          "name": "UserBalanceOpKind",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 20916,
                                          "src": "4091:17:51",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_enum$_UserBalanceOpKind_$20916_$",
                                            "typeString": "type(enum IVault.UserBalanceOpKind)"
                                          }
                                        },
                                        "id": 17735,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "memberName": "DEPOSIT_INTERNAL",
                                        "nodeType": "MemberAccess",
                                        "src": "4091:34:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                          "typeString": "enum IVault.UserBalanceOpKind"
                                        }
                                      },
                                      "src": "4083:42:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "falseBody": {
                                      "id": 17793,
                                      "nodeType": "Block",
                                      "src": "4443:540:51",
                                      "statements": [
                                        {
                                          "expression": {
                                            "arguments": [
                                              {
                                                "id": 17761,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "nodeType": "UnaryOperation",
                                                "operator": "!",
                                                "prefix": true,
                                                "src": "4526:14:51",
                                                "subExpression": {
                                                  "arguments": [
                                                    {
                                                      "id": 17759,
                                                      "name": "asset",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17684,
                                                      "src": "4534:5:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_contract$_IAsset_$20645",
                                                        "typeString": "contract IAsset"
                                                      }
                                                    }
                                                  ],
                                                  "expression": {
                                                    "argumentTypes": [
                                                      {
                                                        "typeIdentifier": "t_contract$_IAsset_$20645",
                                                        "typeString": "contract IAsset"
                                                      }
                                                    ],
                                                    "id": 17758,
                                                    "name": "_isETH",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 183,
                                                    "src": "4527:6:51",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_bool_$",
                                                      "typeString": "function (contract IAsset) pure returns (bool)"
                                                    }
                                                  },
                                                  "id": 17760,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "kind": "functionCall",
                                                  "lValueRequested": false,
                                                  "names": [],
                                                  "nodeType": "FunctionCall",
                                                  "src": "4527:13:51",
                                                  "tryCall": false,
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                  }
                                                },
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              },
                                              {
                                                "expression": {
                                                  "id": 17762,
                                                  "name": "Errors",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 655,
                                                  "src": "4542:6:51",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                                    "typeString": "type(library Errors)"
                                                  }
                                                },
                                                "id": 17763,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "CANNOT_USE_ETH_SENTINEL",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 618,
                                                "src": "4542:30:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "id": 17757,
                                              "name": "_require",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 361,
                                              "src": "4517:8:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                                "typeString": "function (bool,uint256) pure"
                                              }
                                            },
                                            "id": 17764,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "4517:56:51",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_tuple$__$",
                                              "typeString": "tuple()"
                                            }
                                          },
                                          "id": 17765,
                                          "nodeType": "ExpressionStatement",
                                          "src": "4517:56:51"
                                        },
                                        {
                                          "assignments": [
                                            17767
                                          ],
                                          "declarations": [
                                            {
                                              "constant": false,
                                              "id": 17767,
                                              "mutability": "mutable",
                                              "name": "token",
                                              "nodeType": "VariableDeclaration",
                                              "scope": 17793,
                                              "src": "4595:12:51",
                                              "stateVariable": false,
                                              "storageLocation": "default",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                                "typeString": "contract IERC20"
                                              },
                                              "typeName": {
                                                "id": 17766,
                                                "name": "IERC20",
                                                "nodeType": "UserDefinedTypeName",
                                                "referencedDeclaration": 5095,
                                                "src": "4595:6:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                                  "typeString": "contract IERC20"
                                                }
                                              },
                                              "visibility": "internal"
                                            }
                                          ],
                                          "id": 17771,
                                          "initialValue": {
                                            "arguments": [
                                              {
                                                "id": 17769,
                                                "name": "asset",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 17684,
                                                "src": "4620:5:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                                  "typeString": "contract IAsset"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                                  "typeString": "contract IAsset"
                                                }
                                              ],
                                              "id": 17768,
                                              "name": "_asIERC20",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 265,
                                              "src": "4610:9:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                                "typeString": "function (contract IAsset) pure returns (contract IERC20)"
                                              }
                                            },
                                            "id": 17770,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "4610:16:51",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_contract$_IERC20_$5095",
                                              "typeString": "contract IERC20"
                                            }
                                          },
                                          "nodeType": "VariableDeclarationStatement",
                                          "src": "4595:31:51"
                                        },
                                        {
                                          "condition": {
                                            "commonType": {
                                              "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                              "typeString": "enum IVault.UserBalanceOpKind"
                                            },
                                            "id": 17775,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "leftExpression": {
                                              "id": 17772,
                                              "name": "kind",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 17681,
                                              "src": "4653:4:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                                "typeString": "enum IVault.UserBalanceOpKind"
                                              }
                                            },
                                            "nodeType": "BinaryOperation",
                                            "operator": "==",
                                            "rightExpression": {
                                              "expression": {
                                                "id": 17773,
                                                "name": "UserBalanceOpKind",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 20916,
                                                "src": "4661:17:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_enum$_UserBalanceOpKind_$20916_$",
                                                  "typeString": "type(enum IVault.UserBalanceOpKind)"
                                                }
                                              },
                                              "id": 17774,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "memberName": "TRANSFER_INTERNAL",
                                              "nodeType": "MemberAccess",
                                              "src": "4661:35:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                                "typeString": "enum IVault.UserBalanceOpKind"
                                              }
                                            },
                                            "src": "4653:43:51",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            }
                                          },
                                          "falseBody": {
                                            "id": 17791,
                                            "nodeType": "Block",
                                            "src": "4811:154:51",
                                            "statements": [
                                              {
                                                "expression": {
                                                  "arguments": [
                                                    {
                                                      "id": 17785,
                                                      "name": "token",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17767,
                                                      "src": "4909:5:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                                        "typeString": "contract IERC20"
                                                      }
                                                    },
                                                    {
                                                      "id": 17786,
                                                      "name": "sender",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17690,
                                                      "src": "4916:6:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_address",
                                                        "typeString": "address"
                                                      }
                                                    },
                                                    {
                                                      "id": 17787,
                                                      "name": "recipient",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17693,
                                                      "src": "4924:9:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_address_payable",
                                                        "typeString": "address payable"
                                                      }
                                                    },
                                                    {
                                                      "id": 17788,
                                                      "name": "amount",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17687,
                                                      "src": "4935:6:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      }
                                                    }
                                                  ],
                                                  "expression": {
                                                    "argumentTypes": [
                                                      {
                                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                                        "typeString": "contract IERC20"
                                                      },
                                                      {
                                                        "typeIdentifier": "t_address",
                                                        "typeString": "address"
                                                      },
                                                      {
                                                        "typeIdentifier": "t_address_payable",
                                                        "typeString": "address payable"
                                                      },
                                                      {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      }
                                                    ],
                                                    "id": 17784,
                                                    "name": "_transferToExternalBalance",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 17916,
                                                    "src": "4882:26:51",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_address_$_t_uint256_$returns$__$",
                                                      "typeString": "function (contract IERC20,address,address,uint256)"
                                                    }
                                                  },
                                                  "id": 17789,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "kind": "functionCall",
                                                  "lValueRequested": false,
                                                  "names": [],
                                                  "nodeType": "FunctionCall",
                                                  "src": "4882:60:51",
                                                  "tryCall": false,
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_tuple$__$",
                                                    "typeString": "tuple()"
                                                  }
                                                },
                                                "id": 17790,
                                                "nodeType": "ExpressionStatement",
                                                "src": "4882:60:51"
                                              }
                                            ]
                                          },
                                          "id": 17792,
                                          "nodeType": "IfStatement",
                                          "src": "4649:316:51",
                                          "trueBody": {
                                            "id": 17783,
                                            "nodeType": "Block",
                                            "src": "4698:107:51",
                                            "statements": [
                                              {
                                                "expression": {
                                                  "arguments": [
                                                    {
                                                      "id": 17777,
                                                      "name": "token",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17767,
                                                      "src": "4749:5:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                                        "typeString": "contract IERC20"
                                                      }
                                                    },
                                                    {
                                                      "id": 17778,
                                                      "name": "sender",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17690,
                                                      "src": "4756:6:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_address",
                                                        "typeString": "address"
                                                      }
                                                    },
                                                    {
                                                      "id": 17779,
                                                      "name": "recipient",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17693,
                                                      "src": "4764:9:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_address_payable",
                                                        "typeString": "address payable"
                                                      }
                                                    },
                                                    {
                                                      "id": 17780,
                                                      "name": "amount",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 17687,
                                                      "src": "4775:6:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      }
                                                    }
                                                  ],
                                                  "expression": {
                                                    "argumentTypes": [
                                                      {
                                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                                        "typeString": "contract IERC20"
                                                      },
                                                      {
                                                        "typeIdentifier": "t_address",
                                                        "typeString": "address"
                                                      },
                                                      {
                                                        "typeIdentifier": "t_address_payable",
                                                        "typeString": "address payable"
                                                      },
                                                      {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      }
                                                    ],
                                                    "id": 17776,
                                                    "name": "_transferInternalBalance",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 17884,
                                                    "src": "4724:24:51",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_address_$_t_uint256_$returns$__$",
                                                      "typeString": "function (contract IERC20,address,address,uint256)"
                                                    }
                                                  },
                                                  "id": 17781,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "kind": "functionCall",
                                                  "lValueRequested": false,
                                                  "names": [],
                                                  "nodeType": "FunctionCall",
                                                  "src": "4724:58:51",
                                                  "tryCall": false,
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_tuple$__$",
                                                    "typeString": "tuple()"
                                                  }
                                                },
                                                "id": 17782,
                                                "nodeType": "ExpressionStatement",
                                                "src": "4724:58:51"
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    },
                                    "id": 17794,
                                    "nodeType": "IfStatement",
                                    "src": "4079:904:51",
                                    "trueBody": {
                                      "id": 17756,
                                      "nodeType": "Block",
                                      "src": "4127:310:51",
                                      "statements": [
                                        {
                                          "expression": {
                                            "arguments": [
                                              {
                                                "id": 17738,
                                                "name": "asset",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 17684,
                                                "src": "4175:5:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                                  "typeString": "contract IAsset"
                                                }
                                              },
                                              {
                                                "id": 17739,
                                                "name": "sender",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 17690,
                                                "src": "4182:6:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_address",
                                                  "typeString": "address"
                                                }
                                              },
                                              {
                                                "id": 17740,
                                                "name": "recipient",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 17693,
                                                "src": "4190:9:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_address_payable",
                                                  "typeString": "address payable"
                                                }
                                              },
                                              {
                                                "id": 17741,
                                                "name": "amount",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 17687,
                                                "src": "4201:6:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                                  "typeString": "contract IAsset"
                                                },
                                                {
                                                  "typeIdentifier": "t_address",
                                                  "typeString": "address"
                                                },
                                                {
                                                  "typeIdentifier": "t_address_payable",
                                                  "typeString": "address payable"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "id": 17737,
                                              "name": "_depositToInternalBalance",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 17831,
                                              "src": "4149:25:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_address_$_t_address_$_t_uint256_$returns$__$",
                                                "typeString": "function (contract IAsset,address,address,uint256)"
                                              }
                                            },
                                            "id": 17742,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "4149:59:51",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_tuple$__$",
                                              "typeString": "tuple()"
                                            }
                                          },
                                          "id": 17743,
                                          "nodeType": "ExpressionStatement",
                                          "src": "4149:59:51"
                                        },
                                        {
                                          "condition": {
                                            "arguments": [
                                              {
                                                "id": 17745,
                                                "name": "asset",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 17684,
                                                "src": "4327:5:51",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                                  "typeString": "contract IAsset"
                                                }
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_contract$_IAsset_$20645",
                                                  "typeString": "contract IAsset"
                                                }
                                              ],
                                              "id": 17744,
                                              "name": "_isETH",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 183,
                                              "src": "4320:6:51",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_contract$_IAsset_$20645_$returns$_t_bool_$",
                                                "typeString": "function (contract IAsset) pure returns (bool)"
                                              }
                                            },
                                            "id": 17746,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "4320:13:51",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            }
                                          },
                                          "id": 17755,
                                          "nodeType": "IfStatement",
                                          "src": "4316:103:51",
                                          "trueBody": {
                                            "id": 17754,
                                            "nodeType": "Block",
                                            "src": "4335:84:51",
                                            "statements": [
                                              {
                                                "expression": {
                                                  "id": 17752,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "leftHandSide": {
                                                    "id": 17747,
                                                    "name": "ethWrapped",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 17658,
                                                    "src": "4361:10:51",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  },
                                                  "nodeType": "Assignment",
                                                  "operator": "=",
                                                  "rightHandSide": {
                                                    "arguments": [
                                                      {
                                                        "id": 17750,
                                                        "name": "amount",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 17687,
                                                        "src": "4389:6:51",
                                                        "typeDescriptions": {
                                                          "typeIdentifier": "t_uint256",
                                                          "typeString": "uint256"
                                                        }
                                                      }
                                                    ],
                                                    "expression": {
                                                      "argumentTypes": [
                                                        {
                                                          "typeIdentifier": "t_uint256",
                                                          "typeString": "uint256"
                                                        }
                                                      ],
                                                      "expression": {
                                                        "id": 17748,
                                                        "name": "ethWrapped",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 17658,
                                                        "src": "4374:10:51",
                                                        "typeDescriptions": {
                                                          "typeIdentifier": "t_uint256",
                                                          "typeString": "uint256"
                                                        }
                                                      },
                                                      "id": 17749,
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": false,
                                                      "lValueRequested": false,
                                                      "memberName": "add",
                                                      "nodeType": "MemberAccess",
                                                      "referencedDeclaration": 3115,
                                                      "src": "4374:14:51",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                      }
                                                    },
                                                    "id": 17751,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "kind": "functionCall",
                                                    "lValueRequested": false,
                                                    "names": [],
                                                    "nodeType": "FunctionCall",
                                                    "src": "4374:22:51",
                                                    "tryCall": false,
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  },
                                                  "src": "4361:35:51",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "id": 17753,
                                                "nodeType": "ExpressionStatement",
                                                "src": "4361:35:51"
                                              }
                                            ]
                                          }
                                        }
                                      ]
                                    }
                                  }
                                ]
                              },
                              "id": 17796,
                              "nodeType": "IfStatement",
                              "src": "3443:1554:51",
                              "trueBody": {
                                "id": 17721,
                                "nodeType": "Block",
                                "src": "3492:193:51",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 17715,
                                          "name": "asset",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 17684,
                                          "src": "3637:5:51",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IAsset_$20645",
                                            "typeString": "contract IAsset"
                                          }
                                        },
                                        {
                                          "id": 17716,
                                          "name": "sender",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 17690,
                                          "src": "3644:6:51",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          }
                                        },
                                        {
                                          "id": 17717,
                                          "name": "recipient",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 17693,
                                          "src": "3652:9:51",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address_payable",
                                            "typeString": "address payable"
                                          }
                                        },
                                        {
                                          "id": 17718,
                                          "name": "amount",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 17687,
                                          "src": "3663:6:51",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_contract$_IAsset_$20645",
                                            "typeString": "contract IAsset"
                                          },
                                          {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          },
                                          {
                                            "typeIdentifier": "t_address_payable",
                                            "typeString": "address payable"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 17714,
                                        "name": "_withdrawFromInternalBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17859,
                                        "src": "3608:28:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_address_$_t_address_payable_$_t_uint256_$returns$__$",
                                          "typeString": "function (contract IAsset,address,address payable,uint256)"
                                        }
                                      },
                                      "id": 17719,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "3608:62:51",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 17720,
                                    "nodeType": "ExpressionStatement",
                                    "src": "3608:62:51"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 17676,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 17673,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17670,
                            "src": "2949:1:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 17674,
                              "name": "ops",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17651,
                              "src": "2953:3:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_UserBalanceOp_$20911_memory_ptr_$dyn_memory_ptr",
                                "typeString": "struct IVault.UserBalanceOp memory[] memory"
                              }
                            },
                            "id": 17675,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2953:10:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2949:14:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 17798,
                        "initializationExpression": {
                          "assignments": [
                            17670
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 17670,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 17798,
                              "src": "2934:9:51",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 17669,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2934:7:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 17672,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 17671,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2946:1:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2934:13:51"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 17678,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "2965:3:51",
                            "subExpression": {
                              "id": 17677,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17670,
                              "src": "2965:1:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 17679,
                          "nodeType": "ExpressionStatement",
                          "src": "2965:3:51"
                        },
                        "nodeType": "ForStatement",
                        "src": "2929:2078:51"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17800,
                              "name": "ethWrapped",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17658,
                              "src": "5074:10:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 17799,
                            "name": "_handleRemainingEth",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14046,
                            "src": "5054:19:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 17801,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5054:31:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17802,
                        "nodeType": "ExpressionStatement",
                        "src": "5054:31:51"
                      }
                    ]
                  },
                  "functionSelector": "0e8e3e84",
                  "id": 17804,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 17655,
                      "modifierName": {
                        "id": 17654,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "2602:12:51",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "2602:12:51"
                    }
                  ],
                  "name": "manageUserBalance",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 17653,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "2593:8:51"
                  },
                  "parameters": {
                    "id": 17652,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17651,
                        "mutability": "mutable",
                        "name": "ops",
                        "nodeType": "VariableDeclaration",
                        "scope": 17804,
                        "src": "2548:26:51",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_UserBalanceOp_$20911_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.UserBalanceOp[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 17649,
                            "name": "UserBalanceOp",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20911,
                            "src": "2548:13:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_UserBalanceOp_$20911_storage_ptr",
                              "typeString": "struct IVault.UserBalanceOp"
                            }
                          },
                          "id": 17650,
                          "nodeType": "ArrayTypeName",
                          "src": "2548:15:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_UserBalanceOp_$20911_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.UserBalanceOp[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2547:28:51"
                  },
                  "returnParameters": {
                    "id": 17656,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2615:0:51"
                  },
                  "scope": 18120,
                  "src": "2521:2571:51",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 17830,
                    "nodeType": "Block",
                    "src": "5244:140:51",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17816,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17810,
                              "src": "5279:9:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 17818,
                                  "name": "asset",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17806,
                                  "src": "5309:5:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  }
                                ],
                                "id": 17817,
                                "name": "_translateToIERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [
                                  202,
                                  249
                                ],
                                "referencedDeclaration": 202,
                                "src": "5290:18:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                  "typeString": "function (contract IAsset) view returns (contract IERC20)"
                                }
                              },
                              "id": 17819,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5290:25:51",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 17820,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17812,
                              "src": "5317:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 17815,
                            "name": "_increaseInternalBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              17951
                            ],
                            "referencedDeclaration": 17951,
                            "src": "5254:24:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                              "typeString": "function (address,contract IERC20,uint256)"
                            }
                          },
                          "id": 17821,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5254:70:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17822,
                        "nodeType": "ExpressionStatement",
                        "src": "5254:70:51"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17824,
                              "name": "asset",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17806,
                              "src": "5348:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            },
                            {
                              "id": 17825,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17812,
                              "src": "5355:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 17826,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17808,
                              "src": "5363:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "hexValue": "66616c7365",
                              "id": 17827,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "bool",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5371:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "value": "false"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 17823,
                            "name": "_receiveAsset",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 13943,
                            "src": "5334:13:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_$_t_bool_$returns$__$",
                              "typeString": "function (contract IAsset,uint256,address,bool)"
                            }
                          },
                          "id": 17828,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5334:43:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17829,
                        "nodeType": "ExpressionStatement",
                        "src": "5334:43:51"
                      }
                    ]
                  },
                  "id": 17831,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_depositToInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17813,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17806,
                        "mutability": "mutable",
                        "name": "asset",
                        "nodeType": "VariableDeclaration",
                        "scope": 17831,
                        "src": "5142:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        },
                        "typeName": {
                          "id": 17805,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "5142:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17808,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 17831,
                        "src": "5164:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17807,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5164:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17810,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 17831,
                        "src": "5188:17:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17809,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5188:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17812,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 17831,
                        "src": "5215:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17811,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5215:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5132:103:51"
                  },
                  "returnParameters": {
                    "id": 17814,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5244:0:51"
                  },
                  "scope": 18120,
                  "src": "5098:286:51",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 17858,
                    "nodeType": "Block",
                    "src": "5547:247:51",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17843,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17835,
                              "src": "5685:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 17845,
                                  "name": "asset",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17833,
                                  "src": "5712:5:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IAsset_$20645",
                                    "typeString": "contract IAsset"
                                  }
                                ],
                                "id": 17844,
                                "name": "_translateToIERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [
                                  202,
                                  249
                                ],
                                "referencedDeclaration": 202,
                                "src": "5693:18:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$_t_contract$_IAsset_$20645_$returns$_t_contract$_IERC20_$5095_$",
                                  "typeString": "function (contract IAsset) view returns (contract IERC20)"
                                }
                              },
                              "id": 17846,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5693:25:51",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 17847,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17839,
                              "src": "5720:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "66616c7365",
                              "id": 17848,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "bool",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5728:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "value": "false"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 17842,
                            "name": "_decreaseInternalBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              18010
                            ],
                            "referencedDeclaration": 18010,
                            "src": "5660:24:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_uint256_$_t_bool_$returns$_t_uint256_$",
                              "typeString": "function (address,contract IERC20,uint256,bool) returns (uint256)"
                            }
                          },
                          "id": 17849,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5660:74:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17850,
                        "nodeType": "ExpressionStatement",
                        "src": "5660:74:51"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17852,
                              "name": "asset",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17833,
                              "src": "5755:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            },
                            {
                              "id": 17853,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17839,
                              "src": "5762:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 17854,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17837,
                              "src": "5770:9:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "hexValue": "66616c7365",
                              "id": 17855,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "bool",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5781:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "value": "false"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 17851,
                            "name": "_sendAsset",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14010,
                            "src": "5744:10:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_payable_$_t_bool_$returns$__$",
                              "typeString": "function (contract IAsset,uint256,address payable,bool)"
                            }
                          },
                          "id": 17856,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5744:43:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17857,
                        "nodeType": "ExpressionStatement",
                        "src": "5744:43:51"
                      }
                    ]
                  },
                  "id": 17859,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_withdrawFromInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17840,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17833,
                        "mutability": "mutable",
                        "name": "asset",
                        "nodeType": "VariableDeclaration",
                        "scope": 17859,
                        "src": "5437:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        },
                        "typeName": {
                          "id": 17832,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "5437:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17835,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 17859,
                        "src": "5459:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17834,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5459:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17837,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 17859,
                        "src": "5483:25:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 17836,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5483:15:51",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17839,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 17859,
                        "src": "5518:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17838,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5518:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5427:111:51"
                  },
                  "returnParameters": {
                    "id": 17841,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5547:0:51"
                  },
                  "scope": 18120,
                  "src": "5390:404:51",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 17883,
                    "nodeType": "Block",
                    "src": "5945:234:51",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17871,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17863,
                              "src": "6083:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 17872,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17861,
                              "src": "6091:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 17873,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17867,
                              "src": "6098:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "66616c7365",
                              "id": 17874,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "bool",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "6106:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "value": "false"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 17870,
                            "name": "_decreaseInternalBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              18010
                            ],
                            "referencedDeclaration": 18010,
                            "src": "6058:24:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_uint256_$_t_bool_$returns$_t_uint256_$",
                              "typeString": "function (address,contract IERC20,uint256,bool) returns (uint256)"
                            }
                          },
                          "id": 17875,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6058:54:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17876,
                        "nodeType": "ExpressionStatement",
                        "src": "6058:54:51"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17878,
                              "name": "recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17865,
                              "src": "6147:9:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 17879,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17861,
                              "src": "6158:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 17880,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17867,
                              "src": "6165:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 17877,
                            "name": "_increaseInternalBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              17951
                            ],
                            "referencedDeclaration": 17951,
                            "src": "6122:24:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$__$",
                              "typeString": "function (address,contract IERC20,uint256)"
                            }
                          },
                          "id": 17881,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6122:50:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17882,
                        "nodeType": "ExpressionStatement",
                        "src": "6122:50:51"
                      }
                    ]
                  },
                  "id": 17884,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_transferInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17868,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17861,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 17884,
                        "src": "5843:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 17860,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5843:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17863,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 17884,
                        "src": "5865:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17862,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5865:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17865,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 17884,
                        "src": "5889:17:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17864,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5889:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17867,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 17884,
                        "src": "5916:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17866,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5916:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5833:103:51"
                  },
                  "returnParameters": {
                    "id": 17869,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5945:0:51"
                  },
                  "scope": 18120,
                  "src": "5800:379:51",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 17915,
                    "nodeType": "Block",
                    "src": "6332:182:51",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 17897,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 17895,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17892,
                            "src": "6346:6:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 17896,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "6355:1:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "6346:10:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 17914,
                        "nodeType": "IfStatement",
                        "src": "6342:166:51",
                        "trueBody": {
                          "id": 17913,
                          "nodeType": "Block",
                          "src": "6358:150:51",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 17901,
                                    "name": "sender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17888,
                                    "src": "6395:6:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 17902,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17890,
                                    "src": "6403:9:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 17903,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17892,
                                    "src": "6414:6:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "id": 17898,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17886,
                                    "src": "6372:5:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 17900,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "safeTransferFrom",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 5274,
                                  "src": "6372:22:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$5095_$",
                                    "typeString": "function (contract IERC20,address,address,uint256)"
                                  }
                                },
                                "id": 17904,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "6372:49:51",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 17905,
                              "nodeType": "ExpressionStatement",
                              "src": "6372:49:51"
                            },
                            {
                              "eventCall": {
                                "arguments": [
                                  {
                                    "id": 17907,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17886,
                                    "src": "6464:5:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "id": 17908,
                                    "name": "sender",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17888,
                                    "src": "6471:6:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 17909,
                                    "name": "recipient",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17890,
                                    "src": "6479:9:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "id": 17910,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 17892,
                                    "src": "6490:6:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 17906,
                                  "name": "ExternalBalanceTransfer",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20936,
                                  "src": "6440:23:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20_$5095_$_t_address_$_t_address_$_t_uint256_$returns$__$",
                                    "typeString": "function (contract IERC20,address,address,uint256)"
                                  }
                                },
                                "id": 17911,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "6440:57:51",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 17912,
                              "nodeType": "EmitStatement",
                              "src": "6435:62:51"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 17916,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_transferToExternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 17893,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17886,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 17916,
                        "src": "6230:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 17885,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6230:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17888,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 17916,
                        "src": "6252:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17887,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6252:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17890,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 17916,
                        "src": "6276:17:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17889,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6276:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17892,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 17916,
                        "src": "6303:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17891,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6303:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6220:103:51"
                  },
                  "returnParameters": {
                    "id": 17894,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6332:0:51"
                  },
                  "scope": 18120,
                  "src": "6185:329:51",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "baseFunctions": [
                    14073
                  ],
                  "body": {
                    "id": 17950,
                    "nodeType": "Block",
                    "src": "6741:210:51",
                    "statements": [
                      {
                        "assignments": [
                          17928
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17928,
                            "mutability": "mutable",
                            "name": "currentBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17950,
                            "src": "6751:22:51",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17927,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "6751:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17933,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 17930,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17919,
                              "src": "6796:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 17931,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17921,
                              "src": "6805:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 17929,
                            "name": "_getInternalBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18054,
                            "src": "6776:19:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_address_$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                              "typeString": "function (address,contract IERC20) view returns (uint256)"
                            }
                          },
                          "id": 17932,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6776:35:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6751:60:51"
                      },
                      {
                        "assignments": [
                          17935
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17935,
                            "mutability": "mutable",
                            "name": "newBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 17950,
                            "src": "6821:18:51",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17934,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "6821:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17940,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 17938,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17923,
                              "src": "6861:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 17936,
                              "name": "currentBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17928,
                              "src": "6842:14:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 17937,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3115,
                            "src": "6842:18:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 17939,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6842:26:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6821:47:51"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17942,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17919,
                              "src": "6898:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 17943,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17921,
                              "src": "6907:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 17944,
                              "name": "newBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17935,
                              "src": "6914:10:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 17945,
                                  "name": "amount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 17923,
                                  "src": "6926:6:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 17946,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "toInt256",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5215,
                                "src": "6926:15:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_int256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (int256)"
                                }
                              },
                              "id": 17947,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6926:17:51",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            ],
                            "id": 17941,
                            "name": "_setInternalBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18037,
                            "src": "6878:19:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_uint256_$_t_int256_$returns$__$",
                              "typeString": "function (address,contract IERC20,uint256,int256)"
                            }
                          },
                          "id": 17948,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6878:66:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17949,
                        "nodeType": "ExpressionStatement",
                        "src": "6878:66:51"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 17917,
                    "nodeType": "StructuredDocumentation",
                    "src": "6520:87:51",
                    "text": " @dev Increases `account`'s Internal Balance for `token` by `amount`."
                  },
                  "id": 17951,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_increaseInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 17925,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "6732:8:51"
                  },
                  "parameters": {
                    "id": 17924,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17919,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 17951,
                        "src": "6655:15:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17918,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6655:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17921,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 17951,
                        "src": "6680:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 17920,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6680:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17923,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 17951,
                        "src": "6702:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17922,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6702:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6645:77:51"
                  },
                  "returnParameters": {
                    "id": 17926,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6741:0:51"
                  },
                  "scope": 18120,
                  "src": "6612:339:51",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    14086
                  ],
                  "body": {
                    "id": 18009,
                    "nodeType": "Block",
                    "src": "7405:501:51",
                    "statements": [
                      {
                        "assignments": [
                          17967
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17967,
                            "mutability": "mutable",
                            "name": "currentBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 18009,
                            "src": "7415:22:51",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17966,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7415:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17972,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 17969,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17954,
                              "src": "7460:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 17970,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17956,
                              "src": "7469:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 17968,
                            "name": "_getInternalBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18054,
                            "src": "7440:19:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_address_$_t_contract$_IERC20_$5095_$returns$_t_uint256_$",
                              "typeString": "function (address,contract IERC20) view returns (uint256)"
                            }
                          },
                          "id": 17971,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7440:35:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7415:60:51"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 17979,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 17974,
                                "name": "allowPartial",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17960,
                                "src": "7494:12:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 17977,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 17975,
                                      "name": "currentBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17967,
                                      "src": "7511:14:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": ">=",
                                    "rightExpression": {
                                      "id": 17976,
                                      "name": "amount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 17958,
                                      "src": "7529:6:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "7511:24:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "id": 17978,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7510:26:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "7494:42:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 17980,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "7538:6:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 17981,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "INSUFFICIENT_INTERNAL_BALANCE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 600,
                              "src": "7538:36:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 17973,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "7485:8:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 17982,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7485:90:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 17983,
                        "nodeType": "ExpressionStatement",
                        "src": "7485:90:51"
                      },
                      {
                        "expression": {
                          "id": 17990,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 17984,
                            "name": "deducted",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17964,
                            "src": "7586:8:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 17987,
                                "name": "currentBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17967,
                                "src": "7606:14:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "id": 17988,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17958,
                                "src": "7622:6:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 17985,
                                "name": "Math",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3350,
                                "src": "7597:4:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                  "typeString": "type(library Math)"
                                }
                              },
                              "id": 17986,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "min",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3260,
                              "src": "7597:8:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 17989,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7597:32:51",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7586:43:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 17991,
                        "nodeType": "ExpressionStatement",
                        "src": "7586:43:51"
                      },
                      {
                        "assignments": [
                          17993
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 17993,
                            "mutability": "mutable",
                            "name": "newBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 18009,
                            "src": "7772:18:51",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 17992,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7772:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 17997,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 17996,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 17994,
                            "name": "currentBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17967,
                            "src": "7793:14:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "id": 17995,
                            "name": "deducted",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 17964,
                            "src": "7810:8:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7793:25:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7772:46:51"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 17999,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17954,
                              "src": "7848:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 18000,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17956,
                              "src": "7857:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 18001,
                              "name": "newBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17993,
                              "src": "7864:10:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18006,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "UnaryOperation",
                              "operator": "-",
                              "prefix": true,
                              "src": "7876:22:51",
                              "subExpression": {
                                "components": [
                                  {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "expression": {
                                        "id": 18002,
                                        "name": "deducted",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 17964,
                                        "src": "7878:8:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "id": 18003,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "toInt256",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 5215,
                                      "src": "7878:17:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_int256_$bound_to$_t_uint256_$",
                                        "typeString": "function (uint256) pure returns (int256)"
                                      }
                                    },
                                    "id": 18004,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "7878:19:51",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  }
                                ],
                                "id": 18005,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7877:21:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            ],
                            "id": 17998,
                            "name": "_setInternalBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18037,
                            "src": "7828:19:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_uint256_$_t_int256_$returns$__$",
                              "typeString": "function (address,contract IERC20,uint256,int256)"
                            }
                          },
                          "id": 18007,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7828:71:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 18008,
                        "nodeType": "ExpressionStatement",
                        "src": "7828:71:51"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 17952,
                    "nodeType": "StructuredDocumentation",
                    "src": "6957:260:51",
                    "text": " @dev Decreases `account`'s Internal Balance for `token` by `amount`. If `allowPartial` is true, this function\n doesn't revert if `account` doesn't have enough balance, and sets it to zero and returns the deducted amount\n instead."
                  },
                  "id": 18010,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_decreaseInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 17962,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "7369:8:51"
                  },
                  "parameters": {
                    "id": 17961,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17954,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 18010,
                        "src": "7265:15:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 17953,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "7265:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17956,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 18010,
                        "src": "7290:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 17955,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7290:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17958,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 18010,
                        "src": "7312:14:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17957,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7312:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 17960,
                        "mutability": "mutable",
                        "name": "allowPartial",
                        "nodeType": "VariableDeclaration",
                        "scope": 18010,
                        "src": "7336:17:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 17959,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "7336:4:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7255:104:51"
                  },
                  "returnParameters": {
                    "id": 17965,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 17964,
                        "mutability": "mutable",
                        "name": "deducted",
                        "nodeType": "VariableDeclaration",
                        "scope": 18010,
                        "src": "7387:16:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 17963,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7387:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7386:18:51"
                  },
                  "scope": 18120,
                  "src": "7222:684:51",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18036,
                    "nodeType": "Block",
                    "src": "8451:127:51",
                    "statements": [
                      {
                        "expression": {
                          "id": 18028,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "baseExpression": {
                                "id": 18022,
                                "name": "_internalTokenBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 17602,
                                "src": "8461:21:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$_$",
                                  "typeString": "mapping(address => mapping(contract IERC20 => uint256))"
                                }
                              },
                              "id": 18025,
                              "indexExpression": {
                                "id": 18023,
                                "name": "account",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18013,
                                "src": "8483:7:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "8461:30:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                                "typeString": "mapping(contract IERC20 => uint256)"
                              }
                            },
                            "id": 18026,
                            "indexExpression": {
                              "id": 18024,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18015,
                              "src": "8492:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "8461:37:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 18027,
                            "name": "newBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18017,
                            "src": "8501:10:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "8461:50:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 18029,
                        "nodeType": "ExpressionStatement",
                        "src": "8461:50:51"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 18031,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18013,
                              "src": "8549:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 18032,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18015,
                              "src": "8558:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 18033,
                              "name": "delta",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18019,
                              "src": "8565:5:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            ],
                            "id": 18030,
                            "name": "InternalBalanceChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20925,
                            "src": "8526:22:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20_$5095_$_t_int256_$returns$__$",
                              "typeString": "function (address,contract IERC20,int256)"
                            }
                          },
                          "id": 18034,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8526:45:51",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 18035,
                        "nodeType": "EmitStatement",
                        "src": "8521:50:51"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18011,
                    "nodeType": "StructuredDocumentation",
                    "src": "7912:394:51",
                    "text": " @dev Sets `account`'s Internal Balance for `token` to `newBalance`.\n Emits an `InternalBalanceChanged` event. This event includes `delta`, which is the amount the balance increased\n (if positive) or decreased (if negative). To avoid reading the current balance in order to compute the delta,\n this function relies on the caller providing it directly."
                  },
                  "id": 18037,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18020,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18013,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 18037,
                        "src": "8349:15:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18012,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8349:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18015,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 18037,
                        "src": "8374:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 18014,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8374:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18017,
                        "mutability": "mutable",
                        "name": "newBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18037,
                        "src": "8396:18:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18016,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8396:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18019,
                        "mutability": "mutable",
                        "name": "delta",
                        "nodeType": "VariableDeclaration",
                        "scope": 18037,
                        "src": "8424:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 18018,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8424:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8339:103:51"
                  },
                  "returnParameters": {
                    "id": 18021,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "8451:0:51"
                  },
                  "scope": 18120,
                  "src": "8311:267:51",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 18053,
                    "nodeType": "Block",
                    "src": "8754:61:51",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "baseExpression": {
                              "id": 18047,
                              "name": "_internalTokenBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 17602,
                              "src": "8771:21:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(contract IERC20 => uint256))"
                              }
                            },
                            "id": 18049,
                            "indexExpression": {
                              "id": 18048,
                              "name": "account",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18040,
                              "src": "8793:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "8771:30:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_uint256_$",
                              "typeString": "mapping(contract IERC20 => uint256)"
                            }
                          },
                          "id": 18051,
                          "indexExpression": {
                            "id": 18050,
                            "name": "token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18042,
                            "src": "8802:5:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "8771:37:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 18046,
                        "id": 18052,
                        "nodeType": "Return",
                        "src": "8764:44:51"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18038,
                    "nodeType": "StructuredDocumentation",
                    "src": "8584:73:51",
                    "text": " @dev Returns `account`'s Internal Balance for `token`."
                  },
                  "id": 18054,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18043,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18040,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 18054,
                        "src": "8691:15:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18039,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8691:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18042,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 18054,
                        "src": "8708:12:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 18041,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8708:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8690:31:51"
                  },
                  "returnParameters": {
                    "id": 18046,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18045,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18054,
                        "src": "8745:7:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18044,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8745:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8744:9:51"
                  },
                  "scope": 18120,
                  "src": "8662:153:51",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18118,
                    "nodeType": "Block",
                    "src": "9236:876:51",
                    "statements": [
                      {
                        "assignments": [
                          18075
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18075,
                            "mutability": "mutable",
                            "name": "sender",
                            "nodeType": "VariableDeclaration",
                            "scope": 18118,
                            "src": "9400:14:51",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 18074,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "9400:7:51",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18078,
                        "initialValue": {
                          "expression": {
                            "id": 18076,
                            "name": "op",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18057,
                            "src": "9417:2:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_UserBalanceOp_$20911_memory_ptr",
                              "typeString": "struct IVault.UserBalanceOp memory"
                            }
                          },
                          "id": 18077,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 20908,
                          "src": "9417:9:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9400:26:51"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "id": 18082,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 18079,
                            "name": "sender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18075,
                            "src": "9441:6:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "expression": {
                              "id": 18080,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "9451:3:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 18081,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "src": "9451:10:51",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "src": "9441:20:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 18105,
                        "nodeType": "IfStatement",
                        "src": "9437:575:51",
                        "trueBody": {
                          "id": 18104,
                          "nodeType": "Block",
                          "src": "9463:549:51",
                          "statements": [
                            {
                              "condition": {
                                "id": 18084,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "9778:23:51",
                                "subExpression": {
                                  "id": 18083,
                                  "name": "checkedCallerIsRelayer",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18059,
                                  "src": "9779:22:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 18093,
                              "nodeType": "IfStatement",
                              "src": "9774:130:51",
                              "trueBody": {
                                "id": 18092,
                                "nodeType": "Block",
                                "src": "9803:101:51",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [],
                                      "expression": {
                                        "argumentTypes": [],
                                        "id": 18085,
                                        "name": "_authenticateCaller",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 316,
                                        "src": "9821:19:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_view$__$returns$__$",
                                          "typeString": "function () view"
                                        }
                                      },
                                      "id": 18086,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "9821:21:51",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 18087,
                                    "nodeType": "ExpressionStatement",
                                    "src": "9821:21:51"
                                  },
                                  {
                                    "expression": {
                                      "id": 18090,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftHandSide": {
                                        "id": 18088,
                                        "name": "checkedCallerIsRelayer",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 18059,
                                        "src": "9860:22:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        }
                                      },
                                      "nodeType": "Assignment",
                                      "operator": "=",
                                      "rightHandSide": {
                                        "hexValue": "74727565",
                                        "id": 18089,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "bool",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "9885:4:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bool",
                                          "typeString": "bool"
                                        },
                                        "value": "true"
                                      },
                                      "src": "9860:29:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                      }
                                    },
                                    "id": 18091,
                                    "nodeType": "ExpressionStatement",
                                    "src": "9860:29:51"
                                  }
                                ]
                              }
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "id": 18096,
                                        "name": "sender",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 18075,
                                        "src": "9947:6:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_address",
                                          "typeString": "address"
                                        }
                                      },
                                      {
                                        "expression": {
                                          "id": 18097,
                                          "name": "msg",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": -15,
                                          "src": "9955:3:51",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_magic_message",
                                            "typeString": "msg"
                                          }
                                        },
                                        "id": 18098,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "sender",
                                        "nodeType": "MemberAccess",
                                        "src": "9955:10:51",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_address_payable",
                                          "typeString": "address payable"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_address",
                                          "typeString": "address"
                                        },
                                        {
                                          "typeIdentifier": "t_address_payable",
                                          "typeString": "address payable"
                                        }
                                      ],
                                      "id": 18095,
                                      "name": "_hasApprovedRelayer",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 18388,
                                      "src": "9927:19:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$",
                                        "typeString": "function (address,address) view returns (bool)"
                                      }
                                    },
                                    "id": 18099,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9927:39:51",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 18100,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "9968:6:51",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 18101,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "USER_DOESNT_ALLOW_RELAYER",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 570,
                                    "src": "9968:32:51",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 18094,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "9918:8:51",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 18102,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9918:83:51",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 18103,
                              "nodeType": "ExpressionStatement",
                              "src": "9918:83:51"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "components": [
                            {
                              "expression": {
                                "id": 18106,
                                "name": "op",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18057,
                                "src": "10030:2:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_UserBalanceOp_$20911_memory_ptr",
                                  "typeString": "struct IVault.UserBalanceOp memory"
                                }
                              },
                              "id": 18107,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "kind",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20902,
                              "src": "10030:7:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                                "typeString": "enum IVault.UserBalanceOpKind"
                              }
                            },
                            {
                              "expression": {
                                "id": 18108,
                                "name": "op",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18057,
                                "src": "10039:2:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_UserBalanceOp_$20911_memory_ptr",
                                  "typeString": "struct IVault.UserBalanceOp memory"
                                }
                              },
                              "id": 18109,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "asset",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20904,
                              "src": "10039:8:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAsset_$20645",
                                "typeString": "contract IAsset"
                              }
                            },
                            {
                              "expression": {
                                "id": 18110,
                                "name": "op",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18057,
                                "src": "10049:2:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_UserBalanceOp_$20911_memory_ptr",
                                  "typeString": "struct IVault.UserBalanceOp memory"
                                }
                              },
                              "id": 18111,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "amount",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20906,
                              "src": "10049:9:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18112,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18075,
                              "src": "10060:6:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "expression": {
                                "id": 18113,
                                "name": "op",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18057,
                                "src": "10068:2:51",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_UserBalanceOp_$20911_memory_ptr",
                                  "typeString": "struct IVault.UserBalanceOp memory"
                                }
                              },
                              "id": 18114,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "recipient",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 20910,
                              "src": "10068:12:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "id": 18115,
                              "name": "checkedCallerIsRelayer",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18059,
                              "src": "10082:22:51",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "id": 18116,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "10029:76:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_UserBalanceOpKind_$20916_$_t_contract$_IAsset_$20645_$_t_uint256_$_t_address_$_t_address_payable_$_t_bool_$",
                            "typeString": "tuple(enum IVault.UserBalanceOpKind,contract IAsset,uint256,address,address payable,bool)"
                          }
                        },
                        "functionReturnParameters": 18073,
                        "id": 18117,
                        "nodeType": "Return",
                        "src": "10022:83:51"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18055,
                    "nodeType": "StructuredDocumentation",
                    "src": "8821:124:51",
                    "text": " @dev Destructures a User Balance operation, validating that the contract caller is allowed to perform it."
                  },
                  "id": 18119,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_validateUserBalanceOp",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18060,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18057,
                        "mutability": "mutable",
                        "name": "op",
                        "nodeType": "VariableDeclaration",
                        "scope": 18119,
                        "src": "8982:23:51",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_UserBalanceOp_$20911_memory_ptr",
                          "typeString": "struct IVault.UserBalanceOp"
                        },
                        "typeName": {
                          "id": 18056,
                          "name": "UserBalanceOp",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20911,
                          "src": "8982:13:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_UserBalanceOp_$20911_storage_ptr",
                            "typeString": "struct IVault.UserBalanceOp"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18059,
                        "mutability": "mutable",
                        "name": "checkedCallerIsRelayer",
                        "nodeType": "VariableDeclaration",
                        "scope": 18119,
                        "src": "9007:27:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18058,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "9007:4:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8981:54:51"
                  },
                  "returnParameters": {
                    "id": 18073,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18062,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18119,
                        "src": "9095:17:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                          "typeString": "enum IVault.UserBalanceOpKind"
                        },
                        "typeName": {
                          "id": 18061,
                          "name": "UserBalanceOpKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20916,
                          "src": "9095:17:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                            "typeString": "enum IVault.UserBalanceOpKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18064,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18119,
                        "src": "9126:6:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        },
                        "typeName": {
                          "id": 18063,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "9126:6:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18066,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18119,
                        "src": "9146:7:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18065,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9146:7:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18068,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18119,
                        "src": "9167:7:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18067,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "9167:7:51",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18070,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18119,
                        "src": "9188:15:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 18069,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "9188:15:51",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18072,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18119,
                        "src": "9217:4:51",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18071,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "9217:4:51",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9081:150:51"
                  },
                  "scope": 18120,
                  "src": "8950:1162:51",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 18121,
              "src": "1838:8276:51"
            }
          ],
          "src": "688:9427:51"
        },
        "id": 51
      },
      "src.sol/amm/vault/Vault.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/Vault.sol",
          "exportedSymbols": {
            "Vault": [
              18183
            ]
          },
          "id": 18184,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 18122,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:52"
            },
            {
              "id": 18123,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:52"
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAuthorizer.sol",
              "file": "./interfaces/IAuthorizer.sol",
              "id": 18124,
              "nodeType": "ImportDirective",
              "scope": 18184,
              "sourceUnit": 20661,
              "src": "747:38:52",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IWETH.sol",
              "file": "./interfaces/IWETH.sol",
              "id": 18125,
              "nodeType": "ImportDirective",
              "scope": 18184,
              "sourceUnit": 21282,
              "src": "786:32:52",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/VaultAuthorization.sol",
              "file": "./VaultAuthorization.sol",
              "id": 18126,
              "nodeType": "ImportDirective",
              "scope": 18184,
              "sourceUnit": 18419,
              "src": "820:34:52",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/FlashLoans.sol",
              "file": "./FlashLoans.sol",
              "id": 18127,
              "nodeType": "ImportDirective",
              "scope": 18184,
              "sourceUnit": 14609,
              "src": "855:26:52",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/Swaps.sol",
              "file": "./Swaps.sol",
              "id": 18128,
              "nodeType": "ImportDirective",
              "scope": 18184,
              "sourceUnit": 17570,
              "src": "882:21:52",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 18130,
                    "name": "VaultAuthorization",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 18418,
                    "src": "3262:18:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_VaultAuthorization_$18418",
                      "typeString": "contract VaultAuthorization"
                    }
                  },
                  "id": 18131,
                  "nodeType": "InheritanceSpecifier",
                  "src": "3262:18:52"
                },
                {
                  "baseName": {
                    "id": 18132,
                    "name": "FlashLoans",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 14608,
                    "src": "3282:10:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_FlashLoans_$14608",
                      "typeString": "contract FlashLoans"
                    }
                  },
                  "id": 18133,
                  "nodeType": "InheritanceSpecifier",
                  "src": "3282:10:52"
                },
                {
                  "baseName": {
                    "id": 18134,
                    "name": "Swaps",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 17569,
                    "src": "3294:5:52",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Swaps_$17569",
                      "typeString": "contract Swaps"
                    }
                  },
                  "id": 18135,
                  "nodeType": "InheritanceSpecifier",
                  "src": "3294:5:52"
                }
              ],
              "contractDependencies": [
                266,
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                13834,
                14087,
                14372,
                14608,
                15340,
                15609,
                16018,
                17569,
                18120,
                18418,
                19467,
                19917,
                20641,
                20822,
                21266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 18129,
                "nodeType": "StructuredDocumentation",
                "src": "905:2338:52",
                "text": " @dev The `Vault` is Balancer V2's core contract. A single instance of it exists for the entire network, and it is the\n entity used to interact with Pools by Liquidity Providers who join and exit them, Traders who swap, and Asset\n Managers who withdraw and deposit tokens.\n The `Vault`'s source code is split among a number of sub-contracts, with the goal of improving readability and making\n understanding the system easier. Most sub-contracts have been marked as `abstract` to explicitly indicate that only\n the full `Vault` is meant to be deployed.\n Roughly speaking, these are the contents of each sub-contract:\n  - `AssetManagers`: Pool token Asset Manager registry, and Asset Manager interactions.\n  - `Fees`: set and compute protocol fees.\n  - `FlashLoans`: flash loan transfers and fees.\n  - `PoolBalances`: Pool joins and exits.\n  - `PoolRegistry`: Pool registration, ID management, and basic queries.\n  - `PoolTokens`: Pool token registration and registration, and balance queries.\n  - `Swaps`: Pool swaps.\n  - `UserBalance`: manage user balances (Internal Balance operations and external balance transfers)\n  - `VaultAuthorization`: access control, relayers and signature validation.\n Additionally, the different Pool specializations are handled by the `GeneralPoolsBalance`,\n `MinimalSwapInfoPoolsBalance` and `TwoTokenPoolsBalance` sub-contracts, which in turn make use of the\n `BalanceAllocation` library.\n The most important goal of the `Vault` is to make token swaps use as little gas as possible. This is reflected in a\n multitude of design decisions, from minor things like the format used to store Pool IDs, to major features such as\n the different Pool specialization settings.\n Finally, the large number of tasks carried out by the Vault means its bytecode is very large, close to exceeding\n the contract size limit imposed by EIP 170 (https://eips.ethereum.org/EIPS/eip-170). Manual tuning of the source code\n was required to improve code generation and bring the bytecode size below this limit. This includes extensive\n utilization of `internal` functions (particularly inside modifiers), usage of named return arguments, dedicated\n storage access methods, dynamic revert reason generation, and usage of inline assembly, to name a few."
              },
              "fullyImplemented": true,
              "id": 18183,
              "linearizedBaseContracts": [
                18183,
                17569,
                15340,
                18120,
                16018,
                13834,
                20641,
                19917,
                15609,
                14608,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                14087,
                19467,
                5187,
                14372,
                21266,
                20822,
                266
              ],
              "name": "Vault",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "body": {
                    "id": 18156,
                    "nodeType": "Block",
                    "src": "3564:64:52",
                    "statements": []
                  },
                  "id": 18157,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "id": 18146,
                          "name": "authorizer",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 18137,
                          "src": "3470:10:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        }
                      ],
                      "id": 18147,
                      "modifierName": {
                        "id": 18145,
                        "name": "VaultAuthorization",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 18418,
                        "src": "3451:18:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_VaultAuthorization_$18418_$",
                          "typeString": "type(contract VaultAuthorization)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3451:30:52"
                    },
                    {
                      "arguments": [
                        {
                          "id": 18149,
                          "name": "weth",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 18139,
                          "src": "3495:4:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        }
                      ],
                      "id": 18150,
                      "modifierName": {
                        "id": 18148,
                        "name": "AssetHelpers",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 266,
                        "src": "3482:12:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_AssetHelpers_$266_$",
                          "typeString": "type(contract AssetHelpers)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3482:18:52"
                    },
                    {
                      "arguments": [
                        {
                          "id": 18152,
                          "name": "pauseWindowDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 18141,
                          "src": "3521:19:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 18153,
                          "name": "bufferPeriodDuration",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 18143,
                          "src": "3542:20:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 18154,
                      "modifierName": {
                        "id": 18151,
                        "name": "TemporarilyPausable",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1473,
                        "src": "3501:19:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_TemporarilyPausable_$1473_$",
                          "typeString": "type(contract TemporarilyPausable)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3501:62:52"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18144,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18137,
                        "mutability": "mutable",
                        "name": "authorizer",
                        "nodeType": "VariableDeclaration",
                        "scope": 18157,
                        "src": "3327:22:52",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 18136,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "3327:11:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18139,
                        "mutability": "mutable",
                        "name": "weth",
                        "nodeType": "VariableDeclaration",
                        "scope": 18157,
                        "src": "3359:10:52",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IWETH_$21281",
                          "typeString": "contract IWETH"
                        },
                        "typeName": {
                          "id": 18138,
                          "name": "IWETH",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21281,
                          "src": "3359:5:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18141,
                        "mutability": "mutable",
                        "name": "pauseWindowDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 18157,
                        "src": "3379:27:52",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18140,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3379:7:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18143,
                        "mutability": "mutable",
                        "name": "bufferPeriodDuration",
                        "nodeType": "VariableDeclaration",
                        "scope": 18157,
                        "src": "3416:28:52",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18142,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3416:7:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3317:133:52"
                  },
                  "returnParameters": {
                    "id": 18155,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3564:0:52"
                  },
                  "scope": 18183,
                  "src": "3306:322:52",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "public"
                },
                {
                  "baseFunctions": [
                    21259
                  ],
                  "body": {
                    "id": 18171,
                    "nodeType": "Block",
                    "src": "3710:35:52",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18168,
                              "name": "paused",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18159,
                              "src": "3731:6:52",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 18167,
                            "name": "_setPaused",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1428,
                            "src": "3720:10:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$",
                              "typeString": "function (bool)"
                            }
                          },
                          "id": 18169,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3720:18:52",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 18170,
                        "nodeType": "ExpressionStatement",
                        "src": "3720:18:52"
                      }
                    ]
                  },
                  "functionSelector": "16c38b3c",
                  "id": 18172,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 18163,
                      "modifierName": {
                        "id": 18162,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "3684:12:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3684:12:52"
                    },
                    {
                      "id": 18165,
                      "modifierName": {
                        "id": 18164,
                        "name": "authenticate",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 294,
                        "src": "3697:12:52",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3697:12:52"
                    }
                  ],
                  "name": "setPaused",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 18161,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3675:8:52"
                  },
                  "parameters": {
                    "id": 18160,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18159,
                        "mutability": "mutable",
                        "name": "paused",
                        "nodeType": "VariableDeclaration",
                        "scope": 18172,
                        "src": "3653:11:52",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18158,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "3653:4:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3652:13:52"
                  },
                  "returnParameters": {
                    "id": 18166,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3710:0:52"
                  },
                  "scope": 18183,
                  "src": "3634:111:52",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    21265
                  ],
                  "body": {
                    "id": 18181,
                    "nodeType": "Block",
                    "src": "3859:31:52",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 18178,
                            "name": "_WETH",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 167,
                            "src": "3876:5:52",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IWETH_$21281_$",
                              "typeString": "function () view returns (contract IWETH)"
                            }
                          },
                          "id": 18179,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3876:7:52",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        },
                        "functionReturnParameters": 18177,
                        "id": 18180,
                        "nodeType": "Return",
                        "src": "3869:14:52"
                      }
                    ]
                  },
                  "functionSelector": "ad5c4648",
                  "id": 18182,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "WETH",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 18174,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3834:8:52"
                  },
                  "parameters": {
                    "id": 18173,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3817:2:52"
                  },
                  "returnParameters": {
                    "id": 18177,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18176,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18182,
                        "src": "3852:5:52",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IWETH_$21281",
                          "typeString": "contract IWETH"
                        },
                        "typeName": {
                          "id": 18175,
                          "name": "IWETH",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21281,
                          "src": "3852:5:52",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3851:7:52"
                  },
                  "scope": 18183,
                  "src": "3804:86:52",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 18184,
              "src": "3244:648:52"
            }
          ],
          "src": "688:3205:52"
        },
        "id": 52
      },
      "src.sol/amm/vault/VaultAuthorization.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/VaultAuthorization.sol",
          "exportedSymbols": {
            "VaultAuthorization": [
              18418
            ]
          },
          "id": 18419,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 18185,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:53"
            },
            {
              "id": 18186,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:53"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 18187,
              "nodeType": "ImportDirective",
              "scope": 18419,
              "sourceUnit": 656,
              "src": "747:43:53",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/Authentication.sol",
              "file": "../lib/helpers/Authentication.sol",
              "id": 18188,
              "nodeType": "ImportDirective",
              "scope": 18419,
              "sourceUnit": 344,
              "src": "791:43:53",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/TemporarilyPausable.sol",
              "file": "../lib/helpers/TemporarilyPausable.sol",
              "id": 18189,
              "nodeType": "ImportDirective",
              "scope": 18419,
              "sourceUnit": 1474,
              "src": "835:48:53",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../lib/helpers/BalancerErrors.sol",
              "id": 18190,
              "nodeType": "ImportDirective",
              "scope": 18419,
              "sourceUnit": 656,
              "src": "884:43:53",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/SignaturesValidator.sol",
              "file": "../lib/helpers/SignaturesValidator.sol",
              "id": 18191,
              "nodeType": "ImportDirective",
              "scope": 18419,
              "sourceUnit": 1294,
              "src": "928:48:53",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/ReentrancyGuard.sol",
              "file": "../lib/openzeppelin/ReentrancyGuard.sol",
              "id": 18192,
              "nodeType": "ImportDirective",
              "scope": 18419,
              "sourceUnit": 5188,
              "src": "977:49:53",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "./interfaces/IVault.sol",
              "id": 18193,
              "nodeType": "ImportDirective",
              "scope": 18419,
              "sourceUnit": 21267,
              "src": "1028:33:53",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAuthorizer.sol",
              "file": "./interfaces/IAuthorizer.sol",
              "id": 18194,
              "nodeType": "ImportDirective",
              "scope": 18419,
              "sourceUnit": 20661,
              "src": "1062:38:53",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 18196,
                    "name": "IVault",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21266,
                    "src": "1328:6:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IVault_$21266",
                      "typeString": "contract IVault"
                    }
                  },
                  "id": 18197,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1328:6:53"
                },
                {
                  "baseName": {
                    "id": 18198,
                    "name": "ReentrancyGuard",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5187,
                    "src": "1340:15:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ReentrancyGuard_$5187",
                      "typeString": "contract ReentrancyGuard"
                    }
                  },
                  "id": 18199,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1340:15:53"
                },
                {
                  "baseName": {
                    "id": 18200,
                    "name": "Authentication",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 343,
                    "src": "1361:14:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Authentication_$343",
                      "typeString": "contract Authentication"
                    }
                  },
                  "id": 18201,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1361:14:53"
                },
                {
                  "baseName": {
                    "id": 18202,
                    "name": "SignaturesValidator",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1293,
                    "src": "1381:19:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_SignaturesValidator_$1293",
                      "typeString": "contract SignaturesValidator"
                    }
                  },
                  "id": 18203,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1381:19:53"
                },
                {
                  "baseName": {
                    "id": 18204,
                    "name": "TemporarilyPausable",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1473,
                    "src": "1406:19:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_TemporarilyPausable_$1473",
                      "typeString": "contract TemporarilyPausable"
                    }
                  },
                  "id": 18205,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1406:19:53"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                20822,
                21266
              ],
              "contractKind": "contract",
              "documentation": {
                "id": 18195,
                "nodeType": "StructuredDocumentation",
                "src": "1102:181:53",
                "text": " @dev Manages access control of Vault permissioned functions by relying on the Authorizer and signature validation.\n Additionally handles relayer access and approval."
              },
              "fullyImplemented": false,
              "id": 18418,
              "linearizedBaseContracts": [
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                5187,
                21266,
                20822
              ],
              "name": "VaultAuthorization",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "constant": true,
                  "id": 18208,
                  "mutability": "constant",
                  "name": "_JOIN_TYPE_HASH",
                  "nodeType": "VariableDeclaration",
                  "scope": 18418,
                  "src": "1776:109:53",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 18206,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1776:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": {
                    "hexValue": "307833663762373132353262643139313133666634386331396336653030346139626366636361333230613064373464353865383538373763626437646361653538",
                    "id": 18207,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1819:66:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_28713812549183377044748713259476995946841408553939056548680640663573646585432_by_1",
                      "typeString": "int_const 2871...(69 digits omitted)...5432"
                    },
                    "value": "0x3f7b71252bd19113ff48c19c6e004a9bcfcca320a0d74d58e85877cbd7dcae58"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 18211,
                  "mutability": "constant",
                  "name": "_EXIT_TYPE_HASH",
                  "nodeType": "VariableDeclaration",
                  "scope": 18418,
                  "src": "2002:109:53",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 18209,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2002:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": {
                    "hexValue": "307838626263353766363665613933363930326635306137316365313262393263343366336335333430626234306332376334653930616238346565616533333533",
                    "id": 18210,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2045:66:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_63204260296985377466765927530391367930153876605403162929682898597016582894419_by_1",
                      "typeString": "int_const 6320...(69 digits omitted)...4419"
                    },
                    "value": "0x8bbc57f66ea936902f50a71ce12b92c43f3c5340bb40c27c4e90ab84eeae3353"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 18214,
                  "mutability": "constant",
                  "name": "_SWAP_TYPE_HASH",
                  "nodeType": "VariableDeclaration",
                  "scope": 18418,
                  "src": "2224:109:53",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 18212,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2224:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": {
                    "hexValue": "307865313932646362633134336231653234346164373362383133666433633039376238333261643236306131353733343062346535653562656461303637616265",
                    "id": 18213,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2267:66:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_102029874057489414306014326180932457930791105430947960193060447830035067730622_by_1",
                      "typeString": "int_const 1020...(70 digits omitted)...0622"
                    },
                    "value": "0xe192dcbc143b1e244ad73b813fd3c097b832ad260a157340b4e5e5beda067abe"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 18217,
                  "mutability": "constant",
                  "name": "_BATCH_SWAP_TYPE_HASH",
                  "nodeType": "VariableDeclaration",
                  "scope": 18418,
                  "src": "2457:115:53",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 18215,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2457:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": {
                    "hexValue": "307839626663343361346439383331336336373636393836666664376339313663373438313536366439663232346336383139616630613533333838616365643361",
                    "id": 18216,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2506:66:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_70554203852073620773320542884815015319480942240002975956078883761200594480442_by_1",
                      "typeString": "int_const 7055...(69 digits omitted)...0442"
                    },
                    "value": "0x9bfc43a4d98313c6766986ffd7c916c7481566d9f224c6819af0a53388aced3a"
                  },
                  "visibility": "private"
                },
                {
                  "constant": true,
                  "id": 18220,
                  "mutability": "constant",
                  "name": "_SET_RELAYER_TYPE_HASH",
                  "nodeType": "VariableDeclaration",
                  "scope": 18418,
                  "src": "2717:124:53",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 18218,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2717:7:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": {
                    "hexValue": "307861336638363561613335316535316366656234306635313738643135363462623632396665393033306238336361663633363164316261616635623930623561",
                    "id": 18219,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2775:66:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_74165874056303444090863280954102338647354415430482625780053785737906936679258_by_1",
                      "typeString": "int_const 7416...(69 digits omitted)...9258"
                    },
                    "value": "0xa3f865aa351e51cfeb40f5178d1564bb629fe9030b83caf6361d1baaf5b90b5a"
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 18222,
                  "mutability": "mutable",
                  "name": "_authorizer",
                  "nodeType": "VariableDeclaration",
                  "scope": 18418,
                  "src": "2848:31:53",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                    "typeString": "contract IAuthorizer"
                  },
                  "typeName": {
                    "id": 18221,
                    "name": "IAuthorizer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20660,
                    "src": "2848:11:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                      "typeString": "contract IAuthorizer"
                    }
                  },
                  "visibility": "private"
                },
                {
                  "constant": false,
                  "id": 18228,
                  "mutability": "mutable",
                  "name": "_approvedRelayers",
                  "nodeType": "VariableDeclaration",
                  "scope": 18418,
                  "src": "2885:70:53",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$",
                    "typeString": "mapping(address => mapping(address => bool))"
                  },
                  "typeName": {
                    "id": 18227,
                    "keyType": {
                      "id": 18223,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "2893:7:53",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "2885:44:53",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$",
                      "typeString": "mapping(address => mapping(address => bool))"
                    },
                    "valueType": {
                      "id": 18226,
                      "keyType": {
                        "id": 18224,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "2912:7:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "nodeType": "Mapping",
                      "src": "2904:24:53",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                        "typeString": "mapping(address => bool)"
                      },
                      "valueType": {
                        "id": 18225,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "2923:4:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 18238,
                    "nodeType": "Block",
                    "src": "3408:50:53",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18234,
                              "name": "user",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18231,
                              "src": "3435:4:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 18233,
                            "name": "_authenticateFor",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18371,
                            "src": "3418:16:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                              "typeString": "function (address)"
                            }
                          },
                          "id": 18235,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3418:22:53",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 18236,
                        "nodeType": "ExpressionStatement",
                        "src": "3418:22:53"
                      },
                      {
                        "id": 18237,
                        "nodeType": "PlaceholderStatement",
                        "src": "3450:1:53"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18229,
                    "nodeType": "StructuredDocumentation",
                    "src": "2962:402:53",
                    "text": " @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call this function (that\n is, it is a relayer for that function), and either:\n  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\n  b) a valid signature from them was appended to the calldata.\n Should only be applied to external functions."
                  },
                  "id": 18239,
                  "name": "authenticateFor",
                  "nodeType": "ModifierDefinition",
                  "parameters": {
                    "id": 18232,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18231,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 18239,
                        "src": "3394:12:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18230,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "3394:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3393:14:53"
                  },
                  "src": "3369:89:53",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18263,
                    "nodeType": "Block",
                    "src": "3716:41:53",
                    "statements": [
                      {
                        "expression": {
                          "id": 18261,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 18259,
                            "name": "_authorizer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18222,
                            "src": "3726:11:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                              "typeString": "contract IAuthorizer"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 18260,
                            "name": "authorizer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18241,
                            "src": "3740:10:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                              "typeString": "contract IAuthorizer"
                            }
                          },
                          "src": "3726:24:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "id": 18262,
                        "nodeType": "ExpressionStatement",
                        "src": "3726:24:53"
                      }
                    ]
                  },
                  "id": 18264,
                  "implemented": true,
                  "kind": "constructor",
                  "modifiers": [
                    {
                      "arguments": [
                        {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "id": 18250,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -28,
                                      "src": "3654:4:53",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_VaultAuthorization_$18418",
                                        "typeString": "contract VaultAuthorization"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_VaultAuthorization_$18418",
                                        "typeString": "contract VaultAuthorization"
                                      }
                                    ],
                                    "id": 18249,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "3646:7:53",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": {
                                      "id": 18248,
                                      "name": "address",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "3646:7:53",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 18251,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3646:13:53",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 18247,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3638:7:53",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": {
                                  "id": 18246,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3638:7:53",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 18252,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3638:22:53",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18245,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "3630:7:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_bytes32_$",
                              "typeString": "type(bytes32)"
                            },
                            "typeName": {
                              "id": 18244,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "3630:7:53",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 18253,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3630:31:53",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "id": 18254,
                      "modifierName": {
                        "id": 18243,
                        "name": "Authentication",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 343,
                        "src": "3615:14:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_Authentication_$343_$",
                          "typeString": "type(contract Authentication)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3615:47:53"
                    },
                    {
                      "arguments": [
                        {
                          "hexValue": "42616c616e636572205632205661756c74",
                          "id": 18256,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3691:19:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_546d0ab49c5920e3fe063e6971dd456a095183a2e20611f1b5815c7a1f43f069",
                            "typeString": "literal_string \"Balancer V2 Vault\""
                          },
                          "value": "Balancer V2 Vault"
                        }
                      ],
                      "id": 18257,
                      "modifierName": {
                        "id": 18255,
                        "name": "SignaturesValidator",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1293,
                        "src": "3671:19:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_SignaturesValidator_$1293_$",
                          "typeString": "type(contract SignaturesValidator)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3671:40:53"
                    }
                  ],
                  "name": "",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18242,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18241,
                        "mutability": "mutable",
                        "name": "authorizer",
                        "nodeType": "VariableDeclaration",
                        "scope": 18264,
                        "src": "3476:22:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 18240,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "3476:11:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3475:24:53"
                  },
                  "returnParameters": {
                    "id": 18258,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3716:0:53"
                  },
                  "scope": 18418,
                  "src": "3464:293:53",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    20847
                  ],
                  "body": {
                    "id": 18283,
                    "nodeType": "Block",
                    "src": "3860:104:53",
                    "statements": [
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 18275,
                              "name": "_authorizer",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18222,
                              "src": "3893:11:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                                "typeString": "contract IAuthorizer"
                              }
                            },
                            {
                              "id": 18276,
                              "name": "newAuthorizer",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18266,
                              "src": "3906:13:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                                "typeString": "contract IAuthorizer"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                                "typeString": "contract IAuthorizer"
                              },
                              {
                                "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                                "typeString": "contract IAuthorizer"
                              }
                            ],
                            "id": 18274,
                            "name": "AuthorizerChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20853,
                            "src": "3875:17:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IAuthorizer_$20660_$_t_contract$_IAuthorizer_$20660_$returns$__$",
                              "typeString": "function (contract IAuthorizer,contract IAuthorizer)"
                            }
                          },
                          "id": 18277,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3875:45:53",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 18278,
                        "nodeType": "EmitStatement",
                        "src": "3870:50:53"
                      },
                      {
                        "expression": {
                          "id": 18281,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 18279,
                            "name": "_authorizer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18222,
                            "src": "3930:11:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                              "typeString": "contract IAuthorizer"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 18280,
                            "name": "newAuthorizer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18266,
                            "src": "3944:13:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                              "typeString": "contract IAuthorizer"
                            }
                          },
                          "src": "3930:27:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "id": 18282,
                        "nodeType": "ExpressionStatement",
                        "src": "3930:27:53"
                      }
                    ]
                  },
                  "functionSelector": "0e9e98cf",
                  "id": 18284,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 18270,
                      "modifierName": {
                        "id": 18269,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "3834:12:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3834:12:53"
                    },
                    {
                      "id": 18272,
                      "modifierName": {
                        "id": 18271,
                        "name": "authenticate",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 294,
                        "src": "3847:12:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "3847:12:53"
                    }
                  ],
                  "name": "changeAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 18268,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "3825:8:53"
                  },
                  "parameters": {
                    "id": 18267,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18266,
                        "mutability": "mutable",
                        "name": "newAuthorizer",
                        "nodeType": "VariableDeclaration",
                        "scope": 18284,
                        "src": "3789:25:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 18265,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "3789:11:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3788:27:53"
                  },
                  "returnParameters": {
                    "id": 18273,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3860:0:53"
                  },
                  "scope": 18418,
                  "src": "3763:201:53",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    20841
                  ],
                  "body": {
                    "id": 18292,
                    "nodeType": "Block",
                    "src": "4040:35:53",
                    "statements": [
                      {
                        "expression": {
                          "id": 18290,
                          "name": "_authorizer",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 18222,
                          "src": "4057:11:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "functionReturnParameters": 18289,
                        "id": 18291,
                        "nodeType": "Return",
                        "src": "4050:18:53"
                      }
                    ]
                  },
                  "functionSelector": "aaabadc5",
                  "id": 18293,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 18286,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4009:8:53"
                  },
                  "parameters": {
                    "id": 18285,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3992:2:53"
                  },
                  "returnParameters": {
                    "id": 18289,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18288,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18293,
                        "src": "4027:11:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 18287,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "4027:11:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4026:13:53"
                  },
                  "scope": 18418,
                  "src": "3970:105:53",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    20873
                  ],
                  "body": {
                    "id": 18324,
                    "nodeType": "Block",
                    "src": "4256:126:53",
                    "statements": [
                      {
                        "expression": {
                          "id": 18316,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "baseExpression": {
                                "id": 18310,
                                "name": "_approvedRelayers",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18228,
                                "src": "4266:17:53",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$",
                                  "typeString": "mapping(address => mapping(address => bool))"
                                }
                              },
                              "id": 18313,
                              "indexExpression": {
                                "id": 18311,
                                "name": "sender",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18295,
                                "src": "4284:6:53",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "4266:25:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                                "typeString": "mapping(address => bool)"
                              }
                            },
                            "id": 18314,
                            "indexExpression": {
                              "id": 18312,
                              "name": "relayer",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18297,
                              "src": "4292:7:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "4266:34:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 18315,
                            "name": "approved",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18299,
                            "src": "4303:8:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "4266:45:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 18317,
                        "nodeType": "ExpressionStatement",
                        "src": "4266:45:53"
                      },
                      {
                        "eventCall": {
                          "arguments": [
                            {
                              "id": 18319,
                              "name": "relayer",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18297,
                              "src": "4349:7:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 18320,
                              "name": "sender",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18295,
                              "src": "4358:6:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 18321,
                              "name": "approved",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18299,
                              "src": "4366:8:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 18318,
                            "name": "RelayerApprovalChanged",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20881,
                            "src": "4326:22:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$returns$__$",
                              "typeString": "function (address,address,bool)"
                            }
                          },
                          "id": 18322,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4326:49:53",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 18323,
                        "nodeType": "EmitStatement",
                        "src": "4321:54:53"
                      }
                    ]
                  },
                  "functionSelector": "fa6e671d",
                  "id": 18325,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [
                    {
                      "id": 18303,
                      "modifierName": {
                        "id": 18302,
                        "name": "nonReentrant",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5162,
                        "src": "4205:12:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4205:12:53"
                    },
                    {
                      "id": 18305,
                      "modifierName": {
                        "id": 18304,
                        "name": "whenNotPaused",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1362,
                        "src": "4218:13:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$__$",
                          "typeString": "modifier ()"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4218:13:53"
                    },
                    {
                      "arguments": [
                        {
                          "id": 18307,
                          "name": "sender",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 18295,
                          "src": "4248:6:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "id": 18308,
                      "modifierName": {
                        "id": 18306,
                        "name": "authenticateFor",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 18239,
                        "src": "4232:15:53",
                        "typeDescriptions": {
                          "typeIdentifier": "t_modifier$_t_address_$",
                          "typeString": "modifier (address)"
                        }
                      },
                      "nodeType": "ModifierInvocation",
                      "src": "4232:23:53"
                    }
                  ],
                  "name": "setRelayerApproval",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 18301,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4196:8:53"
                  },
                  "parameters": {
                    "id": 18300,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18295,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 18325,
                        "src": "4118:14:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18294,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4118:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18297,
                        "mutability": "mutable",
                        "name": "relayer",
                        "nodeType": "VariableDeclaration",
                        "scope": 18325,
                        "src": "4142:15:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18296,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4142:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18299,
                        "mutability": "mutable",
                        "name": "approved",
                        "nodeType": "VariableDeclaration",
                        "scope": 18325,
                        "src": "4167:13:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18298,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4167:4:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4108:78:53"
                  },
                  "returnParameters": {
                    "id": 18309,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4256:0:53"
                  },
                  "scope": 18418,
                  "src": "4081:301:53",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "baseFunctions": [
                    20863
                  ],
                  "body": {
                    "id": 18340,
                    "nodeType": "Block",
                    "src": "4485:58:53",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18336,
                              "name": "user",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18327,
                              "src": "4522:4:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "id": 18337,
                              "name": "relayer",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18329,
                              "src": "4528:7:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 18335,
                            "name": "_hasApprovedRelayer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18388,
                            "src": "4502:19:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$",
                              "typeString": "function (address,address) view returns (bool)"
                            }
                          },
                          "id": 18338,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4502:34:53",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 18334,
                        "id": 18339,
                        "nodeType": "Return",
                        "src": "4495:41:53"
                      }
                    ]
                  },
                  "functionSelector": "fec90d72",
                  "id": 18341,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "hasApprovedRelayer",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 18331,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "4461:8:53"
                  },
                  "parameters": {
                    "id": 18330,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18327,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 18341,
                        "src": "4416:12:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18326,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4416:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18329,
                        "mutability": "mutable",
                        "name": "relayer",
                        "nodeType": "VariableDeclaration",
                        "scope": 18341,
                        "src": "4430:15:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18328,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4430:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4415:31:53"
                  },
                  "returnParameters": {
                    "id": 18334,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18333,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18341,
                        "src": "4479:4:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18332,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4479:4:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4478:6:53"
                  },
                  "scope": 18418,
                  "src": "4388:155:53",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "body": {
                    "id": 18370,
                    "nodeType": "Block",
                    "src": "4955:533:53",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "id": 18350,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "expression": {
                              "id": 18347,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "4969:3:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 18348,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "src": "4969:10:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "id": 18349,
                            "name": "user",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18344,
                            "src": "4983:4:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "4969:18:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 18369,
                        "nodeType": "IfStatement",
                        "src": "4965:517:53",
                        "trueBody": {
                          "id": 18368,
                          "nodeType": "Block",
                          "src": "4989:493:53",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 18351,
                                  "name": "_authenticateCaller",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 316,
                                  "src": "5107:19:53",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$__$",
                                    "typeString": "function () view"
                                  }
                                },
                                "id": 18352,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5107:21:53",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 18353,
                              "nodeType": "ExpressionStatement",
                              "src": "5107:21:53"
                            },
                            {
                              "condition": {
                                "id": 18359,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "5341:38:53",
                                "subExpression": {
                                  "arguments": [
                                    {
                                      "id": 18355,
                                      "name": "user",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 18344,
                                      "src": "5362:4:53",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      }
                                    },
                                    {
                                      "expression": {
                                        "id": 18356,
                                        "name": "msg",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -15,
                                        "src": "5368:3:53",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_message",
                                          "typeString": "msg"
                                        }
                                      },
                                      "id": 18357,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "sender",
                                      "nodeType": "MemberAccess",
                                      "src": "5368:10:53",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_address_payable",
                                        "typeString": "address payable"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                      },
                                      {
                                        "typeIdentifier": "t_address_payable",
                                        "typeString": "address payable"
                                      }
                                    ],
                                    "id": 18354,
                                    "name": "_hasApprovedRelayer",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18388,
                                    "src": "5342:19:53",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$",
                                      "typeString": "function (address,address) view returns (bool)"
                                    }
                                  },
                                  "id": 18358,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5342:37:53",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 18367,
                              "nodeType": "IfStatement",
                              "src": "5337:135:53",
                              "trueBody": {
                                "id": 18366,
                                "nodeType": "Block",
                                "src": "5381:91:53",
                                "statements": [
                                  {
                                    "expression": {
                                      "arguments": [
                                        {
                                          "id": 18361,
                                          "name": "user",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 18344,
                                          "src": "5418:4:53",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          }
                                        },
                                        {
                                          "expression": {
                                            "id": 18362,
                                            "name": "Errors",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 655,
                                            "src": "5424:6:53",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                              "typeString": "type(library Errors)"
                                            }
                                          },
                                          "id": 18363,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "USER_DOESNT_ALLOW_RELAYER",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 570,
                                          "src": "5424:32:53",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                          },
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 18360,
                                        "name": "_validateSignature",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 1118,
                                        "src": "5399:18:53",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                                          "typeString": "function (address,uint256)"
                                        }
                                      },
                                      "id": 18364,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5399:58:53",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 18365,
                                    "nodeType": "ExpressionStatement",
                                    "src": "5399:58:53"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18342,
                    "nodeType": "StructuredDocumentation",
                    "src": "4549:352:53",
                    "text": " @dev Reverts unless `user` is the caller, or the caller is approved by the Authorizer to call the entry point\n function (that is, it is a relayer for that function) and either:\n  a) `user` approved the caller as a relayer (via `setRelayerApproval`), or\n  b) a valid signature from them was appended to the calldata."
                  },
                  "id": 18371,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_authenticateFor",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18345,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18344,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 18371,
                        "src": "4932:12:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18343,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4932:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4931:14:53"
                  },
                  "returnParameters": {
                    "id": 18346,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4955:0:53"
                  },
                  "scope": 18418,
                  "src": "4906:582:53",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18387,
                    "nodeType": "Block",
                    "src": "5683:56:53",
                    "statements": [
                      {
                        "expression": {
                          "baseExpression": {
                            "baseExpression": {
                              "id": 18381,
                              "name": "_approvedRelayers",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18228,
                              "src": "5700:17:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$",
                                "typeString": "mapping(address => mapping(address => bool))"
                              }
                            },
                            "id": 18383,
                            "indexExpression": {
                              "id": 18382,
                              "name": "user",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18374,
                              "src": "5718:4:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "5700:23:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                              "typeString": "mapping(address => bool)"
                            }
                          },
                          "id": 18385,
                          "indexExpression": {
                            "id": 18384,
                            "name": "relayer",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18376,
                            "src": "5724:7:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5700:32:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 18380,
                        "id": 18386,
                        "nodeType": "Return",
                        "src": "5693:39:53"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18372,
                    "nodeType": "StructuredDocumentation",
                    "src": "5494:95:53",
                    "text": " @dev Returns true if `user` approved `relayer` to act as a relayer for them."
                  },
                  "id": 18388,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_hasApprovedRelayer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18377,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18374,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 18388,
                        "src": "5623:12:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18373,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5623:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18376,
                        "mutability": "mutable",
                        "name": "relayer",
                        "nodeType": "VariableDeclaration",
                        "scope": 18388,
                        "src": "5637:15:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18375,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5637:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5622:31:53"
                  },
                  "returnParameters": {
                    "id": 18380,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18379,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18388,
                        "src": "5677:4:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18378,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "5677:4:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5676:6:53"
                  },
                  "scope": 18418,
                  "src": "5594:145:53",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    342
                  ],
                  "body": {
                    "id": 18408,
                    "nodeType": "Block",
                    "src": "5836:135:53",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18400,
                              "name": "actionId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18390,
                              "src": "5934:8:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 18401,
                              "name": "user",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18392,
                              "src": "5944:4:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 18404,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -28,
                                  "src": "5958:4:53",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_VaultAuthorization_$18418",
                                    "typeString": "contract VaultAuthorization"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_VaultAuthorization_$18418",
                                    "typeString": "contract VaultAuthorization"
                                  }
                                ],
                                "id": 18403,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "5950:7:53",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 18402,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "5950:7:53",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 18405,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5950:13:53",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "id": 18398,
                              "name": "_authorizer",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18222,
                              "src": "5911:11:53",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                                "typeString": "contract IAuthorizer"
                              }
                            },
                            "id": 18399,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "canPerform",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 20659,
                            "src": "5911:22:53",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_address_$_t_address_$returns$_t_bool_$",
                              "typeString": "function (bytes32,address,address) view external returns (bool)"
                            }
                          },
                          "id": 18406,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5911:53:53",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 18397,
                        "id": 18407,
                        "nodeType": "Return",
                        "src": "5904:60:53"
                      }
                    ]
                  },
                  "id": 18409,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_canPerform",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 18394,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "5812:8:53"
                  },
                  "parameters": {
                    "id": 18393,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18390,
                        "mutability": "mutable",
                        "name": "actionId",
                        "nodeType": "VariableDeclaration",
                        "scope": 18409,
                        "src": "5766:16:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18389,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5766:7:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18392,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 18409,
                        "src": "5784:12:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 18391,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5784:7:53",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5765:32:53"
                  },
                  "returnParameters": {
                    "id": 18397,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18396,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18409,
                        "src": "5830:4:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18395,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "5830:4:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5829:6:53"
                  },
                  "scope": 18418,
                  "src": "5745:226:53",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "baseFunctions": [
                    1214
                  ],
                  "body": {
                    "id": 18416,
                    "nodeType": "Block",
                    "src": "6044:1425:53",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "6308:1155:53",
                          "statements": [
                            {
                              "nodeType": "YulVariableDeclaration",
                              "src": "6577:41:53",
                              "value": {
                                "arguments": [
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "6597:3:53",
                                    "type": "",
                                    "value": "224"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "kind": "number",
                                        "nodeType": "YulLiteral",
                                        "src": "6615:1:53",
                                        "type": "",
                                        "value": "0"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "calldataload",
                                      "nodeType": "YulIdentifier",
                                      "src": "6602:12:53"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "6602:15:53"
                                  }
                                ],
                                "functionName": {
                                  "name": "shr",
                                  "nodeType": "YulIdentifier",
                                  "src": "6593:3:53"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "6593:25:53"
                              },
                              "variables": [
                                {
                                  "name": "selector",
                                  "nodeType": "YulTypedName",
                                  "src": "6581:8:53",
                                  "type": ""
                                }
                              ]
                            },
                            {
                              "cases": [
                                {
                                  "body": {
                                    "nodeType": "YulBlock",
                                    "src": "6854:63:53",
                                    "statements": [
                                      {
                                        "nodeType": "YulAssignment",
                                        "src": "6876:23:53",
                                        "value": {
                                          "name": "_JOIN_TYPE_HASH",
                                          "nodeType": "YulIdentifier",
                                          "src": "6884:15:53"
                                        },
                                        "variableNames": [
                                          {
                                            "name": "hash",
                                            "nodeType": "YulIdentifier",
                                            "src": "6876:4:53"
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  "nodeType": "YulCase",
                                  "src": "6838:79:53",
                                  "value": {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "6843:10:53",
                                    "type": "",
                                    "value": "0xb95cac28"
                                  }
                                },
                                {
                                  "body": {
                                    "nodeType": "YulBlock",
                                    "src": "6950:63:53",
                                    "statements": [
                                      {
                                        "nodeType": "YulAssignment",
                                        "src": "6972:23:53",
                                        "value": {
                                          "name": "_EXIT_TYPE_HASH",
                                          "nodeType": "YulIdentifier",
                                          "src": "6980:15:53"
                                        },
                                        "variableNames": [
                                          {
                                            "name": "hash",
                                            "nodeType": "YulIdentifier",
                                            "src": "6972:4:53"
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  "nodeType": "YulCase",
                                  "src": "6934:79:53",
                                  "value": {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "6939:10:53",
                                    "type": "",
                                    "value": "0x8bdb3913"
                                  }
                                },
                                {
                                  "body": {
                                    "nodeType": "YulBlock",
                                    "src": "7046:63:53",
                                    "statements": [
                                      {
                                        "nodeType": "YulAssignment",
                                        "src": "7068:23:53",
                                        "value": {
                                          "name": "_SWAP_TYPE_HASH",
                                          "nodeType": "YulIdentifier",
                                          "src": "7076:15:53"
                                        },
                                        "variableNames": [
                                          {
                                            "name": "hash",
                                            "nodeType": "YulIdentifier",
                                            "src": "7068:4:53"
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  "nodeType": "YulCase",
                                  "src": "7030:79:53",
                                  "value": {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "7035:10:53",
                                    "type": "",
                                    "value": "0x52bbbe29"
                                  }
                                },
                                {
                                  "body": {
                                    "nodeType": "YulBlock",
                                    "src": "7142:69:53",
                                    "statements": [
                                      {
                                        "nodeType": "YulAssignment",
                                        "src": "7164:29:53",
                                        "value": {
                                          "name": "_BATCH_SWAP_TYPE_HASH",
                                          "nodeType": "YulIdentifier",
                                          "src": "7172:21:53"
                                        },
                                        "variableNames": [
                                          {
                                            "name": "hash",
                                            "nodeType": "YulIdentifier",
                                            "src": "7164:4:53"
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  "nodeType": "YulCase",
                                  "src": "7126:85:53",
                                  "value": {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "7131:10:53",
                                    "type": "",
                                    "value": "0x945bcec9"
                                  }
                                },
                                {
                                  "body": {
                                    "nodeType": "YulBlock",
                                    "src": "7244:70:53",
                                    "statements": [
                                      {
                                        "nodeType": "YulAssignment",
                                        "src": "7266:30:53",
                                        "value": {
                                          "name": "_SET_RELAYER_TYPE_HASH",
                                          "nodeType": "YulIdentifier",
                                          "src": "7274:22:53"
                                        },
                                        "variableNames": [
                                          {
                                            "name": "hash",
                                            "nodeType": "YulIdentifier",
                                            "src": "7266:4:53"
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  "nodeType": "YulCase",
                                  "src": "7228:86:53",
                                  "value": {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "7233:10:53",
                                    "type": "",
                                    "value": "0xfa6e671d"
                                  }
                                },
                                {
                                  "body": {
                                    "nodeType": "YulBlock",
                                    "src": "7339:114:53",
                                    "statements": [
                                      {
                                        "nodeType": "YulAssignment",
                                        "src": "7361:74:53",
                                        "value": {
                                          "kind": "number",
                                          "nodeType": "YulLiteral",
                                          "src": "7369:66:53",
                                          "type": "",
                                          "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                                        },
                                        "variableNames": [
                                          {
                                            "name": "hash",
                                            "nodeType": "YulIdentifier",
                                            "src": "7361:4:53"
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  "nodeType": "YulCase",
                                  "src": "7331:122:53",
                                  "value": "default"
                                }
                              ],
                              "expression": {
                                "name": "selector",
                                "nodeType": "YulIdentifier",
                                "src": "6813:8:53"
                              },
                              "nodeType": "YulSwitch",
                              "src": "6806:647:53"
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 18217,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "7172:21:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18211,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6980:15:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18208,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6884:15:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18220,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "7274:22:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18214,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "7076:15:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18413,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6876:4:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18413,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "6972:4:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18413,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "7068:4:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18413,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "7164:4:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18413,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "7266:4:53",
                            "valueSize": 1
                          },
                          {
                            "declaration": 18413,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "7361:4:53",
                            "valueSize": 1
                          }
                        ],
                        "id": 18415,
                        "nodeType": "InlineAssembly",
                        "src": "6299:1164:53"
                      }
                    ]
                  },
                  "id": 18417,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_typeHash",
                  "nodeType": "FunctionDefinition",
                  "overrides": {
                    "id": 18411,
                    "nodeType": "OverrideSpecifier",
                    "overrides": [],
                    "src": "6012:8:53"
                  },
                  "parameters": {
                    "id": 18410,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5995:2:53"
                  },
                  "returnParameters": {
                    "id": 18414,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18413,
                        "mutability": "mutable",
                        "name": "hash",
                        "nodeType": "VariableDeclaration",
                        "scope": 18417,
                        "src": "6030:12:53",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18412,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6030:7:53",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6029:14:53"
                  },
                  "scope": 18418,
                  "src": "5977:1492:53",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 18419,
              "src": "1284:6187:53"
            }
          ],
          "src": "688:6784:53"
        },
        "id": 53
      },
      "src.sol/amm/vault/balances/BalanceAllocation.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/balances/BalanceAllocation.sol",
          "exportedSymbols": {
            "BalanceAllocation": [
              19057
            ]
          },
          "id": 19058,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 18420,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:54"
            },
            {
              "absolutePath": "src.sol/amm/lib/math/Math.sol",
              "file": "../../lib/math/Math.sol",
              "id": 18421,
              "nodeType": "ImportDirective",
              "scope": 19058,
              "sourceUnit": 3351,
              "src": "713:33:54",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "library",
              "fullyImplemented": true,
              "id": 19057,
              "linearizedBaseContracts": [
                19057
              ],
              "name": "BalanceAllocation",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 18424,
                  "libraryName": {
                    "id": 18422,
                    "name": "Math",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 3350,
                    "src": "2933:4:54",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Math_$3350",
                      "typeString": "library Math"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "2927:23:54",
                  "typeName": {
                    "id": 18423,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2942:7:54",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  }
                },
                {
                  "body": {
                    "id": 18440,
                    "nodeType": "Block",
                    "src": "3377:231:54",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18438,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "id": 18433,
                                "name": "balance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18427,
                                "src": "3574:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 18432,
                              "name": "cash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18466,
                              "src": "3569:4:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                "typeString": "function (bytes32) pure returns (uint256)"
                              }
                            },
                            "id": 18434,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3569:13:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "arguments": [
                              {
                                "id": 18436,
                                "name": "balance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18427,
                                "src": "3593:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 18435,
                              "name": "managed",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18493,
                              "src": "3585:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                "typeString": "function (bytes32) pure returns (uint256)"
                              }
                            },
                            "id": 18437,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3585:16:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3569:32:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 18431,
                        "id": 18439,
                        "nodeType": "Return",
                        "src": "3562:39:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18425,
                    "nodeType": "StructuredDocumentation",
                    "src": "3179:129:54",
                    "text": " @dev Returns the total amount of Pool tokens, including those that are not currently in the Vault ('managed')."
                  },
                  "id": 18441,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "total",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18428,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18427,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18441,
                        "src": "3328:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18426,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3328:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3327:17:54"
                  },
                  "returnParameters": {
                    "id": 18431,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18430,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18441,
                        "src": "3368:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18429,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3368:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3367:9:54"
                  },
                  "scope": 19057,
                  "src": "3313:295:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18465,
                    "nodeType": "Block",
                    "src": "3763:84:54",
                    "statements": [
                      {
                        "assignments": [
                          18450
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18450,
                            "mutability": "mutable",
                            "name": "mask",
                            "nodeType": "VariableDeclaration",
                            "scope": 18465,
                            "src": "3773:12:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18449,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "3773:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18457,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_rational_5192296858534827628530496329220095_by_1",
                            "typeString": "int_const 5192...(26 digits omitted)...0095"
                          },
                          "id": 18456,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                              "typeString": "int_const 5192...(26 digits omitted)...0096"
                            },
                            "id": 18454,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "32",
                              "id": 18451,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3788:1:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "**",
                            "rightExpression": {
                              "components": [
                                {
                                  "hexValue": "313132",
                                  "id": 18452,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3792:3:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_112_by_1",
                                    "typeString": "int_const 112"
                                  },
                                  "value": "112"
                                }
                              ],
                              "id": 18453,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "3791:5:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_112_by_1",
                                "typeString": "int_const 112"
                              }
                            },
                            "src": "3788:8:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                              "typeString": "int_const 5192...(26 digits omitted)...0096"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "hexValue": "31",
                            "id": 18455,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3799:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "3788:12:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_5192296858534827628530496329220095_by_1",
                            "typeString": "int_const 5192...(26 digits omitted)...0095"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3773:27:54"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18463,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "id": 18460,
                                "name": "balance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18444,
                                "src": "3825:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 18459,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3817:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": {
                                "id": 18458,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "3817:7:54",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 18461,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3817:16:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&",
                          "rightExpression": {
                            "id": 18462,
                            "name": "mask",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18450,
                            "src": "3836:4:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3817:23:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 18448,
                        "id": 18464,
                        "nodeType": "Return",
                        "src": "3810:30:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18442,
                    "nodeType": "StructuredDocumentation",
                    "src": "3614:81:54",
                    "text": " @dev Returns the amount of Pool tokens currently in the Vault."
                  },
                  "id": 18466,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "cash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18445,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18444,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18466,
                        "src": "3714:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18443,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3714:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3713:17:54"
                  },
                  "returnParameters": {
                    "id": 18448,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18447,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18466,
                        "src": "3754:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18446,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3754:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3753:9:54"
                  },
                  "scope": 19057,
                  "src": "3700:147:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18492,
                    "nodeType": "Block",
                    "src": "4025:91:54",
                    "statements": [
                      {
                        "assignments": [
                          18475
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18475,
                            "mutability": "mutable",
                            "name": "mask",
                            "nodeType": "VariableDeclaration",
                            "scope": 18492,
                            "src": "4035:12:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18474,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4035:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18482,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_rational_5192296858534827628530496329220095_by_1",
                            "typeString": "int_const 5192...(26 digits omitted)...0095"
                          },
                          "id": 18481,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                              "typeString": "int_const 5192...(26 digits omitted)...0096"
                            },
                            "id": 18479,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "32",
                              "id": 18476,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4050:1:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "**",
                            "rightExpression": {
                              "components": [
                                {
                                  "hexValue": "313132",
                                  "id": 18477,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4054:3:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_112_by_1",
                                    "typeString": "int_const 112"
                                  },
                                  "value": "112"
                                }
                              ],
                              "id": 18478,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "4053:5:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_112_by_1",
                                "typeString": "int_const 112"
                              }
                            },
                            "src": "4050:8:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                              "typeString": "int_const 5192...(26 digits omitted)...0096"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "hexValue": "31",
                            "id": 18480,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4061:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "4050:12:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_5192296858534827628530496329220095_by_1",
                            "typeString": "int_const 5192...(26 digits omitted)...0095"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4035:27:54"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18490,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "id": 18487,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 18485,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18469,
                                  "src": "4087:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">>",
                                "rightExpression": {
                                  "hexValue": "313132",
                                  "id": 18486,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4098:3:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_112_by_1",
                                    "typeString": "int_const 112"
                                  },
                                  "value": "112"
                                },
                                "src": "4087:14:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 18484,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4079:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": {
                                "id": 18483,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4079:7:54",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 18488,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4079:23:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&",
                          "rightExpression": {
                            "id": 18489,
                            "name": "mask",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18475,
                            "src": "4105:4:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4079:30:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 18473,
                        "id": 18491,
                        "nodeType": "Return",
                        "src": "4072:37:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18467,
                    "nodeType": "StructuredDocumentation",
                    "src": "3853:101:54",
                    "text": " @dev Returns the amount of Pool tokens that are being managed by an Asset Manager."
                  },
                  "id": 18493,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "managed",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18470,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18469,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18493,
                        "src": "3976:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18468,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3976:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3975:17:54"
                  },
                  "returnParameters": {
                    "id": 18473,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18472,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18493,
                        "src": "4016:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18471,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4016:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4015:9:54"
                  },
                  "scope": 19057,
                  "src": "3959:157:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18519,
                    "nodeType": "Block",
                    "src": "4279:90:54",
                    "statements": [
                      {
                        "assignments": [
                          18502
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18502,
                            "mutability": "mutable",
                            "name": "mask",
                            "nodeType": "VariableDeclaration",
                            "scope": 18519,
                            "src": "4289:12:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18501,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4289:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18509,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_rational_4294967295_by_1",
                            "typeString": "int_const 4294967295"
                          },
                          "id": 18508,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_rational_4294967296_by_1",
                              "typeString": "int_const 4294967296"
                            },
                            "id": 18506,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "32",
                              "id": 18503,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4304:1:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "**",
                            "rightExpression": {
                              "components": [
                                {
                                  "hexValue": "3332",
                                  "id": 18504,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4308:2:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_32_by_1",
                                    "typeString": "int_const 32"
                                  },
                                  "value": "32"
                                }
                              ],
                              "id": 18505,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "4307:4:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              }
                            },
                            "src": "4304:7:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_4294967296_by_1",
                              "typeString": "int_const 4294967296"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "hexValue": "31",
                            "id": 18507,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4314:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "4304:11:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_4294967295_by_1",
                            "typeString": "int_const 4294967295"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4289:26:54"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18517,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "id": 18514,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 18512,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18496,
                                  "src": "4340:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">>",
                                "rightExpression": {
                                  "hexValue": "323234",
                                  "id": 18513,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4351:3:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_224_by_1",
                                    "typeString": "int_const 224"
                                  },
                                  "value": "224"
                                },
                                "src": "4340:14:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 18511,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4332:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": {
                                "id": 18510,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4332:7:54",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 18515,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4332:23:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&",
                          "rightExpression": {
                            "id": 18516,
                            "name": "mask",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18502,
                            "src": "4358:4:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4332:30:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 18500,
                        "id": 18518,
                        "nodeType": "Return",
                        "src": "4325:37:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18494,
                    "nodeType": "StructuredDocumentation",
                    "src": "4122:78:54",
                    "text": " @dev Returns the last block when the total balance changed."
                  },
                  "id": 18520,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "lastChangeBlock",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18497,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18496,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18520,
                        "src": "4230:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18495,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4230:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4229:17:54"
                  },
                  "returnParameters": {
                    "id": 18500,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18499,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18520,
                        "src": "4270:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18498,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4270:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4269:9:54"
                  },
                  "scope": 19057,
                  "src": "4205:164:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18544,
                    "nodeType": "Block",
                    "src": "4554:186:54",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 18542,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "id": 18533,
                                    "name": "newBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18523,
                                    "src": "4691:10:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 18532,
                                  "name": "managed",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18493,
                                  "src": "4683:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                    "typeString": "function (bytes32) pure returns (uint256)"
                                  }
                                },
                                "id": 18534,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4683:19:54",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 18531,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4676:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": {
                                "id": 18530,
                                "name": "int256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4676:6:54",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 18535,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4676:27:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "id": 18539,
                                    "name": "oldBalance",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18525,
                                    "src": "4721:10:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 18538,
                                  "name": "managed",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18493,
                                  "src": "4713:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                    "typeString": "function (bytes32) pure returns (uint256)"
                                  }
                                },
                                "id": 18540,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4713:19:54",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 18537,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4706:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": {
                                "id": 18536,
                                "name": "int256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4706:6:54",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 18541,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4706:27:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "src": "4676:57:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 18529,
                        "id": 18543,
                        "nodeType": "Return",
                        "src": "4669:64:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18521,
                    "nodeType": "StructuredDocumentation",
                    "src": "4375:81:54",
                    "text": " @dev Returns the difference in 'managed' between two balances."
                  },
                  "id": 18545,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "managedDelta",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18526,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18523,
                        "mutability": "mutable",
                        "name": "newBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18545,
                        "src": "4483:18:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18522,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4483:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18525,
                        "mutability": "mutable",
                        "name": "oldBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18545,
                        "src": "4503:18:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18524,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4503:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4482:40:54"
                  },
                  "returnParameters": {
                    "id": 18529,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18528,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18545,
                        "src": "4546:6:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 18527,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4546:6:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4545:8:54"
                  },
                  "scope": 19057,
                  "src": "4461:279:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18607,
                    "nodeType": "Block",
                    "src": "5136:322:54",
                    "statements": [
                      {
                        "expression": {
                          "id": 18564,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 18557,
                            "name": "results",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18553,
                            "src": "5146:7:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 18561,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18549,
                                  "src": "5170:8:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                    "typeString": "bytes32[] memory"
                                  }
                                },
                                "id": 18562,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "5170:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 18560,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "5156:13:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (uint256[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 18558,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "5160:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 18559,
                                "nodeType": "ArrayTypeName",
                                "src": "5160:9:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                                  "typeString": "uint256[]"
                                }
                              }
                            },
                            "id": 18563,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5156:30:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                              "typeString": "uint256[] memory"
                            }
                          },
                          "src": "5146:40:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                            "typeString": "uint256[] memory"
                          }
                        },
                        "id": 18565,
                        "nodeType": "ExpressionStatement",
                        "src": "5146:40:54"
                      },
                      {
                        "expression": {
                          "id": 18568,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 18566,
                            "name": "lastChangeBlock_",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18555,
                            "src": "5196:16:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "hexValue": "30",
                            "id": 18567,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5215:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5196:20:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 18569,
                        "nodeType": "ExpressionStatement",
                        "src": "5196:20:54"
                      },
                      {
                        "body": {
                          "id": 18605,
                          "nodeType": "Block",
                          "src": "5272:180:54",
                          "statements": [
                            {
                              "assignments": [
                                18582
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 18582,
                                  "mutability": "mutable",
                                  "name": "balance",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 18605,
                                  "src": "5286:15:54",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "typeName": {
                                    "id": 18581,
                                    "name": "bytes32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5286:7:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 18586,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 18583,
                                  "name": "balances",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18549,
                                  "src": "5304:8:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                    "typeString": "bytes32[] memory"
                                  }
                                },
                                "id": 18585,
                                "indexExpression": {
                                  "id": 18584,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18571,
                                  "src": "5313:1:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "5304:11:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "5286:29:54"
                            },
                            {
                              "expression": {
                                "id": 18593,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 18587,
                                    "name": "results",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18553,
                                    "src": "5329:7:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                      "typeString": "uint256[] memory"
                                    }
                                  },
                                  "id": 18589,
                                  "indexExpression": {
                                    "id": 18588,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18571,
                                    "src": "5337:1:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "5329:10:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 18591,
                                      "name": "balance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 18582,
                                      "src": "5348:7:54",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 18590,
                                    "name": "total",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18441,
                                    "src": "5342:5:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                      "typeString": "function (bytes32) pure returns (uint256)"
                                    }
                                  },
                                  "id": 18592,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5342:14:54",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5329:27:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 18594,
                              "nodeType": "ExpressionStatement",
                              "src": "5329:27:54"
                            },
                            {
                              "expression": {
                                "id": 18603,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 18595,
                                  "name": "lastChangeBlock_",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18555,
                                  "src": "5370:16:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 18598,
                                      "name": "lastChangeBlock_",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 18555,
                                      "src": "5398:16:54",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "id": 18600,
                                          "name": "balance",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 18582,
                                          "src": "5432:7:54",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        ],
                                        "id": 18599,
                                        "name": "lastChangeBlock",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 18520,
                                        "src": "5416:15:54",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                          "typeString": "function (bytes32) pure returns (uint256)"
                                        }
                                      },
                                      "id": 18601,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "5416:24:54",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 18596,
                                      "name": "Math",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3350,
                                      "src": "5389:4:54",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                        "typeString": "type(library Math)"
                                      }
                                    },
                                    "id": 18597,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "max",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 3242,
                                    "src": "5389:8:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 18602,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5389:52:54",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5370:71:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 18604,
                              "nodeType": "ExpressionStatement",
                              "src": "5370:71:54"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18577,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 18574,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18571,
                            "src": "5247:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 18575,
                              "name": "results",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18553,
                              "src": "5251:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                                "typeString": "uint256[] memory"
                              }
                            },
                            "id": 18576,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "5251:14:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5247:18:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 18606,
                        "initializationExpression": {
                          "assignments": [
                            18571
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 18571,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 18606,
                              "src": "5232:9:54",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 18570,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5232:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 18573,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 18572,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5244:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "5232:13:54"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 18579,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": false,
                            "src": "5267:3:54",
                            "subExpression": {
                              "id": 18578,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18571,
                              "src": "5267:1:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 18580,
                          "nodeType": "ExpressionStatement",
                          "src": "5267:3:54"
                        },
                        "nodeType": "ForStatement",
                        "src": "5227:225:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18546,
                    "nodeType": "StructuredDocumentation",
                    "src": "4746:168:54",
                    "text": " @dev Returns the total balance for each entry in `balances`, as well as the latest block when the total\n balance of *any* of them last changed."
                  },
                  "id": 18608,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "totalsAndLastChangeBlock",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18550,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18549,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 18608,
                        "src": "4953:25:54",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 18547,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "4953:7:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 18548,
                          "nodeType": "ArrayTypeName",
                          "src": "4953:9:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4952:27:54"
                  },
                  "returnParameters": {
                    "id": 18556,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18553,
                        "mutability": "mutable",
                        "name": "results",
                        "nodeType": "VariableDeclaration",
                        "scope": 18608,
                        "src": "5040:24:54",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 18551,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "5040:7:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 18552,
                          "nodeType": "ArrayTypeName",
                          "src": "5040:9:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18555,
                        "mutability": "mutable",
                        "name": "lastChangeBlock_",
                        "nodeType": "VariableDeclaration",
                        "scope": 18608,
                        "src": "5078:24:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18554,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5078:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5026:105:54"
                  },
                  "scope": 19057,
                  "src": "4919:539:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18635,
                    "nodeType": "Block",
                    "src": "5677:203:54",
                    "statements": [
                      {
                        "assignments": [
                          18617
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18617,
                            "mutability": "mutable",
                            "name": "mask",
                            "nodeType": "VariableDeclaration",
                            "scope": 18635,
                            "src": "5799:12:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18616,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "5799:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18624,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_rational_26959946667150639794667015087019630673637144422540572481103610249215_by_1",
                            "typeString": "int_const 2695...(60 digits omitted)...9215"
                          },
                          "id": 18623,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_rational_26959946667150639794667015087019630673637144422540572481103610249216_by_1",
                              "typeString": "int_const 2695...(60 digits omitted)...9216"
                            },
                            "id": 18621,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "32",
                              "id": 18618,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5814:1:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "**",
                            "rightExpression": {
                              "components": [
                                {
                                  "hexValue": "323234",
                                  "id": 18619,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "5818:3:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_224_by_1",
                                    "typeString": "int_const 224"
                                  },
                                  "value": "224"
                                }
                              ],
                              "id": 18620,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "5817:5:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_224_by_1",
                                "typeString": "int_const 224"
                              }
                            },
                            "src": "5814:8:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_26959946667150639794667015087019630673637144422540572481103610249216_by_1",
                              "typeString": "int_const 2695...(60 digits omitted)...9216"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "hexValue": "31",
                            "id": 18622,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5825:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "5814:12:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_26959946667150639794667015087019630673637144422540572481103610249215_by_1",
                            "typeString": "int_const 2695...(60 digits omitted)...9215"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5799:27:54"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18633,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 18630,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "arguments": [
                                    {
                                      "id": 18627,
                                      "name": "balance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 18611,
                                      "src": "5852:7:54",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 18626,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "5844:7:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 18625,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "5844:7:54",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 18628,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5844:16:54",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "&",
                                "rightExpression": {
                                  "id": 18629,
                                  "name": "mask",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18617,
                                  "src": "5863:4:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5844:23:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 18631,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "5843:25:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 18632,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5872:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5843:30:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 18615,
                        "id": 18634,
                        "nodeType": "Return",
                        "src": "5836:37:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18609,
                    "nodeType": "StructuredDocumentation",
                    "src": "5464:146:54",
                    "text": " @dev Returns true if `balance`'s 'total' balance is zero. Costs less gas than computing 'total' and comparing\n with zero."
                  },
                  "id": 18636,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "isZero",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18612,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18611,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18636,
                        "src": "5631:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18610,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5631:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5630:17:54"
                  },
                  "returnParameters": {
                    "id": 18615,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18614,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18636,
                        "src": "5671:4:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18613,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "5671:4:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5670:6:54"
                  },
                  "scope": 19057,
                  "src": "5615:265:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18649,
                    "nodeType": "Block",
                    "src": "6106:40:54",
                    "statements": [
                      {
                        "expression": {
                          "id": 18647,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "6123:16:54",
                          "subExpression": {
                            "arguments": [
                              {
                                "id": 18645,
                                "name": "balance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18639,
                                "src": "6131:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 18644,
                              "name": "isZero",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18636,
                              "src": "6124:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bool_$",
                                "typeString": "function (bytes32) pure returns (bool)"
                              }
                            },
                            "id": 18646,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6124:15:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 18643,
                        "id": 18648,
                        "nodeType": "Return",
                        "src": "6116:23:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18637,
                    "nodeType": "StructuredDocumentation",
                    "src": "5886:150:54",
                    "text": " @dev Returns true if `balance`'s 'total' balance is not zero. Costs less gas than computing 'total' and comparing\n with zero."
                  },
                  "id": 18650,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "isNotZero",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18640,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18639,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18650,
                        "src": "6060:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18638,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6060:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6059:17:54"
                  },
                  "returnParameters": {
                    "id": 18643,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18642,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18650,
                        "src": "6100:4:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 18641,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "6100:4:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6099:6:54"
                  },
                  "scope": 19057,
                  "src": "6041:105:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18688,
                    "nodeType": "Block",
                    "src": "6513:514:54",
                    "statements": [
                      {
                        "assignments": [
                          18663
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18663,
                            "mutability": "mutable",
                            "name": "_total",
                            "nodeType": "VariableDeclaration",
                            "scope": 18688,
                            "src": "6523:14:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18662,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "6523:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18667,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18666,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 18664,
                            "name": "_cash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18653,
                            "src": "6540:5:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 18665,
                            "name": "_managed",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18655,
                            "src": "6548:8:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6540:16:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6523:33:54"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 18677,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 18671,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 18669,
                                  "name": "_total",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18663,
                                  "src": "6798:6:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">=",
                                "rightExpression": {
                                  "id": 18670,
                                  "name": "_cash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18653,
                                  "src": "6808:5:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "6798:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 18676,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 18672,
                                  "name": "_total",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18663,
                                  "src": "6817:6:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                                    "typeString": "int_const 5192...(26 digits omitted)...0096"
                                  },
                                  "id": 18675,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "hexValue": "32",
                                    "id": 18673,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "6826:1:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_2_by_1",
                                      "typeString": "int_const 2"
                                    },
                                    "value": "2"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "**",
                                  "rightExpression": {
                                    "hexValue": "313132",
                                    "id": 18674,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "6829:3:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_112_by_1",
                                      "typeString": "int_const 112"
                                    },
                                    "value": "112"
                                  },
                                  "src": "6826:6:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                                    "typeString": "int_const 5192...(26 digits omitted)...0096"
                                  }
                                },
                                "src": "6817:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "6798:34:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 18678,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "6834:6:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 18679,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "BALANCE_TOTAL_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 639,
                              "src": "6834:29:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18668,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "6789:8:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 18680,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6789:75:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 18681,
                        "nodeType": "ExpressionStatement",
                        "src": "6789:75:54"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18683,
                              "name": "_cash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18653,
                              "src": "6990:5:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18684,
                              "name": "_managed",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18655,
                              "src": "6997:8:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18685,
                              "name": "_blockNumber",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18657,
                              "src": "7007:12:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18682,
                            "name": "_pack",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19056,
                            "src": "6984:5:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 18686,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6984:36:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18661,
                        "id": 18687,
                        "nodeType": "Return",
                        "src": "6977:43:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18651,
                    "nodeType": "StructuredDocumentation",
                    "src": "6152:220:54",
                    "text": " @dev Packs together `cash` and `managed` amounts with a block to create a balance value.\n For consistency, this also checks that the sum of `cash` and `managed` (`total`) fits in 112 bits."
                  },
                  "id": 18689,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "toBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18658,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18653,
                        "mutability": "mutable",
                        "name": "_cash",
                        "nodeType": "VariableDeclaration",
                        "scope": 18689,
                        "src": "6405:13:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18652,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6405:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18655,
                        "mutability": "mutable",
                        "name": "_managed",
                        "nodeType": "VariableDeclaration",
                        "scope": 18689,
                        "src": "6428:16:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18654,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6428:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18657,
                        "mutability": "mutable",
                        "name": "_blockNumber",
                        "nodeType": "VariableDeclaration",
                        "scope": 18689,
                        "src": "6454:20:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18656,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6454:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6395:85:54"
                  },
                  "returnParameters": {
                    "id": 18661,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18660,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18689,
                        "src": "6504:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18659,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6504:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6503:9:54"
                  },
                  "scope": 19057,
                  "src": "6377:650:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18725,
                    "nodeType": "Block",
                    "src": "7378:234:54",
                    "statements": [
                      {
                        "assignments": [
                          18700
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18700,
                            "mutability": "mutable",
                            "name": "newCash",
                            "nodeType": "VariableDeclaration",
                            "scope": 18725,
                            "src": "7388:15:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18699,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7388:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18707,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18705,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18694,
                              "src": "7424:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 18702,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18692,
                                  "src": "7411:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18701,
                                "name": "cash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18466,
                                "src": "7406:4:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18703,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7406:13:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 18704,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3115,
                            "src": "7406:17:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 18706,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7406:25:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7388:43:54"
                      },
                      {
                        "assignments": [
                          18709
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18709,
                            "mutability": "mutable",
                            "name": "currentManaged",
                            "nodeType": "VariableDeclaration",
                            "scope": 18725,
                            "src": "7441:22:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18708,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7441:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18713,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18711,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18692,
                              "src": "7474:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 18710,
                            "name": "managed",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18493,
                            "src": "7466:7:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                              "typeString": "function (bytes32) pure returns (uint256)"
                            }
                          },
                          "id": 18712,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7466:16:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7441:41:54"
                      },
                      {
                        "assignments": [
                          18715
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18715,
                            "mutability": "mutable",
                            "name": "newLastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 18725,
                            "src": "7492:26:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18714,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7492:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18718,
                        "initialValue": {
                          "expression": {
                            "id": 18716,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -4,
                            "src": "7521:5:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 18717,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "src": "7521:12:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7492:41:54"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18720,
                              "name": "newCash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18700,
                              "src": "7561:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18721,
                              "name": "currentManaged",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18709,
                              "src": "7570:14:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18722,
                              "name": "newLastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18715,
                              "src": "7586:18:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18719,
                            "name": "toBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18689,
                            "src": "7551:9:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 18723,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7551:54:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18698,
                        "id": 18724,
                        "nodeType": "Return",
                        "src": "7544:61:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18690,
                    "nodeType": "StructuredDocumentation",
                    "src": "7033:253:54",
                    "text": " @dev Increases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent to the Vault (except\n for Asset Manager deposits).\n Updates the last total balance change block, even if `amount` is zero."
                  },
                  "id": 18726,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "increaseCash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18695,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18692,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18726,
                        "src": "7313:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18691,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7313:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18694,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 18726,
                        "src": "7330:14:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18693,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7330:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7312:33:54"
                  },
                  "returnParameters": {
                    "id": 18698,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18697,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18726,
                        "src": "7369:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18696,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7369:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7368:9:54"
                  },
                  "scope": 19057,
                  "src": "7291:321:54",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18762,
                    "nodeType": "Block",
                    "src": "7968:234:54",
                    "statements": [
                      {
                        "assignments": [
                          18737
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18737,
                            "mutability": "mutable",
                            "name": "newCash",
                            "nodeType": "VariableDeclaration",
                            "scope": 18762,
                            "src": "7978:15:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18736,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7978:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18744,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18742,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18731,
                              "src": "8014:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 18739,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18729,
                                  "src": "8001:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18738,
                                "name": "cash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18466,
                                "src": "7996:4:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18740,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7996:13:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 18741,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3183,
                            "src": "7996:17:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 18743,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7996:25:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7978:43:54"
                      },
                      {
                        "assignments": [
                          18746
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18746,
                            "mutability": "mutable",
                            "name": "currentManaged",
                            "nodeType": "VariableDeclaration",
                            "scope": 18762,
                            "src": "8031:22:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18745,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8031:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18750,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18748,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18729,
                              "src": "8064:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 18747,
                            "name": "managed",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18493,
                            "src": "8056:7:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                              "typeString": "function (bytes32) pure returns (uint256)"
                            }
                          },
                          "id": 18749,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8056:16:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8031:41:54"
                      },
                      {
                        "assignments": [
                          18752
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18752,
                            "mutability": "mutable",
                            "name": "newLastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 18762,
                            "src": "8082:26:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18751,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8082:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18755,
                        "initialValue": {
                          "expression": {
                            "id": 18753,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -4,
                            "src": "8111:5:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 18754,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "src": "8111:12:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8082:41:54"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18757,
                              "name": "newCash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18737,
                              "src": "8151:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18758,
                              "name": "currentManaged",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18746,
                              "src": "8160:14:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18759,
                              "name": "newLastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18752,
                              "src": "8176:18:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18756,
                            "name": "toBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18689,
                            "src": "8141:9:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 18760,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8141:54:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18735,
                        "id": 18761,
                        "nodeType": "Return",
                        "src": "8134:61:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18727,
                    "nodeType": "StructuredDocumentation",
                    "src": "7618:258:54",
                    "text": " @dev Decreases a Pool's 'cash' (and therefore its 'total'). Called when Pool tokens are sent from the Vault\n (except for Asset Manager withdrawals).\n Updates the last total balance change block, even if `amount` is zero."
                  },
                  "id": 18763,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "decreaseCash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18732,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18729,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18763,
                        "src": "7903:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18728,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7903:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18731,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 18763,
                        "src": "7920:14:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18730,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7920:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7902:33:54"
                  },
                  "returnParameters": {
                    "id": 18735,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18734,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18763,
                        "src": "7959:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18733,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7959:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7958:9:54"
                  },
                  "scope": 19057,
                  "src": "7881:321:54",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18803,
                    "nodeType": "Block",
                    "src": "8454:258:54",
                    "statements": [
                      {
                        "assignments": [
                          18774
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18774,
                            "mutability": "mutable",
                            "name": "newCash",
                            "nodeType": "VariableDeclaration",
                            "scope": 18803,
                            "src": "8464:15:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18773,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8464:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18781,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18779,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18768,
                              "src": "8500:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 18776,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18766,
                                  "src": "8487:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18775,
                                "name": "cash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18466,
                                "src": "8482:4:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18777,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8482:13:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 18778,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3183,
                            "src": "8482:17:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 18780,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8482:25:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8464:43:54"
                      },
                      {
                        "assignments": [
                          18783
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18783,
                            "mutability": "mutable",
                            "name": "newManaged",
                            "nodeType": "VariableDeclaration",
                            "scope": 18803,
                            "src": "8517:18:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18782,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8517:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18790,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18788,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18768,
                              "src": "8559:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 18785,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18766,
                                  "src": "8546:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18784,
                                "name": "managed",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18493,
                                "src": "8538:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18786,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8538:16:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 18787,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3115,
                            "src": "8538:20:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 18789,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8538:28:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8517:49:54"
                      },
                      {
                        "assignments": [
                          18792
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18792,
                            "mutability": "mutable",
                            "name": "currentLastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 18803,
                            "src": "8576:30:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18791,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8576:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18796,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18794,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18766,
                              "src": "8625:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 18793,
                            "name": "lastChangeBlock",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18520,
                            "src": "8609:15:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                              "typeString": "function (bytes32) pure returns (uint256)"
                            }
                          },
                          "id": 18795,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8609:24:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8576:57:54"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18798,
                              "name": "newCash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18774,
                              "src": "8661:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18799,
                              "name": "newManaged",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18783,
                              "src": "8670:10:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18800,
                              "name": "currentLastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18792,
                              "src": "8682:22:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18797,
                            "name": "toBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18689,
                            "src": "8651:9:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 18801,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8651:54:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18772,
                        "id": 18802,
                        "nodeType": "Return",
                        "src": "8644:61:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18764,
                    "nodeType": "StructuredDocumentation",
                    "src": "8208:153:54",
                    "text": " @dev Moves 'cash' into 'managed', leaving 'total' unchanged. Called when an Asset Manager withdraws Pool tokens\n from the Vault."
                  },
                  "id": 18804,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "cashToManaged",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18769,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18766,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18804,
                        "src": "8389:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18765,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8389:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18768,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 18804,
                        "src": "8406:14:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18767,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8406:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8388:33:54"
                  },
                  "returnParameters": {
                    "id": 18772,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18771,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18804,
                        "src": "8445:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18770,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8445:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8444:9:54"
                  },
                  "scope": 19057,
                  "src": "8366:346:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18844,
                    "nodeType": "Block",
                    "src": "8963:258:54",
                    "statements": [
                      {
                        "assignments": [
                          18815
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18815,
                            "mutability": "mutable",
                            "name": "newCash",
                            "nodeType": "VariableDeclaration",
                            "scope": 18844,
                            "src": "8973:15:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18814,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8973:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18822,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18820,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18809,
                              "src": "9009:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 18817,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18807,
                                  "src": "8996:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18816,
                                "name": "cash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18466,
                                "src": "8991:4:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18818,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "8991:13:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 18819,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "add",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3115,
                            "src": "8991:17:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 18821,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8991:25:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8973:43:54"
                      },
                      {
                        "assignments": [
                          18824
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18824,
                            "mutability": "mutable",
                            "name": "newManaged",
                            "nodeType": "VariableDeclaration",
                            "scope": 18844,
                            "src": "9026:18:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18823,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9026:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18831,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18829,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18809,
                              "src": "9068:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [
                                {
                                  "id": 18826,
                                  "name": "balance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18807,
                                  "src": "9055:7:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18825,
                                "name": "managed",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18493,
                                "src": "9047:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18827,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "9047:16:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 18828,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sub",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3183,
                            "src": "9047:20:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 18830,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9047:28:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9026:49:54"
                      },
                      {
                        "assignments": [
                          18833
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18833,
                            "mutability": "mutable",
                            "name": "currentLastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 18844,
                            "src": "9085:30:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18832,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9085:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18837,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18835,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18807,
                              "src": "9134:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 18834,
                            "name": "lastChangeBlock",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18520,
                            "src": "9118:15:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                              "typeString": "function (bytes32) pure returns (uint256)"
                            }
                          },
                          "id": 18836,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9118:24:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9085:57:54"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18839,
                              "name": "newCash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18815,
                              "src": "9170:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18840,
                              "name": "newManaged",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18824,
                              "src": "9179:10:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18841,
                              "name": "currentLastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18833,
                              "src": "9191:22:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18838,
                            "name": "toBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18689,
                            "src": "9160:9:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 18842,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9160:54:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18813,
                        "id": 18843,
                        "nodeType": "Return",
                        "src": "9153:61:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18805,
                    "nodeType": "StructuredDocumentation",
                    "src": "8718:152:54",
                    "text": " @dev Moves 'managed' into 'cash', leaving 'total' unchanged. Called when an Asset Manager deposits Pool tokens\n into the Vault."
                  },
                  "id": 18845,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "managedToCash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18810,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18807,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18845,
                        "src": "8898:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18806,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8898:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18809,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 18845,
                        "src": "8915:14:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18808,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8915:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8897:33:54"
                  },
                  "returnParameters": {
                    "id": 18813,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18812,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18845,
                        "src": "8954:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18811,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8954:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8953:9:54"
                  },
                  "scope": 19057,
                  "src": "8875:346:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18872,
                    "nodeType": "Block",
                    "src": "9658:174:54",
                    "statements": [
                      {
                        "assignments": [
                          18856
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18856,
                            "mutability": "mutable",
                            "name": "currentCash",
                            "nodeType": "VariableDeclaration",
                            "scope": 18872,
                            "src": "9668:19:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18855,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9668:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18860,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 18858,
                              "name": "balance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18848,
                              "src": "9695:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 18857,
                            "name": "cash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18466,
                            "src": "9690:4:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                              "typeString": "function (bytes32) pure returns (uint256)"
                            }
                          },
                          "id": 18859,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9690:13:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9668:35:54"
                      },
                      {
                        "assignments": [
                          18862
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18862,
                            "mutability": "mutable",
                            "name": "newLastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 18872,
                            "src": "9713:26:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18861,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9713:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18865,
                        "initialValue": {
                          "expression": {
                            "id": 18863,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -4,
                            "src": "9742:5:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 18864,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "src": "9742:12:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9713:41:54"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 18867,
                              "name": "currentCash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18856,
                              "src": "9781:11:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18868,
                              "name": "newManaged",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18850,
                              "src": "9794:10:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 18869,
                              "name": "newLastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18862,
                              "src": "9806:18:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18866,
                            "name": "toBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18689,
                            "src": "9771:9:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 18870,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9771:54:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18854,
                        "id": 18871,
                        "nodeType": "Return",
                        "src": "9764:61:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18846,
                    "nodeType": "StructuredDocumentation",
                    "src": "9227:337:54",
                    "text": " @dev Sets 'managed' balance to an arbitrary value, changing 'total'. Called when the Asset Manager reports\n profits or losses. It's the Manager's responsibility to provide a meaningful value.\n Updates the last total balance change block, even if `newManaged` is equal to the current 'managed' value."
                  },
                  "id": 18873,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "setManaged",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18851,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18848,
                        "mutability": "mutable",
                        "name": "balance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18873,
                        "src": "9589:15:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18847,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "9589:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18850,
                        "mutability": "mutable",
                        "name": "newManaged",
                        "nodeType": "VariableDeclaration",
                        "scope": 18873,
                        "src": "9606:18:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18849,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "9606:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9588:37:54"
                  },
                  "returnParameters": {
                    "id": 18854,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18853,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18873,
                        "src": "9649:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18852,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "9649:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9648:9:54"
                  },
                  "scope": 19057,
                  "src": "9569:263:54",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18897,
                    "nodeType": "Block",
                    "src": "11266:90:54",
                    "statements": [
                      {
                        "assignments": [
                          18882
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18882,
                            "mutability": "mutable",
                            "name": "mask",
                            "nodeType": "VariableDeclaration",
                            "scope": 18897,
                            "src": "11276:12:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18881,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11276:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18889,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_rational_5192296858534827628530496329220095_by_1",
                            "typeString": "int_const 5192...(26 digits omitted)...0095"
                          },
                          "id": 18888,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                              "typeString": "int_const 5192...(26 digits omitted)...0096"
                            },
                            "id": 18886,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "32",
                              "id": 18883,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11291:1:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "**",
                            "rightExpression": {
                              "components": [
                                {
                                  "hexValue": "313132",
                                  "id": 18884,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "11295:3:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_112_by_1",
                                    "typeString": "int_const 112"
                                  },
                                  "value": "112"
                                }
                              ],
                              "id": 18885,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11294:5:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_112_by_1",
                                "typeString": "int_const 112"
                              }
                            },
                            "src": "11291:8:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                              "typeString": "int_const 5192...(26 digits omitted)...0096"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "hexValue": "31",
                            "id": 18887,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "11302:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "11291:12:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_5192296858534827628530496329220095_by_1",
                            "typeString": "int_const 5192...(26 digits omitted)...0095"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11276:27:54"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18895,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "id": 18892,
                                "name": "sharedBalance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18876,
                                "src": "11328:13:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 18891,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "11320:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": {
                                "id": 18890,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11320:7:54",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 18893,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "11320:22:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&",
                          "rightExpression": {
                            "id": 18894,
                            "name": "mask",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18882,
                            "src": "11345:4:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "11320:29:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 18880,
                        "id": 18896,
                        "nodeType": "Return",
                        "src": "11313:36:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18874,
                    "nodeType": "StructuredDocumentation",
                    "src": "11015:167:54",
                    "text": " @dev Extracts the part of the balance that corresponds to token A. This function can be used to decode both\n shared cash and managed balances."
                  },
                  "id": 18898,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_decodeBalanceA",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18877,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18876,
                        "mutability": "mutable",
                        "name": "sharedBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18898,
                        "src": "11212:21:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18875,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11212:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11211:23:54"
                  },
                  "returnParameters": {
                    "id": 18880,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18879,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18898,
                        "src": "11257:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18878,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11257:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11256:9:54"
                  },
                  "scope": 19057,
                  "src": "11187:169:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 18924,
                    "nodeType": "Block",
                    "src": "11613:97:54",
                    "statements": [
                      {
                        "assignments": [
                          18907
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18907,
                            "mutability": "mutable",
                            "name": "mask",
                            "nodeType": "VariableDeclaration",
                            "scope": 18924,
                            "src": "11623:12:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 18906,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "11623:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18914,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_rational_5192296858534827628530496329220095_by_1",
                            "typeString": "int_const 5192...(26 digits omitted)...0095"
                          },
                          "id": 18913,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                              "typeString": "int_const 5192...(26 digits omitted)...0096"
                            },
                            "id": 18911,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "32",
                              "id": 18908,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11638:1:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_2_by_1",
                                "typeString": "int_const 2"
                              },
                              "value": "2"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "**",
                            "rightExpression": {
                              "components": [
                                {
                                  "hexValue": "313132",
                                  "id": 18909,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "11642:3:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_112_by_1",
                                    "typeString": "int_const 112"
                                  },
                                  "value": "112"
                                }
                              ],
                              "id": 18910,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "11641:5:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_112_by_1",
                                "typeString": "int_const 112"
                              }
                            },
                            "src": "11638:8:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_5192296858534827628530496329220096_by_1",
                              "typeString": "int_const 5192...(26 digits omitted)...0096"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "hexValue": "31",
                            "id": 18912,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "11649:1:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "11638:12:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_5192296858534827628530496329220095_by_1",
                            "typeString": "int_const 5192...(26 digits omitted)...0095"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11623:27:54"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 18922,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "id": 18919,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 18917,
                                  "name": "sharedBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18901,
                                  "src": "11675:13:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": ">>",
                                "rightExpression": {
                                  "hexValue": "313132",
                                  "id": 18918,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "11692:3:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_112_by_1",
                                    "typeString": "int_const 112"
                                  },
                                  "value": "112"
                                },
                                "src": "11675:20:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "id": 18916,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "11667:7:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": {
                                "id": 18915,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "11667:7:54",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 18920,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "11667:29:54",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&",
                          "rightExpression": {
                            "id": 18921,
                            "name": "mask",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18907,
                            "src": "11699:4:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "11667:36:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 18905,
                        "id": 18923,
                        "nodeType": "Return",
                        "src": "11660:43:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18899,
                    "nodeType": "StructuredDocumentation",
                    "src": "11362:167:54",
                    "text": " @dev Extracts the part of the balance that corresponds to token B. This function can be used to decode both\n shared cash and managed balances."
                  },
                  "id": 18925,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_decodeBalanceB",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18902,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18901,
                        "mutability": "mutable",
                        "name": "sharedBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 18925,
                        "src": "11559:21:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18900,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11559:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11558:23:54"
                  },
                  "returnParameters": {
                    "id": 18905,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18904,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18925,
                        "src": "11604:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 18903,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "11604:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11603:9:54"
                  },
                  "scope": 19057,
                  "src": "11534:176:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 18947,
                    "nodeType": "Block",
                    "src": "12039:290:54",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 18937,
                                  "name": "sharedCash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18928,
                                  "src": "12249:10:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18936,
                                "name": "_decodeBalanceA",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18898,
                                "src": "12233:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18938,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12233:27:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 18940,
                                  "name": "sharedManaged",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18930,
                                  "src": "12278:13:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18939,
                                "name": "_decodeBalanceA",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18898,
                                "src": "12262:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18941,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12262:30:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 18943,
                                  "name": "sharedCash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18928,
                                  "src": "12310:10:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18942,
                                "name": "lastChangeBlock",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18520,
                                "src": "12294:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18944,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12294:27:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18935,
                            "name": "toBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18689,
                            "src": "12223:9:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 18945,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12223:99:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18934,
                        "id": 18946,
                        "nodeType": "Return",
                        "src": "12216:106:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18926,
                    "nodeType": "StructuredDocumentation",
                    "src": "11811:118:54",
                    "text": " @dev Unpacks the shared token A and token B cash and managed balances into the balance for token A."
                  },
                  "id": 18948,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "fromSharedToBalanceA",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18931,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18928,
                        "mutability": "mutable",
                        "name": "sharedCash",
                        "nodeType": "VariableDeclaration",
                        "scope": 18948,
                        "src": "11964:18:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18927,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11964:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18930,
                        "mutability": "mutable",
                        "name": "sharedManaged",
                        "nodeType": "VariableDeclaration",
                        "scope": 18948,
                        "src": "11984:21:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18929,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11984:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11963:43:54"
                  },
                  "returnParameters": {
                    "id": 18934,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18933,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18948,
                        "src": "12030:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18932,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12030:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12029:9:54"
                  },
                  "scope": 19057,
                  "src": "11934:395:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 18970,
                    "nodeType": "Block",
                    "src": "12563:290:54",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 18960,
                                  "name": "sharedCash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18951,
                                  "src": "12773:10:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18959,
                                "name": "_decodeBalanceB",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18925,
                                "src": "12757:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18961,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12757:27:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 18963,
                                  "name": "sharedManaged",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18953,
                                  "src": "12802:13:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18962,
                                "name": "_decodeBalanceB",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18925,
                                "src": "12786:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18964,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12786:30:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 18966,
                                  "name": "sharedCash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18951,
                                  "src": "12834:10:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18965,
                                "name": "lastChangeBlock",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18520,
                                "src": "12818:15:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18967,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "12818:27:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18958,
                            "name": "toBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 18689,
                            "src": "12747:9:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 18968,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12747:99:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18957,
                        "id": 18969,
                        "nodeType": "Return",
                        "src": "12740:106:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18949,
                    "nodeType": "StructuredDocumentation",
                    "src": "12335:118:54",
                    "text": " @dev Unpacks the shared token A and token B cash and managed balances into the balance for token B."
                  },
                  "id": 18971,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "fromSharedToBalanceB",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18954,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18951,
                        "mutability": "mutable",
                        "name": "sharedCash",
                        "nodeType": "VariableDeclaration",
                        "scope": 18971,
                        "src": "12488:18:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18950,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12488:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18953,
                        "mutability": "mutable",
                        "name": "sharedManaged",
                        "nodeType": "VariableDeclaration",
                        "scope": 18971,
                        "src": "12508:21:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18952,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12508:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12487:43:54"
                  },
                  "returnParameters": {
                    "id": 18957,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18956,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 18971,
                        "src": "12554:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18955,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12554:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12553:9:54"
                  },
                  "scope": 19057,
                  "src": "12458:395:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19006,
                    "nodeType": "Block",
                    "src": "13076:406:54",
                    "statements": [
                      {
                        "assignments": [
                          18982
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 18982,
                            "mutability": "mutable",
                            "name": "newLastChangeBlock",
                            "nodeType": "VariableDeclaration",
                            "scope": 19006,
                            "src": "13282:25:54",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            },
                            "typeName": {
                              "id": 18981,
                              "name": "uint32",
                              "nodeType": "ElementaryTypeName",
                              "src": "13282:6:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 18995,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "id": 18988,
                                      "name": "tokenABalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 18974,
                                      "src": "13342:13:54",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 18987,
                                    "name": "lastChangeBlock",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18520,
                                    "src": "13326:15:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                      "typeString": "function (bytes32) pure returns (uint256)"
                                    }
                                  },
                                  "id": 18989,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "13326:30:54",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "arguments": [
                                    {
                                      "id": 18991,
                                      "name": "tokenBBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 18976,
                                      "src": "13374:13:54",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "id": 18990,
                                    "name": "lastChangeBlock",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18520,
                                    "src": "13358:15:54",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                      "typeString": "function (bytes32) pure returns (uint256)"
                                    }
                                  },
                                  "id": 18992,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "13358:30:54",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 18985,
                                  "name": "Math",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3350,
                                  "src": "13317:4:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_Math_$3350_$",
                                    "typeString": "type(library Math)"
                                  }
                                },
                                "id": 18986,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "max",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3242,
                                "src": "13317:8:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 18993,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13317:72:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 18984,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "13310:6:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint32_$",
                              "typeString": "type(uint32)"
                            },
                            "typeName": {
                              "id": 18983,
                              "name": "uint32",
                              "nodeType": "ElementaryTypeName",
                              "src": "13310:6:54",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 18994,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13310:80:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint32",
                            "typeString": "uint32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13282:108:54"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 18998,
                                  "name": "tokenABalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18974,
                                  "src": "13419:13:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 18997,
                                "name": "cash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18466,
                                "src": "13414:4:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 18999,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13414:19:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 19001,
                                  "name": "tokenBBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 18976,
                                  "src": "13440:13:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 19000,
                                "name": "cash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18466,
                                "src": "13435:4:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 19002,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13435:19:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 19003,
                              "name": "newLastChangeBlock",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 18982,
                              "src": "13456:18:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint32",
                                "typeString": "uint32"
                              }
                            ],
                            "id": 18996,
                            "name": "_pack",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19056,
                            "src": "13408:5:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 19004,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13408:67:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 18980,
                        "id": 19005,
                        "nodeType": "Return",
                        "src": "13401:74:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 18972,
                    "nodeType": "StructuredDocumentation",
                    "src": "12859:112:54",
                    "text": " @dev Returns the sharedCash shared field, given the current balances for token A and token B."
                  },
                  "id": 19007,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "toSharedCash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 18977,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18974,
                        "mutability": "mutable",
                        "name": "tokenABalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 19007,
                        "src": "12998:21:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18973,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12998:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 18976,
                        "mutability": "mutable",
                        "name": "tokenBBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 19007,
                        "src": "13021:21:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18975,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13021:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12997:46:54"
                  },
                  "returnParameters": {
                    "id": 18980,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 18979,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19007,
                        "src": "13067:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 18978,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13067:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13066:9:54"
                  },
                  "scope": 19057,
                  "src": "12976:506:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19027,
                    "nodeType": "Block",
                    "src": "13711:178:54",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 19019,
                                  "name": "tokenABalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19010,
                                  "src": "13840:13:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 19018,
                                "name": "managed",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18493,
                                "src": "13832:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 19020,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13832:22:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "arguments": [
                                {
                                  "id": 19022,
                                  "name": "tokenBBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19012,
                                  "src": "13864:13:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                ],
                                "id": 19021,
                                "name": "managed",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18493,
                                "src": "13856:7:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_uint256_$",
                                  "typeString": "function (bytes32) pure returns (uint256)"
                                }
                              },
                              "id": 19023,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "13856:22:54",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "30",
                              "id": 19024,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "13880:1:54",
                              "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_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 19017,
                            "name": "_pack",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19056,
                            "src": "13826:5:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bytes32)"
                            }
                          },
                          "id": 19025,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13826:56:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 19016,
                        "id": 19026,
                        "nodeType": "Return",
                        "src": "13819:63:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19008,
                    "nodeType": "StructuredDocumentation",
                    "src": "13488:115:54",
                    "text": " @dev Returns the sharedManaged shared field, given the current balances for token A and token B."
                  },
                  "id": 19028,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "toSharedManaged",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19013,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19010,
                        "mutability": "mutable",
                        "name": "tokenABalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 19028,
                        "src": "13633:21:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19009,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13633:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19012,
                        "mutability": "mutable",
                        "name": "tokenBBalance",
                        "nodeType": "VariableDeclaration",
                        "scope": 19028,
                        "src": "13656:21:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19011,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13656:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13632:46:54"
                  },
                  "returnParameters": {
                    "id": 19016,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19015,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19028,
                        "src": "13702:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19014,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13702:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13701:9:54"
                  },
                  "scope": 19057,
                  "src": "13608:281:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19055,
                    "nodeType": "Block",
                    "src": "14159:105:54",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 19052,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 19050,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 19044,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 19042,
                                        "name": "_mostSignificant",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19035,
                                        "src": "14185:16:54",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "<<",
                                      "rightExpression": {
                                        "hexValue": "323234",
                                        "id": 19043,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "14205:3:54",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_224_by_1",
                                          "typeString": "int_const 224"
                                        },
                                        "value": "224"
                                      },
                                      "src": "14185:23:54",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 19045,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "14184:25:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "components": [
                                    {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "id": 19048,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "leftExpression": {
                                        "id": 19046,
                                        "name": "_midSignificant",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19033,
                                        "src": "14213:15:54",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "nodeType": "BinaryOperation",
                                      "operator": "<<",
                                      "rightExpression": {
                                        "hexValue": "313132",
                                        "id": 19047,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "14232:3:54",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_rational_112_by_1",
                                          "typeString": "int_const 112"
                                        },
                                        "value": "112"
                                      },
                                      "src": "14213:22:54",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "id": 19049,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "TupleExpression",
                                  "src": "14212:24:54",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "14184:52:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "+",
                              "rightExpression": {
                                "id": 19051,
                                "name": "_leastSignificant",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19031,
                                "src": "14239:17:54",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "14184:72:54",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19041,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "14176:7:54",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_bytes32_$",
                              "typeString": "type(bytes32)"
                            },
                            "typeName": {
                              "id": 19040,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "14176:7:54",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 19053,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "14176:81:54",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 19039,
                        "id": 19054,
                        "nodeType": "Return",
                        "src": "14169:88:54"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19029,
                    "nodeType": "StructuredDocumentation",
                    "src": "13920:80:54",
                    "text": " @dev Packs together two uint112 and one uint32 into a bytes32"
                  },
                  "id": 19056,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_pack",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19036,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19031,
                        "mutability": "mutable",
                        "name": "_leastSignificant",
                        "nodeType": "VariableDeclaration",
                        "scope": 19056,
                        "src": "14029:25:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19030,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14029:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19033,
                        "mutability": "mutable",
                        "name": "_midSignificant",
                        "nodeType": "VariableDeclaration",
                        "scope": 19056,
                        "src": "14064:23:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19032,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14064:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19035,
                        "mutability": "mutable",
                        "name": "_mostSignificant",
                        "nodeType": "VariableDeclaration",
                        "scope": 19056,
                        "src": "14097:24:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19034,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14097:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14019:108:54"
                  },
                  "returnParameters": {
                    "id": 19039,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19038,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19056,
                        "src": "14150:7:54",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19037,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "14150:7:54",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14149:9:54"
                  },
                  "scope": 19057,
                  "src": "14005:259:54",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 19058,
              "src": "2895:11371:54"
            }
          ],
          "src": "688:13579:54"
        },
        "id": 54
      },
      "src.sol/amm/vault/balances/GeneralPoolsBalance.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/balances/GeneralPoolsBalance.sol",
          "exportedSymbols": {
            "GeneralPoolsBalance": [
              19467
            ]
          },
          "id": 19468,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 19059,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:55"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../../lib/helpers/BalancerErrors.sol",
              "id": 19060,
              "nodeType": "ImportDirective",
              "scope": 19468,
              "sourceUnit": 656,
              "src": "713:46:55",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/EnumerableMap.sol",
              "file": "../../lib/openzeppelin/EnumerableMap.sol",
              "id": 19061,
              "nodeType": "ImportDirective",
              "scope": 19468,
              "sourceUnit": 4811,
              "src": "760:50:55",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 19062,
              "nodeType": "ImportDirective",
              "scope": 19468,
              "sourceUnit": 5096,
              "src": "811:43:55",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/BalanceAllocation.sol",
              "file": "./BalanceAllocation.sol",
              "id": 19063,
              "nodeType": "ImportDirective",
              "scope": 19468,
              "sourceUnit": 19058,
              "src": "856:33:55",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "contract",
              "fullyImplemented": true,
              "id": 19467,
              "linearizedBaseContracts": [
                19467
              ],
              "name": "GeneralPoolsBalance",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 19066,
                  "libraryName": {
                    "id": 19064,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "941:17:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "935:36:55",
                  "typeName": {
                    "id": 19065,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "963:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                },
                {
                  "id": 19069,
                  "libraryName": {
                    "id": 19067,
                    "name": "EnumerableMap",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4810,
                    "src": "982:13:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_EnumerableMap_$4810",
                      "typeString": "library EnumerableMap"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "976:57:55",
                  "typeName": {
                    "id": 19068,
                    "name": "EnumerableMap.IERC20ToBytes32Map",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4479,
                    "src": "1000:32:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 19073,
                  "mutability": "mutable",
                  "name": "_generalPoolsBalances",
                  "nodeType": "VariableDeclaration",
                  "scope": 19467,
                  "src": "1925:83:55",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                    "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map)"
                  },
                  "typeName": {
                    "id": 19072,
                    "keyType": {
                      "id": 19070,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1933:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1925:52:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                      "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map)"
                    },
                    "valueType": {
                      "id": 19071,
                      "name": "EnumerableMap.IERC20ToBytes32Map",
                      "nodeType": "UserDefinedTypeName",
                      "referencedDeclaration": 4479,
                      "src": "1944:32:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                        "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                      }
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19119,
                    "nodeType": "Block",
                    "src": "2415:504:55",
                    "statements": [
                      {
                        "assignments": [
                          19085
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19085,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 19119,
                            "src": "2425:53:55",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                            },
                            "typeName": {
                              "id": 19084,
                              "name": "EnumerableMap.IERC20ToBytes32Map",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4479,
                              "src": "2425:32:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19089,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19086,
                            "name": "_generalPoolsBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19073,
                            "src": "2481:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map storage ref)"
                            }
                          },
                          "id": 19088,
                          "indexExpression": {
                            "id": 19087,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19076,
                            "src": "2503:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2481:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2425:85:55"
                      },
                      {
                        "body": {
                          "id": 19117,
                          "nodeType": "Block",
                          "src": "2565:348:55",
                          "statements": [
                            {
                              "assignments": [
                                19102
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 19102,
                                  "mutability": "mutable",
                                  "name": "added",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 19117,
                                  "src": "2797:10:55",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "typeName": {
                                    "id": 19101,
                                    "name": "bool",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2797:4:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 19110,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "baseExpression": {
                                      "id": 19105,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19079,
                                      "src": "2827:6:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 19107,
                                    "indexExpression": {
                                      "id": 19106,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19091,
                                      "src": "2834:1:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "2827:9:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  {
                                    "hexValue": "30",
                                    "id": 19108,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "2838:1:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    },
                                    "value": "0"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    },
                                    {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    }
                                  ],
                                  "expression": {
                                    "id": 19103,
                                    "name": "poolBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19085,
                                    "src": "2810:12:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 19104,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "set",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4554,
                                  "src": "2810:16:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$_t_bytes32_$returns$_t_bool_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                                    "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20,bytes32) returns (bool)"
                                  }
                                },
                                "id": 19109,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2810:30:55",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2797:43:55"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 19112,
                                    "name": "added",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19102,
                                    "src": "2863:5:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 19113,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2870:6:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 19114,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKEN_ALREADY_REGISTERED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 627,
                                    "src": "2870:31:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 19111,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2854:8:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 19115,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2854:48:55",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19116,
                              "nodeType": "ExpressionStatement",
                              "src": "2854:48:55"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19097,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 19094,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19091,
                            "src": "2541:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 19095,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19079,
                              "src": "2545:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 19096,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2545:13:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2541:17:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19118,
                        "initializationExpression": {
                          "assignments": [
                            19091
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 19091,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 19118,
                              "src": "2526:9:55",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 19090,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2526:7:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 19093,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 19092,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2538:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2526:13:55"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 19099,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "2560:3:55",
                            "subExpression": {
                              "id": 19098,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19091,
                              "src": "2562:1:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 19100,
                          "nodeType": "ExpressionStatement",
                          "src": "2560:3:55"
                        },
                        "nodeType": "ForStatement",
                        "src": "2521:392:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19074,
                    "nodeType": "StructuredDocumentation",
                    "src": "2015:310:55",
                    "text": " @dev Registers a list of tokens in a General Pool.\n This function assumes `poolId` exists and corresponds to the General specialization setting.\n Requirements:\n - `tokens` must not be registered in the Pool\n - `tokens` must not contain duplicates"
                  },
                  "id": 19120,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_registerGeneralPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19080,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19076,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19120,
                        "src": "2366:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19075,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2366:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19079,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 19120,
                        "src": "2382:22:55",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19077,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "2382:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 19078,
                          "nodeType": "ArrayTypeName",
                          "src": "2382:8:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2365:40:55"
                  },
                  "returnParameters": {
                    "id": 19081,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2415:0:55"
                  },
                  "scope": 19467,
                  "src": "2330:589:55",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19177,
                    "nodeType": "Block",
                    "src": "3379:556:55",
                    "statements": [
                      {
                        "assignments": [
                          19132
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19132,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 19177,
                            "src": "3389:53:55",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                            },
                            "typeName": {
                              "id": 19131,
                              "name": "EnumerableMap.IERC20ToBytes32Map",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4479,
                              "src": "3389:32:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19136,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19133,
                            "name": "_generalPoolsBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19073,
                            "src": "3445:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map storage ref)"
                            }
                          },
                          "id": 19135,
                          "indexExpression": {
                            "id": 19134,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19123,
                            "src": "3467:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3445:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3389:85:55"
                      },
                      {
                        "body": {
                          "id": 19175,
                          "nodeType": "Block",
                          "src": "3529:400:55",
                          "statements": [
                            {
                              "assignments": [
                                19149
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 19149,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 19175,
                                  "src": "3543:12:55",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 19148,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "3543:6:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 19153,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 19150,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19126,
                                  "src": "3558:6:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 19152,
                                "indexExpression": {
                                  "id": 19151,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19138,
                                  "src": "3565:1:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3558:9:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3543:24:55"
                            },
                            {
                              "assignments": [
                                19155
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 19155,
                                  "mutability": "mutable",
                                  "name": "currentBalance",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 19175,
                                  "src": "3581:22:55",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "typeName": {
                                    "id": 19154,
                                    "name": "bytes32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3581:7:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 19160,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 19157,
                                    "name": "poolBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19132,
                                    "src": "3629:12:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  {
                                    "id": 19158,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19149,
                                    "src": "3643:5:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  ],
                                  "id": 19156,
                                  "name": "_getGeneralPoolBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [
                                    19424,
                                    19442
                                  ],
                                  "referencedDeclaration": 19442,
                                  "src": "3606:22:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                                    "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20) view returns (bytes32)"
                                  }
                                },
                                "id": 19159,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3606:43:55",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3581:68:55"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "expression": {
                                        "id": 19162,
                                        "name": "currentBalance",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19155,
                                        "src": "3672:14:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      "id": 19163,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "isZero",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 18636,
                                      "src": "3672:21:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bool_$bound_to$_t_bytes32_$",
                                        "typeString": "function (bytes32) pure returns (bool)"
                                      }
                                    },
                                    "id": 19164,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "3672:23:55",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 19165,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3697:6:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 19166,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "NONZERO_TOKEN_BALANCE",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 636,
                                    "src": "3697:28:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 19161,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3663:8:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 19167,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3663:63:55",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19168,
                              "nodeType": "ExpressionStatement",
                              "src": "3663:63:55"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 19172,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19149,
                                    "src": "3912:5:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  ],
                                  "expression": {
                                    "id": 19169,
                                    "name": "poolBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19132,
                                    "src": "3892:12:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 19171,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "remove",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4659,
                                  "src": "3892:19:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$returns$_t_bool_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                                    "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20) returns (bool)"
                                  }
                                },
                                "id": 19173,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3892:26:55",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "id": 19174,
                              "nodeType": "ExpressionStatement",
                              "src": "3892:26:55"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19144,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 19141,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19138,
                            "src": "3505:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 19142,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19126,
                              "src": "3509:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 19143,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "3509:13:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3505:17:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19176,
                        "initializationExpression": {
                          "assignments": [
                            19138
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 19138,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 19176,
                              "src": "3490:9:55",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 19137,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "3490:7:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 19140,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 19139,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3502:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "3490:13:55"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 19146,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "3524:3:55",
                            "subExpression": {
                              "id": 19145,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19138,
                              "src": "3526:1:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 19147,
                          "nodeType": "ExpressionStatement",
                          "src": "3524:3:55"
                        },
                        "nodeType": "ForStatement",
                        "src": "3485:444:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19121,
                    "nodeType": "StructuredDocumentation",
                    "src": "2925:362:55",
                    "text": " @dev Deregisters a list of tokens in a General Pool.\n This function assumes `poolId` exists and corresponds to the General specialization setting.\n Requirements:\n - `tokens` must be registered in the Pool\n - `tokens` must have zero balance in the Vault\n - `tokens` must not contain duplicates"
                  },
                  "id": 19178,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_deregisterGeneralPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19127,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19123,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19178,
                        "src": "3330:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19122,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3330:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19126,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 19178,
                        "src": "3346:22:55",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19124,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "3346:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 19125,
                          "nodeType": "ArrayTypeName",
                          "src": "3346:8:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3329:40:55"
                  },
                  "returnParameters": {
                    "id": 19128,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3379:0:55"
                  },
                  "scope": 19467,
                  "src": "3292:643:55",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19217,
                    "nodeType": "Block",
                    "src": "4213:386:55",
                    "statements": [
                      {
                        "assignments": [
                          19190
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19190,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 19217,
                            "src": "4223:53:55",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                            },
                            "typeName": {
                              "id": 19189,
                              "name": "EnumerableMap.IERC20ToBytes32Map",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4479,
                              "src": "4223:32:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19194,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19191,
                            "name": "_generalPoolsBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19073,
                            "src": "4279:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map storage ref)"
                            }
                          },
                          "id": 19193,
                          "indexExpression": {
                            "id": 19192,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19181,
                            "src": "4301:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4279:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4223:85:55"
                      },
                      {
                        "body": {
                          "id": 19215,
                          "nodeType": "Block",
                          "src": "4365:228:55",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 19209,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19196,
                                    "src": "4567:1:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "baseExpression": {
                                      "id": 19210,
                                      "name": "balances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19184,
                                      "src": "4570:8:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                        "typeString": "bytes32[] memory"
                                      }
                                    },
                                    "id": 19212,
                                    "indexExpression": {
                                      "id": 19211,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19196,
                                      "src": "4579:1:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "4570:11:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "expression": {
                                    "id": 19206,
                                    "name": "poolBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19190,
                                    "src": "4538:12:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 19208,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "unchecked_setAt",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4574,
                                  "src": "4538:28:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_uint256_$_t_bytes32_$returns$__$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                                    "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256,bytes32)"
                                  }
                                },
                                "id": 19213,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4538:44:55",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19214,
                              "nodeType": "ExpressionStatement",
                              "src": "4538:44:55"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19202,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 19199,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19196,
                            "src": "4339:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 19200,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19184,
                              "src": "4343:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 19201,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "4343:15:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4339:19:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19216,
                        "initializationExpression": {
                          "assignments": [
                            19196
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 19196,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 19216,
                              "src": "4324:9:55",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 19195,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4324:7:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 19198,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 19197,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4336:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "4324:13:55"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 19204,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "4360:3:55",
                            "subExpression": {
                              "id": 19203,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19196,
                              "src": "4362:1:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 19205,
                          "nodeType": "ExpressionStatement",
                          "src": "4360:3:55"
                        },
                        "nodeType": "ForStatement",
                        "src": "4319:274:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19179,
                    "nodeType": "StructuredDocumentation",
                    "src": "3941:182:55",
                    "text": " @dev Sets the balances of a General Pool's tokens to `balances`.\n WARNING: this assumes `balances` has the same length and order as the Pool's tokens."
                  },
                  "id": 19218,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setGeneralPoolBalances",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19185,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19181,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19218,
                        "src": "4161:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19180,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4161:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19184,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 19218,
                        "src": "4177:25:55",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19182,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "4177:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 19183,
                          "nodeType": "ArrayTypeName",
                          "src": "4177:9:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4160:43:55"
                  },
                  "returnParameters": {
                    "id": 19186,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4213:0:55"
                  },
                  "scope": 19467,
                  "src": "4128:471:55",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19236,
                    "nodeType": "Block",
                    "src": "4993:98:55",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19229,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19221,
                              "src": "5029:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19230,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19223,
                              "src": "5037:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 19231,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "5044:17:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 19232,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "cashToManaged",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18804,
                              "src": "5044:31:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              }
                            },
                            {
                              "id": 19233,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19225,
                              "src": "5077:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19228,
                            "name": "_updateGeneralPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19334,
                            "src": "5003:25:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 19234,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5003:81:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 19235,
                        "nodeType": "ExpressionStatement",
                        "src": "5003:81:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19219,
                    "nodeType": "StructuredDocumentation",
                    "src": "4605:263:55",
                    "text": " @dev Transforms `amount` of `token`'s balance in a General Pool from cash into managed.\n This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\n registered for that Pool."
                  },
                  "id": 19237,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_generalPoolCashToManaged",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19226,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19221,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19237,
                        "src": "4917:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19220,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4917:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19223,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19237,
                        "src": "4941:12:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19222,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "4941:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19225,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 19237,
                        "src": "4963:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19224,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4963:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4907:76:55"
                  },
                  "returnParameters": {
                    "id": 19227,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4993:0:55"
                  },
                  "scope": 19467,
                  "src": "4873:218:55",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19255,
                    "nodeType": "Block",
                    "src": "5485:98:55",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19248,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19240,
                              "src": "5521:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19249,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19242,
                              "src": "5529:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 19250,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "5536:17:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 19251,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "managedToCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18845,
                              "src": "5536:31:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              }
                            },
                            {
                              "id": 19252,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19244,
                              "src": "5569:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19247,
                            "name": "_updateGeneralPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19334,
                            "src": "5495:25:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 19253,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5495:81:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 19254,
                        "nodeType": "ExpressionStatement",
                        "src": "5495:81:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19238,
                    "nodeType": "StructuredDocumentation",
                    "src": "5097:263:55",
                    "text": " @dev Transforms `amount` of `token`'s balance in a General Pool from managed into cash.\n This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\n registered for that Pool."
                  },
                  "id": 19256,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_generalPoolManagedToCash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19245,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19240,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19256,
                        "src": "5409:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19239,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5409:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19242,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19256,
                        "src": "5433:12:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19241,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5433:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19244,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 19256,
                        "src": "5455:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19243,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5455:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5399:76:55"
                  },
                  "returnParameters": {
                    "id": 19246,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5485:0:55"
                  },
                  "scope": 19467,
                  "src": "5365:218:55",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19276,
                    "nodeType": "Block",
                    "src": "6051:102:55",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19269,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19259,
                              "src": "6094:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19270,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19261,
                              "src": "6102:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 19271,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "6109:17:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 19272,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "setManaged",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18873,
                              "src": "6109:28:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              }
                            },
                            {
                              "id": 19273,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19263,
                              "src": "6139:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19268,
                            "name": "_updateGeneralPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19334,
                            "src": "6068:25:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 19274,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6068:78:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 19267,
                        "id": 19275,
                        "nodeType": "Return",
                        "src": "6061:85:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19257,
                    "nodeType": "StructuredDocumentation",
                    "src": "5589:316:55",
                    "text": " @dev Sets `token`'s managed balance in a General Pool to `amount`.\n This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\n registered for that Pool.\n Returns the managed balance delta as a result of this call."
                  },
                  "id": 19277,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setGeneralPoolManagedBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19264,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19259,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19277,
                        "src": "5958:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19258,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5958:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19261,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19277,
                        "src": "5982:12:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19260,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5982:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19263,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 19277,
                        "src": "6004:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19262,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6004:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5948:76:55"
                  },
                  "returnParameters": {
                    "id": 19267,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19266,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19277,
                        "src": "6043:6:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 19265,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6043:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6042:8:55"
                  },
                  "scope": 19467,
                  "src": "5910:243:55",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19333,
                    "nodeType": "Block",
                    "src": "6757:346:55",
                    "statements": [
                      {
                        "assignments": [
                          19302
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19302,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 19333,
                            "src": "6767:53:55",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                            },
                            "typeName": {
                              "id": 19301,
                              "name": "EnumerableMap.IERC20ToBytes32Map",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4479,
                              "src": "6767:32:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19306,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19303,
                            "name": "_generalPoolsBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19073,
                            "src": "6823:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map storage ref)"
                            }
                          },
                          "id": 19305,
                          "indexExpression": {
                            "id": 19304,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19280,
                            "src": "6845:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "6823:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6767:85:55"
                      },
                      {
                        "assignments": [
                          19308
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19308,
                            "mutability": "mutable",
                            "name": "currentBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 19333,
                            "src": "6862:22:55",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 19307,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "6862:7:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19313,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 19310,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19302,
                              "src": "6910:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            {
                              "id": 19311,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19282,
                              "src": "6924:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 19309,
                            "name": "_getGeneralPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              19424,
                              19442
                            ],
                            "referencedDeclaration": 19442,
                            "src": "6887:22:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20) view returns (bytes32)"
                            }
                          },
                          "id": 19312,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6887:43:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6862:68:55"
                      },
                      {
                        "assignments": [
                          19315
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19315,
                            "mutability": "mutable",
                            "name": "newBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 19333,
                            "src": "6941:18:55",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 19314,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "6941:7:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19320,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 19317,
                              "name": "currentBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19308,
                              "src": "6971:14:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19318,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19294,
                              "src": "6987:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19316,
                            "name": "mutation",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19292,
                            "src": "6962:8:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (bytes32,uint256) returns (bytes32)"
                            }
                          },
                          "id": 19319,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6962:32:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6941:53:55"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19324,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19282,
                              "src": "7021:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 19325,
                              "name": "newBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19315,
                              "src": "7028:10:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 19321,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19302,
                              "src": "7004:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 19323,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "set",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4554,
                            "src": "7004:16:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$_t_bytes32_$returns$_t_bool_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20,bytes32) returns (bool)"
                            }
                          },
                          "id": 19326,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7004:35:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19327,
                        "nodeType": "ExpressionStatement",
                        "src": "7004:35:55"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19330,
                              "name": "currentBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19308,
                              "src": "7081:14:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 19328,
                              "name": "newBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19315,
                              "src": "7057:10:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "id": 19329,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "managedDelta",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 18545,
                            "src": "7057:23:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_int256_$bound_to$_t_bytes32_$",
                              "typeString": "function (bytes32,bytes32) pure returns (int256)"
                            }
                          },
                          "id": 19331,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7057:39:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 19298,
                        "id": 19332,
                        "nodeType": "Return",
                        "src": "7050:46:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19278,
                    "nodeType": "StructuredDocumentation",
                    "src": "6159:394:55",
                    "text": " @dev Sets `token`'s balance in a General Pool to the result of the `mutation` function when called with the\n current balance and `amount`.\n This function assumes `poolId` exists, corresponds to the General specialization setting, and that `token` is\n registered for that Pool.\n Returns the managed balance delta as a result of this call."
                  },
                  "id": 19334,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_updateGeneralPoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19295,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19280,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19334,
                        "src": "6602:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19279,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6602:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19282,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19334,
                        "src": "6626:12:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19281,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6626:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19292,
                        "mutability": "mutable",
                        "name": "mutation",
                        "nodeType": "VariableDeclaration",
                        "scope": 19334,
                        "src": "6648:53:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                          "typeString": "function (bytes32,uint256) returns (bytes32)"
                        },
                        "typeName": {
                          "id": 19291,
                          "nodeType": "FunctionTypeName",
                          "parameterTypes": {
                            "id": 19287,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 19284,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 19291,
                                "src": "6657:7:55",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "typeName": {
                                  "id": 19283,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "6657:7:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 19286,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 19291,
                                "src": "6666:7:55",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 19285,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "6666:7:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "6656:18:55"
                          },
                          "returnParameterTypes": {
                            "id": 19290,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 19289,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 19291,
                                "src": "6684:7:55",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "typeName": {
                                  "id": 19288,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "6684:7:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "6683:9:55"
                          },
                          "src": "6648:53:55",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                            "typeString": "function (bytes32,uint256) returns (bytes32)"
                          },
                          "visibility": "internal"
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19294,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 19334,
                        "src": "6711:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19293,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6711:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6592:139:55"
                  },
                  "returnParameters": {
                    "id": 19298,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19297,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19334,
                        "src": "6749:6:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 19296,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6749:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6748:8:55"
                  },
                  "scope": 19467,
                  "src": "6558:545:55",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 19399,
                    "nodeType": "Block",
                    "src": "7534:551:55",
                    "statements": [
                      {
                        "assignments": [
                          19349
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19349,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 19399,
                            "src": "7544:53:55",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                            },
                            "typeName": {
                              "id": 19348,
                              "name": "EnumerableMap.IERC20ToBytes32Map",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4479,
                              "src": "7544:32:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19353,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19350,
                            "name": "_generalPoolsBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19073,
                            "src": "7600:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map storage ref)"
                            }
                          },
                          "id": 19352,
                          "indexExpression": {
                            "id": 19351,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19337,
                            "src": "7622:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "7600:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7544:85:55"
                      },
                      {
                        "expression": {
                          "id": 19362,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 19354,
                            "name": "tokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19341,
                            "src": "7639:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 19358,
                                    "name": "poolBalances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19349,
                                    "src": "7661:12:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                      "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                    }
                                  },
                                  "id": 19359,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4689,
                                  "src": "7661:19:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                                    "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer) view returns (uint256)"
                                  }
                                },
                                "id": 19360,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7661:21:55",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 19357,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "7648:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (contract IERC20[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 19355,
                                  "name": "IERC20",
                                  "nodeType": "UserDefinedTypeName",
                                  "referencedDeclaration": 5095,
                                  "src": "7652:6:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "id": 19356,
                                "nodeType": "ArrayTypeName",
                                "src": "7652:8:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                  "typeString": "contract IERC20[]"
                                }
                              }
                            },
                            "id": 19361,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7648:35:55",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[] memory"
                            }
                          },
                          "src": "7639:44:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        "id": 19363,
                        "nodeType": "ExpressionStatement",
                        "src": "7639:44:55"
                      },
                      {
                        "expression": {
                          "id": 19371,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 19364,
                            "name": "balances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19344,
                            "src": "7693:8:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 19368,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19341,
                                  "src": "7718:6:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 19369,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7718:13:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 19367,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "7704:13:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (bytes32[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 19365,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "7708:7:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 19366,
                                "nodeType": "ArrayTypeName",
                                "src": "7708:9:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                  "typeString": "bytes32[]"
                                }
                              }
                            },
                            "id": 19370,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7704:28:55",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "src": "7693:39:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                            "typeString": "bytes32[] memory"
                          }
                        },
                        "id": 19372,
                        "nodeType": "ExpressionStatement",
                        "src": "7693:39:55"
                      },
                      {
                        "body": {
                          "id": 19397,
                          "nodeType": "Block",
                          "src": "7787:292:55",
                          "statements": [
                            {
                              "expression": {
                                "id": 19395,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "components": [
                                    {
                                      "baseExpression": {
                                        "id": 19384,
                                        "name": "tokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19341,
                                        "src": "8014:6:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                          "typeString": "contract IERC20[] memory"
                                        }
                                      },
                                      "id": 19386,
                                      "indexExpression": {
                                        "id": 19385,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19374,
                                        "src": "8021:1:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "8014:9:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    },
                                    {
                                      "baseExpression": {
                                        "id": 19387,
                                        "name": "balances",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19344,
                                        "src": "8025:8:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                          "typeString": "bytes32[] memory"
                                        }
                                      },
                                      "id": 19389,
                                      "indexExpression": {
                                        "id": 19388,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19374,
                                        "src": "8034:1:55",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "nodeType": "IndexAccess",
                                      "src": "8025:11:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "id": 19390,
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "TupleExpression",
                                  "src": "8013:24:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                    "typeString": "tuple(contract IERC20,bytes32)"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 19393,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19374,
                                      "src": "8066:1:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 19391,
                                      "name": "poolBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19349,
                                      "src": "8040:12:55",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                        "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                                      }
                                    },
                                    "id": 19392,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "unchecked_at",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4742,
                                    "src": "8040:25:55",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_uint256_$returns$_t_contract$_IERC20_$5095_$_t_bytes32_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                                      "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,uint256) view returns (contract IERC20,bytes32)"
                                    }
                                  },
                                  "id": 19394,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "8040:28:55",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                    "typeString": "tuple(contract IERC20,bytes32)"
                                  }
                                },
                                "src": "8013:55:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19396,
                              "nodeType": "ExpressionStatement",
                              "src": "8013:55:55"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19380,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 19377,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19374,
                            "src": "7763:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 19378,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19341,
                              "src": "7767:6:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 19379,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "7767:13:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7763:17:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19398,
                        "initializationExpression": {
                          "assignments": [
                            19374
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 19374,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 19398,
                              "src": "7748:9:55",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 19373,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "7748:7:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 19376,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 19375,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "7760:1:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "7748:13:55"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 19382,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "7782:3:55",
                            "subExpression": {
                              "id": 19381,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19374,
                              "src": "7784:1:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 19383,
                          "nodeType": "ExpressionStatement",
                          "src": "7782:3:55"
                        },
                        "nodeType": "ForStatement",
                        "src": "7743:336:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19335,
                    "nodeType": "StructuredDocumentation",
                    "src": "7109:271:55",
                    "text": " @dev Returns an array with all the tokens and balances in a General Pool. The order may change when tokens are\n registered or deregistered.\n This function assumes `poolId` exists and corresponds to the General specialization setting."
                  },
                  "id": 19400,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getGeneralPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19338,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19337,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19400,
                        "src": "7416:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19336,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7416:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7415:16:55"
                  },
                  "returnParameters": {
                    "id": 19345,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19341,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 19400,
                        "src": "7479:22:55",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19339,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "7479:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 19340,
                          "nodeType": "ArrayTypeName",
                          "src": "7479:8:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19344,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 19400,
                        "src": "7503:25:55",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19342,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "7503:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 19343,
                          "nodeType": "ArrayTypeName",
                          "src": "7503:9:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7478:51:55"
                  },
                  "scope": 19467,
                  "src": "7385:700:55",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19423,
                    "nodeType": "Block",
                    "src": "8453:162:55",
                    "statements": [
                      {
                        "assignments": [
                          19413
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19413,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 19423,
                            "src": "8463:53:55",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                            },
                            "typeName": {
                              "id": 19412,
                              "name": "EnumerableMap.IERC20ToBytes32Map",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4479,
                              "src": "8463:32:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19417,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19414,
                            "name": "_generalPoolsBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19073,
                            "src": "8519:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map storage ref)"
                            }
                          },
                          "id": 19416,
                          "indexExpression": {
                            "id": 19415,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19403,
                            "src": "8541:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "8519:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8463:85:55"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19419,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19413,
                              "src": "8588:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            {
                              "id": 19420,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19405,
                              "src": "8602:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 19418,
                            "name": "_getGeneralPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              19424,
                              19442
                            ],
                            "referencedDeclaration": 19442,
                            "src": "8565:22:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20) view returns (bytes32)"
                            }
                          },
                          "id": 19421,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8565:43:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 19409,
                        "id": 19422,
                        "nodeType": "Return",
                        "src": "8558:50:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19401,
                    "nodeType": "StructuredDocumentation",
                    "src": "8091:263:55",
                    "text": " @dev Returns the balance of a token in a General Pool.\n This function assumes `poolId` exists and corresponds to the General specialization setting.\n Requirements:\n - `token` must be registered in the Pool"
                  },
                  "id": 19424,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getGeneralPoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19406,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19403,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19424,
                        "src": "8391:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19402,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8391:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19405,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19424,
                        "src": "8407:12:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19404,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8407:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8390:30:55"
                  },
                  "returnParameters": {
                    "id": 19409,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19408,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19424,
                        "src": "8444:7:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19407,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8444:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8443:9:55"
                  },
                  "scope": 19467,
                  "src": "8359:256:55",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19441,
                    "nodeType": "Block",
                    "src": "8931:76:55",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19436,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19429,
                              "src": "8965:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 19437,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "8972:6:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 19438,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "TOKEN_NOT_REGISTERED",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 624,
                              "src": "8972:27:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 19434,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19427,
                              "src": "8948:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 19435,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "get",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4793,
                            "src": "8948:16:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$_t_uint256_$returns$_t_bytes32_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20,uint256) view returns (bytes32)"
                            }
                          },
                          "id": 19439,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8948:52:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 19433,
                        "id": 19440,
                        "nodeType": "Return",
                        "src": "8941:59:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19425,
                    "nodeType": "StructuredDocumentation",
                    "src": "8621:145:55",
                    "text": " @dev Same as `_getGeneralPoolBalance` but using a Pool's storage pointer, which saves gas in repeated reads and\n writes."
                  },
                  "id": 19442,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getGeneralPoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19430,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19427,
                        "mutability": "mutable",
                        "name": "poolBalances",
                        "nodeType": "VariableDeclaration",
                        "scope": 19442,
                        "src": "8803:53:55",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                          "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                        },
                        "typeName": {
                          "id": 19426,
                          "name": "EnumerableMap.IERC20ToBytes32Map",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 4479,
                          "src": "8803:32:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19429,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19442,
                        "src": "8858:12:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19428,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8858:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8802:69:55"
                  },
                  "returnParameters": {
                    "id": 19433,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19432,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19442,
                        "src": "8918:7:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19431,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8918:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8917:9:55"
                  },
                  "scope": 19467,
                  "src": "8771:236:55",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 19465,
                    "nodeType": "Block",
                    "src": "9303:147:55",
                    "statements": [
                      {
                        "assignments": [
                          19455
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19455,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 19465,
                            "src": "9313:53:55",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                              "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                            },
                            "typeName": {
                              "id": 19454,
                              "name": "EnumerableMap.IERC20ToBytes32Map",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4479,
                              "src": "9313:32:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19459,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19456,
                            "name": "_generalPoolsBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19073,
                            "src": "9369:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_IERC20ToBytes32Map_$4479_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableMap.IERC20ToBytes32Map storage ref)"
                            }
                          },
                          "id": 19458,
                          "indexExpression": {
                            "id": 19457,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19445,
                            "src": "9391:6:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "9369:29:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage",
                            "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9313:85:55"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19462,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19447,
                              "src": "9437:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "expression": {
                              "id": 19460,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19455,
                              "src": "9415:12:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_IERC20ToBytes32Map_$4479_storage_ptr",
                                "typeString": "struct EnumerableMap.IERC20ToBytes32Map storage pointer"
                              }
                            },
                            "id": 19461,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "contains",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4677,
                            "src": "9415:21:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$_t_contract$_IERC20_$5095_$returns$_t_bool_$bound_to$_t_struct$_IERC20ToBytes32Map_$4479_storage_ptr_$",
                              "typeString": "function (struct EnumerableMap.IERC20ToBytes32Map storage pointer,contract IERC20) view returns (bool)"
                            }
                          },
                          "id": 19463,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9415:28:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 19451,
                        "id": 19464,
                        "nodeType": "Return",
                        "src": "9408:35:55"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19443,
                    "nodeType": "StructuredDocumentation",
                    "src": "9013:187:55",
                    "text": " @dev Returns true if `token` is registered in a General Pool.\n This function assumes `poolId` exists and corresponds to the General specialization setting."
                  },
                  "id": 19466,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_isGeneralPoolTokenRegistered",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19448,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19445,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19466,
                        "src": "9244:14:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19444,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "9244:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19447,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19466,
                        "src": "9260:12:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19446,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "9260:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9243:30:55"
                  },
                  "returnParameters": {
                    "id": 19451,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19450,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19466,
                        "src": "9297:4:55",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 19449,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "9297:4:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9296:6:55"
                  },
                  "scope": 19467,
                  "src": "9205:245:55",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 19468,
              "src": "891:8561:55"
            }
          ],
          "src": "688:8765:55"
        },
        "id": 55
      },
      "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/balances/MinimalSwapInfoPoolsBalance.sol",
          "exportedSymbols": {
            "MinimalSwapInfoPoolsBalance": [
              19917
            ]
          },
          "id": 19918,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 19469,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:56"
            },
            {
              "id": 19470,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:56"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../../lib/helpers/BalancerErrors.sol",
              "id": 19471,
              "nodeType": "ImportDirective",
              "scope": 19918,
              "sourceUnit": 656,
              "src": "747:46:56",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/EnumerableSet.sol",
              "file": "../../lib/openzeppelin/EnumerableSet.sol",
              "id": 19472,
              "nodeType": "ImportDirective",
              "scope": 19918,
              "sourceUnit": 5018,
              "src": "794:50:56",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 19473,
              "nodeType": "ImportDirective",
              "scope": 19918,
              "sourceUnit": 5096,
              "src": "845:43:56",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/BalanceAllocation.sol",
              "file": "./BalanceAllocation.sol",
              "id": 19474,
              "nodeType": "ImportDirective",
              "scope": 19918,
              "sourceUnit": 19058,
              "src": "890:33:56",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/PoolRegistry.sol",
              "file": "../PoolRegistry.sol",
              "id": 19475,
              "nodeType": "ImportDirective",
              "scope": 19918,
              "sourceUnit": 15610,
              "src": "924:29:56",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 19476,
                    "name": "PoolRegistry",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 15609,
                    "src": "1004:12:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_PoolRegistry_$15609",
                      "typeString": "contract PoolRegistry"
                    }
                  },
                  "id": 19477,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1004:12:56"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                15609,
                18418,
                20822,
                21266
              ],
              "contractKind": "contract",
              "fullyImplemented": false,
              "id": 19917,
              "linearizedBaseContracts": [
                19917,
                15609,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                5187,
                21266,
                20822
              ],
              "name": "MinimalSwapInfoPoolsBalance",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 19480,
                  "libraryName": {
                    "id": 19478,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "1029:17:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1023:36:56",
                  "typeName": {
                    "id": 19479,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "1051:7:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                },
                {
                  "id": 19483,
                  "libraryName": {
                    "id": 19481,
                    "name": "EnumerableSet",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5017,
                    "src": "1070:13:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_EnumerableSet_$5017",
                      "typeString": "library EnumerableSet"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "1064:49:56",
                  "typeName": {
                    "id": 19482,
                    "name": "EnumerableSet.AddressSet",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4822,
                    "src": "1088:24:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                      "typeString": "struct EnumerableSet.AddressSet"
                    }
                  }
                },
                {
                  "constant": false,
                  "id": 19489,
                  "mutability": "mutable",
                  "name": "_minimalSwapInfoPoolsBalances",
                  "nodeType": "VariableDeclaration",
                  "scope": 19917,
                  "src": "1766:85:56",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                    "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                  },
                  "typeName": {
                    "id": 19488,
                    "keyType": {
                      "id": 19484,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1774:7:56",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1766:46:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                      "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                    },
                    "valueType": {
                      "id": 19487,
                      "keyType": {
                        "id": 19485,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "1793:6:56",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "nodeType": "Mapping",
                      "src": "1785:26:56",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                        "typeString": "mapping(contract IERC20 => bytes32)"
                      },
                      "valueType": {
                        "id": 19486,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1803:7:56",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 19493,
                  "mutability": "mutable",
                  "name": "_minimalSwapInfoPoolsTokens",
                  "nodeType": "VariableDeclaration",
                  "scope": 19917,
                  "src": "1857:81:56",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$4822_storage_$",
                    "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet)"
                  },
                  "typeName": {
                    "id": 19492,
                    "keyType": {
                      "id": 19490,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "1865:7:56",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "1857:44:56",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$4822_storage_$",
                      "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet)"
                    },
                    "valueType": {
                      "id": 19491,
                      "name": "EnumerableSet.AddressSet",
                      "nodeType": "UserDefinedTypeName",
                      "referencedDeclaration": 4822,
                      "src": "1876:24:56",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                        "typeString": "struct EnumerableSet.AddressSet"
                      }
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19541,
                    "nodeType": "Block",
                    "src": "2373:426:56",
                    "statements": [
                      {
                        "assignments": [
                          19505
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19505,
                            "mutability": "mutable",
                            "name": "poolTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 19541,
                            "src": "2383:43:56",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                              "typeString": "struct EnumerableSet.AddressSet"
                            },
                            "typeName": {
                              "id": 19504,
                              "name": "EnumerableSet.AddressSet",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4822,
                              "src": "2383:24:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19509,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19506,
                            "name": "_minimalSwapInfoPoolsTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19493,
                            "src": "2429:27:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$4822_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet storage ref)"
                            }
                          },
                          "id": 19508,
                          "indexExpression": {
                            "id": 19507,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19496,
                            "src": "2457:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2429:35:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                            "typeString": "struct EnumerableSet.AddressSet storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2383:81:56"
                      },
                      {
                        "body": {
                          "id": 19539,
                          "nodeType": "Block",
                          "src": "2519:274:56",
                          "statements": [
                            {
                              "assignments": [
                                19522
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 19522,
                                  "mutability": "mutable",
                                  "name": "added",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 19539,
                                  "src": "2533:10:56",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "typeName": {
                                    "id": 19521,
                                    "name": "bool",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "2533:4:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 19532,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "baseExpression": {
                                          "id": 19527,
                                          "name": "tokens",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 19499,
                                          "src": "2569:6:56",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                            "typeString": "contract IERC20[] memory"
                                          }
                                        },
                                        "id": 19529,
                                        "indexExpression": {
                                          "id": 19528,
                                          "name": "i",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 19511,
                                          "src": "2576:1:56",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "2569:9:56",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      ],
                                      "id": 19526,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "2561:7:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 19525,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "2561:7:56",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 19530,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2561:18:56",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "id": 19523,
                                    "name": "poolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19505,
                                    "src": "2546:10:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                      "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                    }
                                  },
                                  "id": 19524,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "add",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4863,
                                  "src": "2546:14:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$4822_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                                    "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) returns (bool)"
                                  }
                                },
                                "id": 19531,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2546:34:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "2533:47:56"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 19534,
                                    "name": "added",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19522,
                                    "src": "2603:5:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 19535,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "2610:6:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 19536,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKEN_ALREADY_REGISTERED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 627,
                                    "src": "2610:31:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 19533,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "2594:8:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 19537,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2594:48:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19538,
                              "nodeType": "ExpressionStatement",
                              "src": "2594:48:56"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19517,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 19514,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19511,
                            "src": "2495:1:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 19515,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19499,
                              "src": "2499:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 19516,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "2499:13:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2495:17:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19540,
                        "initializationExpression": {
                          "assignments": [
                            19511
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 19511,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 19540,
                              "src": "2480:9:56",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 19510,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2480:7:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 19513,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 19512,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "2492:1:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "2480:13:56"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 19519,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "2514:3:56",
                            "subExpression": {
                              "id": 19518,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19511,
                              "src": "2516:1:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 19520,
                          "nodeType": "ExpressionStatement",
                          "src": "2514:3:56"
                        },
                        "nodeType": "ForStatement",
                        "src": "2475:318:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19494,
                    "nodeType": "StructuredDocumentation",
                    "src": "1945:330:56",
                    "text": " @dev Registers a list of tokens in a Minimal Swap Info Pool.\n This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\n Requirements:\n - `tokens` must not be registered in the Pool\n - `tokens` must not contain duplicates"
                  },
                  "id": 19542,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_registerMinimalSwapInfoPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19500,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19496,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19542,
                        "src": "2324:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19495,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2324:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19499,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 19542,
                        "src": "2340:22:56",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19497,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "2340:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 19498,
                          "nodeType": "ArrayTypeName",
                          "src": "2340:8:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2323:40:56"
                  },
                  "returnParameters": {
                    "id": 19501,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2373:0:56"
                  },
                  "scope": 19917,
                  "src": "2280:519:56",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19613,
                    "nodeType": "Block",
                    "src": "3287:663:56",
                    "statements": [
                      {
                        "assignments": [
                          19554
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19554,
                            "mutability": "mutable",
                            "name": "poolTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 19613,
                            "src": "3297:43:56",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                              "typeString": "struct EnumerableSet.AddressSet"
                            },
                            "typeName": {
                              "id": 19553,
                              "name": "EnumerableSet.AddressSet",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4822,
                              "src": "3297:24:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19558,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19555,
                            "name": "_minimalSwapInfoPoolsTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19493,
                            "src": "3343:27:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$4822_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet storage ref)"
                            }
                          },
                          "id": 19557,
                          "indexExpression": {
                            "id": 19556,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19545,
                            "src": "3371:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3343:35:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                            "typeString": "struct EnumerableSet.AddressSet storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3297:81:56"
                      },
                      {
                        "body": {
                          "id": 19611,
                          "nodeType": "Block",
                          "src": "3433:511:56",
                          "statements": [
                            {
                              "assignments": [
                                19571
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 19571,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 19611,
                                  "src": "3447:12:56",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 19570,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "3447:6:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 19575,
                              "initialValue": {
                                "baseExpression": {
                                  "id": 19572,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19548,
                                  "src": "3462:6:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 19574,
                                "indexExpression": {
                                  "id": 19573,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19560,
                                  "src": "3469:1:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3462:9:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3447:24:56"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "expression": {
                                        "baseExpression": {
                                          "baseExpression": {
                                            "id": 19577,
                                            "name": "_minimalSwapInfoPoolsBalances",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 19489,
                                            "src": "3494:29:56",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                                              "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                                            }
                                          },
                                          "id": 19579,
                                          "indexExpression": {
                                            "id": 19578,
                                            "name": "poolId",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 19545,
                                            "src": "3524:6:56",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_bytes32",
                                              "typeString": "bytes32"
                                            }
                                          },
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "nodeType": "IndexAccess",
                                          "src": "3494:37:56",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                            "typeString": "mapping(contract IERC20 => bytes32)"
                                          }
                                        },
                                        "id": 19581,
                                        "indexExpression": {
                                          "id": 19580,
                                          "name": "token",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 19571,
                                          "src": "3532:5:56",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        "isConstant": false,
                                        "isLValue": true,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "nodeType": "IndexAccess",
                                        "src": "3494:44:56",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_bytes32",
                                          "typeString": "bytes32"
                                        }
                                      },
                                      "id": 19582,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "isZero",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 18636,
                                      "src": "3494:51:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bool_$bound_to$_t_bytes32_$",
                                        "typeString": "function (bytes32) pure returns (bool)"
                                      }
                                    },
                                    "id": 19583,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "3494:53:56",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 19584,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3549:6:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 19585,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "NONZERO_TOKEN_BALANCE",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 636,
                                    "src": "3549:28:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 19576,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3485:8:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 19586,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3485:93:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19587,
                              "nodeType": "ExpressionStatement",
                              "src": "3485:93:56"
                            },
                            {
                              "expression": {
                                "id": 19593,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "delete",
                                "prefix": true,
                                "src": "3759:51:56",
                                "subExpression": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 19588,
                                      "name": "_minimalSwapInfoPoolsBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19489,
                                      "src": "3766:29:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                                        "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                                      }
                                    },
                                    "id": 19590,
                                    "indexExpression": {
                                      "id": 19589,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19545,
                                      "src": "3796:6:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "3766:37:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                      "typeString": "mapping(contract IERC20 => bytes32)"
                                    }
                                  },
                                  "id": 19592,
                                  "indexExpression": {
                                    "id": 19591,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19571,
                                    "src": "3804:5:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "3766:44:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19594,
                              "nodeType": "ExpressionStatement",
                              "src": "3759:51:56"
                            },
                            {
                              "assignments": [
                                19596
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 19596,
                                  "mutability": "mutable",
                                  "name": "removed",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 19611,
                                  "src": "3825:12:56",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "typeName": {
                                    "id": 19595,
                                    "name": "bool",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "3825:4:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 19604,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "id": 19601,
                                        "name": "token",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19571,
                                        "src": "3866:5:56",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_IERC20_$5095",
                                          "typeString": "contract IERC20"
                                        }
                                      ],
                                      "id": 19600,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "3858:7:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": {
                                        "id": 19599,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "3858:7:56",
                                        "typeDescriptions": {}
                                      }
                                    },
                                    "id": 19602,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "3858:14:56",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "id": 19597,
                                    "name": "poolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19554,
                                    "src": "3840:10:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                      "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                    }
                                  },
                                  "id": 19598,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "remove",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4943,
                                  "src": "3840:17:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$4822_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                                    "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) returns (bool)"
                                  }
                                },
                                "id": 19603,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3840:33:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "3825:48:56"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 19606,
                                    "name": "removed",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19596,
                                    "src": "3896:7:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  },
                                  {
                                    "expression": {
                                      "id": 19607,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "3905:6:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 19608,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKEN_NOT_REGISTERED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 624,
                                    "src": "3905:27:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 19605,
                                  "name": "_require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 361,
                                  "src": "3887:8:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                                    "typeString": "function (bool,uint256) pure"
                                  }
                                },
                                "id": 19609,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3887:46:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19610,
                              "nodeType": "ExpressionStatement",
                              "src": "3887:46:56"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19566,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 19563,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19560,
                            "src": "3409:1:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 19564,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19548,
                              "src": "3413:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 19565,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "3413:13:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3409:17:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19612,
                        "initializationExpression": {
                          "assignments": [
                            19560
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 19560,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 19612,
                              "src": "3394:9:56",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 19559,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "3394:7:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 19562,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 19561,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3406:1:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "3394:13:56"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 19568,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "3428:3:56",
                            "subExpression": {
                              "id": 19567,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19560,
                              "src": "3430:1:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 19569,
                          "nodeType": "ExpressionStatement",
                          "src": "3428:3:56"
                        },
                        "nodeType": "ForStatement",
                        "src": "3389:555:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19543,
                    "nodeType": "StructuredDocumentation",
                    "src": "2805:382:56",
                    "text": " @dev Deregisters a list of tokens in a Minimal Swap Info Pool.\n This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting.\n Requirements:\n - `tokens` must be registered in the Pool\n - `tokens` must have zero balance in the Vault\n - `tokens` must not contain duplicates"
                  },
                  "id": 19614,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_deregisterMinimalSwapInfoPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19549,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19545,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19614,
                        "src": "3238:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19544,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3238:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19548,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 19614,
                        "src": "3254:22:56",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19546,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "3254:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 19547,
                          "nodeType": "ArrayTypeName",
                          "src": "3254:8:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3237:40:56"
                  },
                  "returnParameters": {
                    "id": 19550,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3287:0:56"
                  },
                  "scope": 19917,
                  "src": "3192:758:56",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19651,
                    "nodeType": "Block",
                    "src": "4300:147:56",
                    "statements": [
                      {
                        "body": {
                          "id": 19649,
                          "nodeType": "Block",
                          "src": "4354:87:56",
                          "statements": [
                            {
                              "expression": {
                                "id": 19647,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 19637,
                                      "name": "_minimalSwapInfoPoolsBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19489,
                                      "src": "4368:29:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                                        "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                                      }
                                    },
                                    "id": 19642,
                                    "indexExpression": {
                                      "id": 19638,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19617,
                                      "src": "4398:6:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "4368:37:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                      "typeString": "mapping(contract IERC20 => bytes32)"
                                    }
                                  },
                                  "id": 19643,
                                  "indexExpression": {
                                    "baseExpression": {
                                      "id": 19639,
                                      "name": "tokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19620,
                                      "src": "4406:6:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                        "typeString": "contract IERC20[] memory"
                                      }
                                    },
                                    "id": 19641,
                                    "indexExpression": {
                                      "id": 19640,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19627,
                                      "src": "4413:1:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "4406:9:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "4368:48:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "baseExpression": {
                                    "id": 19644,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19623,
                                    "src": "4419:8:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                      "typeString": "bytes32[] memory"
                                    }
                                  },
                                  "id": 19646,
                                  "indexExpression": {
                                    "id": 19645,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19627,
                                    "src": "4428:1:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "4419:11:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "4368:62:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 19648,
                              "nodeType": "ExpressionStatement",
                              "src": "4368:62:56"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19633,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 19630,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19627,
                            "src": "4330:1:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 19631,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19620,
                              "src": "4334:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 19632,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "4334:13:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4330:17:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19650,
                        "initializationExpression": {
                          "assignments": [
                            19627
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 19627,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 19650,
                              "src": "4315:9:56",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 19626,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4315:7:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 19629,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 19628,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4327:1:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "4315:13:56"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 19635,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "4349:3:56",
                            "subExpression": {
                              "id": 19634,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19627,
                              "src": "4351:1:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 19636,
                          "nodeType": "ExpressionStatement",
                          "src": "4349:3:56"
                        },
                        "nodeType": "ForStatement",
                        "src": "4310:131:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19615,
                    "nodeType": "StructuredDocumentation",
                    "src": "3956:192:56",
                    "text": " @dev Sets the balances of a Minimal Swap Info Pool's tokens to `balances`.\n WARNING: this assumes `balances` has the same length and order as the Pool's tokens."
                  },
                  "id": 19652,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setMinimalSwapInfoPoolBalances",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19624,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19617,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19652,
                        "src": "4203:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19616,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4203:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19620,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 19652,
                        "src": "4227:22:56",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19618,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "4227:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 19619,
                          "nodeType": "ArrayTypeName",
                          "src": "4227:8:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19623,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 19652,
                        "src": "4259:25:56",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19621,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "4259:7:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 19622,
                          "nodeType": "ArrayTypeName",
                          "src": "4259:9:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4193:97:56"
                  },
                  "returnParameters": {
                    "id": 19625,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4300:0:56"
                  },
                  "scope": 19917,
                  "src": "4153:294:56",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19670,
                    "nodeType": "Block",
                    "src": "4869:106:56",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19663,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19655,
                              "src": "4913:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19664,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19657,
                              "src": "4921:5:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 19665,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "4928:17:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 19666,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "cashToManaged",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18804,
                              "src": "4928:31:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              }
                            },
                            {
                              "id": 19667,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19659,
                              "src": "4961:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19662,
                            "name": "_updateMinimalSwapInfoPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19761,
                            "src": "4879:33:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 19668,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4879:89:56",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 19669,
                        "nodeType": "ExpressionStatement",
                        "src": "4879:89:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19653,
                    "nodeType": "StructuredDocumentation",
                    "src": "4453:283:56",
                    "text": " @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from cash into managed.\n This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\n `token` is registered for that Pool."
                  },
                  "id": 19671,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_minimalSwapInfoPoolCashToManaged",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19660,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19655,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19671,
                        "src": "4793:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19654,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4793:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19657,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19671,
                        "src": "4817:12:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19656,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "4817:6:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19659,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 19671,
                        "src": "4839:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19658,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4839:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4783:76:56"
                  },
                  "returnParameters": {
                    "id": 19661,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4869:0:56"
                  },
                  "scope": 19917,
                  "src": "4741:234:56",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19689,
                    "nodeType": "Block",
                    "src": "5397:106:56",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19682,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19674,
                              "src": "5441:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19683,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19676,
                              "src": "5449:5:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 19684,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "5456:17:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 19685,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "managedToCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18845,
                              "src": "5456:31:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              }
                            },
                            {
                              "id": 19686,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19678,
                              "src": "5489:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19681,
                            "name": "_updateMinimalSwapInfoPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19761,
                            "src": "5407:33:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 19687,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5407:89:56",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 19688,
                        "nodeType": "ExpressionStatement",
                        "src": "5407:89:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19672,
                    "nodeType": "StructuredDocumentation",
                    "src": "4981:283:56",
                    "text": " @dev Transforms `amount` of `token`'s balance in a Minimal Swap Info Pool from managed into cash.\n This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\n `token` is registered for that Pool."
                  },
                  "id": 19690,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_minimalSwapInfoPoolManagedToCash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19679,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19674,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19690,
                        "src": "5321:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19673,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5321:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19676,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19690,
                        "src": "5345:12:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19675,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5345:6:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19678,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 19690,
                        "src": "5367:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19677,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5367:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5311:76:56"
                  },
                  "returnParameters": {
                    "id": 19680,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5397:0:56"
                  },
                  "scope": 19917,
                  "src": "5269:234:56",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19710,
                    "nodeType": "Block",
                    "src": "5999:110:56",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19703,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19693,
                              "src": "6050:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19704,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19695,
                              "src": "6058:5:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 19705,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "6065:17:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 19706,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "setManaged",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18873,
                              "src": "6065:28:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              }
                            },
                            {
                              "id": 19707,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19697,
                              "src": "6095:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19702,
                            "name": "_updateMinimalSwapInfoPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19761,
                            "src": "6016:33:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 19708,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6016:86:56",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 19701,
                        "id": 19709,
                        "nodeType": "Return",
                        "src": "6009:93:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19691,
                    "nodeType": "StructuredDocumentation",
                    "src": "5509:336:56",
                    "text": " @dev Sets `token`'s managed balance in a Minimal Swap Info Pool to `amount`.\n This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\n `token` is registered for that Pool.\n Returns the managed balance delta as a result of this call."
                  },
                  "id": 19711,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setMinimalSwapInfoPoolManagedBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19698,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19693,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19711,
                        "src": "5906:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19692,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5906:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19695,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19711,
                        "src": "5930:12:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19694,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5930:6:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19697,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 19711,
                        "src": "5952:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19696,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5952:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5896:76:56"
                  },
                  "returnParameters": {
                    "id": 19701,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19700,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19711,
                        "src": "5991:6:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 19699,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "5991:6:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5990:8:56"
                  },
                  "scope": 19917,
                  "src": "5850:259:56",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19760,
                    "nodeType": "Block",
                    "src": "6742:275:56",
                    "statements": [
                      {
                        "assignments": [
                          19734
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19734,
                            "mutability": "mutable",
                            "name": "currentBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 19760,
                            "src": "6752:22:56",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 19733,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "6752:7:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19739,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 19736,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19714,
                              "src": "6808:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19737,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19716,
                              "src": "6816:5:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 19735,
                            "name": "_getMinimalSwapInfoPoolBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19889,
                            "src": "6777:30:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                              "typeString": "function (bytes32,contract IERC20) view returns (bytes32)"
                            }
                          },
                          "id": 19738,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6777:45:56",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6752:70:56"
                      },
                      {
                        "assignments": [
                          19741
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19741,
                            "mutability": "mutable",
                            "name": "newBalance",
                            "nodeType": "VariableDeclaration",
                            "scope": 19760,
                            "src": "6833:18:56",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 19740,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "6833:7:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19746,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 19743,
                              "name": "currentBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19734,
                              "src": "6863:14:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 19744,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19728,
                              "src": "6879:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19742,
                            "name": "mutation",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19726,
                            "src": "6854:8:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                              "typeString": "function (bytes32,uint256) returns (bytes32)"
                            }
                          },
                          "id": 19745,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6854:32:56",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6833:53:56"
                      },
                      {
                        "expression": {
                          "id": 19753,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "baseExpression": {
                                "id": 19747,
                                "name": "_minimalSwapInfoPoolsBalances",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19489,
                                "src": "6896:29:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                                  "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                                }
                              },
                              "id": 19750,
                              "indexExpression": {
                                "id": 19748,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19714,
                                "src": "6926:6:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6896:37:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                "typeString": "mapping(contract IERC20 => bytes32)"
                              }
                            },
                            "id": 19751,
                            "indexExpression": {
                              "id": 19749,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19716,
                              "src": "6934:5:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "6896:44:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 19752,
                            "name": "newBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19741,
                            "src": "6943:10:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "6896:57:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 19754,
                        "nodeType": "ExpressionStatement",
                        "src": "6896:57:56"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 19757,
                              "name": "currentBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19734,
                              "src": "6995:14:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "expression": {
                              "id": 19755,
                              "name": "newBalance",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19741,
                              "src": "6971:10:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "id": 19756,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "managedDelta",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 18545,
                            "src": "6971:23:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_int256_$bound_to$_t_bytes32_$",
                              "typeString": "function (bytes32,bytes32) pure returns (int256)"
                            }
                          },
                          "id": 19758,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6971:39:56",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 19732,
                        "id": 19759,
                        "nodeType": "Return",
                        "src": "6964:46:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19712,
                    "nodeType": "StructuredDocumentation",
                    "src": "6115:414:56",
                    "text": " @dev Sets `token`'s balance in a Minimal Swap Info Pool to the result of the `mutation` function when called with\n the current balance and `amount`.\n This function assumes `poolId` exists, corresponds to the Minimal Swap Info specialization setting, and that\n `token` is registered for that Pool.\n Returns the managed balance delta as a result of this call."
                  },
                  "id": 19761,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_updateMinimalSwapInfoPoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19729,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19714,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19761,
                        "src": "6586:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19713,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6586:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19716,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19761,
                        "src": "6610:12:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19715,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6610:6:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19726,
                        "mutability": "mutable",
                        "name": "mutation",
                        "nodeType": "VariableDeclaration",
                        "scope": 19761,
                        "src": "6632:53:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                          "typeString": "function (bytes32,uint256) returns (bytes32)"
                        },
                        "typeName": {
                          "id": 19725,
                          "nodeType": "FunctionTypeName",
                          "parameterTypes": {
                            "id": 19721,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 19718,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 19725,
                                "src": "6641:7:56",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "typeName": {
                                  "id": 19717,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "6641:7:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 19720,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 19725,
                                "src": "6650:7:56",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 19719,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "6650:7:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "6640:18:56"
                          },
                          "returnParameterTypes": {
                            "id": 19724,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 19723,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 19725,
                                "src": "6668:7:56",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "typeName": {
                                  "id": 19722,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "6668:7:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "6667:9:56"
                          },
                          "src": "6632:53:56",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                            "typeString": "function (bytes32,uint256) returns (bytes32)"
                          },
                          "visibility": "internal"
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19728,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 19761,
                        "src": "6695:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 19727,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6695:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6576:139:56"
                  },
                  "returnParameters": {
                    "id": 19732,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19731,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19761,
                        "src": "6734:6:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 19730,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6734:6:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6733:8:56"
                  },
                  "scope": 19917,
                  "src": "6534:483:56",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19838,
                    "nodeType": "Block",
                    "src": "7476:642:56",
                    "statements": [
                      {
                        "assignments": [
                          19776
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19776,
                            "mutability": "mutable",
                            "name": "poolTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 19838,
                            "src": "7486:43:56",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                              "typeString": "struct EnumerableSet.AddressSet"
                            },
                            "typeName": {
                              "id": 19775,
                              "name": "EnumerableSet.AddressSet",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4822,
                              "src": "7486:24:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19780,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19777,
                            "name": "_minimalSwapInfoPoolsTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19493,
                            "src": "7532:27:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$4822_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet storage ref)"
                            }
                          },
                          "id": 19779,
                          "indexExpression": {
                            "id": 19778,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19764,
                            "src": "7560:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "7532:35:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                            "typeString": "struct EnumerableSet.AddressSet storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "7486:81:56"
                      },
                      {
                        "expression": {
                          "id": 19789,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 19781,
                            "name": "tokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19768,
                            "src": "7577:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 19785,
                                    "name": "poolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19776,
                                    "src": "7599:10:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                      "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                    }
                                  },
                                  "id": 19786,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 4974,
                                  "src": "7599:17:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                                    "typeString": "function (struct EnumerableSet.AddressSet storage pointer) view returns (uint256)"
                                  }
                                },
                                "id": 19787,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7599:19:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 19784,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "7586:12:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (contract IERC20[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 19782,
                                  "name": "IERC20",
                                  "nodeType": "UserDefinedTypeName",
                                  "referencedDeclaration": 5095,
                                  "src": "7590:6:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "id": 19783,
                                "nodeType": "ArrayTypeName",
                                "src": "7590:8:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                  "typeString": "contract IERC20[]"
                                }
                              }
                            },
                            "id": 19788,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7586:33:56",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[] memory"
                            }
                          },
                          "src": "7577:42:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        "id": 19790,
                        "nodeType": "ExpressionStatement",
                        "src": "7577:42:56"
                      },
                      {
                        "expression": {
                          "id": 19798,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 19791,
                            "name": "balances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19771,
                            "src": "7629:8:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 19795,
                                  "name": "tokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19768,
                                  "src": "7654:6:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                    "typeString": "contract IERC20[] memory"
                                  }
                                },
                                "id": 19796,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "src": "7654:13:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 19794,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "7640:13:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (bytes32[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 19792,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "7644:7:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 19793,
                                "nodeType": "ArrayTypeName",
                                "src": "7644:9:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                  "typeString": "bytes32[]"
                                }
                              }
                            },
                            "id": 19797,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7640:28:56",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "src": "7629:39:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                            "typeString": "bytes32[] memory"
                          }
                        },
                        "id": 19799,
                        "nodeType": "ExpressionStatement",
                        "src": "7629:39:56"
                      },
                      {
                        "body": {
                          "id": 19836,
                          "nodeType": "Block",
                          "src": "7723:389:56",
                          "statements": [
                            {
                              "assignments": [
                                19812
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 19812,
                                  "mutability": "mutable",
                                  "name": "token",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 19836,
                                  "src": "7949:12:56",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "typeName": {
                                    "id": 19811,
                                    "name": "IERC20",
                                    "nodeType": "UserDefinedTypeName",
                                    "referencedDeclaration": 5095,
                                    "src": "7949:6:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 19819,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "arguments": [
                                      {
                                        "id": 19816,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19801,
                                        "src": "7995:1:56",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "id": 19814,
                                        "name": "poolTokens",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 19776,
                                        "src": "7971:10:56",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                          "typeString": "struct EnumerableSet.AddressSet storage pointer"
                                        }
                                      },
                                      "id": 19815,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "unchecked_at",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 5016,
                                      "src": "7971:23:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                                        "typeString": "function (struct EnumerableSet.AddressSet storage pointer,uint256) view returns (address)"
                                      }
                                    },
                                    "id": 19817,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "7971:26:56",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "id": 19813,
                                  "name": "IERC20",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5095,
                                  "src": "7964:6:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                    "typeString": "type(contract IERC20)"
                                  }
                                },
                                "id": 19818,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7964:34:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "7949:49:56"
                            },
                            {
                              "expression": {
                                "id": 19824,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 19820,
                                    "name": "tokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19768,
                                    "src": "8012:6:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  "id": 19822,
                                  "indexExpression": {
                                    "id": 19821,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19801,
                                    "src": "8019:1:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "8012:9:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 19823,
                                  "name": "token",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19812,
                                  "src": "8024:5:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "8012:17:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "id": 19825,
                              "nodeType": "ExpressionStatement",
                              "src": "8012:17:56"
                            },
                            {
                              "expression": {
                                "id": 19834,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "baseExpression": {
                                    "id": 19826,
                                    "name": "balances",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19771,
                                    "src": "8043:8:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                      "typeString": "bytes32[] memory"
                                    }
                                  },
                                  "id": 19828,
                                  "indexExpression": {
                                    "id": 19827,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19801,
                                    "src": "8052:1:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "8043:11:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "baseExpression": {
                                    "baseExpression": {
                                      "id": 19829,
                                      "name": "_minimalSwapInfoPoolsBalances",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19489,
                                      "src": "8057:29:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                                        "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                                      }
                                    },
                                    "id": 19831,
                                    "indexExpression": {
                                      "id": 19830,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 19764,
                                      "src": "8087:6:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "nodeType": "IndexAccess",
                                    "src": "8057:37:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                                      "typeString": "mapping(contract IERC20 => bytes32)"
                                    }
                                  },
                                  "id": 19833,
                                  "indexExpression": {
                                    "id": 19832,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19812,
                                    "src": "8095:5:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "8057:44:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "8043:58:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 19835,
                              "nodeType": "ExpressionStatement",
                              "src": "8043:58:56"
                            }
                          ]
                        },
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19807,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 19804,
                            "name": "i",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19801,
                            "src": "7699:1:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "expression": {
                              "id": 19805,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19768,
                              "src": "7703:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 19806,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "src": "7703:13:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "7699:17:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19837,
                        "initializationExpression": {
                          "assignments": [
                            19801
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 19801,
                              "mutability": "mutable",
                              "name": "i",
                              "nodeType": "VariableDeclaration",
                              "scope": 19837,
                              "src": "7684:9:56",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 19800,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "7684:7:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 19803,
                          "initialValue": {
                            "hexValue": "30",
                            "id": 19802,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "7696:1:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "7684:13:56"
                        },
                        "loopExpression": {
                          "expression": {
                            "id": 19809,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "++",
                            "prefix": true,
                            "src": "7718:3:56",
                            "subExpression": {
                              "id": 19808,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19801,
                              "src": "7720:1:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 19810,
                          "nodeType": "ExpressionStatement",
                          "src": "7718:3:56"
                        },
                        "nodeType": "ForStatement",
                        "src": "7679:433:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19762,
                    "nodeType": "StructuredDocumentation",
                    "src": "7023:291:56",
                    "text": " @dev Returns an array with all the tokens and balances in a Minimal Swap Info Pool. The order may change when\n tokens are registered or deregistered.\n This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting."
                  },
                  "id": 19839,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getMinimalSwapInfoPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19765,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19764,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19839,
                        "src": "7358:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19763,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7358:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7357:16:56"
                  },
                  "returnParameters": {
                    "id": 19772,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19768,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 19839,
                        "src": "7421:22:56",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19766,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "7421:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 19767,
                          "nodeType": "ArrayTypeName",
                          "src": "7421:8:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19771,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 19839,
                        "src": "7445:25:56",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 19769,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "7445:7:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 19770,
                          "nodeType": "ArrayTypeName",
                          "src": "7445:9:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7420:51:56"
                  },
                  "scope": 19917,
                  "src": "7319:799:56",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19888,
                    "nodeType": "Block",
                    "src": "8448:796:56",
                    "statements": [
                      {
                        "assignments": [
                          19850
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19850,
                            "mutability": "mutable",
                            "name": "balance",
                            "nodeType": "VariableDeclaration",
                            "scope": 19888,
                            "src": "8458:15:56",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 19849,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "8458:7:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19856,
                        "initialValue": {
                          "baseExpression": {
                            "baseExpression": {
                              "id": 19851,
                              "name": "_minimalSwapInfoPoolsBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19489,
                              "src": "8476:29:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$_$",
                                "typeString": "mapping(bytes32 => mapping(contract IERC20 => bytes32))"
                              }
                            },
                            "id": 19853,
                            "indexExpression": {
                              "id": 19852,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19842,
                              "src": "8506:6:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "8476:37:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                              "typeString": "mapping(contract IERC20 => bytes32)"
                            }
                          },
                          "id": 19855,
                          "indexExpression": {
                            "id": 19854,
                            "name": "token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19844,
                            "src": "8514:5:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "8476:44:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8458:62:56"
                      },
                      {
                        "assignments": [
                          19858
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19858,
                            "mutability": "mutable",
                            "name": "tokenRegistered",
                            "nodeType": "VariableDeclaration",
                            "scope": 19888,
                            "src": "8807:20:56",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 19857,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "8807:4:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19872,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 19871,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "id": 19859,
                                "name": "balance",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19850,
                                "src": "8830:7:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 19860,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "isNotZero",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18650,
                              "src": "8830:17:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bool_$bound_to$_t_bytes32_$",
                                "typeString": "function (bytes32) pure returns (bool)"
                              }
                            },
                            "id": 19861,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8830:19:56",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "||",
                          "rightExpression": {
                            "arguments": [
                              {
                                "arguments": [
                                  {
                                    "id": 19868,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19844,
                                    "src": "8906:5:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  ],
                                  "id": 19867,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "8898:7:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": {
                                    "id": 19866,
                                    "name": "address",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "8898:7:56",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 19869,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8898:14:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "expression": {
                                "baseExpression": {
                                  "id": 19862,
                                  "name": "_minimalSwapInfoPoolsTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19493,
                                  "src": "8853:27:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$4822_storage_$",
                                    "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet storage ref)"
                                  }
                                },
                                "id": 19864,
                                "indexExpression": {
                                  "id": 19863,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19842,
                                  "src": "8881:6:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "8853:35:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                                  "typeString": "struct EnumerableSet.AddressSet storage ref"
                                }
                              },
                              "id": 19865,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "contains",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 4961,
                              "src": "8853:44:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                                "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) view returns (bool)"
                              }
                            },
                            "id": 19870,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8853:60:56",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "8830:83:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8807:106:56"
                      },
                      {
                        "condition": {
                          "id": 19874,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "8928:16:56",
                          "subExpression": {
                            "id": 19873,
                            "name": "tokenRegistered",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19858,
                            "src": "8929:15:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 19885,
                        "nodeType": "IfStatement",
                        "src": "8924:289:56",
                        "trueBody": {
                          "id": 19884,
                          "nodeType": "Block",
                          "src": "8946:267:56",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 19876,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19842,
                                    "src": "9145:6:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 19875,
                                  "name": "_ensureRegisteredPool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15394,
                                  "src": "9123:21:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$",
                                    "typeString": "function (bytes32) view"
                                  }
                                },
                                "id": 19877,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9123:29:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19878,
                              "nodeType": "ExpressionStatement",
                              "src": "9123:29:56"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 19880,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "9174:6:56",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 19881,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKEN_NOT_REGISTERED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 624,
                                    "src": "9174:27:56",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 19879,
                                  "name": "_revert",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 369,
                                  "src": "9166:7:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                                    "typeString": "function (uint256) pure"
                                  }
                                },
                                "id": 19882,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9166:36:56",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 19883,
                              "nodeType": "ExpressionStatement",
                              "src": "9166:36:56"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 19886,
                          "name": "balance",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19850,
                          "src": "9230:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 19848,
                        "id": 19887,
                        "nodeType": "Return",
                        "src": "9223:14:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19840,
                    "nodeType": "StructuredDocumentation",
                    "src": "8124:217:56",
                    "text": " @dev Returns the balance of a token in a Minimal Swap Info Pool.\n Requirements:\n - `poolId` must be a Minimal Swap Info Pool\n - `token` must be registered in the Pool"
                  },
                  "id": 19889,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getMinimalSwapInfoPoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19845,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19842,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19889,
                        "src": "8386:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19841,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8386:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19844,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19889,
                        "src": "8402:12:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19843,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8402:6:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8385:30:56"
                  },
                  "returnParameters": {
                    "id": 19848,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19847,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19889,
                        "src": "8439:7:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19846,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8439:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8438:9:56"
                  },
                  "scope": 19917,
                  "src": "8346:898:56",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 19915,
                    "nodeType": "Block",
                    "src": "9568:150:56",
                    "statements": [
                      {
                        "assignments": [
                          19902
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19902,
                            "mutability": "mutable",
                            "name": "poolTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 19915,
                            "src": "9578:43:56",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                              "typeString": "struct EnumerableSet.AddressSet"
                            },
                            "typeName": {
                              "id": 19901,
                              "name": "EnumerableSet.AddressSet",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 4822,
                              "src": "9578:24:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19906,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19903,
                            "name": "_minimalSwapInfoPoolsTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19493,
                            "src": "9624:27:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_AddressSet_$4822_storage_$",
                              "typeString": "mapping(bytes32 => struct EnumerableSet.AddressSet storage ref)"
                            }
                          },
                          "id": 19905,
                          "indexExpression": {
                            "id": 19904,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19892,
                            "src": "9652:6:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "9624:35:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_AddressSet_$4822_storage",
                            "typeString": "struct EnumerableSet.AddressSet storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9578:81:56"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 19911,
                                  "name": "token",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19894,
                                  "src": "9704:5:56",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "id": 19910,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "9696:7:56",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 19909,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "9696:7:56",
                                  "typeDescriptions": {}
                                }
                              },
                              "id": 19912,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "9696:14:56",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "id": 19907,
                              "name": "poolTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19902,
                              "src": "9676:10:56",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_AddressSet_$4822_storage_ptr",
                                "typeString": "struct EnumerableSet.AddressSet storage pointer"
                              }
                            },
                            "id": 19908,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "contains",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 4961,
                            "src": "9676:19:56",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$4822_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$4822_storage_ptr_$",
                              "typeString": "function (struct EnumerableSet.AddressSet storage pointer,address) view returns (bool)"
                            }
                          },
                          "id": 19913,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9676:35:56",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 19898,
                        "id": 19914,
                        "nodeType": "Return",
                        "src": "9669:42:56"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19890,
                    "nodeType": "StructuredDocumentation",
                    "src": "9250:207:56",
                    "text": " @dev Returns true if `token` is registered in a Minimal Swap Info Pool.\n This function assumes `poolId` exists and corresponds to the Minimal Swap Info specialization setting."
                  },
                  "id": 19916,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_isMinimalSwapInfoPoolTokenRegistered",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19895,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19892,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 19916,
                        "src": "9509:14:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19891,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "9509:7:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19894,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 19916,
                        "src": "9525:12:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19893,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "9525:6:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9508:30:56"
                  },
                  "returnParameters": {
                    "id": 19898,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19897,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 19916,
                        "src": "9562:4:56",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 19896,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "9562:4:56",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9561:6:56"
                  },
                  "scope": 19917,
                  "src": "9462:256:56",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                }
              ],
              "scope": 19918,
              "src": "955:8765:56"
            }
          ],
          "src": "688:9033:56"
        },
        "id": 56
      },
      "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/balances/TwoTokenPoolsBalance.sol",
          "exportedSymbols": {
            "TwoTokenPoolsBalance": [
              20641
            ]
          },
          "id": 20642,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 19919,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:57"
            },
            {
              "id": 19920,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:57"
            },
            {
              "absolutePath": "src.sol/amm/lib/helpers/BalancerErrors.sol",
              "file": "../../lib/helpers/BalancerErrors.sol",
              "id": 19921,
              "nodeType": "ImportDirective",
              "scope": 20642,
              "sourceUnit": 656,
              "src": "747:46:57",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 19922,
              "nodeType": "ImportDirective",
              "scope": 20642,
              "sourceUnit": 5096,
              "src": "794:43:57",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/balances/BalanceAllocation.sol",
              "file": "./BalanceAllocation.sol",
              "id": 19923,
              "nodeType": "ImportDirective",
              "scope": 20642,
              "sourceUnit": 19058,
              "src": "839:33:57",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/PoolRegistry.sol",
              "file": "../PoolRegistry.sol",
              "id": 19924,
              "nodeType": "ImportDirective",
              "scope": 20642,
              "sourceUnit": 15610,
              "src": "873:29:57",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": true,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 19925,
                    "name": "PoolRegistry",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 15609,
                    "src": "946:12:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_PoolRegistry_$15609",
                      "typeString": "contract PoolRegistry"
                    }
                  },
                  "id": 19926,
                  "nodeType": "InheritanceSpecifier",
                  "src": "946:12:57"
                }
              ],
              "contractDependencies": [
                343,
                911,
                1293,
                1473,
                3890,
                5187,
                15609,
                18418,
                20822,
                21266
              ],
              "contractKind": "contract",
              "fullyImplemented": false,
              "id": 20641,
              "linearizedBaseContracts": [
                20641,
                15609,
                18418,
                1473,
                1293,
                3890,
                343,
                911,
                5187,
                21266,
                20822
              ],
              "name": "TwoTokenPoolsBalance",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "id": 19929,
                  "libraryName": {
                    "id": 19927,
                    "name": "BalanceAllocation",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 19057,
                    "src": "971:17:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_BalanceAllocation_$19057",
                      "typeString": "library BalanceAllocation"
                    }
                  },
                  "nodeType": "UsingForDirective",
                  "src": "965:36:57",
                  "typeName": {
                    "id": 19928,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "993:7:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                },
                {
                  "canonicalName": "TwoTokenPoolsBalance.TwoTokenPoolBalances",
                  "id": 19934,
                  "members": [
                    {
                      "constant": false,
                      "id": 19931,
                      "mutability": "mutable",
                      "name": "sharedCash",
                      "nodeType": "VariableDeclaration",
                      "scope": 19934,
                      "src": "1835:18:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 19930,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1835:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 19933,
                      "mutability": "mutable",
                      "name": "sharedManaged",
                      "nodeType": "VariableDeclaration",
                      "scope": 19934,
                      "src": "1863:21:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 19932,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1863:7:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "TwoTokenPoolBalances",
                  "nodeType": "StructDefinition",
                  "scope": 20641,
                  "src": "1797:94:57",
                  "visibility": "public"
                },
                {
                  "canonicalName": "TwoTokenPoolsBalance.TwoTokenPoolTokens",
                  "id": 19943,
                  "members": [
                    {
                      "constant": false,
                      "id": 19936,
                      "mutability": "mutable",
                      "name": "tokenA",
                      "nodeType": "VariableDeclaration",
                      "scope": 19943,
                      "src": "3309:13:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IERC20_$5095",
                        "typeString": "contract IERC20"
                      },
                      "typeName": {
                        "id": 19935,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "3309:6:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 19938,
                      "mutability": "mutable",
                      "name": "tokenB",
                      "nodeType": "VariableDeclaration",
                      "scope": 19943,
                      "src": "3332:13:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IERC20_$5095",
                        "typeString": "contract IERC20"
                      },
                      "typeName": {
                        "id": 19937,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "3332:6:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 19942,
                      "mutability": "mutable",
                      "name": "balances",
                      "nodeType": "VariableDeclaration",
                      "scope": 19943,
                      "src": "3355:49:57",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_$",
                        "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances)"
                      },
                      "typeName": {
                        "id": 19941,
                        "keyType": {
                          "id": 19939,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3363:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "Mapping",
                        "src": "3355:40:57",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_$",
                          "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances)"
                        },
                        "valueType": {
                          "id": 19940,
                          "name": "TwoTokenPoolBalances",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 19934,
                          "src": "3374:20:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                          }
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "TwoTokenPoolTokens",
                  "nodeType": "StructDefinition",
                  "scope": 20641,
                  "src": "3273:138:57",
                  "visibility": "public"
                },
                {
                  "constant": false,
                  "id": 19947,
                  "mutability": "mutable",
                  "name": "_twoTokenPoolTokens",
                  "nodeType": "VariableDeclaration",
                  "scope": 20641,
                  "src": "3417:66:57",
                  "stateVariable": true,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolTokens_$19943_storage_$",
                    "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens)"
                  },
                  "typeName": {
                    "id": 19946,
                    "keyType": {
                      "id": 19944,
                      "name": "bytes32",
                      "nodeType": "ElementaryTypeName",
                      "src": "3425:7:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Mapping",
                    "src": "3417:38:57",
                    "typeDescriptions": {
                      "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolTokens_$19943_storage_$",
                      "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens)"
                    },
                    "valueType": {
                      "id": 19945,
                      "name": "TwoTokenPoolTokens",
                      "nodeType": "UserDefinedTypeName",
                      "referencedDeclaration": 19943,
                      "src": "3436:18:57",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                        "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens"
                      }
                    }
                  },
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 20009,
                    "nodeType": "Block",
                    "src": "3927:860:57",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              "id": 19960,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 19958,
                                "name": "tokenX",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19952,
                                "src": "4100:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "!=",
                              "rightExpression": {
                                "id": 19959,
                                "name": "tokenY",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19954,
                                "src": "4110:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "src": "4100:16:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 19961,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4118:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 19962,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "TOKEN_ALREADY_REGISTERED",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 627,
                              "src": "4118:31:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19957,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4091:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 19963,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4091:59:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 19964,
                        "nodeType": "ExpressionStatement",
                        "src": "4091:59:57"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              "id": 19968,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 19966,
                                "name": "tokenX",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19952,
                                "src": "4170:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "<",
                              "rightExpression": {
                                "id": 19967,
                                "name": "tokenY",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19954,
                                "src": "4179:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              "src": "4170:15:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 19969,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4187:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 19970,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "UNSORTED_TOKENS",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 408,
                              "src": "4187:22:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19965,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4161:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 19971,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4161:49:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 19972,
                        "nodeType": "ExpressionStatement",
                        "src": "4161:49:57"
                      },
                      {
                        "assignments": [
                          19974
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19974,
                            "mutability": "mutable",
                            "name": "poolTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 20009,
                            "src": "4334:37:57",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens"
                            },
                            "typeName": {
                              "id": 19973,
                              "name": "TwoTokenPoolTokens",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19943,
                              "src": "4334:18:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 19978,
                        "initialValue": {
                          "baseExpression": {
                            "id": 19975,
                            "name": "_twoTokenPoolTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19947,
                            "src": "4374:19:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolTokens_$19943_storage_$",
                              "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref)"
                            }
                          },
                          "id": 19977,
                          "indexExpression": {
                            "id": 19976,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19950,
                            "src": "4394:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4374:27:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4334:67:57"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 19992,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                },
                                "id": 19985,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 19980,
                                    "name": "poolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19974,
                                    "src": "4420:10:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                      "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                                    }
                                  },
                                  "id": 19981,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "tokenA",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 19936,
                                  "src": "4420:17:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "arguments": [
                                    {
                                      "hexValue": "30",
                                      "id": 19983,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "4448:1:57",
                                      "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": 19982,
                                    "name": "IERC20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5095,
                                    "src": "4441:6:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                      "typeString": "type(contract IERC20)"
                                    }
                                  },
                                  "id": 19984,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4441:9:57",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "4420:30:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "commonType": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                },
                                "id": 19991,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 19986,
                                    "name": "poolTokens",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19974,
                                    "src": "4454:10:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                      "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                                    }
                                  },
                                  "id": 19987,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "tokenB",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 19938,
                                  "src": "4454:17:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "arguments": [
                                    {
                                      "hexValue": "30",
                                      "id": 19989,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "4482:1:57",
                                      "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": 19988,
                                    "name": "IERC20",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5095,
                                    "src": "4475:6:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                      "typeString": "type(contract IERC20)"
                                    }
                                  },
                                  "id": 19990,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4475:9:57",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "src": "4454:30:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "4420:64:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 19993,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "4486:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 19994,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "TOKENS_ALREADY_SET",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 630,
                              "src": "4486:25:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19979,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "4411:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 19995,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4411:101:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 19996,
                        "nodeType": "ExpressionStatement",
                        "src": "4411:101:57"
                      },
                      {
                        "expression": {
                          "id": 20001,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 19997,
                              "name": "poolTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19974,
                              "src": "4585:10:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                              }
                            },
                            "id": 19999,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "tokenA",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19936,
                            "src": "4585:17:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 20000,
                            "name": "tokenX",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19952,
                            "src": "4605:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "4585:26:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 20002,
                        "nodeType": "ExpressionStatement",
                        "src": "4585:26:57"
                      },
                      {
                        "expression": {
                          "id": 20007,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 20003,
                              "name": "poolTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19974,
                              "src": "4621:10:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                              }
                            },
                            "id": 20005,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "tokenB",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19938,
                            "src": "4621:17:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 20006,
                            "name": "tokenY",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19954,
                            "src": "4641:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "4621:26:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 20008,
                        "nodeType": "ExpressionStatement",
                        "src": "4621:26:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 19948,
                    "nodeType": "StructuredDocumentation",
                    "src": "3490:310:57",
                    "text": " @dev Registers tokens in a Two Token Pool.\n This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\n Requirements:\n - `tokenX` and `tokenY` must not be the same\n - The tokens must be ordered: tokenX < tokenY"
                  },
                  "id": 20010,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_registerTwoTokenPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 19955,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 19950,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20010,
                        "src": "3851:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 19949,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "3851:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19952,
                        "mutability": "mutable",
                        "name": "tokenX",
                        "nodeType": "VariableDeclaration",
                        "scope": 20010,
                        "src": "3875:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19951,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "3875:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 19954,
                        "mutability": "mutable",
                        "name": "tokenY",
                        "nodeType": "VariableDeclaration",
                        "scope": 20010,
                        "src": "3898:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 19953,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "3898:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3841:76:57"
                  },
                  "returnParameters": {
                    "id": 19956,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3927:0:57"
                  },
                  "scope": 20641,
                  "src": "3805:982:57",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20053,
                    "nodeType": "Block",
                    "src": "5248:542:57",
                    "statements": [
                      {
                        "assignments": [
                          20021,
                          20023,
                          20025
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20021,
                            "mutability": "mutable",
                            "name": "balanceA",
                            "nodeType": "VariableDeclaration",
                            "scope": 20053,
                            "src": "5272:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20020,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "5272:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20023,
                            "mutability": "mutable",
                            "name": "balanceB",
                            "nodeType": "VariableDeclaration",
                            "scope": 20053,
                            "src": "5302:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20022,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "5302:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20025,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 20053,
                            "src": "5332:41:57",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                            },
                            "typeName": {
                              "id": 20024,
                              "name": "TwoTokenPoolBalances",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19934,
                              "src": "5332:20:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20031,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 20027,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20013,
                              "src": "5417:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 20028,
                              "name": "tokenX",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20015,
                              "src": "5425:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 20029,
                              "name": "tokenY",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20017,
                              "src": "5433:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 20026,
                            "name": "_getTwoTokenPoolSharedBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20563,
                            "src": "5386:30:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$",
                              "typeString": "function (bytes32,contract IERC20,contract IERC20) view returns (bytes32,bytes32,struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer)"
                            }
                          },
                          "id": 20030,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5386:54:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_bytes32_$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$",
                            "typeString": "tuple(bytes32,bytes32,struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5258:182:57"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 20039,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 20033,
                                    "name": "balanceA",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20021,
                                    "src": "5460:8:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "id": 20034,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "isZero",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 18636,
                                  "src": "5460:15:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bool_$bound_to$_t_bytes32_$",
                                    "typeString": "function (bytes32) pure returns (bool)"
                                  }
                                },
                                "id": 20035,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5460:17:57",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 20036,
                                    "name": "balanceB",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20023,
                                    "src": "5481:8:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "id": 20037,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "isZero",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 18636,
                                  "src": "5481:15:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bool_$bound_to$_t_bytes32_$",
                                    "typeString": "function (bytes32) pure returns (bool)"
                                  }
                                },
                                "id": 20038,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5481:17:57",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "5460:38:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "expression": {
                                "id": 20040,
                                "name": "Errors",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 655,
                                "src": "5500:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                  "typeString": "type(library Errors)"
                                }
                              },
                              "id": 20041,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "NONZERO_TOKEN_BALANCE",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 636,
                              "src": "5500:28:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 20032,
                            "name": "_require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 361,
                            "src": "5451:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_bool_$_t_uint256_$returns$__$",
                              "typeString": "function (bool,uint256) pure"
                            }
                          },
                          "id": 20042,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5451:78:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 20043,
                        "nodeType": "ExpressionStatement",
                        "src": "5451:78:57"
                      },
                      {
                        "expression": {
                          "id": 20047,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "delete",
                          "prefix": true,
                          "src": "5540:34:57",
                          "subExpression": {
                            "baseExpression": {
                              "id": 20044,
                              "name": "_twoTokenPoolTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19947,
                              "src": "5547:19:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolTokens_$19943_storage_$",
                                "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref)"
                              }
                            },
                            "id": 20046,
                            "indexExpression": {
                              "id": 20045,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20013,
                              "src": "5567:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "5547:27:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 20048,
                        "nodeType": "ExpressionStatement",
                        "src": "5540:34:57"
                      },
                      {
                        "expression": {
                          "id": 20051,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "delete",
                          "prefix": true,
                          "src": "5753:30:57",
                          "subExpression": {
                            "expression": {
                              "id": 20049,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20025,
                              "src": "5760:12:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                              }
                            },
                            "id": 20050,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "sharedCash",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19931,
                            "src": "5760:23:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 20052,
                        "nodeType": "ExpressionStatement",
                        "src": "5753:30:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20011,
                    "nodeType": "StructuredDocumentation",
                    "src": "4793:326:57",
                    "text": " @dev Deregisters tokens in a Two Token Pool.\n This function assumes `poolId` exists and corresponds to the Two Token specialization setting.\n Requirements:\n - `tokenX` and `tokenY` must be registered in the Pool\n - both tokens must have zero balance in the Vault"
                  },
                  "id": 20054,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_deregisterTwoTokenPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20018,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20013,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20054,
                        "src": "5172:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20012,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "5172:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20015,
                        "mutability": "mutable",
                        "name": "tokenX",
                        "nodeType": "VariableDeclaration",
                        "scope": 20054,
                        "src": "5196:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20014,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5196:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20017,
                        "mutability": "mutable",
                        "name": "tokenY",
                        "nodeType": "VariableDeclaration",
                        "scope": 20054,
                        "src": "5219:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20016,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "5219:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5162:76:57"
                  },
                  "returnParameters": {
                    "id": 20019,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "5248:0:57"
                  },
                  "scope": 20641,
                  "src": "5124:666:57",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20094,
                    "nodeType": "Block",
                    "src": "6178:258:57",
                    "statements": [
                      {
                        "assignments": [
                          20069
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20069,
                            "mutability": "mutable",
                            "name": "pairHash",
                            "nodeType": "VariableDeclaration",
                            "scope": 20094,
                            "src": "6188:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20068,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "6188:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20074,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 20071,
                              "name": "tokenA",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20059,
                              "src": "6228:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 20072,
                              "name": "tokenB",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20063,
                              "src": "6236:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 20070,
                            "name": "_getTwoTokenPairHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20616,
                            "src": "6207:20:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                              "typeString": "function (contract IERC20,contract IERC20) pure returns (bytes32)"
                            }
                          },
                          "id": 20073,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6207:36:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6188:55:57"
                      },
                      {
                        "assignments": [
                          20076
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20076,
                            "mutability": "mutable",
                            "name": "poolBalances",
                            "nodeType": "VariableDeclaration",
                            "scope": 20094,
                            "src": "6253:41:57",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                            },
                            "typeName": {
                              "id": 20075,
                              "name": "TwoTokenPoolBalances",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19934,
                              "src": "6253:20:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20083,
                        "initialValue": {
                          "baseExpression": {
                            "expression": {
                              "baseExpression": {
                                "id": 20077,
                                "name": "_twoTokenPoolTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19947,
                                "src": "6297:19:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolTokens_$19943_storage_$",
                                  "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref)"
                                }
                              },
                              "id": 20079,
                              "indexExpression": {
                                "id": 20078,
                                "name": "poolId",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20057,
                                "src": "6317:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "6297:27:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref"
                              }
                            },
                            "id": 20080,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "balances",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19942,
                            "src": "6297:36:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_$",
                              "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage ref)"
                            }
                          },
                          "id": 20082,
                          "indexExpression": {
                            "id": 20081,
                            "name": "pairHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20069,
                            "src": "6334:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "6297:46:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "6253:90:57"
                      },
                      {
                        "expression": {
                          "id": 20092,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 20084,
                              "name": "poolBalances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20076,
                              "src": "6353:12:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                              }
                            },
                            "id": 20086,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "sharedCash",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19931,
                            "src": "6353:23:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 20089,
                                "name": "balanceA",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20061,
                                "src": "6410:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 20090,
                                "name": "balanceB",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20065,
                                "src": "6420:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "id": 20087,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "6379:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20088,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "toSharedCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 19007,
                              "src": "6379:30:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                              }
                            },
                            "id": 20091,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6379:50:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "6353:76:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20093,
                        "nodeType": "ExpressionStatement",
                        "src": "6353:76:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20055,
                    "nodeType": "StructuredDocumentation",
                    "src": "5796:202:57",
                    "text": " @dev Sets the cash balances of a Two Token Pool's tokens.\n WARNING: this assumes `tokenA` and `tokenB` are the Pool's two registered tokens, and are in the correct order."
                  },
                  "id": 20095,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setTwoTokenPoolCashBalances",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20066,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20057,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20095,
                        "src": "6050:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20056,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6050:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20059,
                        "mutability": "mutable",
                        "name": "tokenA",
                        "nodeType": "VariableDeclaration",
                        "scope": 20095,
                        "src": "6074:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20058,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6074:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20061,
                        "mutability": "mutable",
                        "name": "balanceA",
                        "nodeType": "VariableDeclaration",
                        "scope": 20095,
                        "src": "6097:16:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20060,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6097:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20063,
                        "mutability": "mutable",
                        "name": "tokenB",
                        "nodeType": "VariableDeclaration",
                        "scope": 20095,
                        "src": "6123:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20062,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6123:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20065,
                        "mutability": "mutable",
                        "name": "balanceB",
                        "nodeType": "VariableDeclaration",
                        "scope": 20095,
                        "src": "6146:16:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20064,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6146:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6040:128:57"
                  },
                  "returnParameters": {
                    "id": 20067,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6178:0:57"
                  },
                  "scope": 20641,
                  "src": "6003:433:57",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20113,
                    "nodeType": "Block",
                    "src": "6835:105:57",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 20106,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20098,
                              "src": "6878:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 20107,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20100,
                              "src": "6886:5:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 20108,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "6893:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20109,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "cashToManaged",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18804,
                              "src": "6893:31:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              }
                            },
                            {
                              "id": 20110,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20102,
                              "src": "6926:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 20105,
                            "name": "_updateTwoTokenPoolSharedBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20256,
                            "src": "6845:32:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 20111,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6845:88:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 20112,
                        "nodeType": "ExpressionStatement",
                        "src": "6845:88:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20096,
                    "nodeType": "StructuredDocumentation",
                    "src": "6442:267:57",
                    "text": " @dev Transforms `amount` of `token`'s balance in a Two Token Pool from cash into managed.\n This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\n registered for that Pool."
                  },
                  "id": 20114,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_twoTokenPoolCashToManaged",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20103,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20098,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20114,
                        "src": "6759:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20097,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "6759:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20100,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 20114,
                        "src": "6783:12:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20099,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "6783:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20102,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 20114,
                        "src": "6805:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20101,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "6805:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6749:76:57"
                  },
                  "returnParameters": {
                    "id": 20104,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6835:0:57"
                  },
                  "scope": 20641,
                  "src": "6714:226:57",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20132,
                    "nodeType": "Block",
                    "src": "7339:105:57",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 20125,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20117,
                              "src": "7382:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 20126,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20119,
                              "src": "7390:5:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 20127,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "7397:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20128,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "managedToCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18845,
                              "src": "7397:31:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              }
                            },
                            {
                              "id": 20129,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20121,
                              "src": "7430:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) pure returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 20124,
                            "name": "_updateTwoTokenPoolSharedBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20256,
                            "src": "7349:32:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 20130,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7349:88:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 20131,
                        "nodeType": "ExpressionStatement",
                        "src": "7349:88:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20115,
                    "nodeType": "StructuredDocumentation",
                    "src": "6946:267:57",
                    "text": " @dev Transforms `amount` of `token`'s balance in a Two Token Pool from managed into cash.\n This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\n registered for that Pool."
                  },
                  "id": 20133,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_twoTokenPoolManagedToCash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20122,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20117,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20133,
                        "src": "7263:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20116,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7263:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20119,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 20133,
                        "src": "7287:12:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20118,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7287:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20121,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 20133,
                        "src": "7309:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20120,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7309:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7253:76:57"
                  },
                  "returnParameters": {
                    "id": 20123,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "7339:0:57"
                  },
                  "scope": 20641,
                  "src": "7218:226:57",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20153,
                    "nodeType": "Block",
                    "src": "7917:109:57",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 20146,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20136,
                              "src": "7967:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 20147,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20138,
                              "src": "7975:5:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "expression": {
                                "id": 20148,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "7982:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20149,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "setManaged",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18873,
                              "src": "7982:28:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              }
                            },
                            {
                              "id": 20150,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20140,
                              "src": "8012:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,uint256) view returns (bytes32)"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 20145,
                            "name": "_updateTwoTokenPoolSharedBalance",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20256,
                            "src": "7934:32:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$_$_t_uint256_$returns$_t_int256_$",
                              "typeString": "function (bytes32,contract IERC20,function (bytes32,uint256) returns (bytes32),uint256) returns (int256)"
                            }
                          },
                          "id": 20151,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7934:85:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 20144,
                        "id": 20152,
                        "nodeType": "Return",
                        "src": "7927:92:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20134,
                    "nodeType": "StructuredDocumentation",
                    "src": "7450:320:57",
                    "text": " @dev Sets `token`'s managed balance in a Two Token Pool to `amount`.\n This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\n registered for that Pool.\n Returns the managed balance delta as a result of this call."
                  },
                  "id": 20154,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_setTwoTokenPoolManagedBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20141,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20136,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20154,
                        "src": "7824:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20135,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "7824:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20138,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 20154,
                        "src": "7848:12:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20137,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "7848:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20140,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 20154,
                        "src": "7870:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20139,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7870:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7814:76:57"
                  },
                  "returnParameters": {
                    "id": 20144,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20143,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20154,
                        "src": "7909:6:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 20142,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "7909:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "7908:8:57"
                  },
                  "scope": 20641,
                  "src": "7775:251:57",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20255,
                    "nodeType": "Block",
                    "src": "8641:822:57",
                    "statements": [
                      {
                        "assignments": [
                          20177,
                          20179,
                          20181,
                          null,
                          20183
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20177,
                            "mutability": "mutable",
                            "name": "balances",
                            "nodeType": "VariableDeclaration",
                            "scope": 20255,
                            "src": "8665:37:57",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                            },
                            "typeName": {
                              "id": 20176,
                              "name": "TwoTokenPoolBalances",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19934,
                              "src": "8665:20:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20179,
                            "mutability": "mutable",
                            "name": "tokenA",
                            "nodeType": "VariableDeclaration",
                            "scope": 20255,
                            "src": "8716:13:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 20178,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "8716:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20181,
                            "mutability": "mutable",
                            "name": "balanceA",
                            "nodeType": "VariableDeclaration",
                            "scope": 20255,
                            "src": "8743:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20180,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "8743:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          },
                          null,
                          {
                            "constant": false,
                            "id": 20183,
                            "mutability": "mutable",
                            "name": "balanceB",
                            "nodeType": "VariableDeclaration",
                            "scope": 20255,
                            "src": "8787:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20182,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "8787:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20187,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 20185,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20157,
                              "src": "8841:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 20184,
                            "name": "_getTwoTokenPoolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20418,
                            "src": "8816:24:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$_t_contract$_IERC20_$5095_$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                              "typeString": "function (bytes32) view returns (struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer,contract IERC20,bytes32,contract IERC20,bytes32)"
                            }
                          },
                          "id": 20186,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8816:32:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$_t_contract$_IERC20_$5095_$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                            "typeString": "tuple(struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer,contract IERC20,bytes32,contract IERC20,bytes32)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8651:197:57"
                      },
                      {
                        "assignments": [
                          20189
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20189,
                            "mutability": "mutable",
                            "name": "delta",
                            "nodeType": "VariableDeclaration",
                            "scope": 20255,
                            "src": "8859:12:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            },
                            "typeName": {
                              "id": 20188,
                              "name": "int256",
                              "nodeType": "ElementaryTypeName",
                              "src": "8859:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20190,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "8859:12:57"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          },
                          "id": 20193,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 20191,
                            "name": "token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20159,
                            "src": "8885:5:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "id": 20192,
                            "name": "tokenA",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20179,
                            "src": "8894:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "8885:15:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 20231,
                          "nodeType": "Block",
                          "src": "9070:193:57",
                          "statements": [
                            {
                              "assignments": [
                                20214
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 20214,
                                  "mutability": "mutable",
                                  "name": "newBalance",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 20231,
                                  "src": "9115:18:57",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "typeName": {
                                    "id": 20213,
                                    "name": "bytes32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "9115:7:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 20219,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 20216,
                                    "name": "balanceB",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20183,
                                    "src": "9145:8:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 20217,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20171,
                                    "src": "9155:6:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 20215,
                                  "name": "mutation",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20169,
                                  "src": "9136:8:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                    "typeString": "function (bytes32,uint256) returns (bytes32)"
                                  }
                                },
                                "id": 20218,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9136:26:57",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "9115:47:57"
                            },
                            {
                              "expression": {
                                "id": 20225,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 20220,
                                  "name": "delta",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20189,
                                  "src": "9176:5:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 20223,
                                      "name": "balanceB",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20183,
                                      "src": "9208:8:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "id": 20221,
                                      "name": "newBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20214,
                                      "src": "9184:10:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "id": 20222,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "managedDelta",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 18545,
                                    "src": "9184:23:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_int256_$bound_to$_t_bytes32_$",
                                      "typeString": "function (bytes32,bytes32) pure returns (int256)"
                                    }
                                  },
                                  "id": 20224,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "9184:33:57",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9176:41:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 20226,
                              "nodeType": "ExpressionStatement",
                              "src": "9176:41:57"
                            },
                            {
                              "expression": {
                                "id": 20229,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 20227,
                                  "name": "balanceB",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20183,
                                  "src": "9231:8:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 20228,
                                  "name": "newBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20214,
                                  "src": "9242:10:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "9231:21:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 20230,
                              "nodeType": "ExpressionStatement",
                              "src": "9231:21:57"
                            }
                          ]
                        },
                        "id": 20232,
                        "nodeType": "IfStatement",
                        "src": "8881:382:57",
                        "trueBody": {
                          "id": 20212,
                          "nodeType": "Block",
                          "src": "8902:162:57",
                          "statements": [
                            {
                              "assignments": [
                                20195
                              ],
                              "declarations": [
                                {
                                  "constant": false,
                                  "id": 20195,
                                  "mutability": "mutable",
                                  "name": "newBalance",
                                  "nodeType": "VariableDeclaration",
                                  "scope": 20212,
                                  "src": "8916:18:57",
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  },
                                  "typeName": {
                                    "id": 20194,
                                    "name": "bytes32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "8916:7:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  "visibility": "internal"
                                }
                              ],
                              "id": 20200,
                              "initialValue": {
                                "arguments": [
                                  {
                                    "id": 20197,
                                    "name": "balanceA",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20181,
                                    "src": "8946:8:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  },
                                  {
                                    "id": 20198,
                                    "name": "amount",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20171,
                                    "src": "8956:6:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 20196,
                                  "name": "mutation",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20169,
                                  "src": "8937:8:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                                    "typeString": "function (bytes32,uint256) returns (bytes32)"
                                  }
                                },
                                "id": 20199,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "8937:26:57",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "nodeType": "VariableDeclarationStatement",
                              "src": "8916:47:57"
                            },
                            {
                              "expression": {
                                "id": 20206,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 20201,
                                  "name": "delta",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20189,
                                  "src": "8977:5:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "id": 20204,
                                      "name": "balanceA",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20181,
                                      "src": "9009:8:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    ],
                                    "expression": {
                                      "id": 20202,
                                      "name": "newBalance",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20195,
                                      "src": "8985:10:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    "id": 20203,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "managedDelta",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 18545,
                                    "src": "8985:23:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_int256_$bound_to$_t_bytes32_$",
                                      "typeString": "function (bytes32,bytes32) pure returns (int256)"
                                    }
                                  },
                                  "id": 20205,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "8985:33:57",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "8977:41:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 20207,
                              "nodeType": "ExpressionStatement",
                              "src": "8977:41:57"
                            },
                            {
                              "expression": {
                                "id": 20210,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 20208,
                                  "name": "balanceA",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20181,
                                  "src": "9032:8:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "id": 20209,
                                  "name": "newBalance",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20195,
                                  "src": "9043:10:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "src": "9032:21:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "id": 20211,
                              "nodeType": "ExpressionStatement",
                              "src": "9032:21:57"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 20241,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 20233,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20177,
                              "src": "9273:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                              }
                            },
                            "id": 20235,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "sharedCash",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19931,
                            "src": "9273:19:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 20238,
                                "name": "balanceA",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20181,
                                "src": "9326:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 20239,
                                "name": "balanceB",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20183,
                                "src": "9336:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "id": 20236,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "9295:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20237,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "toSharedCash",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 19007,
                              "src": "9295:30:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                              }
                            },
                            "id": 20240,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9295:50:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "9273:72:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20242,
                        "nodeType": "ExpressionStatement",
                        "src": "9273:72:57"
                      },
                      {
                        "expression": {
                          "id": 20251,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "expression": {
                              "id": 20243,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20177,
                              "src": "9355:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                              }
                            },
                            "id": 20245,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "sharedManaged",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19933,
                            "src": "9355:22:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 20248,
                                "name": "balanceA",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20181,
                                "src": "9414:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 20249,
                                "name": "balanceB",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20183,
                                "src": "9424:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "id": 20246,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "9380:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20247,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "toSharedManaged",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 19028,
                              "src": "9380:33:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                              }
                            },
                            "id": 20250,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9380:53:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "9355:78:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20252,
                        "nodeType": "ExpressionStatement",
                        "src": "9355:78:57"
                      },
                      {
                        "expression": {
                          "id": 20253,
                          "name": "delta",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 20189,
                          "src": "9451:5:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "functionReturnParameters": 20175,
                        "id": 20254,
                        "nodeType": "Return",
                        "src": "9444:12:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20155,
                    "nodeType": "StructuredDocumentation",
                    "src": "8032:398:57",
                    "text": " @dev Sets `token`'s balance in a Two Token Pool to the result of the `mutation` function when called with\n the current balance and `amount`.\n This function assumes `poolId` exists, corresponds to the Two Token specialization setting, and that `token` is\n registered for that Pool.\n Returns the managed balance delta as a result of this call."
                  },
                  "id": 20256,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_updateTwoTokenPoolSharedBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20172,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20157,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20256,
                        "src": "8486:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20156,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "8486:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20159,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 20256,
                        "src": "8510:12:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20158,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8510:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20169,
                        "mutability": "mutable",
                        "name": "mutation",
                        "nodeType": "VariableDeclaration",
                        "scope": 20256,
                        "src": "8532:53:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                          "typeString": "function (bytes32,uint256) returns (bytes32)"
                        },
                        "typeName": {
                          "id": 20168,
                          "nodeType": "FunctionTypeName",
                          "parameterTypes": {
                            "id": 20164,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 20161,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 20168,
                                "src": "8541:7:57",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "typeName": {
                                  "id": 20160,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "8541:7:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "visibility": "internal"
                              },
                              {
                                "constant": false,
                                "id": 20163,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 20168,
                                "src": "8550:7:57",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "typeName": {
                                  "id": 20162,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "8550:7:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "8540:18:57"
                          },
                          "returnParameterTypes": {
                            "id": 20167,
                            "nodeType": "ParameterList",
                            "parameters": [
                              {
                                "constant": false,
                                "id": 20166,
                                "mutability": "mutable",
                                "name": "",
                                "nodeType": "VariableDeclaration",
                                "scope": 20168,
                                "src": "8568:7:57",
                                "stateVariable": false,
                                "storageLocation": "default",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                "typeName": {
                                  "id": 20165,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "8568:7:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "visibility": "internal"
                              }
                            ],
                            "src": "8567:9:57"
                          },
                          "src": "8532:53:57",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$_t_bytes32_$",
                            "typeString": "function (bytes32,uint256) returns (bytes32)"
                          },
                          "visibility": "internal"
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20171,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 20256,
                        "src": "8595:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20170,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8595:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8476:139:57"
                  },
                  "returnParameters": {
                    "id": 20175,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20174,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20256,
                        "src": "8633:6:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 20173,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8633:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8632:8:57"
                  },
                  "scope": 20641,
                  "src": "8435:1028:57",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 20344,
                    "nodeType": "Block",
                    "src": "9898:714:57",
                    "statements": [
                      {
                        "assignments": [
                          null,
                          20268,
                          20270,
                          20272,
                          20274
                        ],
                        "declarations": [
                          null,
                          {
                            "constant": false,
                            "id": 20268,
                            "mutability": "mutable",
                            "name": "tokenA",
                            "nodeType": "VariableDeclaration",
                            "scope": 20344,
                            "src": "9911:13:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 20267,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "9911:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20270,
                            "mutability": "mutable",
                            "name": "balanceA",
                            "nodeType": "VariableDeclaration",
                            "scope": 20344,
                            "src": "9926:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20269,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "9926:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20272,
                            "mutability": "mutable",
                            "name": "tokenB",
                            "nodeType": "VariableDeclaration",
                            "scope": 20344,
                            "src": "9944:13:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 20271,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "9944:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20274,
                            "mutability": "mutable",
                            "name": "balanceB",
                            "nodeType": "VariableDeclaration",
                            "scope": 20344,
                            "src": "9959:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20273,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "9959:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20278,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 20276,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20258,
                              "src": "10004:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 20275,
                            "name": "_getTwoTokenPoolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20418,
                            "src": "9979:24:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$_t_contract$_IERC20_$5095_$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                              "typeString": "function (bytes32) view returns (struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer,contract IERC20,bytes32,contract IERC20,bytes32)"
                            }
                          },
                          "id": 20277,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9979:32:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$_t_contract$_IERC20_$5095_$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                            "typeString": "tuple(struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer,contract IERC20,bytes32,contract IERC20,bytes32)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "9908:103:57"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 20289,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "id": 20283,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 20279,
                              "name": "tokenA",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20268,
                              "src": "10167:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 20281,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "10184:1:57",
                                  "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": 20280,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "10177:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 20282,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "10177:9:57",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "src": "10167:19:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "||",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "id": 20288,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 20284,
                              "name": "tokenB",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20272,
                              "src": "10190:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 20286,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "10207:1:57",
                                  "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": 20285,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "10200:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 20287,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "10200:9:57",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "src": "10190:19:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "10167:42:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 20303,
                        "nodeType": "IfStatement",
                        "src": "10163:115:57",
                        "trueBody": {
                          "id": 20302,
                          "nodeType": "Block",
                          "src": "10211:67:57",
                          "statements": [
                            {
                              "expression": {
                                "components": [
                                  {
                                    "arguments": [
                                      {
                                        "hexValue": "30",
                                        "id": 20293,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "10246:1:57",
                                        "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": 20292,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "NewExpression",
                                      "src": "10233:12:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$",
                                        "typeString": "function (uint256) pure returns (contract IERC20[] memory)"
                                      },
                                      "typeName": {
                                        "baseType": {
                                          "id": 20290,
                                          "name": "IERC20",
                                          "nodeType": "UserDefinedTypeName",
                                          "referencedDeclaration": 5095,
                                          "src": "10237:6:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IERC20_$5095",
                                            "typeString": "contract IERC20"
                                          }
                                        },
                                        "id": 20291,
                                        "nodeType": "ArrayTypeName",
                                        "src": "10237:8:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                          "typeString": "contract IERC20[]"
                                        }
                                      }
                                    },
                                    "id": 20294,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "10233:15:57",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                      "typeString": "contract IERC20[] memory"
                                    }
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "hexValue": "30",
                                        "id": 20298,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "number",
                                        "lValueRequested": false,
                                        "nodeType": "Literal",
                                        "src": "10264:1:57",
                                        "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": 20297,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "NewExpression",
                                      "src": "10250:13:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                        "typeString": "function (uint256) pure returns (bytes32[] memory)"
                                      },
                                      "typeName": {
                                        "baseType": {
                                          "id": 20295,
                                          "name": "bytes32",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "10254:7:57",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bytes32",
                                            "typeString": "bytes32"
                                          }
                                        },
                                        "id": 20296,
                                        "nodeType": "ArrayTypeName",
                                        "src": "10254:9:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                          "typeString": "bytes32[]"
                                        }
                                      }
                                    },
                                    "id": 20299,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "10250:16:57",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                      "typeString": "bytes32[] memory"
                                    }
                                  }
                                ],
                                "id": 20300,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "10232:35:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                  "typeString": "tuple(contract IERC20[] memory,bytes32[] memory)"
                                }
                              },
                              "functionReturnParameters": 20266,
                              "id": 20301,
                              "nodeType": "Return",
                              "src": "10225:42:57"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 20310,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20304,
                            "name": "tokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20262,
                            "src": "10423:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "hexValue": "32",
                                "id": 20308,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "10445:1:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                }
                              ],
                              "id": 20307,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "10432:12:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (contract IERC20[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 20305,
                                  "name": "IERC20",
                                  "nodeType": "UserDefinedTypeName",
                                  "referencedDeclaration": 5095,
                                  "src": "10436:6:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                "id": 20306,
                                "nodeType": "ArrayTypeName",
                                "src": "10436:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                                  "typeString": "contract IERC20[]"
                                }
                              }
                            },
                            "id": 20309,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "10432:15:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                              "typeString": "contract IERC20[] memory"
                            }
                          },
                          "src": "10423:24:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                            "typeString": "contract IERC20[] memory"
                          }
                        },
                        "id": 20311,
                        "nodeType": "ExpressionStatement",
                        "src": "10423:24:57"
                      },
                      {
                        "expression": {
                          "id": 20316,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 20312,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20262,
                              "src": "10457:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 20314,
                            "indexExpression": {
                              "hexValue": "30",
                              "id": 20313,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "10464:1:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "10457:9:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 20315,
                            "name": "tokenA",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20268,
                            "src": "10469:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "10457:18:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 20317,
                        "nodeType": "ExpressionStatement",
                        "src": "10457:18:57"
                      },
                      {
                        "expression": {
                          "id": 20322,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 20318,
                              "name": "tokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20262,
                              "src": "10485:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                                "typeString": "contract IERC20[] memory"
                              }
                            },
                            "id": 20320,
                            "indexExpression": {
                              "hexValue": "31",
                              "id": 20319,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "10492:1:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "10485:9:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 20321,
                            "name": "tokenB",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20272,
                            "src": "10497:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "10485:18:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 20323,
                        "nodeType": "ExpressionStatement",
                        "src": "10485:18:57"
                      },
                      {
                        "expression": {
                          "id": 20330,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20324,
                            "name": "balances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20265,
                            "src": "10514:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "hexValue": "32",
                                "id": 20328,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "10539:1:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                }
                              ],
                              "id": 20327,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "NewExpression",
                              "src": "10525:13:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$",
                                "typeString": "function (uint256) pure returns (bytes32[] memory)"
                              },
                              "typeName": {
                                "baseType": {
                                  "id": 20325,
                                  "name": "bytes32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "10529:7:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 20326,
                                "nodeType": "ArrayTypeName",
                                "src": "10529:9:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                                  "typeString": "bytes32[]"
                                }
                              }
                            },
                            "id": 20329,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "10525:16:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                              "typeString": "bytes32[] memory"
                            }
                          },
                          "src": "10514:27:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                            "typeString": "bytes32[] memory"
                          }
                        },
                        "id": 20331,
                        "nodeType": "ExpressionStatement",
                        "src": "10514:27:57"
                      },
                      {
                        "expression": {
                          "id": 20336,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 20332,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20265,
                              "src": "10551:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 20334,
                            "indexExpression": {
                              "hexValue": "30",
                              "id": 20333,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "10560:1:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "10551:11:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 20335,
                            "name": "balanceA",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20270,
                            "src": "10565:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "10551:22:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20337,
                        "nodeType": "ExpressionStatement",
                        "src": "10551:22:57"
                      },
                      {
                        "expression": {
                          "id": 20342,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "baseExpression": {
                              "id": 20338,
                              "name": "balances",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20265,
                              "src": "10583:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                                "typeString": "bytes32[] memory"
                              }
                            },
                            "id": 20340,
                            "indexExpression": {
                              "hexValue": "31",
                              "id": 20339,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "10592:1:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "10583:11:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 20341,
                            "name": "balanceB",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20274,
                            "src": "10597:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "10583:22:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20343,
                        "nodeType": "ExpressionStatement",
                        "src": "10583:22:57"
                      }
                    ]
                  },
                  "id": 20345,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getTwoTokenPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20259,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20258,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20345,
                        "src": "9780:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20257,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "9780:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9779:16:57"
                  },
                  "returnParameters": {
                    "id": 20266,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20262,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 20345,
                        "src": "9843:22:57",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20260,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "9843:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 20261,
                          "nodeType": "ArrayTypeName",
                          "src": "9843:8:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20265,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 20345,
                        "src": "9867:25:57",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr",
                          "typeString": "bytes32[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20263,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "9867:7:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "id": 20264,
                          "nodeType": "ArrayTypeName",
                          "src": "9867:9:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
                            "typeString": "bytes32[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "9842:51:57"
                  },
                  "scope": 20641,
                  "src": "9748:864:57",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20417,
                    "nodeType": "Block",
                    "src": "11213:564:57",
                    "statements": [
                      {
                        "assignments": [
                          20362
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20362,
                            "mutability": "mutable",
                            "name": "poolTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 20417,
                            "src": "11223:37:57",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens"
                            },
                            "typeName": {
                              "id": 20361,
                              "name": "TwoTokenPoolTokens",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19943,
                              "src": "11223:18:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20366,
                        "initialValue": {
                          "baseExpression": {
                            "id": 20363,
                            "name": "_twoTokenPoolTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19947,
                            "src": "11263:19:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolTokens_$19943_storage_$",
                              "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref)"
                            }
                          },
                          "id": 20365,
                          "indexExpression": {
                            "id": 20364,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20348,
                            "src": "11283:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "11263:27:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11223:67:57"
                      },
                      {
                        "expression": {
                          "id": 20370,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20367,
                            "name": "tokenA",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20353,
                            "src": "11300:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 20368,
                              "name": "poolTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20362,
                              "src": "11309:10:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                              }
                            },
                            "id": 20369,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "tokenA",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19936,
                            "src": "11309:17:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "11300:26:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 20371,
                        "nodeType": "ExpressionStatement",
                        "src": "11300:26:57"
                      },
                      {
                        "expression": {
                          "id": 20375,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20372,
                            "name": "tokenB",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20357,
                            "src": "11336:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "expression": {
                              "id": 20373,
                              "name": "poolTokens",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20362,
                              "src": "11345:10:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                              }
                            },
                            "id": 20374,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "tokenB",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19938,
                            "src": "11345:17:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "11336:26:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "id": 20376,
                        "nodeType": "ExpressionStatement",
                        "src": "11336:26:57"
                      },
                      {
                        "assignments": [
                          20378
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20378,
                            "mutability": "mutable",
                            "name": "pairHash",
                            "nodeType": "VariableDeclaration",
                            "scope": 20417,
                            "src": "11373:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20377,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "11373:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20383,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 20380,
                              "name": "tokenA",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20353,
                              "src": "11413:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 20381,
                              "name": "tokenB",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20357,
                              "src": "11421:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 20379,
                            "name": "_getTwoTokenPairHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20616,
                            "src": "11392:20:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                              "typeString": "function (contract IERC20,contract IERC20) pure returns (bytes32)"
                            }
                          },
                          "id": 20382,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11392:36:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11373:55:57"
                      },
                      {
                        "expression": {
                          "id": 20389,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20384,
                            "name": "poolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20351,
                            "src": "11438:12:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "baseExpression": {
                              "expression": {
                                "id": 20385,
                                "name": "poolTokens",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20362,
                                "src": "11453:10:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                  "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                                }
                              },
                              "id": 20386,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "balances",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 19942,
                              "src": "11453:19:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_$",
                                "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage ref)"
                              }
                            },
                            "id": 20388,
                            "indexExpression": {
                              "id": 20387,
                              "name": "pairHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20378,
                              "src": "11473:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "11453:29:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage ref"
                            }
                          },
                          "src": "11438:44:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                          }
                        },
                        "id": 20390,
                        "nodeType": "ExpressionStatement",
                        "src": "11438:44:57"
                      },
                      {
                        "assignments": [
                          20392
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20392,
                            "mutability": "mutable",
                            "name": "sharedCash",
                            "nodeType": "VariableDeclaration",
                            "scope": 20417,
                            "src": "11493:18:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20391,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "11493:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20395,
                        "initialValue": {
                          "expression": {
                            "id": 20393,
                            "name": "poolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20351,
                            "src": "11514:12:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                            }
                          },
                          "id": 20394,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sharedCash",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 19931,
                          "src": "11514:23:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11493:44:57"
                      },
                      {
                        "assignments": [
                          20397
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20397,
                            "mutability": "mutable",
                            "name": "sharedManaged",
                            "nodeType": "VariableDeclaration",
                            "scope": 20417,
                            "src": "11547:21:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20396,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "11547:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20400,
                        "initialValue": {
                          "expression": {
                            "id": 20398,
                            "name": "poolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20351,
                            "src": "11571:12:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                            }
                          },
                          "id": 20399,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sharedManaged",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 19933,
                          "src": "11571:26:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "11547:50:57"
                      },
                      {
                        "expression": {
                          "id": 20407,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20401,
                            "name": "balanceA",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20355,
                            "src": "11608:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 20404,
                                "name": "sharedCash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20392,
                                "src": "11658:10:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 20405,
                                "name": "sharedManaged",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20397,
                                "src": "11670:13:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "id": 20402,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "11619:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20403,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "fromSharedToBalanceA",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18948,
                              "src": "11619:38:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                              }
                            },
                            "id": 20406,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "11619:65:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "11608:76:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20408,
                        "nodeType": "ExpressionStatement",
                        "src": "11608:76:57"
                      },
                      {
                        "expression": {
                          "id": 20415,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20409,
                            "name": "balanceB",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20359,
                            "src": "11694:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 20412,
                                "name": "sharedCash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20392,
                                "src": "11744:10:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 20413,
                                "name": "sharedManaged",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20397,
                                "src": "11756:13:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "id": 20410,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "11705:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20411,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "fromSharedToBalanceB",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18971,
                              "src": "11705:38:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                              }
                            },
                            "id": 20414,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "11705:65:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "11694:76:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20416,
                        "nodeType": "ExpressionStatement",
                        "src": "11694:76:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20346,
                    "nodeType": "StructuredDocumentation",
                    "src": "10618:311:57",
                    "text": " @dev Same as `_getTwoTokenPoolTokens`, except it returns the two tokens and balances directly instead of using\n an array, as well as a storage pointer to the `TwoTokenPoolBalances` struct, which can be used to update it\n without having to recompute the pair hash and storage slot."
                  },
                  "id": 20418,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getTwoTokenPoolBalances",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20349,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20348,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20418,
                        "src": "10968:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20347,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "10968:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10967:16:57"
                  },
                  "returnParameters": {
                    "id": 20360,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20351,
                        "mutability": "mutable",
                        "name": "poolBalances",
                        "nodeType": "VariableDeclaration",
                        "scope": 20418,
                        "src": "11043:41:57",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                          "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                        },
                        "typeName": {
                          "id": 20350,
                          "name": "TwoTokenPoolBalances",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 19934,
                          "src": "11043:20:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20353,
                        "mutability": "mutable",
                        "name": "tokenA",
                        "nodeType": "VariableDeclaration",
                        "scope": 20418,
                        "src": "11098:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20352,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "11098:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20355,
                        "mutability": "mutable",
                        "name": "balanceA",
                        "nodeType": "VariableDeclaration",
                        "scope": 20418,
                        "src": "11125:16:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20354,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11125:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20357,
                        "mutability": "mutable",
                        "name": "tokenB",
                        "nodeType": "VariableDeclaration",
                        "scope": 20418,
                        "src": "11155:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20356,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "11155:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20359,
                        "mutability": "mutable",
                        "name": "balanceB",
                        "nodeType": "VariableDeclaration",
                        "scope": 20418,
                        "src": "11182:16:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20358,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11182:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11029:179:57"
                  },
                  "scope": 20641,
                  "src": "10934:843:57",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 20460,
                    "nodeType": "Block",
                    "src": "12381:541:57",
                    "statements": [
                      {
                        "assignments": [
                          null,
                          20429,
                          20431,
                          20433,
                          20435
                        ],
                        "declarations": [
                          null,
                          {
                            "constant": false,
                            "id": 20429,
                            "mutability": "mutable",
                            "name": "tokenA",
                            "nodeType": "VariableDeclaration",
                            "scope": 20460,
                            "src": "12610:13:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 20428,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "12610:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20431,
                            "mutability": "mutable",
                            "name": "balanceA",
                            "nodeType": "VariableDeclaration",
                            "scope": 20460,
                            "src": "12625:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20430,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "12625:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20433,
                            "mutability": "mutable",
                            "name": "tokenB",
                            "nodeType": "VariableDeclaration",
                            "scope": 20460,
                            "src": "12643:13:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 20432,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "12643:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20435,
                            "mutability": "mutable",
                            "name": "balanceB",
                            "nodeType": "VariableDeclaration",
                            "scope": 20460,
                            "src": "12658:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20434,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "12658:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20439,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 20437,
                              "name": "poolId",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20421,
                              "src": "12703:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            ],
                            "id": 20436,
                            "name": "_getTwoTokenPoolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20418,
                            "src": "12678:24:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$_t_contract$_IERC20_$5095_$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                              "typeString": "function (bytes32) view returns (struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer,contract IERC20,bytes32,contract IERC20,bytes32)"
                            }
                          },
                          "id": 20438,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "12678:32:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_struct$_TwoTokenPoolBalances_$19934_storage_ptr_$_t_contract$_IERC20_$5095_$_t_bytes32_$_t_contract$_IERC20_$5095_$_t_bytes32_$",
                            "typeString": "tuple(struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer,contract IERC20,bytes32,contract IERC20,bytes32)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "12607:103:57"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          },
                          "id": 20442,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 20440,
                            "name": "token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20423,
                            "src": "12725:5:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "id": 20441,
                            "name": "tokenA",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20429,
                            "src": "12734:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "src": "12725:15:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "id": 20448,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 20446,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20423,
                              "src": "12792:5:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "==",
                            "rightExpression": {
                              "id": 20447,
                              "name": "tokenB",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20433,
                              "src": "12801:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "src": "12792:15:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseBody": {
                            "id": 20457,
                            "nodeType": "Block",
                            "src": "12855:61:57",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "expression": {
                                        "id": 20453,
                                        "name": "Errors",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 655,
                                        "src": "12877:6:57",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                          "typeString": "type(library Errors)"
                                        }
                                      },
                                      "id": 20454,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "TOKEN_NOT_REGISTERED",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 624,
                                      "src": "12877:27:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 20452,
                                    "name": "_revert",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 369,
                                    "src": "12869:7:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                                      "typeString": "function (uint256) pure"
                                    }
                                  },
                                  "id": 20455,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "12869:36:57",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 20456,
                                "nodeType": "ExpressionStatement",
                                "src": "12869:36:57"
                              }
                            ]
                          },
                          "id": 20458,
                          "nodeType": "IfStatement",
                          "src": "12788:128:57",
                          "trueBody": {
                            "id": 20451,
                            "nodeType": "Block",
                            "src": "12809:40:57",
                            "statements": [
                              {
                                "expression": {
                                  "id": 20449,
                                  "name": "balanceB",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20435,
                                  "src": "12830:8:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "functionReturnParameters": 20427,
                                "id": 20450,
                                "nodeType": "Return",
                                "src": "12823:15:57"
                              }
                            ]
                          }
                        },
                        "id": 20459,
                        "nodeType": "IfStatement",
                        "src": "12721:195:57",
                        "trueBody": {
                          "id": 20445,
                          "nodeType": "Block",
                          "src": "12742:40:57",
                          "statements": [
                            {
                              "expression": {
                                "id": 20443,
                                "name": "balanceA",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20431,
                                "src": "12763:8:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              "functionReturnParameters": 20427,
                              "id": 20444,
                              "nodeType": "Return",
                              "src": "12756:15:57"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20419,
                    "nodeType": "StructuredDocumentation",
                    "src": "11783:498:57",
                    "text": " @dev Returns the balance of a token in a Two Token Pool.\n This function assumes `poolId` exists and corresponds to the General specialization setting.\n This function is convenient but not particularly gas efficient, and should be avoided during gas-sensitive\n operations, such as swaps. For those, _getTwoTokenPoolSharedBalances provides a more flexible interface.\n Requirements:\n - `token` must be registered in the Pool"
                  },
                  "id": 20461,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getTwoTokenPoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20424,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20421,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20461,
                        "src": "12319:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20420,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12319:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20423,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 20461,
                        "src": "12335:12:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20422,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "12335:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12318:30:57"
                  },
                  "returnParameters": {
                    "id": 20427,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20426,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20461,
                        "src": "12372:7:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20425,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12372:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12371:9:57"
                  },
                  "scope": 20641,
                  "src": "12286:636:57",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20562,
                    "nodeType": "Block",
                    "src": "13831:1466:57",
                    "statements": [
                      {
                        "assignments": [
                          20478,
                          20480
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20478,
                            "mutability": "mutable",
                            "name": "tokenA",
                            "nodeType": "VariableDeclaration",
                            "scope": 20562,
                            "src": "13842:13:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 20477,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "13842:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          },
                          {
                            "constant": false,
                            "id": 20480,
                            "mutability": "mutable",
                            "name": "tokenB",
                            "nodeType": "VariableDeclaration",
                            "scope": 20562,
                            "src": "13857:13:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "id": 20479,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 5095,
                              "src": "13857:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20485,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 20482,
                              "name": "tokenX",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20466,
                              "src": "13889:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 20483,
                              "name": "tokenY",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20468,
                              "src": "13897:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 20481,
                            "name": "_sortTwoTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20640,
                            "src": "13874:14:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$",
                              "typeString": "function (contract IERC20,contract IERC20) pure returns (contract IERC20,contract IERC20)"
                            }
                          },
                          "id": 20484,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13874:30:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$",
                            "typeString": "tuple(contract IERC20,contract IERC20)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13841:63:57"
                      },
                      {
                        "assignments": [
                          20487
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20487,
                            "mutability": "mutable",
                            "name": "pairHash",
                            "nodeType": "VariableDeclaration",
                            "scope": 20562,
                            "src": "13914:16:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20486,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "13914:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20492,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 20489,
                              "name": "tokenA",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20478,
                              "src": "13954:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            {
                              "id": 20490,
                              "name": "tokenB",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20480,
                              "src": "13962:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              },
                              {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            ],
                            "id": 20488,
                            "name": "_getTwoTokenPairHash",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20616,
                            "src": "13933:20:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$returns$_t_bytes32_$",
                              "typeString": "function (contract IERC20,contract IERC20) pure returns (bytes32)"
                            }
                          },
                          "id": 20491,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "13933:36:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "13914:55:57"
                      },
                      {
                        "expression": {
                          "id": 20500,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20493,
                            "name": "poolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20475,
                            "src": "13980:12:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "baseExpression": {
                              "expression": {
                                "baseExpression": {
                                  "id": 20494,
                                  "name": "_twoTokenPoolTokens",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19947,
                                  "src": "13995:19:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolTokens_$19943_storage_$",
                                    "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref)"
                                  }
                                },
                                "id": 20496,
                                "indexExpression": {
                                  "id": 20495,
                                  "name": "poolId",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20464,
                                  "src": "14015:6:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "13995:27:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage",
                                  "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref"
                                }
                              },
                              "id": 20497,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "balances",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 19942,
                              "src": "13995:36:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolBalances_$19934_storage_$",
                                "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage ref)"
                              }
                            },
                            "id": 20499,
                            "indexExpression": {
                              "id": 20498,
                              "name": "pairHash",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20487,
                              "src": "14032:8:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "13995:46:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage ref"
                            }
                          },
                          "src": "13980:61:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                          }
                        },
                        "id": 20501,
                        "nodeType": "ExpressionStatement",
                        "src": "13980:61:57"
                      },
                      {
                        "assignments": [
                          20503
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20503,
                            "mutability": "mutable",
                            "name": "sharedCash",
                            "nodeType": "VariableDeclaration",
                            "scope": 20562,
                            "src": "14215:18:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20502,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "14215:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20506,
                        "initialValue": {
                          "expression": {
                            "id": 20504,
                            "name": "poolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20475,
                            "src": "14236:12:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                            }
                          },
                          "id": 20505,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sharedCash",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 19931,
                          "src": "14236:23:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14215:44:57"
                      },
                      {
                        "assignments": [
                          20508
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20508,
                            "mutability": "mutable",
                            "name": "sharedManaged",
                            "nodeType": "VariableDeclaration",
                            "scope": 20562,
                            "src": "14269:21:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            },
                            "typeName": {
                              "id": 20507,
                              "name": "bytes32",
                              "nodeType": "ElementaryTypeName",
                              "src": "14269:7:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20511,
                        "initialValue": {
                          "expression": {
                            "id": 20509,
                            "name": "poolBalances",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20475,
                            "src": "14293:12:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances storage pointer"
                            }
                          },
                          "id": 20510,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sharedManaged",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 19933,
                          "src": "14293:26:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14269:50:57"
                      },
                      {
                        "assignments": [
                          20513
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20513,
                            "mutability": "mutable",
                            "name": "tokensRegistered",
                            "nodeType": "VariableDeclaration",
                            "scope": 20562,
                            "src": "14615:21:57",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 20512,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "14615:4:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20532,
                        "initialValue": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 20531,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "id": 20520,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 20514,
                                  "name": "sharedCash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20503,
                                  "src": "14639:10:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 20515,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "isNotZero",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 18650,
                                "src": "14639:20:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bool_$bound_to$_t_bytes32_$",
                                  "typeString": "function (bytes32) pure returns (bool)"
                                }
                              },
                              "id": 20516,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "14639:22:57",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "||",
                            "rightExpression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 20517,
                                  "name": "sharedManaged",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20508,
                                  "src": "14677:13:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bytes32",
                                    "typeString": "bytes32"
                                  }
                                },
                                "id": 20518,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "isNotZero",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 18650,
                                "src": "14677:23:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_bool_$bound_to$_t_bytes32_$",
                                  "typeString": "function (bytes32) pure returns (bool)"
                                }
                              },
                              "id": 20519,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "14677:25:57",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "src": "14639:63:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "||",
                          "rightExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "id": 20529,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "arguments": [
                                    {
                                      "id": 20522,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20464,
                                      "src": "14750:6:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 20523,
                                      "name": "tokenA",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20478,
                                      "src": "14758:6:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    ],
                                    "id": 20521,
                                    "name": "_isTwoTokenPoolTokenRegistered",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20597,
                                    "src": "14719:30:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bool_$",
                                      "typeString": "function (bytes32,contract IERC20) view returns (bool)"
                                    }
                                  },
                                  "id": 20524,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "14719:46:57",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "&&",
                                "rightExpression": {
                                  "arguments": [
                                    {
                                      "id": 20526,
                                      "name": "poolId",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20464,
                                      "src": "14800:6:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      }
                                    },
                                    {
                                      "id": 20527,
                                      "name": "tokenB",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20480,
                                      "src": "14808:6:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_bytes32",
                                        "typeString": "bytes32"
                                      },
                                      {
                                        "typeIdentifier": "t_contract$_IERC20_$5095",
                                        "typeString": "contract IERC20"
                                      }
                                    ],
                                    "id": 20525,
                                    "name": "_isTwoTokenPoolTokenRegistered",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20597,
                                    "src": "14769:30:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_contract$_IERC20_$5095_$returns$_t_bool_$",
                                      "typeString": "function (bytes32,contract IERC20) view returns (bool)"
                                    }
                                  },
                                  "id": 20528,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "14769:46:57",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "src": "14719:96:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              }
                            ],
                            "id": 20530,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "14718:98:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "14639:177:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "14615:201:57"
                      },
                      {
                        "condition": {
                          "id": 20534,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "14831:17:57",
                          "subExpression": {
                            "id": 20533,
                            "name": "tokensRegistered",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20513,
                            "src": "14832:16:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 20545,
                        "nodeType": "IfStatement",
                        "src": "14827:291:57",
                        "trueBody": {
                          "id": 20544,
                          "nodeType": "Block",
                          "src": "14850:268:57",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 20536,
                                    "name": "poolId",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20464,
                                    "src": "15050:6:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes32",
                                      "typeString": "bytes32"
                                    }
                                  ],
                                  "id": 20535,
                                  "name": "_ensureRegisteredPool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 15394,
                                  "src": "15028:21:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$",
                                    "typeString": "function (bytes32) view"
                                  }
                                },
                                "id": 20537,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "15028:29:57",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 20538,
                              "nodeType": "ExpressionStatement",
                              "src": "15028:29:57"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 20540,
                                      "name": "Errors",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 655,
                                      "src": "15079:6:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_Errors_$655_$",
                                        "typeString": "type(library Errors)"
                                      }
                                    },
                                    "id": 20541,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "TOKEN_NOT_REGISTERED",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 624,
                                    "src": "15079:27:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 20539,
                                  "name": "_revert",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 369,
                                  "src": "15071:7:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$",
                                    "typeString": "function (uint256) pure"
                                  }
                                },
                                "id": 20542,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "15071:36:57",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 20543,
                              "nodeType": "ExpressionStatement",
                              "src": "15071:36:57"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "id": 20552,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20546,
                            "name": "balanceA",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20471,
                            "src": "15128:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 20549,
                                "name": "sharedCash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20503,
                                "src": "15178:10:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 20550,
                                "name": "sharedManaged",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20508,
                                "src": "15190:13:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "id": 20547,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "15139:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20548,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "fromSharedToBalanceA",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18948,
                              "src": "15139:38:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                              }
                            },
                            "id": 20551,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "15139:65:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "15128:76:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20553,
                        "nodeType": "ExpressionStatement",
                        "src": "15128:76:57"
                      },
                      {
                        "expression": {
                          "id": 20560,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 20554,
                            "name": "balanceB",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20473,
                            "src": "15214:8:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 20557,
                                "name": "sharedCash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20503,
                                "src": "15264:10:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              },
                              {
                                "id": 20558,
                                "name": "sharedManaged",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20508,
                                "src": "15276:13:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                },
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "expression": {
                                "id": 20555,
                                "name": "BalanceAllocation",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19057,
                                "src": "15225:17:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_BalanceAllocation_$19057_$",
                                  "typeString": "type(library BalanceAllocation)"
                                }
                              },
                              "id": 20556,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "fromSharedToBalanceB",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 18971,
                              "src": "15225:38:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$",
                                "typeString": "function (bytes32,bytes32) pure returns (bytes32)"
                              }
                            },
                            "id": 20559,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "15225:65:57",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "src": "15214:76:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "id": 20561,
                        "nodeType": "ExpressionStatement",
                        "src": "15214:76:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20462,
                    "nodeType": "StructuredDocumentation",
                    "src": "12928:606:57",
                    "text": " @dev Returns the balance of the two tokens in a Two Token Pool.\n The returned balances are those of token A and token B, where token A is the lowest of token X and token Y, and\n token B the other.\n This function also returns a storage pointer to the TwoTokenPoolBalances struct associated with the token pair,\n which can be used to update it without having to recompute the pair hash and storage slot.\n Requirements:\n - `poolId` must be a Minimal Swap Info Pool\n - `tokenX` and `tokenY` must be registered in the Pool"
                  },
                  "id": 20563,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getTwoTokenPoolSharedBalances",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20469,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20464,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20563,
                        "src": "13588:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20463,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13588:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20466,
                        "mutability": "mutable",
                        "name": "tokenX",
                        "nodeType": "VariableDeclaration",
                        "scope": 20563,
                        "src": "13612:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20465,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "13612:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20468,
                        "mutability": "mutable",
                        "name": "tokenY",
                        "nodeType": "VariableDeclaration",
                        "scope": 20563,
                        "src": "13635:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20467,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "13635:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13578:76:57"
                  },
                  "returnParameters": {
                    "id": 20476,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20471,
                        "mutability": "mutable",
                        "name": "balanceA",
                        "nodeType": "VariableDeclaration",
                        "scope": 20563,
                        "src": "13715:16:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20470,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13715:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20473,
                        "mutability": "mutable",
                        "name": "balanceB",
                        "nodeType": "VariableDeclaration",
                        "scope": 20563,
                        "src": "13745:16:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20472,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13745:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20475,
                        "mutability": "mutable",
                        "name": "poolBalances",
                        "nodeType": "VariableDeclaration",
                        "scope": 20563,
                        "src": "13775:41:57",
                        "stateVariable": false,
                        "storageLocation": "storage",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                          "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                        },
                        "typeName": {
                          "id": 20474,
                          "name": "TwoTokenPoolBalances",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 19934,
                          "src": "13775:20:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolBalances_$19934_storage_ptr",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolBalances"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13701:125:57"
                  },
                  "scope": 20641,
                  "src": "13539:1758:57",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20596,
                    "nodeType": "Block",
                    "src": "15598:243:57",
                    "statements": [
                      {
                        "assignments": [
                          20574
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 20574,
                            "mutability": "mutable",
                            "name": "poolTokens",
                            "nodeType": "VariableDeclaration",
                            "scope": 20596,
                            "src": "15608:37:57",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                              "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens"
                            },
                            "typeName": {
                              "id": 20573,
                              "name": "TwoTokenPoolTokens",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19943,
                              "src": "15608:18:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 20578,
                        "initialValue": {
                          "baseExpression": {
                            "id": 20575,
                            "name": "_twoTokenPoolTokens",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19947,
                            "src": "15648:19:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TwoTokenPoolTokens_$19943_storage_$",
                              "typeString": "mapping(bytes32 => struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref)"
                            }
                          },
                          "id": 20577,
                          "indexExpression": {
                            "id": 20576,
                            "name": "poolId",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 20566,
                            "src": "15668:6:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes32",
                              "typeString": "bytes32"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "15648:27:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage",
                            "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "15608:67:57"
                      },
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 20594,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "id": 20587,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "id": 20582,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 20579,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20568,
                                    "src": "15755:5:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "==",
                                  "rightExpression": {
                                    "expression": {
                                      "id": 20580,
                                      "name": "poolTokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20574,
                                      "src": "15764:10:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                        "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                                      }
                                    },
                                    "id": 20581,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "tokenA",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 19936,
                                    "src": "15764:17:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "src": "15755:26:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "||",
                                "rightExpression": {
                                  "commonType": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  "id": 20586,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 20583,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 20568,
                                    "src": "15785:5:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "==",
                                  "rightExpression": {
                                    "expression": {
                                      "id": 20584,
                                      "name": "poolTokens",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 20574,
                                      "src": "15794:10:57",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_TwoTokenPoolTokens_$19943_storage_ptr",
                                        "typeString": "struct TwoTokenPoolsBalance.TwoTokenPoolTokens storage pointer"
                                      }
                                    },
                                    "id": 20585,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "tokenB",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 19938,
                                    "src": "15794:17:57",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$5095",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "src": "15785:26:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "src": "15755:56:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              }
                            ],
                            "id": 20588,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "15754:58:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "commonType": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "id": 20593,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 20589,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20568,
                              "src": "15816:5:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "arguments": [
                                {
                                  "hexValue": "30",
                                  "id": 20591,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "15832:1:57",
                                  "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": 20590,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5095,
                                "src": "15825:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$5095_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 20592,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "15825:9:57",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "src": "15816:18:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "15754:80:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 20572,
                        "id": 20595,
                        "nodeType": "Return",
                        "src": "15747:87:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20564,
                    "nodeType": "StructuredDocumentation",
                    "src": "15303:191:57",
                    "text": " @dev Returns true if `token` is registered in a Two Token Pool.\n This function assumes `poolId` exists and corresponds to the Two Token specialization setting."
                  },
                  "id": 20597,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_isTwoTokenPoolTokenRegistered",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20569,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20566,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20597,
                        "src": "15539:14:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20565,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "15539:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20568,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 20597,
                        "src": "15555:12:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20567,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "15555:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15538:30:57"
                  },
                  "returnParameters": {
                    "id": 20572,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20571,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20597,
                        "src": "15592:4:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 20570,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "15592:4:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15591:6:57"
                  },
                  "scope": 20641,
                  "src": "15499:342:57",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "internal"
                },
                {
                  "body": {
                    "id": 20615,
                    "nodeType": "Block",
                    "src": "16019:67:57",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 20610,
                                  "name": "tokenA",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20600,
                                  "src": "16063:6:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                },
                                {
                                  "id": 20611,
                                  "name": "tokenB",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 20602,
                                  "src": "16071:6:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  },
                                  {
                                    "typeIdentifier": "t_contract$_IERC20_$5095",
                                    "typeString": "contract IERC20"
                                  }
                                ],
                                "expression": {
                                  "id": 20608,
                                  "name": "abi",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -1,
                                  "src": "16046:3:57",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_abi",
                                    "typeString": "abi"
                                  }
                                },
                                "id": 20609,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "memberName": "encodePacked",
                                "nodeType": "MemberAccess",
                                "src": "16046:16:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                  "typeString": "function () pure returns (bytes memory)"
                                }
                              },
                              "id": 20612,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "16046:32:57",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes_memory_ptr",
                                "typeString": "bytes memory"
                              }
                            ],
                            "id": 20607,
                            "name": "keccak256",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -8,
                            "src": "16036:9:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                              "typeString": "function (bytes memory) pure returns (bytes32)"
                            }
                          },
                          "id": 20613,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "16036:43:57",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "functionReturnParameters": 20606,
                        "id": 20614,
                        "nodeType": "Return",
                        "src": "16029:50:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20598,
                    "nodeType": "StructuredDocumentation",
                    "src": "15847:76:57",
                    "text": " @dev Returns the hash associated with a given token pair."
                  },
                  "id": 20616,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_getTwoTokenPairHash",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20603,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20600,
                        "mutability": "mutable",
                        "name": "tokenA",
                        "nodeType": "VariableDeclaration",
                        "scope": 20616,
                        "src": "15958:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20599,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "15958:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20602,
                        "mutability": "mutable",
                        "name": "tokenB",
                        "nodeType": "VariableDeclaration",
                        "scope": 20616,
                        "src": "15973:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20601,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "15973:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15957:30:57"
                  },
                  "returnParameters": {
                    "id": 20606,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20605,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20616,
                        "src": "16010:7:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20604,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "16010:7:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16009:9:57"
                  },
                  "scope": 20641,
                  "src": "15928:158:57",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                },
                {
                  "body": {
                    "id": 20639,
                    "nodeType": "Block",
                    "src": "16293:77:57",
                    "statements": [
                      {
                        "expression": {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            },
                            "id": 20630,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 20628,
                              "name": "tokenX",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20619,
                              "src": "16310:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "<",
                            "rightExpression": {
                              "id": 20629,
                              "name": "tokenY",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 20621,
                              "src": "16319:6:57",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$5095",
                                "typeString": "contract IERC20"
                              }
                            },
                            "src": "16310:15:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "falseExpression": {
                            "components": [
                              {
                                "id": 20634,
                                "name": "tokenY",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20621,
                                "src": "16348:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              {
                                "id": 20635,
                                "name": "tokenX",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20619,
                                "src": "16356:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              }
                            ],
                            "id": 20636,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "16347:16:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$",
                              "typeString": "tuple(contract IERC20,contract IERC20)"
                            }
                          },
                          "id": 20637,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "Conditional",
                          "src": "16310:53:57",
                          "trueExpression": {
                            "components": [
                              {
                                "id": 20631,
                                "name": "tokenX",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20619,
                                "src": "16329:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              },
                              {
                                "id": 20632,
                                "name": "tokenY",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 20621,
                                "src": "16337:6:57",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IERC20_$5095",
                                  "typeString": "contract IERC20"
                                }
                              }
                            ],
                            "id": 20633,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "16328:16:57",
                            "typeDescriptions": {
                              "typeIdentifier": "t_tuple$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$",
                              "typeString": "tuple(contract IERC20,contract IERC20)"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_contract$_IERC20_$5095_$_t_contract$_IERC20_$5095_$",
                            "typeString": "tuple(contract IERC20,contract IERC20)"
                          }
                        },
                        "functionReturnParameters": 20627,
                        "id": 20638,
                        "nodeType": "Return",
                        "src": "16303:60:57"
                      }
                    ]
                  },
                  "documentation": {
                    "id": 20617,
                    "nodeType": "StructuredDocumentation",
                    "src": "16092:104:57",
                    "text": " @dev Sorts two tokens in ascending order, returning them as a (tokenA, tokenB) tuple."
                  },
                  "id": 20640,
                  "implemented": true,
                  "kind": "function",
                  "modifiers": [],
                  "name": "_sortTwoTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20622,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20619,
                        "mutability": "mutable",
                        "name": "tokenX",
                        "nodeType": "VariableDeclaration",
                        "scope": 20640,
                        "src": "16225:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20618,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "16225:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20621,
                        "mutability": "mutable",
                        "name": "tokenY",
                        "nodeType": "VariableDeclaration",
                        "scope": 20640,
                        "src": "16240:13:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20620,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "16240:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16224:30:57"
                  },
                  "returnParameters": {
                    "id": 20627,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20624,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20640,
                        "src": "16277:6:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20623,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "16277:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20626,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20640,
                        "src": "16285:6:57",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20625,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "16285:6:57",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16276:16:57"
                  },
                  "scope": 20641,
                  "src": "16201:169:57",
                  "stateMutability": "pure",
                  "virtual": false,
                  "visibility": "private"
                }
              ],
              "scope": 20642,
              "src": "904:15468:57"
            }
          ],
          "src": "688:15685:57"
        },
        "id": 57
      },
      "src.sol/amm/vault/interfaces/IAsset.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IAsset.sol",
          "exportedSymbols": {
            "IAsset": [
              20645
            ]
          },
          "id": 20646,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20643,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:58"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "documentation": {
                "id": 20644,
                "nodeType": "StructuredDocumentation",
                "src": "713:309:58",
                "text": " @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\n address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\n types.\n This concept is unrelated to a Pool's Asset Managers."
              },
              "fullyImplemented": true,
              "id": 20645,
              "linearizedBaseContracts": [
                20645
              ],
              "name": "IAsset",
              "nodeType": "ContractDefinition",
              "nodes": [],
              "scope": 20646,
              "src": "1023:73:58"
            }
          ],
          "src": "688:409:58"
        },
        "id": 58
      },
      "src.sol/amm/vault/interfaces/IAuthorizer.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IAuthorizer.sol",
          "exportedSymbols": {
            "IAuthorizer": [
              20660
            ]
          },
          "id": 20661,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20647,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:59"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "fullyImplemented": false,
              "id": 20660,
              "linearizedBaseContracts": [
                20660
              ],
              "name": "IAuthorizer",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "documentation": {
                    "id": 20648,
                    "nodeType": "StructuredDocumentation",
                    "src": "741:121:59",
                    "text": " @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`."
                  },
                  "functionSelector": "9be2a884",
                  "id": 20659,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "canPerform",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20655,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20650,
                        "mutability": "mutable",
                        "name": "actionId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20659,
                        "src": "896:16:59",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20649,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "896:7:59",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20652,
                        "mutability": "mutable",
                        "name": "account",
                        "nodeType": "VariableDeclaration",
                        "scope": 20659,
                        "src": "922:15:59",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20651,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "922:7:59",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20654,
                        "mutability": "mutable",
                        "name": "where",
                        "nodeType": "VariableDeclaration",
                        "scope": 20659,
                        "src": "947:13:59",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20653,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "947:7:59",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "886:80:59"
                  },
                  "returnParameters": {
                    "id": 20658,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20657,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20659,
                        "src": "990:4:59",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 20656,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "990:4:59",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "989:6:59"
                  },
                  "scope": 20660,
                  "src": "867:129:59",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 20661,
              "src": "713:285:59"
            }
          ],
          "src": "688:311:59"
        },
        "id": 59
      },
      "src.sol/amm/vault/interfaces/IBasePool.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IBasePool.sol",
          "exportedSymbols": {
            "IBasePool": [
              20719
            ]
          },
          "id": 20720,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20662,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:60"
            },
            {
              "id": 20663,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:60"
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "./IVault.sol",
              "id": 20664,
              "nodeType": "ImportDirective",
              "scope": 20720,
              "sourceUnit": 21267,
              "src": "747:22:60",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IPoolSwapStructs.sol",
              "file": "./IPoolSwapStructs.sol",
              "id": 20665,
              "nodeType": "ImportDirective",
              "scope": 20720,
              "sourceUnit": 20805,
              "src": "770:32:60",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 20667,
                    "name": "IPoolSwapStructs",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20804,
                    "src": "1112:16:60",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IPoolSwapStructs_$20804",
                      "typeString": "contract IPoolSwapStructs"
                    }
                  },
                  "id": 20668,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1112:16:60"
                }
              ],
              "contractDependencies": [
                20804
              ],
              "contractKind": "interface",
              "documentation": {
                "id": 20666,
                "nodeType": "StructuredDocumentation",
                "src": "804:284:60",
                "text": " @dev Interface for adding and removing liquidity that all Pool contracts should implement. Note that this is not\n the complete Pool contract interface, as it is missing the swap hooks. Pool contracts should also inherit from\n either IGeneralPool or IMinimalSwapInfoPool"
              },
              "fullyImplemented": false,
              "id": 20719,
              "linearizedBaseContracts": [
                20719,
                20804
              ],
              "name": "IBasePool",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "documentation": {
                    "id": 20669,
                    "nodeType": "StructuredDocumentation",
                    "src": "1135:1497:60",
                    "text": " @dev Called by the Vault when a user calls `IVault.joinPool` to add liquidity to this Pool. Returns how many of\n each registered token the user should provide, as well as the amount of protocol fees the Pool owes to the Vault.\n The Vault will then take tokens from `sender` and add them to the Pool's balances, as well as collect\n the reported amount in protocol fees, which the pool should calculate based on `protocolSwapFeePercentage`.\n Protocol fees are reported and charged on join events so that the Pool is free of debt whenever new users join.\n `sender` is the account performing the join (from which tokens will be withdrawn), and `recipient` is the account\n designated to receive any benefits (typically pool shares). `currentBalances` contains the total balances\n for each token the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\n `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\n balance.\n `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\n join (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\n Contracts implementing this function should check that the caller is indeed the Vault before performing any\n state-changing operations, such as minting pool shares."
                  },
                  "functionSelector": "d5c096c4",
                  "id": 20693,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "onJoinPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20685,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20671,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2666:14:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20670,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "2666:7:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20673,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2690:14:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20672,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2690:7:60",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20675,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2714:17:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20674,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "2714:7:60",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20678,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2741:25:60",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20676,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2741:7:60",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20677,
                          "nodeType": "ArrayTypeName",
                          "src": "2741:9:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20680,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2776:23:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20679,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2776:7:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20682,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2809:33:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20681,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2809:7:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20684,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2852:21:60",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 20683,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "2852:5:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2656:223:60"
                  },
                  "returnParameters": {
                    "id": 20692,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20688,
                        "mutability": "mutable",
                        "name": "amountsIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2898:26:60",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20686,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2898:7:60",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20687,
                          "nodeType": "ArrayTypeName",
                          "src": "2898:9:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20691,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 20693,
                        "src": "2926:38:60",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20689,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "2926:7:60",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20690,
                          "nodeType": "ArrayTypeName",
                          "src": "2926:9:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2897:68:60"
                  },
                  "scope": 20719,
                  "src": "2637:329:60",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 20694,
                    "nodeType": "StructuredDocumentation",
                    "src": "2972:1497:60",
                    "text": " @dev Called by the Vault when a user calls `IVault.exitPool` to remove liquidity from this Pool. Returns how many\n tokens the Vault should deduct from the Pool's balances, as well as the amount of protocol fees the Pool owes\n to the Vault. The Vault will then take tokens from the Pool's balances and send them to `recipient`,\n as well as collect the reported amount in protocol fees, which the Pool should calculate based on\n `protocolSwapFeePercentage`.\n Protocol fees are charged on exit events to guarantee that users exiting the Pool have paid their share.\n `sender` is the account performing the exit (typically the pool shareholder), and `recipient` is the account\n to which the Vault will send the proceeds. `currentBalances` contains the total token balances for each token\n the Pool registered in the Vault, in the same order that `IVault.getPoolTokens` would return.\n `lastChangeBlock` is the last block in which *any* of the Pool's registered tokens last changed its total\n balance.\n `userData` contains any pool-specific instructions needed to perform the calculations, such as the type of\n exit (e.g., proportional given an amount of pool shares, single-asset, multi-asset, etc.)\n Contracts implementing this function should check that the caller is indeed the Vault before performing any\n state-changing operations, such as burning pool shares."
                  },
                  "functionSelector": "74f3b009",
                  "id": 20718,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "onExitPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20710,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20696,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4503:14:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20695,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "4503:7:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20698,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4527:14:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20697,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4527:7:60",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20700,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4551:17:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20699,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4551:7:60",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20703,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4578:25:60",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20701,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4578:7:60",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20702,
                          "nodeType": "ArrayTypeName",
                          "src": "4578:9:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20705,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4613:23:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20704,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4613:7:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20707,
                        "mutability": "mutable",
                        "name": "protocolSwapFeePercentage",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4646:33:60",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20706,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4646:7:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20709,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4689:21:60",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 20708,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "4689:5:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4493:223:60"
                  },
                  "returnParameters": {
                    "id": 20717,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20713,
                        "mutability": "mutable",
                        "name": "amountsOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4735:27:60",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20711,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4735:7:60",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20712,
                          "nodeType": "ArrayTypeName",
                          "src": "4735:9:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20716,
                        "mutability": "mutable",
                        "name": "dueProtocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 20718,
                        "src": "4764:38:60",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20714,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4764:7:60",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20715,
                          "nodeType": "ArrayTypeName",
                          "src": "4764:9:60",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4734:69:60"
                  },
                  "scope": 20719,
                  "src": "4474:330:60",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 20720,
              "src": "1089:3717:60"
            }
          ],
          "src": "688:4119:60"
        },
        "id": 60
      },
      "src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol",
          "exportedSymbols": {
            "IFlashLoanRecipient": [
              20738
            ]
          },
          "id": 20739,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20721,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:61"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 20722,
              "nodeType": "ImportDirective",
              "scope": 20739,
              "sourceUnit": 5096,
              "src": "765:43:61",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "fullyImplemented": false,
              "id": 20738,
              "linearizedBaseContracts": [
                20738
              ],
              "name": "IFlashLoanRecipient",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "documentation": {
                    "id": 20723,
                    "nodeType": "StructuredDocumentation",
                    "src": "846:496:61",
                    "text": " @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\n At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\n call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\n Vault, or else the entire flash loan will revert.\n `userData` is the same value passed in the `IVault.flashLoan` call."
                  },
                  "functionSelector": "f04f2707",
                  "id": 20737,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "receiveFlashLoan",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20735,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20726,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 20737,
                        "src": "1382:22:61",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20724,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "1382:6:61",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 20725,
                          "nodeType": "ArrayTypeName",
                          "src": "1382:8:61",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20729,
                        "mutability": "mutable",
                        "name": "amounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 20737,
                        "src": "1414:24:61",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20727,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1414:7:61",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20728,
                          "nodeType": "ArrayTypeName",
                          "src": "1414:9:61",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20732,
                        "mutability": "mutable",
                        "name": "feeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 20737,
                        "src": "1448:27:61",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20730,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1448:7:61",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20731,
                          "nodeType": "ArrayTypeName",
                          "src": "1448:9:61",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20734,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 20737,
                        "src": "1485:21:61",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 20733,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "1485:5:61",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1372:140:61"
                  },
                  "returnParameters": {
                    "id": 20736,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1521:0:61"
                  },
                  "scope": 20738,
                  "src": "1347:175:61",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 20739,
              "src": "810:714:61"
            }
          ],
          "src": "688:837:61"
        },
        "id": 61
      },
      "src.sol/amm/vault/interfaces/IGeneralPool.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IGeneralPool.sol",
          "exportedSymbols": {
            "IGeneralPool": [
              20760
            ]
          },
          "id": 20761,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20740,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:62"
            },
            {
              "id": 20741,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:62"
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IBasePool.sol",
              "file": "./IBasePool.sol",
              "id": 20742,
              "nodeType": "ImportDirective",
              "scope": 20761,
              "sourceUnit": 20720,
              "src": "747:25:62",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 20744,
                    "name": "IBasePool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20719,
                    "src": "1407:9:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBasePool_$20719",
                      "typeString": "contract IBasePool"
                    }
                  },
                  "id": 20745,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1407:9:62"
                }
              ],
              "contractDependencies": [
                20719,
                20804
              ],
              "contractKind": "interface",
              "documentation": {
                "id": 20743,
                "nodeType": "StructuredDocumentation",
                "src": "774:606:62",
                "text": " @dev IPools with the General specialization setting should implement this interface.\n This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\n Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will\n grant to the pool in a 'given out' swap.\n This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\n changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\n indeed the Vault."
              },
              "fullyImplemented": false,
              "id": 20760,
              "linearizedBaseContracts": [
                20760,
                20719,
                20804
              ],
              "name": "IGeneralPool",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "functionSelector": "01ec954a",
                  "id": 20759,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "onSwap",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20755,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20747,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 20759,
                        "src": "1448:30:62",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 20746,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "1448:11:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20750,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 20759,
                        "src": "1488:25:62",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20748,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "1488:7:62",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20749,
                          "nodeType": "ArrayTypeName",
                          "src": "1488:9:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20752,
                        "mutability": "mutable",
                        "name": "indexIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 20759,
                        "src": "1523:15:62",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20751,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1523:7:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20754,
                        "mutability": "mutable",
                        "name": "indexOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 20759,
                        "src": "1548:16:62",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20753,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1548:7:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1438:132:62"
                  },
                  "returnParameters": {
                    "id": 20758,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20757,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 20759,
                        "src": "1589:14:62",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20756,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1589:7:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1588:16:62"
                  },
                  "scope": 20760,
                  "src": "1423:182:62",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 20761,
              "src": "1381:226:62"
            }
          ],
          "src": "688:920:62"
        },
        "id": 62
      },
      "src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IMinimalSwapInfoPool.sol",
          "exportedSymbols": {
            "IMinimalSwapInfoPool": [
              20779
            ]
          },
          "id": 20780,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20762,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:63"
            },
            {
              "id": 20763,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:63"
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IBasePool.sol",
              "file": "./IBasePool.sol",
              "id": 20764,
              "nodeType": "ImportDirective",
              "scope": 20780,
              "sourceUnit": 20720,
              "src": "747:25:63",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 20766,
                    "name": "IBasePool",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20719,
                    "src": "1444:9:63",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBasePool_$20719",
                      "typeString": "contract IBasePool"
                    }
                  },
                  "id": 20767,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1444:9:63"
                }
              ],
              "contractDependencies": [
                20719,
                20804
              ],
              "contractKind": "interface",
              "documentation": {
                "id": 20765,
                "nodeType": "StructuredDocumentation",
                "src": "774:635:63",
                "text": " @dev Pool contracts with the MinimalSwapInfo or TwoToken specialization settings should implement this interface.\n This is called by the Vault when a user calls `IVault.swap` or `IVault.batchSwap` to swap with this Pool.\n Returns the number of tokens the Pool will grant to the user in a 'given in' swap, or that the user will grant\n to the pool in a 'given out' swap.\n This can often be implemented by a `view` function, since many pricing algorithms don't need to track state\n changes in swaps. However, contracts implementing this in non-view functions should check that the caller is\n indeed the Vault."
              },
              "fullyImplemented": false,
              "id": 20779,
              "linearizedBaseContracts": [
                20779,
                20719,
                20804
              ],
              "name": "IMinimalSwapInfoPool",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "functionSelector": "9d2c110c",
                  "id": 20778,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "onSwap",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20774,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20769,
                        "mutability": "mutable",
                        "name": "swapRequest",
                        "nodeType": "VariableDeclaration",
                        "scope": 20778,
                        "src": "1485:30:63",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SwapRequest_$20803_memory_ptr",
                          "typeString": "struct IPoolSwapStructs.SwapRequest"
                        },
                        "typeName": {
                          "id": 20768,
                          "name": "SwapRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20803,
                          "src": "1485:11:63",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SwapRequest_$20803_storage_ptr",
                            "typeString": "struct IPoolSwapStructs.SwapRequest"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20771,
                        "mutability": "mutable",
                        "name": "currentBalanceTokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 20778,
                        "src": "1525:29:63",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20770,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1525:7:63",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20773,
                        "mutability": "mutable",
                        "name": "currentBalanceTokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 20778,
                        "src": "1564:30:63",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20772,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1564:7:63",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1475:125:63"
                  },
                  "returnParameters": {
                    "id": 20777,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20776,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 20778,
                        "src": "1619:14:63",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20775,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1619:7:63",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1618:16:63"
                  },
                  "scope": 20779,
                  "src": "1460:175:63",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 20780,
              "src": "1410:227:63"
            }
          ],
          "src": "688:950:63"
        },
        "id": 63
      },
      "src.sol/amm/vault/interfaces/IPoolSwapStructs.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IPoolSwapStructs.sol",
          "exportedSymbols": {
            "IPoolSwapStructs": [
              20804
            ]
          },
          "id": 20805,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20781,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:64"
            },
            {
              "id": 20782,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "712:33:64"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 20783,
              "nodeType": "ImportDirective",
              "scope": 20805,
              "sourceUnit": 5096,
              "src": "747:43:64",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
              "file": "./IVault.sol",
              "id": 20784,
              "nodeType": "ImportDirective",
              "scope": 20805,
              "sourceUnit": 21267,
              "src": "792:22:64",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "fullyImplemented": true,
              "id": 20804,
              "linearizedBaseContracts": [
                20804
              ],
              "name": "IPoolSwapStructs",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "canonicalName": "IPoolSwapStructs.SwapRequest",
                  "id": 20803,
                  "members": [
                    {
                      "constant": false,
                      "id": 20786,
                      "mutability": "mutable",
                      "name": "kind",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2349:20:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_SwapKind_$21101",
                        "typeString": "enum IVault.SwapKind"
                      },
                      "typeName": {
                        "id": 20785,
                        "name": "IVault.SwapKind",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 21101,
                        "src": "2349:15:64",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20788,
                      "mutability": "mutable",
                      "name": "tokenIn",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2379:14:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IERC20_$5095",
                        "typeString": "contract IERC20"
                      },
                      "typeName": {
                        "id": 20787,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "2379:6:64",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20790,
                      "mutability": "mutable",
                      "name": "tokenOut",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2403:15:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IERC20_$5095",
                        "typeString": "contract IERC20"
                      },
                      "typeName": {
                        "id": 20789,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "2403:6:64",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20792,
                      "mutability": "mutable",
                      "name": "amount",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2428:14:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 20791,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2428:7:64",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20794,
                      "mutability": "mutable",
                      "name": "poolId",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2473:14:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 20793,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "2473:7:64",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20796,
                      "mutability": "mutable",
                      "name": "lastChangeBlock",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2497:23:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 20795,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2497:7:64",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20798,
                      "mutability": "mutable",
                      "name": "from",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2530:12:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 20797,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "2530:7:64",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20800,
                      "mutability": "mutable",
                      "name": "to",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2552:10:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 20799,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "2552:7:64",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20802,
                      "mutability": "mutable",
                      "name": "userData",
                      "nodeType": "VariableDeclaration",
                      "scope": 20803,
                      "src": "2572:14:64",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_storage_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 20801,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "2572:5:64",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "SwapRequest",
                  "nodeType": "StructDefinition",
                  "scope": 20804,
                  "src": "2320:273:64",
                  "visibility": "public"
                }
              ],
              "scope": 20805,
              "src": "816:1779:64"
            }
          ],
          "src": "688:1908:64"
        },
        "id": 64
      },
      "src.sol/amm/vault/interfaces/ISignaturesValidator.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/ISignaturesValidator.sol",
          "exportedSymbols": {
            "ISignaturesValidator": [
              20822
            ]
          },
          "id": 20823,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20806,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:65"
            },
            {
              "abstract": false,
              "baseContracts": [],
              "contractDependencies": [],
              "contractKind": "interface",
              "documentation": {
                "id": 20807,
                "nodeType": "StructuredDocumentation",
                "src": "713:95:65",
                "text": " @dev Interface for the SignatureValidator helper, used to support meta-transactions."
              },
              "fullyImplemented": false,
              "id": 20822,
              "linearizedBaseContracts": [
                20822
              ],
              "name": "ISignaturesValidator",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "documentation": {
                    "id": 20808,
                    "nodeType": "StructuredDocumentation",
                    "src": "846:60:65",
                    "text": " @dev Returns the EIP712 domain separator."
                  },
                  "functionSelector": "ed24911d",
                  "id": 20813,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getDomainSeparator",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20809,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "938:2:65"
                  },
                  "returnParameters": {
                    "id": 20812,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20811,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20813,
                        "src": "964:7:65",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20810,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "964:7:65",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "963:9:65"
                  },
                  "scope": 20822,
                  "src": "911:62:65",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 20814,
                    "nodeType": "StructuredDocumentation",
                    "src": "979:83:65",
                    "text": " @dev Returns the next nonce used by an address to sign messages."
                  },
                  "functionSelector": "90193b7c",
                  "id": 20821,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getNextNonce",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20817,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20816,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 20821,
                        "src": "1089:12:65",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20815,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "1089:7:65",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1088:14:65"
                  },
                  "returnParameters": {
                    "id": 20820,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20819,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20821,
                        "src": "1126:7:65",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20818,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1126:7:65",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1125:9:65"
                  },
                  "scope": 20822,
                  "src": "1067:68:65",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 20823,
              "src": "809:328:65"
            }
          ],
          "src": "688:450:65"
        },
        "id": 65
      },
      "src.sol/amm/vault/interfaces/IVault.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IVault.sol",
          "exportedSymbols": {
            "IVault": [
              21266
            ]
          },
          "id": 21267,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 20824,
              "literals": [
                "experimental",
                "ABIEncoderV2"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:33:66"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 20825,
              "nodeType": "ImportDirective",
              "scope": 21267,
              "sourceUnit": 5096,
              "src": "723:43:66",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IWETH.sol",
              "file": "./IWETH.sol",
              "id": 20826,
              "nodeType": "ImportDirective",
              "scope": 21267,
              "sourceUnit": 21282,
              "src": "768:21:66",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAsset.sol",
              "file": "./IAsset.sol",
              "id": 20827,
              "nodeType": "ImportDirective",
              "scope": 21267,
              "sourceUnit": 20646,
              "src": "790:22:66",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IAuthorizer.sol",
              "file": "./IAuthorizer.sol",
              "id": 20828,
              "nodeType": "ImportDirective",
              "scope": 21267,
              "sourceUnit": 20661,
              "src": "813:27:66",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/IFlashLoanRecipient.sol",
              "file": "./IFlashLoanRecipient.sol",
              "id": 20829,
              "nodeType": "ImportDirective",
              "scope": 21267,
              "sourceUnit": 20739,
              "src": "841:35:66",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/interfaces/ISignaturesValidator.sol",
              "file": "./ISignaturesValidator.sol",
              "id": 20830,
              "nodeType": "ImportDirective",
              "scope": 21267,
              "sourceUnit": 20823,
              "src": "877:36:66",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "absolutePath": "src.sol/amm/vault/ProtocolFeesCollector.sol",
              "file": "../ProtocolFeesCollector.sol",
              "id": 20831,
              "nodeType": "ImportDirective",
              "scope": 21267,
              "sourceUnit": 16288,
              "src": "914:38:66",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "id": 20832,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "954:23:66"
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 20834,
                    "name": "ISignaturesValidator",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 20822,
                    "src": "1171:20:66",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ISignaturesValidator_$20822",
                      "typeString": "contract ISignaturesValidator"
                    }
                  },
                  "id": 20835,
                  "nodeType": "InheritanceSpecifier",
                  "src": "1171:20:66"
                }
              ],
              "contractDependencies": [
                20822
              ],
              "contractKind": "interface",
              "documentation": {
                "id": 20833,
                "nodeType": "StructuredDocumentation",
                "src": "979:171:66",
                "text": " @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\n don't override one of these declarations."
              },
              "fullyImplemented": false,
              "id": 21266,
              "linearizedBaseContracts": [
                21266,
                20822
              ],
              "name": "IVault",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "documentation": {
                    "id": 20836,
                    "nodeType": "StructuredDocumentation",
                    "src": "2689:55:66",
                    "text": " @dev Returns the Vault's Authorizer."
                  },
                  "functionSelector": "aaabadc5",
                  "id": 20841,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20837,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "2771:2:66"
                  },
                  "returnParameters": {
                    "id": 20840,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20839,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20841,
                        "src": "2797:11:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 20838,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "2797:11:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "2796:13:66"
                  },
                  "scope": 21266,
                  "src": "2749:61:66",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 20842,
                    "nodeType": "StructuredDocumentation",
                    "src": "2816:175:66",
                    "text": " @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\n Emits an `AuthorizerChanged` event."
                  },
                  "functionSelector": "0e9e98cf",
                  "id": 20847,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "changeAuthorizer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20845,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20844,
                        "mutability": "mutable",
                        "name": "newAuthorizer",
                        "nodeType": "VariableDeclaration",
                        "scope": 20847,
                        "src": "3022:25:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 20843,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "3022:11:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3021:27:66"
                  },
                  "returnParameters": {
                    "id": 20846,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "3057:0:66"
                  },
                  "scope": 21266,
                  "src": "2996:62:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "anonymous": false,
                  "id": 20853,
                  "name": "AuthorizerChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 20852,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20849,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "oldAuthorizer",
                        "nodeType": "VariableDeclaration",
                        "scope": 20853,
                        "src": "3088:33:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 20848,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "3088:11:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20851,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "newAuthorizer",
                        "nodeType": "VariableDeclaration",
                        "scope": 20853,
                        "src": "3123:33:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                          "typeString": "contract IAuthorizer"
                        },
                        "typeName": {
                          "id": 20850,
                          "name": "IAuthorizer",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20660,
                          "src": "3123:11:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAuthorizer_$20660",
                            "typeString": "contract IAuthorizer"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "3087:70:66"
                  },
                  "src": "3064:94:66"
                },
                {
                  "documentation": {
                    "id": 20854,
                    "nodeType": "StructuredDocumentation",
                    "src": "4254:99:66",
                    "text": " @dev Returns true if `user` has approved `relayer` to act as a relayer for them."
                  },
                  "functionSelector": "fec90d72",
                  "id": 20863,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "hasApprovedRelayer",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20859,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20856,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 20863,
                        "src": "4386:12:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20855,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4386:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20858,
                        "mutability": "mutable",
                        "name": "relayer",
                        "nodeType": "VariableDeclaration",
                        "scope": 20863,
                        "src": "4400:15:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20857,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4400:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4385:31:66"
                  },
                  "returnParameters": {
                    "id": 20862,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20861,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20863,
                        "src": "4440:4:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 20860,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4440:4:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4439:6:66"
                  },
                  "scope": 21266,
                  "src": "4358:88:66",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 20864,
                    "nodeType": "StructuredDocumentation",
                    "src": "4452:178:66",
                    "text": " @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\n Emits a `RelayerApprovalChanged` event."
                  },
                  "functionSelector": "fa6e671d",
                  "id": 20873,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "setRelayerApproval",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20871,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20866,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 20873,
                        "src": "4672:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20865,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4672:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20868,
                        "mutability": "mutable",
                        "name": "relayer",
                        "nodeType": "VariableDeclaration",
                        "scope": 20873,
                        "src": "4696:15:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20867,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4696:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20870,
                        "mutability": "mutable",
                        "name": "approved",
                        "nodeType": "VariableDeclaration",
                        "scope": 20873,
                        "src": "4721:13:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 20869,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4721:4:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4662:78:66"
                  },
                  "returnParameters": {
                    "id": 20872,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "4749:0:66"
                  },
                  "scope": 21266,
                  "src": "4635:115:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "anonymous": false,
                  "id": 20881,
                  "name": "RelayerApprovalChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 20880,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20875,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "relayer",
                        "nodeType": "VariableDeclaration",
                        "scope": 20881,
                        "src": "4785:23:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20874,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4785:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20877,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 20881,
                        "src": "4810:22:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20876,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "4810:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20879,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "approved",
                        "nodeType": "VariableDeclaration",
                        "scope": 20881,
                        "src": "4834:13:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 20878,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "4834:4:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "4784:64:66"
                  },
                  "src": "4756:93:66"
                },
                {
                  "documentation": {
                    "id": 20882,
                    "nodeType": "StructuredDocumentation",
                    "src": "5557:78:66",
                    "text": " @dev Returns `user`'s Internal Balance for a set of tokens."
                  },
                  "functionSelector": "0f5a6efa",
                  "id": 20893,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getInternalBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20888,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20884,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 20893,
                        "src": "5668:12:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20883,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "5668:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20887,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 20893,
                        "src": "5682:22:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20885,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "5682:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 20886,
                          "nodeType": "ArrayTypeName",
                          "src": "5682:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5667:38:66"
                  },
                  "returnParameters": {
                    "id": 20892,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20891,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20893,
                        "src": "5729:16:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20889,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "5729:7:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 20890,
                          "nodeType": "ArrayTypeName",
                          "src": "5729:9:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "5728:18:66"
                  },
                  "scope": 21266,
                  "src": "5640:107:66",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 20894,
                    "nodeType": "StructuredDocumentation",
                    "src": "5753:416:66",
                    "text": " @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\n and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\n it lets integrators reuse a user's Vault allowance.\n For each operation, if the caller is not `sender`, it must be an authorized relayer for them."
                  },
                  "functionSelector": "0e8e3e84",
                  "id": 20900,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "manageUserBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20898,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20897,
                        "mutability": "mutable",
                        "name": "ops",
                        "nodeType": "VariableDeclaration",
                        "scope": 20900,
                        "src": "6201:26:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_UserBalanceOp_$20911_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.UserBalanceOp[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20895,
                            "name": "UserBalanceOp",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20911,
                            "src": "6201:13:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_UserBalanceOp_$20911_storage_ptr",
                              "typeString": "struct IVault.UserBalanceOp"
                            }
                          },
                          "id": 20896,
                          "nodeType": "ArrayTypeName",
                          "src": "6201:15:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_UserBalanceOp_$20911_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.UserBalanceOp[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "6200:28:66"
                  },
                  "returnParameters": {
                    "id": 20899,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "6245:0:66"
                  },
                  "scope": 21266,
                  "src": "6174:72:66",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "canonicalName": "IVault.UserBalanceOp",
                  "id": 20911,
                  "members": [
                    {
                      "constant": false,
                      "id": 20902,
                      "mutability": "mutable",
                      "name": "kind",
                      "nodeType": "VariableDeclaration",
                      "scope": 20911,
                      "src": "6463:22:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                        "typeString": "enum IVault.UserBalanceOpKind"
                      },
                      "typeName": {
                        "id": 20901,
                        "name": "UserBalanceOpKind",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 20916,
                        "src": "6463:17:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_UserBalanceOpKind_$20916",
                          "typeString": "enum IVault.UserBalanceOpKind"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20904,
                      "mutability": "mutable",
                      "name": "asset",
                      "nodeType": "VariableDeclaration",
                      "scope": 20911,
                      "src": "6495:12:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IAsset_$20645",
                        "typeString": "contract IAsset"
                      },
                      "typeName": {
                        "id": 20903,
                        "name": "IAsset",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 20645,
                        "src": "6495:6:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20906,
                      "mutability": "mutable",
                      "name": "amount",
                      "nodeType": "VariableDeclaration",
                      "scope": 20911,
                      "src": "6517:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 20905,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6517:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20908,
                      "mutability": "mutable",
                      "name": "sender",
                      "nodeType": "VariableDeclaration",
                      "scope": 20911,
                      "src": "6541:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 20907,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "6541:7:66",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 20910,
                      "mutability": "mutable",
                      "name": "recipient",
                      "nodeType": "VariableDeclaration",
                      "scope": 20911,
                      "src": "6565:25:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      },
                      "typeName": {
                        "id": 20909,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "6565:15:66",
                        "stateMutability": "payable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "UserBalanceOp",
                  "nodeType": "StructDefinition",
                  "scope": 21266,
                  "src": "6432:165:66",
                  "visibility": "public"
                },
                {
                  "canonicalName": "IVault.UserBalanceOpKind",
                  "id": 20916,
                  "members": [
                    {
                      "id": 20912,
                      "name": "DEPOSIT_INTERNAL",
                      "nodeType": "EnumValue",
                      "src": "8235:16:66"
                    },
                    {
                      "id": 20913,
                      "name": "WITHDRAW_INTERNAL",
                      "nodeType": "EnumValue",
                      "src": "8253:17:66"
                    },
                    {
                      "id": 20914,
                      "name": "TRANSFER_INTERNAL",
                      "nodeType": "EnumValue",
                      "src": "8272:17:66"
                    },
                    {
                      "id": 20915,
                      "name": "TRANSFER_EXTERNAL",
                      "nodeType": "EnumValue",
                      "src": "8291:17:66"
                    }
                  ],
                  "name": "UserBalanceOpKind",
                  "nodeType": "EnumDefinition",
                  "src": "8210:100:66"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 20917,
                    "nodeType": "StructuredDocumentation",
                    "src": "8316:317:66",
                    "text": " @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\n interacting with Pools using Internal Balance.\n Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\n address."
                  },
                  "id": 20925,
                  "name": "InternalBalanceChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 20924,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20919,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "user",
                        "nodeType": "VariableDeclaration",
                        "scope": 20925,
                        "src": "8667:20:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20918,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8667:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20921,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 20925,
                        "src": "8689:20:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20920,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8689:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20923,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "delta",
                        "nodeType": "VariableDeclaration",
                        "scope": 20925,
                        "src": "8711:12:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 20922,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8711:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8666:58:66"
                  },
                  "src": "8638:87:66"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 20926,
                    "nodeType": "StructuredDocumentation",
                    "src": "8731:131:66",
                    "text": " @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account."
                  },
                  "id": 20936,
                  "name": "ExternalBalanceTransfer",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 20935,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20928,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 20936,
                        "src": "8897:20:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 20927,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "8897:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20930,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 20936,
                        "src": "8919:22:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20929,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8919:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20932,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 20936,
                        "src": "8943:17:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20931,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "8943:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20934,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 20936,
                        "src": "8962:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 20933,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "8962:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "8896:81:66"
                  },
                  "src": "8867:111:66"
                },
                {
                  "canonicalName": "IVault.PoolSpecialization",
                  "id": 20940,
                  "members": [
                    {
                      "id": 20937,
                      "name": "GENERAL",
                      "nodeType": "EnumValue",
                      "src": "10084:7:66"
                    },
                    {
                      "id": 20938,
                      "name": "MINIMAL_SWAP_INFO",
                      "nodeType": "EnumValue",
                      "src": "10093:17:66"
                    },
                    {
                      "id": 20939,
                      "name": "TWO_TOKEN",
                      "nodeType": "EnumValue",
                      "src": "10112:9:66"
                    }
                  ],
                  "name": "PoolSpecialization",
                  "nodeType": "EnumDefinition",
                  "src": "10058:65:66"
                },
                {
                  "documentation": {
                    "id": 20941,
                    "nodeType": "StructuredDocumentation",
                    "src": "10129:702:66",
                    "text": " @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\n is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\n changed.\n The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\n depending on the chosen specialization setting. This contract is known as the Pool's contract.\n Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\n multiple Pools may share the same contract.\n Emits a `PoolRegistered` event."
                  },
                  "functionSelector": "09b2760f",
                  "id": 20948,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "registerPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20944,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20943,
                        "mutability": "mutable",
                        "name": "specialization",
                        "nodeType": "VariableDeclaration",
                        "scope": 20948,
                        "src": "10858:33:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 20942,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "10858:18:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10857:35:66"
                  },
                  "returnParameters": {
                    "id": 20947,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20946,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20948,
                        "src": "10911:7:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20945,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "10911:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "10910:9:66"
                  },
                  "scope": 21266,
                  "src": "10836:84:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 20949,
                    "nodeType": "StructuredDocumentation",
                    "src": "10926:84:66",
                    "text": " @dev Emitted when a Pool is registered by calling `registerPool`."
                  },
                  "id": 20953,
                  "name": "PoolRegistered",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 20952,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20951,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20953,
                        "src": "11036:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20950,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11036:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11035:16:66"
                  },
                  "src": "11015:37:66"
                },
                {
                  "documentation": {
                    "id": 20954,
                    "nodeType": "StructuredDocumentation",
                    "src": "11058:85:66",
                    "text": " @dev Returns a Pool's contract address and specialization setting."
                  },
                  "functionSelector": "f6c00927",
                  "id": 20963,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20957,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20956,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20963,
                        "src": "11165:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20955,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "11165:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11164:16:66"
                  },
                  "returnParameters": {
                    "id": 20962,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20959,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20963,
                        "src": "11204:7:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 20958,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "11204:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20961,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 20963,
                        "src": "11213:18:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                          "typeString": "enum IVault.PoolSpecialization"
                        },
                        "typeName": {
                          "id": 20960,
                          "name": "PoolSpecialization",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20940,
                          "src": "11213:18:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_PoolSpecialization_$20940",
                            "typeString": "enum IVault.PoolSpecialization"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "11203:29:66"
                  },
                  "scope": 21266,
                  "src": "11148:85:66",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 20964,
                    "nodeType": "StructuredDocumentation",
                    "src": "11239:1422:66",
                    "text": " @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\n Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\n exit by receiving registered tokens, and can only swap registered tokens.\n Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\n of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\n ascending order.\n The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\n Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\n depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\n expected to be highly secured smart contracts with sound design principles, and the decision to register an\n Asset Manager should not be made lightly.\n Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\n Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\n different Asset Manager.\n Emits a `TokensRegistered` event."
                  },
                  "functionSelector": "66a9c7d2",
                  "id": 20975,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "registerTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20973,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20966,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20975,
                        "src": "12699:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20965,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12699:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20969,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 20975,
                        "src": "12723:22:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20967,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "12723:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 20968,
                          "nodeType": "ArrayTypeName",
                          "src": "12723:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20972,
                        "mutability": "mutable",
                        "name": "assetManagers",
                        "nodeType": "VariableDeclaration",
                        "scope": 20975,
                        "src": "12755:30:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                          "typeString": "address[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20970,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "12755:7:66",
                            "stateMutability": "nonpayable",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 20971,
                          "nodeType": "ArrayTypeName",
                          "src": "12755:9:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                            "typeString": "address[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12689:102:66"
                  },
                  "returnParameters": {
                    "id": 20974,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "12800:0:66"
                  },
                  "scope": 21266,
                  "src": "12666:135:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 20976,
                    "nodeType": "StructuredDocumentation",
                    "src": "12807:89:66",
                    "text": " @dev Emitted when a Pool registers tokens by calling `registerTokens`."
                  },
                  "id": 20986,
                  "name": "TokensRegistered",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 20985,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20978,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20986,
                        "src": "12924:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20977,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "12924:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20981,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 20986,
                        "src": "12940:15:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20979,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "12940:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 20980,
                          "nodeType": "ArrayTypeName",
                          "src": "12940:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20984,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "assetManagers",
                        "nodeType": "VariableDeclaration",
                        "scope": 20986,
                        "src": "12957:23:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                          "typeString": "address[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20982,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "12957:7:66",
                            "stateMutability": "nonpayable",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "id": 20983,
                          "nodeType": "ArrayTypeName",
                          "src": "12957:9:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                            "typeString": "address[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "12923:58:66"
                  },
                  "src": "12901:81:66"
                },
                {
                  "documentation": {
                    "id": 20987,
                    "nodeType": "StructuredDocumentation",
                    "src": "12988:567:66",
                    "text": " @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\n Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\n balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\n must be deregistered in the same `deregisterTokens` call.\n A deregistered token can be re-registered later on, possibly with a different Asset Manager.\n Emits a `TokensDeregistered` event."
                  },
                  "functionSelector": "7d3aeb96",
                  "id": 20995,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "deregisterTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 20993,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20989,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 20995,
                        "src": "13586:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20988,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13586:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 20992,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 20995,
                        "src": "13602:22:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20990,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "13602:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 20991,
                          "nodeType": "ArrayTypeName",
                          "src": "13602:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13585:40:66"
                  },
                  "returnParameters": {
                    "id": 20994,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "13634:0:66"
                  },
                  "scope": 21266,
                  "src": "13560:75:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 20996,
                    "nodeType": "StructuredDocumentation",
                    "src": "13641:93:66",
                    "text": " @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`."
                  },
                  "id": 21003,
                  "name": "TokensDeregistered",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 21002,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 20998,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 21003,
                        "src": "13764:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 20997,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "13764:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21001,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 21003,
                        "src": "13780:15:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 20999,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "13780:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 21000,
                          "nodeType": "ArrayTypeName",
                          "src": "13780:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "13763:33:66"
                  },
                  "src": "13739:58:66"
                },
                {
                  "documentation": {
                    "id": 21004,
                    "nodeType": "StructuredDocumentation",
                    "src": "13803:1043:66",
                    "text": " @dev Returns detailed information for a Pool's registered token.\n `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\n withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\n equals the sum of `cash` and `managed`.\n Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\n `managed` or `total` balance to be greater than 2^112 - 1.\n `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\n join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\n example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\n change for this purpose, and will update `lastChangeBlock`.\n `assetManager` is the Pool's token Asset Manager."
                  },
                  "functionSelector": "b05f8e48",
                  "id": 21019,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getPoolTokenInfo",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21009,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21006,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 21019,
                        "src": "14877:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 21005,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "14877:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21008,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 21019,
                        "src": "14893:12:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 21007,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "14893:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14876:30:66"
                  },
                  "returnParameters": {
                    "id": 21018,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21011,
                        "mutability": "mutable",
                        "name": "cash",
                        "nodeType": "VariableDeclaration",
                        "scope": 21019,
                        "src": "14967:12:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21010,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14967:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21013,
                        "mutability": "mutable",
                        "name": "managed",
                        "nodeType": "VariableDeclaration",
                        "scope": 21019,
                        "src": "14993:15:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21012,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "14993:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21015,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 21019,
                        "src": "15022:23:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21014,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "15022:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21017,
                        "mutability": "mutable",
                        "name": "assetManager",
                        "nodeType": "VariableDeclaration",
                        "scope": 21019,
                        "src": "15059:20:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 21016,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "15059:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "14953:136:66"
                  },
                  "scope": 21266,
                  "src": "14851:239:66",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 21020,
                    "nodeType": "StructuredDocumentation",
                    "src": "15096:828:66",
                    "text": " @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\n the tokens' `balances` changed.\n The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\n Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\n If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\n order as passed to `registerTokens`.\n Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\n the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\n instead."
                  },
                  "functionSelector": "f94d4668",
                  "id": 21033,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getPoolTokens",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21023,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21022,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 21033,
                        "src": "15952:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 21021,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "15952:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "15951:16:66"
                  },
                  "returnParameters": {
                    "id": 21032,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21026,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 21033,
                        "src": "16028:22:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21024,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "16028:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 21025,
                          "nodeType": "ArrayTypeName",
                          "src": "16028:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21029,
                        "mutability": "mutable",
                        "name": "balances",
                        "nodeType": "VariableDeclaration",
                        "scope": 21033,
                        "src": "16064:25:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21027,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "16064:7:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 21028,
                          "nodeType": "ArrayTypeName",
                          "src": "16064:9:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21031,
                        "mutability": "mutable",
                        "name": "lastChangeBlock",
                        "nodeType": "VariableDeclaration",
                        "scope": 21033,
                        "src": "16103:23:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21030,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "16103:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "16014:122:66"
                  },
                  "scope": 21266,
                  "src": "15929:208:66",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 21034,
                    "nodeType": "StructuredDocumentation",
                    "src": "16143:2304:66",
                    "text": " @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\n trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\n Pool shares.\n If the caller is not `sender`, it must be an authorized relayer for them.\n The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\n to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\n these maximums.\n If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\n this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\n WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\n back to the caller (not the sender, which is important for relayers).\n `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\n interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\n sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\n `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\n If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\n be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\n withdrawn from Internal Balance: attempting to do so will trigger a revert.\n This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\n their own custom logic. This typically requires additional information from the user (such as the expected number\n of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\n directly to the Pool's contract, as is `recipient`.\n Emits a `PoolBalanceChanged` event."
                  },
                  "functionSelector": "b95cac28",
                  "id": 21045,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "joinPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21043,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21036,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 21045,
                        "src": "18479:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 21035,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "18479:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21038,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 21045,
                        "src": "18503:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 21037,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "18503:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21040,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 21045,
                        "src": "18527:17:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 21039,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "18527:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21042,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 21045,
                        "src": "18554:30:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_memory_ptr",
                          "typeString": "struct IVault.JoinPoolRequest"
                        },
                        "typeName": {
                          "id": 21041,
                          "name": "JoinPoolRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21056,
                          "src": "18554:15:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_JoinPoolRequest_$21056_storage_ptr",
                            "typeString": "struct IVault.JoinPoolRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "18469:121:66"
                  },
                  "returnParameters": {
                    "id": 21044,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "18607:0:66"
                  },
                  "scope": 21266,
                  "src": "18452:156:66",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "canonicalName": "IVault.JoinPoolRequest",
                  "id": 21056,
                  "members": [
                    {
                      "constant": false,
                      "id": 21048,
                      "mutability": "mutable",
                      "name": "assets",
                      "nodeType": "VariableDeclaration",
                      "scope": 21056,
                      "src": "18647:15:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                        "typeString": "contract IAsset[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 21046,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "18647:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "id": 21047,
                        "nodeType": "ArrayTypeName",
                        "src": "18647:8:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                          "typeString": "contract IAsset[]"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21051,
                      "mutability": "mutable",
                      "name": "maxAmountsIn",
                      "nodeType": "VariableDeclaration",
                      "scope": 21056,
                      "src": "18672:22:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                        "typeString": "uint256[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 21049,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "18672:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 21050,
                        "nodeType": "ArrayTypeName",
                        "src": "18672:9:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                          "typeString": "uint256[]"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21053,
                      "mutability": "mutable",
                      "name": "userData",
                      "nodeType": "VariableDeclaration",
                      "scope": 21056,
                      "src": "18704:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_storage_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 21052,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "18704:5:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21055,
                      "mutability": "mutable",
                      "name": "fromInternalBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 21056,
                      "src": "18728:24:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 21054,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "18728:4:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "JoinPoolRequest",
                  "nodeType": "StructDefinition",
                  "scope": 21266,
                  "src": "18614:145:66",
                  "visibility": "public"
                },
                {
                  "documentation": {
                    "id": 21057,
                    "nodeType": "StructuredDocumentation",
                    "src": "18765:2489:66",
                    "text": " @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\n trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\n Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\n `getPoolTokenInfo`).\n If the caller is not `sender`, it must be an authorized relayer for them.\n The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\n token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\n it just enforces these minimums.\n If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\n enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\n of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\n `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\n interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\n be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\n final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\n If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\n an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\n do so will trigger a revert.\n `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\n `tokens` array. This array must match the Pool's registered tokens.\n This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\n their own custom logic. This typically requires additional information from the user (such as the expected number\n of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\n passed directly to the Pool's contract.\n Emits a `PoolBalanceChanged` event."
                  },
                  "functionSelector": "8bdb3913",
                  "id": 21068,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "exitPool",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21066,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21059,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 21068,
                        "src": "21286:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 21058,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "21286:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21061,
                        "mutability": "mutable",
                        "name": "sender",
                        "nodeType": "VariableDeclaration",
                        "scope": 21068,
                        "src": "21310:14:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 21060,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "21310:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21063,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 21068,
                        "src": "21334:25:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        "typeName": {
                          "id": 21062,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "21334:15:66",
                          "stateMutability": "payable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21065,
                        "mutability": "mutable",
                        "name": "request",
                        "nodeType": "VariableDeclaration",
                        "scope": 21068,
                        "src": "21369:30:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_memory_ptr",
                          "typeString": "struct IVault.ExitPoolRequest"
                        },
                        "typeName": {
                          "id": 21064,
                          "name": "ExitPoolRequest",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21079,
                          "src": "21369:15:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ExitPoolRequest_$21079_storage_ptr",
                            "typeString": "struct IVault.ExitPoolRequest"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "21276:129:66"
                  },
                  "returnParameters": {
                    "id": 21067,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "21414:0:66"
                  },
                  "scope": 21266,
                  "src": "21259:156:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "canonicalName": "IVault.ExitPoolRequest",
                  "id": 21079,
                  "members": [
                    {
                      "constant": false,
                      "id": 21071,
                      "mutability": "mutable",
                      "name": "assets",
                      "nodeType": "VariableDeclaration",
                      "scope": 21079,
                      "src": "21454:15:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                        "typeString": "contract IAsset[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 21069,
                          "name": "IAsset",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20645,
                          "src": "21454:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IAsset_$20645",
                            "typeString": "contract IAsset"
                          }
                        },
                        "id": 21070,
                        "nodeType": "ArrayTypeName",
                        "src": "21454:8:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                          "typeString": "contract IAsset[]"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21074,
                      "mutability": "mutable",
                      "name": "minAmountsOut",
                      "nodeType": "VariableDeclaration",
                      "scope": 21079,
                      "src": "21479:23:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                        "typeString": "uint256[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 21072,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "21479:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 21073,
                        "nodeType": "ArrayTypeName",
                        "src": "21479:9:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                          "typeString": "uint256[]"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21076,
                      "mutability": "mutable",
                      "name": "userData",
                      "nodeType": "VariableDeclaration",
                      "scope": 21079,
                      "src": "21512:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_storage_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 21075,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "21512:5:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21078,
                      "mutability": "mutable",
                      "name": "toInternalBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 21079,
                      "src": "21536:22:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 21077,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "21536:4:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "ExitPoolRequest",
                  "nodeType": "StructDefinition",
                  "scope": 21266,
                  "src": "21421:144:66",
                  "visibility": "public"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 21080,
                    "nodeType": "StructuredDocumentation",
                    "src": "21571:116:66",
                    "text": " @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively."
                  },
                  "id": 21095,
                  "name": "PoolBalanceChanged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 21094,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21082,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 21095,
                        "src": "21726:22:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 21081,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "21726:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21084,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "liquidityProvider",
                        "nodeType": "VariableDeclaration",
                        "scope": 21095,
                        "src": "21758:33:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 21083,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "21758:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21087,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 21095,
                        "src": "21801:15:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21085,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "21801:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 21086,
                          "nodeType": "ArrayTypeName",
                          "src": "21801:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21090,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "deltas",
                        "nodeType": "VariableDeclaration",
                        "scope": 21095,
                        "src": "21826:15:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21088,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "21826:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 21089,
                          "nodeType": "ArrayTypeName",
                          "src": "21826:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21093,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "protocolFeeAmounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 21095,
                        "src": "21851:28:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21091,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "21851:7:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 21092,
                          "nodeType": "ArrayTypeName",
                          "src": "21851:9:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "21716:169:66"
                  },
                  "src": "21692:194:66"
                },
                {
                  "canonicalName": "IVault.PoolBalanceChangeKind",
                  "id": 21098,
                  "members": [
                    {
                      "id": 21096,
                      "name": "JOIN",
                      "nodeType": "EnumValue",
                      "src": "21921:4:66"
                    },
                    {
                      "id": 21097,
                      "name": "EXIT",
                      "nodeType": "EnumValue",
                      "src": "21927:4:66"
                    }
                  ],
                  "name": "PoolBalanceChangeKind",
                  "nodeType": "EnumDefinition",
                  "src": "21892:41:66"
                },
                {
                  "canonicalName": "IVault.SwapKind",
                  "id": 21101,
                  "members": [
                    {
                      "id": 21099,
                      "name": "GIVEN_IN",
                      "nodeType": "EnumValue",
                      "src": "25534:8:66"
                    },
                    {
                      "id": 21100,
                      "name": "GIVEN_OUT",
                      "nodeType": "EnumValue",
                      "src": "25544:9:66"
                    }
                  ],
                  "name": "SwapKind",
                  "nodeType": "EnumDefinition",
                  "src": "25518:37:66"
                },
                {
                  "documentation": {
                    "id": 21102,
                    "nodeType": "StructuredDocumentation",
                    "src": "25561:587:66",
                    "text": " @dev Performs a swap with a single Pool.\n If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\n taken from the Pool, which must be greater than or equal to `limit`.\n If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\n sent to the Pool, which must be less than or equal to `limit`.\n Internal Balance usage and the recipient are determined by the `funds` struct.\n Emits a `Swap` event."
                  },
                  "functionSelector": "52bbbe29",
                  "id": 21115,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "swap",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21111,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21104,
                        "mutability": "mutable",
                        "name": "singleSwap",
                        "nodeType": "VariableDeclaration",
                        "scope": 21115,
                        "src": "26176:28:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_SingleSwap_$21128_memory_ptr",
                          "typeString": "struct IVault.SingleSwap"
                        },
                        "typeName": {
                          "id": 21103,
                          "name": "SingleSwap",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21128,
                          "src": "26176:10:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_SingleSwap_$21128_storage_ptr",
                            "typeString": "struct IVault.SingleSwap"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21106,
                        "mutability": "mutable",
                        "name": "funds",
                        "nodeType": "VariableDeclaration",
                        "scope": 21115,
                        "src": "26214:27:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                          "typeString": "struct IVault.FundManagement"
                        },
                        "typeName": {
                          "id": 21105,
                          "name": "FundManagement",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21183,
                          "src": "26214:14:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_FundManagement_$21183_storage_ptr",
                            "typeString": "struct IVault.FundManagement"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21108,
                        "mutability": "mutable",
                        "name": "limit",
                        "nodeType": "VariableDeclaration",
                        "scope": 21115,
                        "src": "26251:13:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21107,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "26251:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21110,
                        "mutability": "mutable",
                        "name": "deadline",
                        "nodeType": "VariableDeclaration",
                        "scope": 21115,
                        "src": "26274:16:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21109,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "26274:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "26166:130:66"
                  },
                  "returnParameters": {
                    "id": 21114,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21113,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 21115,
                        "src": "26323:7:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21112,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "26323:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "26322:9:66"
                  },
                  "scope": 21266,
                  "src": "26153:179:66",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "canonicalName": "IVault.SingleSwap",
                  "id": 21128,
                  "members": [
                    {
                      "constant": false,
                      "id": 21117,
                      "mutability": "mutable",
                      "name": "poolId",
                      "nodeType": "VariableDeclaration",
                      "scope": 21128,
                      "src": "26916:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 21116,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "26916:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21119,
                      "mutability": "mutable",
                      "name": "kind",
                      "nodeType": "VariableDeclaration",
                      "scope": 21128,
                      "src": "26940:13:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_SwapKind_$21101",
                        "typeString": "enum IVault.SwapKind"
                      },
                      "typeName": {
                        "id": 21118,
                        "name": "SwapKind",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 21101,
                        "src": "26940:8:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21121,
                      "mutability": "mutable",
                      "name": "assetIn",
                      "nodeType": "VariableDeclaration",
                      "scope": 21128,
                      "src": "26963:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IAsset_$20645",
                        "typeString": "contract IAsset"
                      },
                      "typeName": {
                        "id": 21120,
                        "name": "IAsset",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 20645,
                        "src": "26963:6:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21123,
                      "mutability": "mutable",
                      "name": "assetOut",
                      "nodeType": "VariableDeclaration",
                      "scope": 21128,
                      "src": "26987:15:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IAsset_$20645",
                        "typeString": "contract IAsset"
                      },
                      "typeName": {
                        "id": 21122,
                        "name": "IAsset",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 20645,
                        "src": "26987:6:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IAsset_$20645",
                          "typeString": "contract IAsset"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21125,
                      "mutability": "mutable",
                      "name": "amount",
                      "nodeType": "VariableDeclaration",
                      "scope": 21128,
                      "src": "27012:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 21124,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "27012:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21127,
                      "mutability": "mutable",
                      "name": "userData",
                      "nodeType": "VariableDeclaration",
                      "scope": 21128,
                      "src": "27036:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_storage_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 21126,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "27036:5:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "SingleSwap",
                  "nodeType": "StructDefinition",
                  "scope": 21266,
                  "src": "26888:169:66",
                  "visibility": "public"
                },
                {
                  "documentation": {
                    "id": 21129,
                    "nodeType": "StructuredDocumentation",
                    "src": "27063:1980:66",
                    "text": " @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\n the amount of tokens sent to or received from the Pool, depending on the `kind` value.\n Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\n Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\n the same index in the `assets` array.\n Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\n Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\n `amountOut` depending on the swap kind.\n Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\n of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\n the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\n The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\n or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\n out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\n or unwrapped from WETH by the Vault.\n Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\n the minimum or maximum amount of each token the vault is allowed to transfer.\n `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\n equivalent `swap` call.\n Emits `Swap` events."
                  },
                  "functionSelector": "945bcec9",
                  "id": 21150,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "batchSwap",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21145,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21131,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 21150,
                        "src": "29076:13:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        },
                        "typeName": {
                          "id": 21130,
                          "name": "SwapKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21101,
                          "src": "29076:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21134,
                        "mutability": "mutable",
                        "name": "swaps",
                        "nodeType": "VariableDeclaration",
                        "scope": 21150,
                        "src": "29099:28:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.BatchSwapStep[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21132,
                            "name": "BatchSwapStep",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 21161,
                            "src": "29099:13:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_BatchSwapStep_$21161_storage_ptr",
                              "typeString": "struct IVault.BatchSwapStep"
                            }
                          },
                          "id": 21133,
                          "nodeType": "ArrayTypeName",
                          "src": "29099:15:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.BatchSwapStep[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21137,
                        "mutability": "mutable",
                        "name": "assets",
                        "nodeType": "VariableDeclaration",
                        "scope": 21150,
                        "src": "29137:22:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                          "typeString": "contract IAsset[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21135,
                            "name": "IAsset",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20645,
                            "src": "29137:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAsset_$20645",
                              "typeString": "contract IAsset"
                            }
                          },
                          "id": 21136,
                          "nodeType": "ArrayTypeName",
                          "src": "29137:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                            "typeString": "contract IAsset[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21139,
                        "mutability": "mutable",
                        "name": "funds",
                        "nodeType": "VariableDeclaration",
                        "scope": 21150,
                        "src": "29169:27:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                          "typeString": "struct IVault.FundManagement"
                        },
                        "typeName": {
                          "id": 21138,
                          "name": "FundManagement",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21183,
                          "src": "29169:14:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_FundManagement_$21183_storage_ptr",
                            "typeString": "struct IVault.FundManagement"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21142,
                        "mutability": "mutable",
                        "name": "limits",
                        "nodeType": "VariableDeclaration",
                        "scope": 21150,
                        "src": "29206:22:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21140,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "29206:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 21141,
                          "nodeType": "ArrayTypeName",
                          "src": "29206:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21144,
                        "mutability": "mutable",
                        "name": "deadline",
                        "nodeType": "VariableDeclaration",
                        "scope": 21150,
                        "src": "29238:16:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21143,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "29238:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "29066:194:66"
                  },
                  "returnParameters": {
                    "id": 21149,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21148,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 21150,
                        "src": "29287:15:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21146,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "29287:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 21147,
                          "nodeType": "ArrayTypeName",
                          "src": "29287:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "29286:17:66"
                  },
                  "scope": 21266,
                  "src": "29048:256:66",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "canonicalName": "IVault.BatchSwapStep",
                  "id": 21161,
                  "members": [
                    {
                      "constant": false,
                      "id": 21152,
                      "mutability": "mutable",
                      "name": "poolId",
                      "nodeType": "VariableDeclaration",
                      "scope": 21161,
                      "src": "29897:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 21151,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "29897:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21154,
                      "mutability": "mutable",
                      "name": "assetInIndex",
                      "nodeType": "VariableDeclaration",
                      "scope": 21161,
                      "src": "29921:20:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 21153,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "29921:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21156,
                      "mutability": "mutable",
                      "name": "assetOutIndex",
                      "nodeType": "VariableDeclaration",
                      "scope": 21161,
                      "src": "29951:21:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 21155,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "29951:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21158,
                      "mutability": "mutable",
                      "name": "amount",
                      "nodeType": "VariableDeclaration",
                      "scope": 21161,
                      "src": "29982:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 21157,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "29982:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21160,
                      "mutability": "mutable",
                      "name": "userData",
                      "nodeType": "VariableDeclaration",
                      "scope": 21161,
                      "src": "30006:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_storage_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 21159,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "30006:5:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "BatchSwapStep",
                  "nodeType": "StructDefinition",
                  "scope": 21266,
                  "src": "29866:161:66",
                  "visibility": "public"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 21162,
                    "nodeType": "StructuredDocumentation",
                    "src": "30033:92:66",
                    "text": " @dev Emitted for each individual swap performed by `swap` or `batchSwap`."
                  },
                  "id": 21174,
                  "name": "Swap",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 21173,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21164,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 21174,
                        "src": "30150:22:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 21163,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "30150:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21166,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "tokenIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 21174,
                        "src": "30182:22:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 21165,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "30182:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21168,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "tokenOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 21174,
                        "src": "30214:23:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 21167,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "30214:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21170,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "amountIn",
                        "nodeType": "VariableDeclaration",
                        "scope": 21174,
                        "src": "30247:16:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21169,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "30247:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21172,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "amountOut",
                        "nodeType": "VariableDeclaration",
                        "scope": 21174,
                        "src": "30273:17:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21171,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "30273:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "30140:156:66"
                  },
                  "src": "30130:167:66"
                },
                {
                  "canonicalName": "IVault.FundManagement",
                  "id": 21183,
                  "members": [
                    {
                      "constant": false,
                      "id": 21176,
                      "mutability": "mutable",
                      "name": "sender",
                      "nodeType": "VariableDeclaration",
                      "scope": 21183,
                      "src": "31260:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 21175,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "31260:7:66",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21178,
                      "mutability": "mutable",
                      "name": "fromInternalBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 21183,
                      "src": "31284:24:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 21177,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "31284:4:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21180,
                      "mutability": "mutable",
                      "name": "recipient",
                      "nodeType": "VariableDeclaration",
                      "scope": 21183,
                      "src": "31318:25:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      },
                      "typeName": {
                        "id": 21179,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "31318:15:66",
                        "stateMutability": "payable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21182,
                      "mutability": "mutable",
                      "name": "toInternalBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 21183,
                      "src": "31353:22:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 21181,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "31353:4:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "FundManagement",
                  "nodeType": "StructDefinition",
                  "scope": 21266,
                  "src": "31228:154:66",
                  "visibility": "public"
                },
                {
                  "documentation": {
                    "id": 21184,
                    "nodeType": "StructuredDocumentation",
                    "src": "31388:1027:66",
                    "text": " @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\n simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\n Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\n the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\n receives are the same that an equivalent `batchSwap` call would receive.\n Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\n This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\n approve them for the Vault, or even know a user's address.\n Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\n eth_call instead of eth_sendTransaction."
                  },
                  "functionSelector": "f84d066e",
                  "id": 21200,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "queryBatchSwap",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21195,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21186,
                        "mutability": "mutable",
                        "name": "kind",
                        "nodeType": "VariableDeclaration",
                        "scope": 21200,
                        "src": "32453:13:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_SwapKind_$21101",
                          "typeString": "enum IVault.SwapKind"
                        },
                        "typeName": {
                          "id": 21185,
                          "name": "SwapKind",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21101,
                          "src": "32453:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_SwapKind_$21101",
                            "typeString": "enum IVault.SwapKind"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21189,
                        "mutability": "mutable",
                        "name": "swaps",
                        "nodeType": "VariableDeclaration",
                        "scope": 21200,
                        "src": "32476:28:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.BatchSwapStep[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21187,
                            "name": "BatchSwapStep",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 21161,
                            "src": "32476:13:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_BatchSwapStep_$21161_storage_ptr",
                              "typeString": "struct IVault.BatchSwapStep"
                            }
                          },
                          "id": 21188,
                          "nodeType": "ArrayTypeName",
                          "src": "32476:15:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_BatchSwapStep_$21161_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.BatchSwapStep[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21192,
                        "mutability": "mutable",
                        "name": "assets",
                        "nodeType": "VariableDeclaration",
                        "scope": 21200,
                        "src": "32514:22:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_memory_ptr",
                          "typeString": "contract IAsset[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21190,
                            "name": "IAsset",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 20645,
                            "src": "32514:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IAsset_$20645",
                              "typeString": "contract IAsset"
                            }
                          },
                          "id": 21191,
                          "nodeType": "ArrayTypeName",
                          "src": "32514:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IAsset_$20645_$dyn_storage_ptr",
                            "typeString": "contract IAsset[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21194,
                        "mutability": "mutable",
                        "name": "funds",
                        "nodeType": "VariableDeclaration",
                        "scope": 21200,
                        "src": "32546:27:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_FundManagement_$21183_memory_ptr",
                          "typeString": "struct IVault.FundManagement"
                        },
                        "typeName": {
                          "id": 21193,
                          "name": "FundManagement",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21183,
                          "src": "32546:14:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_FundManagement_$21183_storage_ptr",
                            "typeString": "struct IVault.FundManagement"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "32443:136:66"
                  },
                  "returnParameters": {
                    "id": 21199,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21198,
                        "mutability": "mutable",
                        "name": "assetDeltas",
                        "nodeType": "VariableDeclaration",
                        "scope": 21200,
                        "src": "32598:27:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21196,
                            "name": "int256",
                            "nodeType": "ElementaryTypeName",
                            "src": "32598:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 21197,
                          "nodeType": "ArrayTypeName",
                          "src": "32598:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "32597:29:66"
                  },
                  "scope": 21266,
                  "src": "32420:207:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 21201,
                    "nodeType": "StructuredDocumentation",
                    "src": "32653:564:66",
                    "text": " @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\n and then reverting unless the tokens plus a proportional protocol fee have been returned.\n The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\n for each token contract. `tokens` must be sorted in ascending order.\n The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\n `receiveFlashLoan` call."
                  },
                  "functionSelector": "5c38449e",
                  "id": 21214,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "flashLoan",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21212,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21203,
                        "mutability": "mutable",
                        "name": "recipient",
                        "nodeType": "VariableDeclaration",
                        "scope": 21214,
                        "src": "33250:29:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IFlashLoanRecipient_$20738",
                          "typeString": "contract IFlashLoanRecipient"
                        },
                        "typeName": {
                          "id": 21202,
                          "name": "IFlashLoanRecipient",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 20738,
                          "src": "33250:19:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IFlashLoanRecipient_$20738",
                            "typeString": "contract IFlashLoanRecipient"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21206,
                        "mutability": "mutable",
                        "name": "tokens",
                        "nodeType": "VariableDeclaration",
                        "scope": 21214,
                        "src": "33289:22:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_memory_ptr",
                          "typeString": "contract IERC20[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21204,
                            "name": "IERC20",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5095,
                            "src": "33289:6:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$5095",
                              "typeString": "contract IERC20"
                            }
                          },
                          "id": 21205,
                          "nodeType": "ArrayTypeName",
                          "src": "33289:8:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_contract$_IERC20_$5095_$dyn_storage_ptr",
                            "typeString": "contract IERC20[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21209,
                        "mutability": "mutable",
                        "name": "amounts",
                        "nodeType": "VariableDeclaration",
                        "scope": 21214,
                        "src": "33321:24:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
                          "typeString": "uint256[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21207,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "33321:7:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 21208,
                          "nodeType": "ArrayTypeName",
                          "src": "33321:9:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                            "typeString": "uint256[]"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21211,
                        "mutability": "mutable",
                        "name": "userData",
                        "nodeType": "VariableDeclaration",
                        "scope": 21214,
                        "src": "33355:21:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes"
                        },
                        "typeName": {
                          "id": 21210,
                          "name": "bytes",
                          "nodeType": "ElementaryTypeName",
                          "src": "33355:5:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_storage_ptr",
                            "typeString": "bytes"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "33240:142:66"
                  },
                  "returnParameters": {
                    "id": 21213,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "33391:0:66"
                  },
                  "scope": 21266,
                  "src": "33222:170:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 21215,
                    "nodeType": "StructuredDocumentation",
                    "src": "34388:434:66",
                    "text": " @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\n Pool Balance management features batching, which means a single contract call can be used to perform multiple\n operations of different kinds, with different Pools and tokens, at once.\n For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`."
                  },
                  "functionSelector": "e6c46092",
                  "id": 21221,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "managePoolBalance",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21219,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21218,
                        "mutability": "mutable",
                        "name": "ops",
                        "nodeType": "VariableDeclaration",
                        "scope": 21221,
                        "src": "34854:26:66",
                        "stateVariable": false,
                        "storageLocation": "memory",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_PoolBalanceOp_$21230_memory_ptr_$dyn_memory_ptr",
                          "typeString": "struct IVault.PoolBalanceOp[]"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 21216,
                            "name": "PoolBalanceOp",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 21230,
                            "src": "34854:13:66",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_PoolBalanceOp_$21230_storage_ptr",
                              "typeString": "struct IVault.PoolBalanceOp"
                            }
                          },
                          "id": 21217,
                          "nodeType": "ArrayTypeName",
                          "src": "34854:15:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_PoolBalanceOp_$21230_storage_$dyn_storage_ptr",
                            "typeString": "struct IVault.PoolBalanceOp[]"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "34853:28:66"
                  },
                  "returnParameters": {
                    "id": 21220,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "34890:0:66"
                  },
                  "scope": 21266,
                  "src": "34827:64:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "canonicalName": "IVault.PoolBalanceOp",
                  "id": 21230,
                  "members": [
                    {
                      "constant": false,
                      "id": 21223,
                      "mutability": "mutable",
                      "name": "kind",
                      "nodeType": "VariableDeclaration",
                      "scope": 21230,
                      "src": "34928:22:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                        "typeString": "enum IVault.PoolBalanceOpKind"
                      },
                      "typeName": {
                        "id": 21222,
                        "name": "PoolBalanceOpKind",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 21234,
                        "src": "34928:17:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_PoolBalanceOpKind_$21234",
                          "typeString": "enum IVault.PoolBalanceOpKind"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21225,
                      "mutability": "mutable",
                      "name": "poolId",
                      "nodeType": "VariableDeclaration",
                      "scope": 21230,
                      "src": "34960:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "typeName": {
                        "id": 21224,
                        "name": "bytes32",
                        "nodeType": "ElementaryTypeName",
                        "src": "34960:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21227,
                      "mutability": "mutable",
                      "name": "token",
                      "nodeType": "VariableDeclaration",
                      "scope": 21230,
                      "src": "34984:12:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IERC20_$5095",
                        "typeString": "contract IERC20"
                      },
                      "typeName": {
                        "id": 21226,
                        "name": "IERC20",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5095,
                        "src": "34984:6:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        }
                      },
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 21229,
                      "mutability": "mutable",
                      "name": "amount",
                      "nodeType": "VariableDeclaration",
                      "scope": 21230,
                      "src": "35006:14:66",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 21228,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "35006:7:66",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "name": "PoolBalanceOp",
                  "nodeType": "StructDefinition",
                  "scope": 21266,
                  "src": "34897:130:66",
                  "visibility": "public"
                },
                {
                  "canonicalName": "IVault.PoolBalanceOpKind",
                  "id": 21234,
                  "members": [
                    {
                      "id": 21231,
                      "name": "WITHDRAW",
                      "nodeType": "EnumValue",
                      "src": "35549:8:66"
                    },
                    {
                      "id": 21232,
                      "name": "DEPOSIT",
                      "nodeType": "EnumValue",
                      "src": "35559:7:66"
                    },
                    {
                      "id": 21233,
                      "name": "UPDATE",
                      "nodeType": "EnumValue",
                      "src": "35568:6:66"
                    }
                  ],
                  "name": "PoolBalanceOpKind",
                  "nodeType": "EnumDefinition",
                  "src": "35524:52:66"
                },
                {
                  "anonymous": false,
                  "documentation": {
                    "id": 21235,
                    "nodeType": "StructuredDocumentation",
                    "src": "35582:109:66",
                    "text": " @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`."
                  },
                  "id": 21247,
                  "name": "PoolBalanceManaged",
                  "nodeType": "EventDefinition",
                  "parameters": {
                    "id": 21246,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21237,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "poolId",
                        "nodeType": "VariableDeclaration",
                        "scope": 21247,
                        "src": "35730:22:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        "typeName": {
                          "id": 21236,
                          "name": "bytes32",
                          "nodeType": "ElementaryTypeName",
                          "src": "35730:7:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21239,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "assetManager",
                        "nodeType": "VariableDeclaration",
                        "scope": 21247,
                        "src": "35762:28:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "typeName": {
                          "id": 21238,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "35762:7:66",
                          "stateMutability": "nonpayable",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21241,
                        "indexed": true,
                        "mutability": "mutable",
                        "name": "token",
                        "nodeType": "VariableDeclaration",
                        "scope": 21247,
                        "src": "35800:20:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20_$5095",
                          "typeString": "contract IERC20"
                        },
                        "typeName": {
                          "id": 21240,
                          "name": "IERC20",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 5095,
                          "src": "35800:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$5095",
                            "typeString": "contract IERC20"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21243,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "cashDelta",
                        "nodeType": "VariableDeclaration",
                        "scope": 21247,
                        "src": "35830:16:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 21242,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "35830:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      },
                      {
                        "constant": false,
                        "id": 21245,
                        "indexed": false,
                        "mutability": "mutable",
                        "name": "managedDelta",
                        "nodeType": "VariableDeclaration",
                        "scope": 21247,
                        "src": "35856:19:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "typeName": {
                          "id": 21244,
                          "name": "int256",
                          "nodeType": "ElementaryTypeName",
                          "src": "35856:6:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "35720:161:66"
                  },
                  "src": "35696:186:66"
                },
                {
                  "documentation": {
                    "id": 21248,
                    "nodeType": "StructuredDocumentation",
                    "src": "36759:64:66",
                    "text": " @dev Returns the current protocol fee module."
                  },
                  "functionSelector": "d2946c2b",
                  "id": 21253,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "getProtocolFeesCollector",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21249,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "36861:2:66"
                  },
                  "returnParameters": {
                    "id": 21252,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21251,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 21253,
                        "src": "36887:21:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                          "typeString": "contract ProtocolFeesCollector"
                        },
                        "typeName": {
                          "id": 21250,
                          "name": "ProtocolFeesCollector",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 16287,
                          "src": "36887:21:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ProtocolFeesCollector_$16287",
                            "typeString": "contract ProtocolFeesCollector"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "36886:23:66"
                  },
                  "scope": 21266,
                  "src": "36828:82:66",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 21254,
                    "nodeType": "StructuredDocumentation",
                    "src": "36916:635:66",
                    "text": " @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\n error in some part of the system.\n The Vault can only be paused during an initial time period, after which pausing is forever disabled.\n While the contract is paused, the following features are disabled:\n - depositing and transferring internal balance\n - transferring external balance (using the Vault's allowance)\n - swaps\n - joining Pools\n - Asset Manager interactions\n Internal Balance can still be withdrawn, and Pools exited."
                  },
                  "functionSelector": "16c38b3c",
                  "id": 21259,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "setPaused",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21257,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21256,
                        "mutability": "mutable",
                        "name": "paused",
                        "nodeType": "VariableDeclaration",
                        "scope": 21259,
                        "src": "37575:11:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "typeName": {
                          "id": 21255,
                          "name": "bool",
                          "nodeType": "ElementaryTypeName",
                          "src": "37575:4:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "37574:13:66"
                  },
                  "returnParameters": {
                    "id": 21258,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "37596:0:66"
                  },
                  "scope": 21266,
                  "src": "37556:41:66",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "documentation": {
                    "id": 21260,
                    "nodeType": "StructuredDocumentation",
                    "src": "37603:58:66",
                    "text": " @dev Returns the Vault's WETH instance."
                  },
                  "functionSelector": "ad5c4648",
                  "id": 21265,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "WETH",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21261,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "37679:2:66"
                  },
                  "returnParameters": {
                    "id": 21264,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21263,
                        "mutability": "mutable",
                        "name": "",
                        "nodeType": "VariableDeclaration",
                        "scope": 21265,
                        "src": "37705:5:66",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IWETH_$21281",
                          "typeString": "contract IWETH"
                        },
                        "typeName": {
                          "id": 21262,
                          "name": "IWETH",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 21281,
                          "src": "37705:5:66",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IWETH_$21281",
                            "typeString": "contract IWETH"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "37704:7:66"
                  },
                  "scope": 21266,
                  "src": "37666:46:66",
                  "stateMutability": "view",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 21267,
              "src": "1151:36620:66"
            }
          ],
          "src": "688:37084:66"
        },
        "id": 66
      },
      "src.sol/amm/vault/interfaces/IWETH.sol": {
        "ast": {
          "absolutePath": "src.sol/amm/vault/interfaces/IWETH.sol",
          "exportedSymbols": {
            "IWETH": [
              21281
            ]
          },
          "id": 21282,
          "license": "GPL-3.0-or-later",
          "nodeType": "SourceUnit",
          "nodes": [
            {
              "id": 21268,
              "literals": [
                "solidity",
                "^",
                "0.7",
                ".0"
              ],
              "nodeType": "PragmaDirective",
              "src": "688:23:67"
            },
            {
              "absolutePath": "src.sol/amm/lib/openzeppelin/IERC20.sol",
              "file": "../../lib/openzeppelin/IERC20.sol",
              "id": 21269,
              "nodeType": "ImportDirective",
              "scope": 21282,
              "sourceUnit": 5096,
              "src": "713:43:67",
              "symbolAliases": [],
              "unitAlias": ""
            },
            {
              "abstract": false,
              "baseContracts": [
                {
                  "baseName": {
                    "id": 21271,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5095,
                    "src": "980:6:67",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$5095",
                      "typeString": "contract IERC20"
                    }
                  },
                  "id": 21272,
                  "nodeType": "InheritanceSpecifier",
                  "src": "980:6:67"
                }
              ],
              "contractDependencies": [
                5095
              ],
              "contractKind": "interface",
              "documentation": {
                "id": 21270,
                "nodeType": "StructuredDocumentation",
                "src": "758:202:67",
                "text": " @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\n sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals."
              },
              "fullyImplemented": false,
              "id": 21281,
              "linearizedBaseContracts": [
                21281,
                5095
              ],
              "name": "IWETH",
              "nodeType": "ContractDefinition",
              "nodes": [
                {
                  "functionSelector": "d0e30db0",
                  "id": 21275,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "deposit",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21273,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1009:2:67"
                  },
                  "returnParameters": {
                    "id": 21274,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1028:0:67"
                  },
                  "scope": 21281,
                  "src": "993:36:67",
                  "stateMutability": "payable",
                  "virtual": false,
                  "visibility": "external"
                },
                {
                  "functionSelector": "2e1a7d4d",
                  "id": 21280,
                  "implemented": false,
                  "kind": "function",
                  "modifiers": [],
                  "name": "withdraw",
                  "nodeType": "FunctionDefinition",
                  "parameters": {
                    "id": 21278,
                    "nodeType": "ParameterList",
                    "parameters": [
                      {
                        "constant": false,
                        "id": 21277,
                        "mutability": "mutable",
                        "name": "amount",
                        "nodeType": "VariableDeclaration",
                        "scope": 21280,
                        "src": "1053:14:67",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 21276,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "1053:7:67",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "src": "1052:16:67"
                  },
                  "returnParameters": {
                    "id": 21279,
                    "nodeType": "ParameterList",
                    "parameters": [],
                    "src": "1077:0:67"
                  },
                  "scope": 21281,
                  "src": "1035:43:67",
                  "stateMutability": "nonpayable",
                  "virtual": false,
                  "visibility": "external"
                }
              ],
              "scope": 21282,
              "src": "961:119:67"
            }
          ],
          "src": "688:393:67"
        },
        "id": 67
      }
    }
  }
}
